/* ============================================================
   Jal Chantre TOUR — Design system
   Paleta inspirada em Cabo Verde: oceano, vulcão, terracota, areia
   ============================================================ */

:root {
    --color-ocean-900: #0b2e3c;
    --color-ocean-700: #145169;
    --color-ocean-500: #1d7096;
    --color-volcanic-900: #14181a;
    --color-volcanic-700: #262e2c;
    --color-sand-100: #faf6ee;
    --color-sand-200: #f1e8d8;
    --color-sand-300: #e6d8bd;
    --color-terracotta-500: #c9663b;
    --color-terracotta-600: #ab5029;
    --color-ocre-400: #d99a44;
    --color-white: #ffffff;

    --color-text: #202b28;
    --color-text-muted: #5c6b66;
    --color-text-on-dark: #f5f2ea;
    --color-text-on-dark-muted: #c9d3ce;

    --color-bg: var(--color-sand-100);
    --color-surface: var(--color-white);
    --color-border: #e4dcc9;

    --font-heading: "Fraunces", "Georgia", serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 3px rgba(20, 24, 26, 0.08);
    --shadow-md: 0 8px 24px rgba(20, 24, 26, 0.12);
    --shadow-lg: 0 20px 48px rgba(20, 24, 26, 0.18);

    --container-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.15;
    margin: 0 0 0.5em;
    font-weight: 600;
    color: var(--color-volcanic-900);
}

h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
a { color: var(--color-ocean-700); text-decoration: none; }
a:hover { color: var(--color-terracotta-600); }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }
.section--dark {
    background: var(--color-ocean-900);
    color: var(--color-text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3 {
    color: var(--color-text-on-dark);
}
.section--sand { background: var(--color-sand-200); }

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-terracotta-500);
    margin-bottom: 0.75em;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
    background: var(--color-terracotta-500);
    color: var(--color-white);
}
.btn-primary:hover { background: var(--color-terracotta-600); color: var(--color-white); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border-color: currentColor;
    color: var(--color-ocean-900);
}
.btn-outline:hover { background: var(--color-ocean-900); color: var(--color-white); }
.section--dark .btn-outline { color: var(--color-white); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-danger { background: #a63d3d; color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--color-border);
}
/* O desfoque vive num pseudo-elemento, não no .site-header em si: "backdrop-filter"
   diretamente no header criaria um "containing block" novo para os seus descendentes
   position:fixed (ex. .main-nav no mobile), fazendo o painel do menu ficar preso à
   altura do header (~80px) em vez de ocupar o ecrã inteiro. */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(250, 246, 238, 0.92);
    backdrop-filter: blur(8px);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}
.brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-ocean-900);
}
.brand span { color: var(--color-terracotta-500); }

.brand--logo { display: inline-flex; align-items: center; }
.brand__logo { height: 48px; width: auto; display: block; }
.brand--footer .brand__logo {
    height: 56px;
    background: var(--color-sand-100);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
    color: var(--color-volcanic-900);
    font-weight: 600;
    font-size: 0.95rem;
}
.main-nav a:hover { color: var(--color-terracotta-500); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; line-height: 1; }

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 16, 0.5);
    /* Tem de ficar ABAIXO de 50 (z-index do .site-header): .main-nav é descendente do
       header, por isso o seu z-index:70 só é comparado dentro do stacking context criado
       pelo header (position:sticky + z-index) — contra o backdrop, que é irmão do header
       no DOM, só o z-index do próprio .site-header conta. Um valor >= 50 aqui fazia o
       backdrop ficar visualmente por cima dos links do menu, "roubando" os cliques. */
    z-index: 45;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.nav-backdrop.is-open { display: block; opacity: 1; }

.header-cta { display: flex; align-items: center; gap: 14px; }
.whatsapp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #22a752;
    color: #fff;
    padding: 9px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}
.whatsapp-pill:hover { background: #1c8a43; color: #fff; }

@media (max-width: 880px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 82vw);
        background: var(--color-ocean-900);
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 32px;
        gap: 20px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        z-index: 70;
        overflow-y: auto;
    }
    .main-nav.is-open { transform: translateX(0); }
    .main-nav a { color: var(--color-text-on-dark); font-size: 1.1rem; }
    .nav-toggle { display: block; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.82rem; color: var(--color-text-muted); padding-top: 16px; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-ocean-700); }
.breadcrumb__sep { margin: 0 6px; opacity: 0.6; }

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--color-ocean-900); padding: 32px 0; }
.stats-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-strip__num { font-family: var(--font-heading); font-size: 2rem; color: var(--color-white); line-height: 1; }
.stats-strip__label { font-size: 0.8rem; color: var(--color-text-on-dark-muted); margin-top: 6px; }
@media (max-width: 700px) { .stats-strip__grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; } }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;
    color: var(--color-white);
    background: linear-gradient(180deg, rgba(11, 46, 60, 0.55), rgba(11, 46, 60, 0.75)), center/cover no-repeat var(--hero-img, none);
}
.hero__content { max-width: 700px; }
.hero h1, .hero h2, .hero h3 { color: var(--color-white); }
.hero p.lead { font-size: 1.15rem; color: var(--color-text-on-dark); max-width: 560px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.next-departure { font-size: 0.85rem; color: var(--color-terracotta-600); margin: 0 0 14px; }

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--color-sand-200);
    color: var(--color-ocean-900);
}
.badge--accent { background: var(--color-terracotta-500); color: #fff; }

/* ---------- Testimonials ---------- */
.testimonial {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.testimonial__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin: -28px -28px 20px;
    width: calc(100% + 56px);
}
.testimonial__stars { color: var(--color-ocre-400); margin-bottom: 10px; }
.testimonial__author { font-weight: 700; margin-top: 14px; }

/* ---------- Itinerary ---------- */
.itinerary-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 16px 0 4px;
    padding-bottom: 6px;
}
.itinerary-nav a {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--color-sand-200);
    color: var(--color-ocean-900);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.itinerary-nav a:hover { background: var(--color-terracotta-500); color: #fff; }
.itinerary-day {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border);
    scroll-margin-top: 90px;
}
.itinerary-day__num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-terracotta-500);
}
.itinerary-day__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; color: var(--color-text-muted); margin-top: 10px; }
@media (max-width: 600px) { .itinerary-day { grid-template-columns: 1fr; } }

/* ---------- Circuit detail layout ---------- */
.circuit-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .circuit-layout { grid-template-columns: 1fr; } }

/* ---------- Pricing box ---------- */
.pricing-box {
    background: var(--color-ocean-900);
    color: var(--color-text-on-dark);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: sticky;
    top: 100px;
}
@media (max-width: 900px) { .pricing-box { position: static; } }

.jal-portrait { border-radius: var(--radius-lg); position: sticky; top: 100px; }
@media (max-width: 900px) { .jal-portrait { position: static; } }
.pricing-box .price { font-family: var(--font-heading); font-size: 2.6rem; }
.pricing-box .price small { font-size: 1rem; font-weight: 400; color: var(--color-text-on-dark-muted); }
.pricing-box ul { list-style: none; padding: 0; margin: 18px 0; }
.pricing-box li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 0.9rem; }

.departure-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
}
.departure-option input { margin-right: 10px; }
.departure-option.is-full { opacity: 0.45; pointer-events: none; }

/* ---------- Mobile booking bar ---------- */
.mobile-booking-bar { display: none; }
.mobile-booking-bar-spacer { display: none; }
@media (max-width: 900px) {
    .mobile-booking-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-ocean-900);
        color: var(--color-text-on-dark);
        padding: 14px 20px;
        z-index: 90;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    }
    .mobile-booking-bar .price { font-family: var(--font-heading); font-size: 1.4rem; line-height: 1; white-space: nowrap; }
    .mobile-booking-bar .price small { display: block; font-size: 0.68rem; font-weight: 400; color: var(--color-text-on-dark-muted); }
    .mobile-booking-bar-spacer { display: block; height: 90px; }
    /* Evita que a barra fixa tape o fundo do footer ao fazer scroll até ao fim. */
    body:has(.mobile-booking-bar) .site-footer { padding-bottom: 90px; }
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
}
.form-control:focus { outline: 2px solid var(--color-ocean-500); outline-offset: 1px; }
textarea.form-control { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-error { color: #a63d3d; font-size: 0.82rem; margin-top: 4px; }
.form-help { color: var(--color-text-muted); font-size: 0.82rem; margin-top: 4px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: #e3f3e6; color: #1c6b31; }
.alert-error { background: #fbe6e2; color: #a63d3d; }
.alert-info { background: var(--color-sand-200); color: var(--color-ocean-900); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-volcanic-900); color: var(--color-text-on-dark); padding: 64px 0 28px; }
.site-footer a { color: var(--color-text-on-dark-muted); }
.site-footer a:hover { color: var(--color-terracotta-500); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; margin-bottom: 40px; }
.footer-grid > div { min-width: 0; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.newsletter-form { display: flex; gap: 8px; min-width: 0; }
.newsletter-form input { min-width: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: var(--color-text-on-dark-muted); }
.social-links { display: flex; gap: 14px; align-items: center; }
.social-links a { display: inline-flex; color: var(--color-text-on-dark-muted); transition: color 0.15s ease; }
.social-links a:hover { color: var(--color-terracotta-500); }
.social-links svg { display: block; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--color-text-muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.quote-banner {
    text-align: center;
    padding: 90px 0;
    background: var(--color-sand-200);
}
.quote-banner blockquote { font-family: var(--font-heading); font-size: clamp(1.4rem, 2vw + 1rem, 2.2rem); max-width: 780px; margin: 0 auto 16px; }

/* ---------- Galerie & Lightbox ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.gallery-item {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:focus-visible { outline: 3px solid var(--color-ocean-500); outline-offset: 2px; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 16, 0.92);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.lightbox__close, .lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox__close { top: 20px; right: 20px; width: 44px; height: 44px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
@media (max-width: 640px) {
    .lightbox__nav { width: 40px; height: 40px; font-size: 1.1rem; }
    .lightbox__close { width: 36px; height: 36px; }
}

/* ==========================================================================
   Wandr Footer Bar — "Digital system developed by wandr"
   Drop-in attribution bar, framework-agnostic, no build step required.
   ========================================================================== */
.wandr-bar {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.2);
}
.wandr-bar--light {
    border-top-color: rgba(11, 18, 32, 0.08);
    background-color: rgba(11, 18, 32, 0.03);
}
.wandr-bar__container {
    margin: 0 auto;
    width: 100%;
    max-width: 72rem;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}
@media (min-width: 640px) { .wandr-bar__container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .wandr-bar__container { padding: 0 2rem; } }
.wandr-bar__link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    font-family: inherit;
    font-size: 0.75rem;
    line-height: 1rem;
    text-decoration: none;
    color: rgba(238, 241, 245, 0.5);
    transition: color 150ms ease;
}
.wandr-bar__link:hover { color: rgba(238, 241, 245, 0.8); }
.wandr-bar--light .wandr-bar__link { color: rgba(11, 18, 32, 0.45); }
.wandr-bar--light .wandr-bar__link:hover { color: rgba(11, 18, 32, 0.75); }
.wandr-bar__logo { height: 1rem; width: auto; opacity: 0.9; display: inline-block; }

/* ---------- Booking wizard ---------- */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
    position: relative;
}
.wizard-progress::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}
.wizard-progress__step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}
.wizard-progress__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.wizard-progress__label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 600;
}
.wizard-progress__step.is-active .wizard-progress__num {
    background: var(--color-terracotta-500);
    border-color: var(--color-terracotta-500);
    color: #fff;
}
.wizard-progress__step.is-active .wizard-progress__label { color: var(--color-volcanic-900); }
.wizard-progress__step.is-done .wizard-progress__num {
    background: var(--color-ocean-900);
    border-color: var(--color-ocean-900);
    color: #fff;
}

.wizard-step { display: none; animation: wizard-fade 0.25s ease; }
.wizard-step.is-active { display: block; }
@keyframes wizard-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.wizard-summary { margin-bottom: 18px; }
.wizard-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}
.wizard-summary__row span { color: var(--color-text-muted); }
