:root {
  --verde: #16A34A;
  --verde-escuro: #0F6B32;
  --vermelho: #E11D2E;
  --amarelo: #FFC72C;
  --grafite: #14181B;
  --grafite-claro: #E8E1D3;
  --creme: #FFF8EE;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 112px; /* fallback; script.js mede a altura real e sobrescreve */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--creme);
  color: var(--grafite);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.site-header.is-scrolled {
  background: var(--creme);
  border-bottom-color: var(--grafite-claro);
  box-shadow: 0 2px 10px rgba(20, 24, 27, 0.08);
}
.site-header .nav-links a { transition: color 0.2s ease; }
body[data-hero="dark"] .site-header:not(.is-scrolled) .nav-links a {
  color: var(--creme);
}
body:not([data-hero="dark"]) main {
  padding-top: var(--header-h);
}
.nav {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.75rem 1.25rem; position: relative;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.logo-icon { display: block; width: 180px; height: auto; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.nav-links a { padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav-links a.active, .nav-links a:hover { border-color: var(--amarelo); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid rgba(20, 24, 27, 0.15);
  background: rgba(255, 255, 255, 0.22); border-radius: 12px; cursor: pointer; padding: 0.6rem;
  align-items: center; justify-content: center; flex-direction: column; gap: 0.28rem;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--grafite);
}
.header-search { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 0.75rem; display: flex; gap: 0.5rem; }
.header-search input {
  flex: 1; padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid var(--grafite-claro);
  font: inherit; background: var(--creme); color: var(--grafite);
}
.header-search button {
  background: var(--verde); color: var(--creme); border: none; border-radius: 999px;
  padding: 0.5rem 0.9rem; cursor: pointer; font-size: 1rem;
}

.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: 999px;
  font-weight: 600; border: none; cursor: pointer; font-size: 1rem;
}
.btn-primary { background: var(--amarelo); color: var(--grafite); }
.btn-whatsapp { background: var(--verde); color: var(--creme); }
.btn:hover { filter: brightness(1.1); }

.floating-help {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 0.0875rem;
  pointer-events: none;
}
.floating-help__bubble {
  position: relative; z-index: 1; margin-bottom: -0.7rem;
  pointer-events: auto; display: inline-flex; align-items: center; justify-content: center;
  background: var(--creme); color: var(--grafite); border: 1px solid rgba(20, 24, 27, 0.08);
  border-radius: 999px; padding: 0.7rem 1rem; font-weight: 700; font-size: 0.88rem;
  box-shadow: 0 10px 24px rgba(20, 24, 27, 0.14);
}
.floating-help__mascot {
  position: relative; z-index: 0;
  width: 144px; height: 144px; object-fit: contain; pointer-events: auto;
}
.floating-help__video-source {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.floating-help__wa {
  position: relative; z-index: 1; margin-top: -0.7rem;
  width: 58px; height: 58px; display: grid; place-items: center;
  background: var(--verde); border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.8);
  pointer-events: auto;
  transition: transform 0.2s ease;
}
.floating-help__wa:hover { transform: translateY(-2px) scale(1.02); }
.floating-help__wa img { width: 26px; height: 26px; filter: brightness(0) invert(1); }

@media (max-width: 640px) {
  .floating-help {
    right: 0.75rem; bottom: 0.75rem; gap: 0.05rem; align-items: center;
  }
  .floating-help__bubble { font-size: 0.75rem; padding: 0.55rem 0.8rem; }
  .floating-help__mascot { width: 115.2px; height: 115.2px; }
  .floating-help__wa { width: 52px; height: 52px; }
}

.hero {
  position: relative; height: 80vh; min-height: 420px; overflow: hidden;
  background: linear-gradient(160deg, var(--grafite) 0%, var(--verde-escuro) 60%, var(--vermelho) 130%);
}
.hero-media { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(20, 24, 27, 0.35);
}
.hero-content {
  position: relative; z-index: 1; max-width: 700px; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 1rem; padding: 0 1.25rem;
  color: var(--creme);
}
.hero-content h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin: 0; }
.hero-content p { font-size: 1.1rem; margin: 0; }

.about-teaser { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.featured-costa {
  padding: 2rem 1.25rem; background-size: cover; background-position: center; background-repeat: no-repeat;
  color: var(--creme);
}
.featured-costa-inner { max-width: 1100px; margin: 0 auto; }
.featured-costa blockquote { border-left: 3px solid var(--amarelo); padding-left: 1rem; font-style: italic; opacity: 0.9; margin-left: 0; }
.tour-carousel-section { padding: 1.5rem 0 1rem; }
.carousel-wrap { position: relative; max-width: 1100px; margin: 1.5rem auto 0; padding: 0 1.25rem; }
.tour-carousel {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem; scroll-behavior: smooth;
}
.tour-carousel .tour-card { flex: 0 0 280px; scroll-snap-align: start; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--creme); color: var(--grafite); font-size: 1.5rem; line-height: 1;
  box-shadow: 0 2px 8px rgba(20, 24, 27, 0.2);
}
.carousel-prev { left: 0.25rem; }
.carousel-next { right: 0.25rem; }

.filter-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--verde); color: var(--creme); border: none; border-radius: 999px;
  padding: 0.6rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer;
  max-width: 1100px; margin: 1.5rem auto 1.5rem; width: calc(100% - 2.5rem);
}
.filter-panel {
  max-width: 1100px; margin: 0 auto; padding: 0 1.25rem;
  max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
}
.filter-panel.is-open { max-height: 600px; margin-top: 1rem; }
.filter-group { margin-bottom: 1rem; }
.filter-group h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.7; margin: 0 0 0.5rem; }
.filter-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-option {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--grafite-claro); border-radius: 999px; padding: 0.4rem 0.9rem;
  cursor: pointer; font-size: 0.9rem;
}
.filter-option input { margin: 0; }

.tours-grid {
  max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 3rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem;
}

.site-footer { border-top: 1px solid var(--grafite-claro); padding: 1rem 1.25rem; margin-top: 1rem; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 1.5rem; font-size: 0.9rem; opacity: 0.9;
}
.footer-contact a { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.25rem; }
.site-footer .logo-icon { width: 180px; height: auto; }
.footer-icon { width: 18px; height: 18px; flex: 0 0 18px; }

.page-content { max-width: 800px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.page-content h2 { color: var(--verde); }
.values-list, .reasons-list { padding-left: 1.2rem; }

.roteiro-hero {
  min-height: 320px; padding: 3rem 1.25rem 2rem; display: flex; align-items: flex-end;
  background-size: cover; background-position: center; background-repeat: no-repeat; color: var(--creme);
}
.roteiro-hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.roteiro-hero h1 { margin: 0.5rem 0 0.25rem; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.roteiro-body { max-width: 800px; margin: 0 auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.roteiro-video { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.roteiro-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.roteiro-map { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.roteiro-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }

.gallery { display: flex; gap: 0.75rem; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; }

.roteiro-carousel-wrap {
  position: relative; width: 100vw;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
.roteiro-carousel {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 10px 0 20px 0;
  -webkit-overflow-scrolling: touch; align-items: center;
}

.roteiro-hero, .gallery-item { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 24, 27, 0.92);
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
  touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform 0.2s ease;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem; background: none; border: none;
  color: var(--creme); font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 101;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.15); color: var(--creme); font-size: 1.8rem; line-height: 1;
  display: none;
}
.lightbox.has-multiple .lightbox-prev, .lightbox.has-multiple .lightbox-next { display: block; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.deslocamento-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0; }
.deslocamento-stat {
  background: var(--grafite-claro); border-radius: 12px; padding: 0.75rem 1rem;
  display: flex; flex-direction: column; gap: 0.15rem; min-width: 140px;
}
.deslocamento-icon { font-size: 1.3rem; }
.deslocamento-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.7; }
.deslocamento-value { font-weight: 700; font-size: 0.95rem; }

.roteiro-opcoes {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(22, 163, 74, 0.05);
  border: 1px solid rgba(22, 163, 74, 0.15);
}
.roteiro-opcoes h2 { margin-top: 0; }
.roteiro-item {
  padding: 1rem 0;
  border-top: 1px solid rgba(20, 24, 27, 0.08);
}
.roteiro-item:first-child { border-top: none; padding-top: 0; }
.roteiro-item h3 { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--verde-escuro); }
.roteiro-subtitulo { margin: 0 0 0.5rem; font-weight: 700; color: var(--grafite); }
.roteiro-detalhe { margin: 0.35rem 0; }
.roteiro-opcoes-list { margin: 0.75rem 0 0; padding-left: 1.2rem; }

.roteiro-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.roteiro-card-stat {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--creme); border: 1px solid rgba(20, 24, 27, 0.08);
  border-radius: 12px; padding: 0.8rem 0.9rem;
  min-height: 110px;
}
.roteiro-card-label {
  display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: rgba(20, 24, 27, 0.7); font-weight: 700;
}
.roteiro-card-value {
  display: block; font-size: 0.98rem; line-height: 1.4; font-weight: 600; color: var(--grafite);
}

/* ============================================ */
/* CARDS COM OVERLAY (Texto sobre a foto) 9:16  */
/* ============================================ */
.tour-card {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
body[data-page="passeios"] .tours-grid .tour-card {
  aspect-ratio: 1 / 1;
}

.tour-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.tour-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: transparent;
  transition: transform 0.5s ease;
  transform: scale(1.02);
}

.tour-cover--fallback {
  background: rgba(20, 24, 27, 0.08);
}

.tour-card:hover .tour-cover {
  transform: scale(1.08);
}

.tour-card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 16px 16px 16px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0.08) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.tour-card-body h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  line-height: 1.2;
}

.tour-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

/* ============================================ */
/* CARROSSEL ADAPTATIVO (Galeria de passeios)   */
/* ============================================ */
.gallery-item {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  scroll-snap-align: center;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img,
.gallery-item video {
  max-width: min(82vw, 900px);
  max-height: 72vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}

.gallery-item iframe {
  width: min(82vw, 900px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
}

/* ============================================ */
/* RESPONSIVO (Mobile)                          */
/* ============================================ */
@media (max-width: 760px) {
  .nav {
    flex-wrap: wrap;
    align-items: center;
  }
  .logo-icon { width: 150px; }
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  .nav-links {
    display: none; width: 100%; flex-direction: column; gap: 0.5rem;
    padding: 0.75rem 0 0.25rem; font-size: 0.95rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    display: block; width: 100%; padding: 0.5rem 0.75rem; border-radius: 10px; border: 1px solid rgba(20, 24, 27, 0.08);
    background: rgba(255, 255, 255, 0.35);
  }
  .nav-links a.active, .nav-links a:hover { border-color: var(--amarelo); }
}

@media (max-width: 640px) {
  .hero { height: 87.5vh; }
  .hero::after {
    background: rgba(20, 24, 27, 0.15);
  }
  .carousel-nav { display: none; }
  .roteiro-hero { min-height: 60vh; }
  .page-content, .roteiro-body { text-align: center; }
  .page-content .values-list,
  .page-content .reasons-list,
  .roteiro-body .tour-highlights {
    text-align: left; display: inline-block; margin-left: auto; margin-right: auto;
  }
  .deslocamento-stats { justify-content: center; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-inner .logo { justify-content: center; }
  .footer-contact a { text-align: center; justify-content: center; }
}