/* ============================================================
   AUDIOGUIA QUINTA DA REGALEIRA
   Design: refined, organic, heritage — inspirado no lugar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

:root {
  --verde-musgo:    #4a5c3f;
  --verde-escuro:   #2d3a26;
  --pedra:          #c8b89a;
  --pedra-clara:    #e8ddd0;
  --creme:          #f5f0e8;
  --branco:         #fdfcf9;
  --texto:          #2a2a22;
  --texto-suave:    #6b6558;
  --ouro:           #8a7140;
  --ouro-claro:     #b8975a;
  --sombra:         rgba(42,42,34,0.12);
  --sombra-forte:   rgba(42,42,34,0.25);

  --fonte-titulo:   'Cormorant Garamond', Georgia, serif;
  --fonte-corpo:    'Jost', sans-serif;

  --raio:           12px;
  --raio-pequeno:   8px;
  --transicao:      0.25s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--creme);
  color: var(--texto);
  font-family: var(--fonte-corpo);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- ECRÃ DE ENTRADA ---- */

#ecra-entrada {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--branco);
  position: relative;
  overflow: hidden;
}

#ecra-entrada::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('img/mapa.jpg');
  background-size: cover;
  background-position: center top;
  opacity: 0.08;
  pointer-events: none;
}

.entrada-logo {
  width: min(320px, 85vw);
  margin-bottom: 2.5rem;
  position: relative;
  animation: fadeUp 0.6s ease both;
}

.entrada-logo img {
  width: 100%;
  height: auto;
}

.entrada-subtitulo {
  font-family: var(--fonte-titulo);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--texto-suave);
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  animation: fadeUp 0.6s 0.1s ease both;
}

.entrada-idiomas {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(300px, 90vw);
  position: relative;
  animation: fadeUp 0.6s 0.2s ease both;
}

.btn-idioma {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--branco);
  border: 1.5px solid var(--pedra);
  border-radius: var(--raio);
  cursor: pointer;
  font-family: var(--fonte-corpo);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--texto);
  transition: all var(--transicao);
  box-shadow: 0 2px 8px var(--sombra);
  text-align: left;
}

.btn-idioma:hover, .btn-idioma:active {
  background: var(--verde-musgo);
  border-color: var(--verde-musgo);
  color: var(--creme);
  box-shadow: 0 4px 16px var(--sombra-forte);
  transform: translateY(-1px);
}

.btn-idioma .idioma-flag {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-idioma .idioma-nome {
  font-family: var(--fonte-titulo);
  font-size: 1.1rem;
  font-weight: 400;
}

.btn-idioma .idioma-native {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--texto-suave);
  font-style: italic;
}

.btn-idioma:hover .idioma-native {
  color: var(--pedra-clara);
}

.entrada-rodape {
  position: relative;
  margin-top: 3rem;
  text-align: center;
  animation: fadeUp 0.6s 0.3s ease both;
}

.entrada-rodape img {
  height: 28px;
  opacity: 0.4;
}

/* ---- HEADER ---- */

#header {
  background: #fdfcf9;
  border-bottom: 1px solid #e8ddd0;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(42,42,34,0.12);
}

#header .header-logo {
  height: 28px;
  width: auto;
}

#header .header-titulo {
  font-family: var(--fonte-titulo);
  font-size: 1rem;
  font-style: italic;
  color: var(--texto-suave);
  flex: 1;
}

#header .btn-idioma-atual {
  background: none;
  border: 1px solid var(--pedra);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-family: var(--fonte-corpo);
  color: var(--texto-suave);
  cursor: pointer;
  transition: all var(--transicao);
}

#header .btn-idioma-atual:hover {
  background: var(--pedra-clara);
}

/* ---- NAVEGAÇÃO ---- */

#nav-tabs {
  display: flex;
  background: #fdfcf9;
  border-bottom: 1px solid #e8ddd0;
}

#ecra-principal {
  padding-top: 100px;
}



.nav-tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-family: var(--fonte-corpo);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto-suave);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2.5px solid transparent;
  transition: all var(--transicao);
}

.nav-tab.ativo {
  color: var(--verde-musgo);
  border-bottom-color: var(--verde-musgo);
}

/* ---- ECRÃ DO MAPA ---- */

#ecra-mapa {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

#mapa-container {
  position: relative;
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--pedra-clara);
  touch-action: pan-x pan-y;
  display: block;
}

#ecra-mapa {
  overflow: hidden;
}

#mapa-img {
  display: block;
  width: 100%;
  min-width: 320px;
  user-select: none;
  pointer-events: none;
}

#mapa-pins {
  position: absolute;
  inset: 0;
}

.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
}

.pin-circulo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--verde-musgo);
  border: 2.5px solid var(--branco);
  box-shadow: 0 2px 8px var(--sombra-forte);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transicao);
}

.pin-numero {
  font-family: var(--fonte-corpo);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--branco);
  line-height: 1;
}

.pin:hover .pin-circulo,
.pin:active .pin-circulo {
  background: var(--ouro);
  transform: scale(1.2);
  box-shadow: 0 4px 12px var(--sombra-forte);
}

/* ---- ECRÃ DE LISTA ---- */

#ecra-lista {
  padding: 1rem;
}

.lista-secao-titulo {
  font-family: var(--fonte-titulo);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--verde-escuro);
  padding: 1rem 0 0.5rem;
  border-bottom: 1px solid var(--pedra-clara);
  margin-bottom: 0.75rem;
}

.lista-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--pedra-clara);
  cursor: pointer;
  transition: background var(--transicao);
  border-radius: var(--raio-pequeno);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.lista-item:hover, .lista-item:active {
  background: var(--pedra-clara);
}

.lista-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--verde-musgo);
  color: var(--branco);
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lista-item.desativado .lista-num {
  background: var(--pedra);
}

.lista-item.desativado {
  opacity: 0.5;
  cursor: default;
}

.lista-info {
  flex: 1;
  min-width: 0;
}

.lista-titulo {
  font-family: var(--fonte-titulo);
  font-size: 1.05rem;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lista-local {
  font-size: 0.78rem;
  color: var(--texto-suave);
  margin-top: 0.1rem;
}

.lista-seta {
  color: var(--pedra);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---- ECRÃ DO PONTO ---- */

#ecra-ponto {
  min-height: 100vh;
  background: var(--branco);
  display: none;
  flex-direction: column;
}

#ecra-ponto.visivel {
  display: flex;
}

.ponto-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--branco);
  border-bottom: 1px solid var(--pedra-clara);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px var(--sombra);
}

.btn-voltar {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--verde-musgo);
  padding: 0.25rem;
  line-height: 1;
}

.ponto-num-header {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--verde-musgo);
  color: var(--branco);
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ponto-header-titulo {
  font-family: var(--fonte-titulo);
  font-size: 1rem;
  font-style: italic;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ponto-corpo {
  flex: 1;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ponto-titulo-grande {
  font-family: var(--fonte-titulo);
  font-size: 2rem;
  font-weight: 300;
  color: var(--verde-escuro);
  line-height: 1.2;
}

.ponto-localizacao {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--texto-suave);
  font-style: italic;
}

/* ---- PLAYER DE ÁUDIO ---- */

.player-container {
  background: var(--creme);
  border-radius: var(--raio);
  padding: 1.25rem;
  border: 1px solid var(--pedra-clara);
}

.player-sem-audio {
  text-align: center;
  padding: 1.5rem;
  color: var(--texto-suave);
  font-size: 0.85rem;
  font-style: italic;
}

audio {
  width: 100%;
  height: 44px;
  outline: none;
  border-radius: var(--raio-pequeno);
  accent-color: var(--verde-musgo);
}

audio::-webkit-media-controls-panel {
  background: var(--creme);
}

.player-label {
  font-size: 0.75rem;
  color: var(--texto-suave);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ponto-texto {
  font-size: 0.95rem;
  color: var(--texto);
  line-height: 1.75;
  font-weight: 300;
}

.ponto-nav-inferior {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem 2rem;
  border-top: 1px solid var(--pedra-clara);
}

.btn-nav-ponto {
  flex: 1;
  padding: 0.85rem;
  border-radius: var(--raio);
  border: 1.5px solid var(--pedra);
  background: var(--branco);
  font-family: var(--fonte-corpo);
  font-size: 0.82rem;
  color: var(--texto);
  cursor: pointer;
  transition: all var(--transicao);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-nav-ponto:hover {
  background: var(--verde-musgo);
  border-color: var(--verde-musgo);
  color: var(--branco);
}

.btn-nav-ponto:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ---- UTILITÁRIOS ---- */

.oculto { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeUp 0.35s ease both;
}

/* ---- RESPONSIVO ---- */

@media (min-width: 480px) {
  .pin-circulo {
    width: 32px;
    height: 32px;
  }
  .pin-numero {
    font-size: 0.72rem;
  }
}

/* ---- CARROSSEL DE FOTOS ---- */

.carrossel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--raio);
  background: var(--pedra-clara);
  aspect-ratio: 4/3;
}

.carrossel-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.carrossel-slide {
  min-width: 100%;
  height: 100%;
}

.carrossel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carrossel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(253,252,249,0.85);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  color: var(--verde-escuro);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 6px var(--sombra);
}

.carrossel-btn.esq { left: 8px; }
.carrossel-btn.dir { right: 8px; }

.carrossel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.carrossel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(253,252,249,0.6);
  cursor: pointer;
  transition: background var(--transicao);
}

.carrossel-dot.ativo {
  background: var(--branco);
}

#topo-fixo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fdfcf9;
  display: block;
}