/* ================================================================
   La Cocina de la Familia Cejas — style.css
   Brand Kit: Bolivian Identity + Premium Travel Experience
   ================================================================ */

/* === CSS Custom Properties (Brand + Bolivia Tokens) === */
:root {
    /* --- New Brand Colors --- */
    --color-guindo:      #6B1D2B;
    --color-guindo-dark: #4A1320;
    --color-guindo-bright:#8B2438;
    --color-acento:      #855E40;
    --color-acento-light:#E6D6C8;
    --color-verde:       #3D6B45;
    --color-verde-light: #E4EFE6;
    --color-negro:       #141010;
    --color-blanco:      #FFFFFF;

    /* --- Bolivia Flag Colors --- */
    --bolivia-red:      #D52B1E;
    --bolivia-yellow:   #F4E400;
    --bolivia-green:    #007934;

    /* --- Chuquisaca Colors --- */
    --chuquisaca-red:   #C41E3A;
    --chuquisaca-white: #FFFFFF;

    /* --- Wiphala Colors --- */
    --wiphala-red:      #D52B1E;
    --wiphala-orange:   #F77F00;
    --wiphala-yellow:   #F4E400;
    --wiphala-white:    #FFFFFF;
    --wiphala-green:    #007934;
    --wiphala-blue:     #0038A8;
    --wiphala-violet:   #6A0DAD;

    /* --- Typography --- */
    --font-display: "Playfair Display", Georgia, serif;
    --font-body:    "Open Sans", system-ui, sans-serif;

    /* --- Spacing & Shape --- */
    --radius-pill:  9999px;
    --radius-card:  1.25rem;
    --shadow-card:  0 4px 24px rgba(0,0,0,0.09);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.16);
    --transition:   all 0.35s ease;
}

/* ================================================================
   BASE RESET
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background-color: var(--color-blanco);
    color: var(--color-negro);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0; padding: 0;
}

img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-blanco); }
::-webkit-scrollbar-thumb { background: var(--color-guindo); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-guindo-dark); }

::selection { background: var(--color-acento); color: var(--color-blanco); }

/* ================================================================
   BOLIVIAN DESIGN ELEMENTS
   ================================================================ */

/* --- Tricolor Bolivia Stripe (top of every page) --- */
.bolivia-stripe {
    display: flex;
    height: 6px;
    width: 100%;
}
.bolivia-stripe span {
    flex: 1;
}
.bolivia-stripe .stripe-red    { background: var(--bolivia-red); }
.bolivia-stripe .stripe-yellow { background: var(--bolivia-yellow); }
.bolivia-stripe .stripe-green  { background: var(--bolivia-green); }

/* --- Chuquisaca Divider (between sections) --- */
.chuquisaca-divider {
    display: flex;
    height: 4px;
    width: 100%;
    overflow: hidden;
}
.chuquisaca-divider span:nth-child(odd)  { flex: 1; background: var(--chuquisaca-red); }
.chuquisaca-divider span:nth-child(even) { flex: 1; background: var(--chuquisaca-white); }

/* Narrow centered decorative version */
.andean-rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 1.5rem;
    width: fit-content;
}
.andean-rule__line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--bolivia-red), var(--bolivia-yellow), var(--bolivia-green));
    border-radius: 2px;
}

/* --- Andean Diamond Pattern — Bolivia flag colors only (red, yellow, green) --- */
/* Inspired by traditional Bolivian textiles (aguayo). NOT rainbow. */
.wiphala-bg {
    position: relative;
}
.wiphala-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Diagonal stripe pattern: only Bolivia Red, Yellow, Green — like an aguayo textile */
    background-image:
        repeating-linear-gradient(
            -45deg,
            var(--bolivia-red)    0px 3px,
            transparent           3px 18px,
            var(--bolivia-yellow) 18px 21px,
            transparent           21px 36px,
            var(--bolivia-green)  36px 39px,
            transparent           39px 54px
        );
    background-size: 54px 54px;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}
.wiphala-bg > * { position: relative; z-index: 1; }

/* --- Andean Diamond Border (decorative SVG line) --- */
.andean-border-top {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.andean-border-top svg {
    display: block;
    width: 100%;
}

/* --- Andean Geometric Card Accent --- */
.andean-card-accent {
    position: absolute;
    top: 0; right: 0;
    width: 80px;
    height: 80px;
    opacity: 0.12;
    background-image:
        repeating-linear-gradient(45deg,
            var(--bolivia-red)    0 8px,
            var(--bolivia-yellow) 8px 16px,
            var(--bolivia-green)  16px 24px,
            transparent           24px 32px
        );
    border-radius: 0 var(--radius-card) 0 0;
}

/* ================================================================
   NAVBAR — Transparent on hero → Solid on scroll
   ================================================================ */
#navbar {
    background: transparent;
    transition: top 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    top: 0 !important;
    background: rgba(247, 245, 240, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 24px rgba(0,0,0,0.09);
}

/* Link colors: transparent vs. scrolled */
#navbar:not(.scrolled) .nav-anchor { color: rgba(255,255,255,0.85); }
#navbar:not(.scrolled) .nav-anchor:hover { color: #fff; }
#navbar.scrolled       .nav-anchor { color: var(--color-negro); }
#navbar.scrolled       .nav-anchor:hover { color: var(--color-guindo); }

#navbar:not(.scrolled) #logo-name { color: var(--color-acento); }
#navbar.scrolled       #logo-name { color: var(--color-guindo); }

/* Active nav link indicator */
.nav-anchor.active-page {
    color: var(--color-acento) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--color-acento);
    padding-bottom: 2px;
}

/* Hamburger bars */
#navbar:not(.scrolled) .hamburger-bar { background: white; }
#navbar.scrolled       .hamburger-bar { background: var(--color-guindo); }

/* Hamburger open state */
#hamburger-btn.open .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#hamburger-btn.open .hamburger-bar:nth-child(2) {
    opacity: 0; transform: scaleX(0);
}
#hamburger-btn.open .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 1.5rem;
}

/* ================================================================
   SCROLL-REVEAL ANIMATIONS
   ================================================================ */
.reveal-element {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   TYPOGRAPHY HELPERS
   ================================================================ */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--color-guindo);
    display: block;
    margin-bottom: 0.5rem;
}

/* ================================================================
   POLAROID FRAMES
   ================================================================ */
.polaroid-frame {
    background: white;
    padding: 10px 10px 36px;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}
.polaroid-frame:hover {
    transform: rotate(0deg) scale(1.04) !important;
    box-shadow: 0 24px 60px rgba(0,0,0,0.22);
}

/* ================================================================
   VALUE CHIPS
   ================================================================ */
.value-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-blanco);
    border: 1px solid rgba(107,29,43,0.12);
    border-radius: var(--radius-card);
    padding: 0.875rem 1rem;
    transition: var(--transition);
}
.value-chip:hover {
    border-color: var(--color-guindo);
    background: var(--color-acento-light);
    transform: translateX(4px);
}

/* ================================================================
   CLASS / SERVICE CARDS
   ================================================================ */
.service-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.service-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-6px);
    box-shadow: 0 24px 56px rgba(0,0,0,0.3);
}
.service-card--featured {
    border-color: var(--color-acento);
    box-shadow: 0 0 0 1px var(--color-acento), 0 8px 32px rgba(133,94,64,0.2);
}
.service-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 210px;
}
.service-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}
.service-card:hover .service-card-img {
    transform: scale(1.06);
}
.service-card-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(45,45,45,0.75);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
}
.service-card-body {
    padding: 1.6rem;
}
.card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}
.card-cta:hover { background: white; color: var(--color-guindo); border-color: white; }
.card-cta--featured { background: var(--color-acento); border-color: var(--color-acento); color: white; }
.card-cta--featured:hover { background: #684830; border-color: #684830; color: white; }

/* ================================================================
   GALLERY (Interactive Accordion)
   ================================================================ */
.gallery-accordion {
    display: flex;
    gap: 0.5rem;
    height: 480px; /* Base height for desktop */
    width: 100%;
}

.gallery-item {
    position: relative;
    flex: 1; /* All items start with equal narrow width */
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s ease;
}

/* Expand the hovered item, shrink the others */
.gallery-accordion:hover .gallery-item {
    flex: 0.7; /* Don't shrink the others as much */
}
.gallery-accordion .gallery-item:hover {
    flex: 2.5; /* Don't expand as much (prevents extreme cropping of vertical photos) */
}

/* Mobile: change flex direction so they accordion vertically */
@media (max-width: 768px) {
    .gallery-accordion { 
        height: 70vh; 
        flex-direction: column; 
    }
    .gallery-accordion:hover .gallery-item { flex: 0.8; }
    .gallery-accordion .gallery-item:hover { flex: 2; }
}

.gallery-img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.gallery-item:hover .gallery-img { 
    transform: scale(1.02); /* Much softer zoom */
}

.gallery-overlay {
    position: absolute; 
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 40%);
    display: flex; 
    align-items: flex-end; 
    padding: 1.5rem;
    opacity: 0; 
    transition: opacity 0.5s ease;
}
.gallery-item:hover .gallery-overlay { 
    opacity: 1; 
}

.gallery-overlay span {
    font-family: var(--font-display);
    font-size: 1.4rem; 
    font-weight: 600; 
    font-style: italic;
    color: white; 
    letter-spacing: 0.02em;
    white-space: nowrap; /* Keep text on one line */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}
.gallery-item:hover .gallery-overlay span {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   TESTIMONIAL CARDS
   ================================================================ */
.testimonial-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border-top: 3px solid var(--color-guindo);
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* ================================================================
   LIGHT CARDS (for accommodation & spanish pages)
   ================================================================ */
.feature-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border-left: 4px solid var(--color-guindo);
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* ================================================================
   PAGE HERO (for inner pages)
   ================================================================ */
.page-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.page-hero-bg {
    position: absolute; inset: 0;
}
.page-hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
}
.page-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(45,45,45,0.65), rgba(45,45,45,0.80));
}
.page-hero-content {
    position: relative; z-index: 10;
    text-align: center; color: white;
    padding: 6rem 1.25rem 3rem;
    max-width: 800px; margin: 0 auto;
}

/* ================================================================
   STEP PROCESS (How It Works)
   ================================================================ */
.step-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
}
.step-connector-line {
    width: 2px;
    height: 2rem;
    background: linear-gradient(to bottom, var(--bolivia-red), var(--bolivia-green));
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer-link {
    color: rgba(255,255,255,0.55);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.25s ease;
}
.footer-link:hover { color: white; }

/* ================================================================
   HERO SCROLL LINE
   ================================================================ */
.scroll-line {
    animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50%       { opacity: 0.8; transform: scaleY(1.15); }
}

/* ================================================================
   CROSS-PAGE PROMO BANNER
   ================================================================ */
.promo-banner {
    background: linear-gradient(135deg, var(--color-negro) 0%, #2A0A14 100%);
    border-top: 3px solid var(--color-guindo);
    border-bottom: 3px solid var(--color-acento);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 640px) {
    .polaroid-frame.secondary { display: none; }
}

/* ================================================================
   REDUCED MOTION ACCESSIBILITY
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .reveal-element { opacity: 1; transform: none; transition: none; }
    .gallery-img, .service-card, .feature-card,
    .testimonial-card, .value-chip, .polaroid-frame,
    .card-cta { transition: none; }
    .scroll-line { animation: none; }
}
