/* CSS Variables - Plagiarized Color Palette & Typography */
:root {
    /* Exact Requested Colors */
    --color-bg-primary: #f2f2ea;
    /* Off-white / Cream background */
    --color-accent-primary: #E05F59;
    /* Coral / Reddish highlight */

    /* Secondary Colors */
    --color-bg-secondary: #ffffff;
    /* Clean white for contrast sections */
    --color-text-main: #2c2c2c;
    /* Charcoal for good readability */
    --color-text-light: #555555;
    --color-accent-hover: #c44d47;
    /* Darker coral for hover effects */

    /* Typography based on live site */
    --font-heading: 'Playfair Display', serif;
    /* Elegant serif for titles */
    --font-body: 'Montserrat', sans-serif;
    /* Clean sans-serif for body */

    /* Spacing & Borders */
    --border-radius-sm: 4px;
    --border-radius-md: 12px;

    /* Transitions */
    --transition-fast: 0.3s ease-in-out;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text-main);
    background-color: var(--color-bg-primary);
    /* #f2f2ea */
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.justify-center {
    justify-content: center;
}

.bg-white {
    background-color: var(--color-bg-primary);
    /* Eliminamos el blanco puro forzado y lo igualamos al de la web por si se quedó alguna clase */
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.pt-150 {
    padding-top: 150px !important;
}

.page-main {
    min-height: calc(100vh - 200px);
}

/* Separator Line */
.title-separator {
    width: 60px;
    height: 3px;
    background-color: var(--color-accent-primary);
    margin: 20px auto 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 30px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--color-accent-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    color: white;
}

.btn-full {
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-bg-primary);
    /* #f2f2ea */
    transition: transform 0.4s ease-in-out, background-color 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.header-hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    max-width: 1400px !important; /* Forces header wider than standard container to give rolling logo room */
}

.logo {
    display: flex;
    align-items: center;
}

/* Header 3D Globe — replaces static .logo-img */
.logo-img {
    height: 85px;
    width: auto;
    object-fit: contain;
}

/* Rolling Logo Animation - Desktop Only */
@media (min-width: 992px) {
    .logo-img {
        animation: rollLogoDesktop 20s infinite cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center center;
    }
}

/* Physics-based wheel constraints: 
   Height = 85px. Circumference = 85 * PI ≈ 267px per full 360deg rotation 
   User override: Reduced translation to 160px to prevent center collision. */
@keyframes rollLogoDesktop {
    0% { transform: translateX(0) rotate(0deg); }
    
    /* Idle at start */
    5% { transform: translateX(0) rotate(0deg); }
    
    /* Rolling Right */
    18% { transform: translateX(160px) rotate(360deg); }
    
    /* Paused near menu */
    25% { transform: translateX(160px) rotate(360deg); }
    
    /* Rolling Left back to start */
    38% { transform: translateX(0) rotate(0deg); }
    
    /* Idle the rest of the 20 second loop */
    100% { transform: translateX(0) rotate(0deg); }
}

.nav-menu {
    flex: 2;
    display: flex;
    justify-content: center;
    /* Center the menu links */
}

.nav-list {
    display: flex;
    gap: 45px;          /* Increased dramatically from 25px for airy feel */
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.90rem;
    /* Reducido ligeramente de 0.95rem */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Fuerza a que "Sobre Nosotras" no salte de línea */
}

.nav-link:hover {
    color: var(--color-accent-primary);
    /* Highlight with the E05F59 coral */
}

/* Dropdown Menu Styles */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--color-bg-primary);
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: var(--border-radius-sm);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu .nav-link {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--color-text-main);
}

.dropdown-menu .nav-link:hover {
    background-color: rgba(224,95,89,0.05);
    color: var(--color-accent-primary);
}

/* Header Socials */
.header-social {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.header-social a {
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2; /* Push icons to the right side of language selector */
}

.header-social a span {
    font-size: 28px;
    /* Haz los iconos un poco más grandes */
}

.header-social a:hover {
    color: var(--color-accent-primary);
}

.header-social #language-selector-container {
    order: 1; /* Keep language selector to the left */
}

.header-social .nav-toggle {
    order: 3; /* Keep menu button at the far edge on mobile */
}

/* Animations for delayed icons on index.html */
.nav-icon-delayed {
    opacity: 0;
    animation: dropDownIcon 0.6s ease-out forwards;
}

.header-social a.nav-icon-delayed:nth-of-type(1) {
    animation-delay: 2s;
}

.header-social a.nav-icon-delayed:nth-of-type(2) {
    animation-delay: 2.2s;
}

@keyframes dropDownIcon {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Language Selector */
.custom-language-selector {
    position: relative;
    display: inline-block;
}

.language-selected {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 0.90rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.language-selected:hover {
    color: var(--color-accent-primary);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-bg-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius-sm);
    list-style: none;
    padding: 10px;
    margin-top: 5px;
    z-index: 100;
    display: none;
    min-width: 120px;
    text-align: right; /* Aligned like The Glamping */
}

.language-options.show {
    display: block;
}

.language-options li {
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-main);
    transition: var(--transition-fast);
}

.language-options li:hover {
    color: var(--color-accent-primary);
}

@keyframes wiggle-twice {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(8deg);
    }
}

.nav-toggle,
.nav-mobile-social {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    margin-left: 10px;
}

.nav-toggle span {
    font-size: 30px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 200px 0 150px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensure videos don't spill out */
    background-color: var(--color-bg-primary); /* Fallback color */
}

/* 3-Video Grid Background */
.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px; /* Small gap between videos */
    z-index: 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1); /* Reduced from 0.5 to 0.1 for video clarity */
    z-index: 1; /* Overlay sits above videos, below text */
}

.hero-content {
    position: relative;
    z-index: 10;
    background: rgba(242, 242, 234, 0.9);
    /* #f2f2ea semi-transparent */
    padding: 50px 40px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.hero-quote {
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: italic;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-author {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent-primary);
    /* Coral color */
}

/* Wavy Dividers */
.custom-shape-divider-bottom-1682548483,
.custom-shape-divider-bottom-134123 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom-134123 {
    transform: rotate(0deg);
    /* Flip for the bottom of services */
}

.custom-shape-divider-bottom-1682548483 svg,
.custom-shape-divider-bottom-134123 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.custom-shape-divider-bottom-1682548483 .shape-fill {
    fill: var(--color-bg-primary);
    /* Connects to #f2f2ea section */
}

.custom-shape-divider-bottom-134123 .shape-fill-bg {
    fill: var(--color-bg-primary);
}


/* Sections Base */
.section {
    padding: 100px 0;
    position: relative;
    background-color: var(--color-bg-primary);
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.section-title {
    font-size: 2.5rem;
}

/* Sobre Nosotras Nuevo Diseño */
.about-stripes {
    width: 100%;
    margin-bottom: 80px;
    margin-top: 30px;
    line-height: 0;
}

.about-stripes svg {
    display: block;
    width: 100%;
    height: 180px;
    /* Adjust as needed */
    object-fit: cover;
}

.about-story-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    margin: 0 auto;
    max-width: 1000px;
}

.about-story-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.about-story-img img {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-story-text {
    flex: 1;
    text-align: center;
}

.about-story-text h2 {
    color: var(--color-accent-primary);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.about-story-text p {
    color: var(--color-text-main);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 25px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .about-story-layout {
        flex-direction: column;
        gap: 50px;
        text-align: center;
        padding: 0 20px;
    }

    .about-story-img {
        justify-content: center;
    }
}

/* Personal Intro Block (Home) */
.personal-intro {
    padding: 100px 0 60px;
    background-color: var(--color-bg-light);
}

.personal-intro-layout {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.personal-intro-img {
    flex: 1;
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.personal-intro-img::before {
    content: '';
    display: block;
    padding-top: 120%; /* creates a vertical portrait aspect ratio */
}

.personal-intro-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.personal-intro-img:hover img {
    transform: scale(1.03);
}

.personal-intro-text {
    flex: 1;
    text-align: left;
    padding: 20px;
}

.personal-intro-text h2 {
    color: var(--color-accent-primary);
    font-size: 2.8rem;
    font-family: var(--font-heading);
    margin-bottom: 25px;
    line-height: 1.1;
}

.personal-intro-text p {
    color: var(--color-text-main);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .personal-intro {
        background-image: url('../assets/intro-juegolibre.jpg');
        background-size: cover;
        background-position: center;
        position: relative;
        padding: 80px 0;
    }

    .personal-intro::before {
        content: '';
        position: absolute;
        inset: 0;
        background-color: rgba(242, 242, 234, 0.85); /* Capa de color para contraste */
        z-index: 1;
    }

    .personal-intro .container {
        position: relative;
        z-index: 2;
    }

    .personal-intro-layout {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .personal-intro-img {
        display: none; /* Ocultamos la imagen original para usarla de fondo */
    }
    
    .personal-intro-text {
        text-align: center;
        padding: 0;
    }

    .personal-intro-text h2 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
}

/* Servicios */
.services {
    padding-bottom: 150px;
    /* Space for the bottom wave */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
}

.service-img {
    height: 250px;
    background-color: #ddd;
    /* Placeholder setup */
}

.service-info {
    padding: 30px;
}

.service-info h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

/* Temáticas */
.themes-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

/* Home Cages (Jaulas) */
.home-services-grid {
    display: flex;
    width: 100%;
    margin-bottom: -150px;
    /* To blend into footer or next section */
    position: relative;
    z-index: 10;
}

.home-cage {
    flex: 1;
    height: 600px;
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.home-cage-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

/* Oscurecer un poco la imagen para que se lea el texto */
.home-cage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: background 0.4s ease;
}

.home-cage-inner {
    position: absolute;
    top: 40px;
    left: 30px;
    right: 30px;
    bottom: 40px;
    border: 10px solid white;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 40px 20px;
    transition: transform 0.4s ease;
}

.home-cage h3 {
    color: white;
    font-size: 2.2rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.btn-read-more {
    background-color: white;
    color: var(--color-accent-primary);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

/* Hover Effects */
.home-cage:hover .home-cage-bg {
    transform: scale(1.08);
}

.home-cage:hover::before {
    background: rgba(0, 0, 0, 0.15);
    /* Aclarar al pasar el ratón */
}

.home-cage:hover .btn-read-more {
    background-color: var(--color-accent-primary);
    color: white;
}

.theme-item {
    aspect-ratio: 16/9;
    background-color: #e8e8e1;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-placeholder {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-main);
    z-index: 2;
}

/* ==============================================
   NUESTRA ESENCIA (GLASS CARDS)
   ============================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-md);
    padding: 35px 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.glass-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 45px rgba(224, 95, 89, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.glass-card-icon {
    font-size: 2.2rem;
    color: var(--color-accent-primary);
    margin-bottom: 20px;
    background: rgba(224, 95, 89, 0.08);
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.4s ease, background 0.4s ease;
}

.glass-card:hover .glass-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(224, 95, 89, 0.15);
}

.glass-card h3 {
    color: var(--color-accent-primary);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.glass-card p {
    color: var(--color-text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==============================================
   SERVICES & THEMES STYLING
   ============================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.service-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(224, 95, 89, 0.1);
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(224, 95, 89, 0.15);
}

.service-img {
    height: 250px;
    background-color: #f8f8f8;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-img::after {
    content: 'FOTO';
    color: #ccc;
    font-size: 2rem;
    font-weight: bold;
    font-family: var(--font-heading);
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* when image is added it covers the placeholder text */
}

.service-info {
    padding: 30px;
    text-align: center;
}

.service-info h3 {
    color: var(--color-accent-primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.service-info p {
    color: var(--color-text-light);
    margin-bottom: 25px;
}

.themes-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.theme-card {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease;
}

.theme-card:hover {
    transform: scale(1.03);
}

.theme-img {
    width: 100%;
    height: 100%;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theme-img::after {
    content: 'FOTO TEMÁTICA';
    color: #ccc;
    font-weight: bold;
    font-family: var(--font-heading);
}

.theme-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px;
    background: linear-gradient(to top, rgba(224, 95, 89, 0.95), rgba(224, 95, 89, 0));
    color: white;
    text-align: center;
}

.theme-overlay h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ==============================================
   FORMS
   ============================================== */
/* Contacto */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 50px;
    background: var(--color-bg-primary);
    padding: 50px;
    border-radius: var(--border-radius-md);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-list {
    margin-top: 30px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-list span {
    color: var(--color-accent-primary);
}

/* Contact Form and Booking CSS */
.contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-primary);
}

/* Custom Calendar Mockup Styles */
.cal-day {
    padding: 10px 0;
    border-radius: 50%;
    cursor: default;
    color: #888;
    transition: var(--transition-fast);
}

.cal-day.available {
    color: var(--color-accent-primary);
    font-weight: 600;
    background-color: rgba(224, 95, 89, 0.1);
    /* Light red tint */
    cursor: pointer;
}

.cal-day.available:hover {
    background-color: var(--color-accent-primary);
    color: white;
}

.cal-day.selected {
    background-color: var(--color-accent-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(224, 95, 89, 0.4);
}

.btn-time {
    background-color: white;
    color: var(--color-accent-primary);
    border: 1px solid var(--color-accent-primary);
    padding: 8px 15px;
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
}

.btn-time:hover {
    background-color: var(--color-accent-primary);
    color: white;
}

/* Footer */
.footer {
    background-color: var(--color-accent-primary);
    color: white;
    padding: 100px 0 40px;
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

.footer-logo-img {
    height: 140px;
    width: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

.footer .social-links a {
    color: white;
    margin: 0 10px;
}

.footer .social-links a:hover {
    opacity: 0.8;
}

.footer-nav {
    margin: 40px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    opacity: 0.8;
}


/* Testimonios */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px 30px;
    border-radius: var(--border-radius-md);
    text-align: center;
}

.testimonial-card .stars {
    color: #ffd700;
    margin-bottom: 20px;
}

.testimonial-card .stars span {
    font-size: 24px;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ==============================================
   GIFT POPUP (BONO REGALO)
   ============================================== */
.gift-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg-primary);
    /* Covers full screen as requested */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gift-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.gift-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease 0.2s, opacity 0.5s ease 0.2s;
}

.gift-popup-overlay.show .gift-popup-content {
    transform: translateY(0);
    opacity: 1;
}

.bono-img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    margin-bottom: 30px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.gift-popup-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn-bono {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
}

.btn-secondary {
    background-color: white;
    color: var(--color-text-main);
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.testimonial-author {
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-show {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}


/* Responsive */
@media (max-width: 992px) {

    .about-grid,
    .themes-gallery,
    .home-services-grid,
    .testimonials-grid,
    .contact-layout {
        grid-template-columns: 1fr !important;
    }

    /* Removed problematic min-height for contact-right divs */

    .home-services-grid {
        flex-direction: column;
    }

    .home-cage {
        height: 400px;
        width: 100%;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        position: relative;
        z-index: 2000;
        background: transparent;
        border: none;
        color: var(--color-text-main);
        cursor: pointer;
        transition: color 0.3s ease;
    }

    /* When menu is active, make toggle white to stand out against coral */
    .nav-menu.active ~ .nav-toggle,
    .nav-menu.active ~ .nav-actions .nav-toggle,
    body.menu-open .nav-toggle {
        color: white !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off-screen */
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--color-accent-primary); /* Coral Background */
        flex-direction: column;
        padding: 100px 30px 40px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        display: flex;
        transition: right 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
        z-index: 1500;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .nav-link {
        color: white !important;
        font-size: 1.5rem;
        font-family: var(--font-heading);
        text-align: left;
    }

    .nav-menu .nav-list {
        gap: 25px;
        align-items: flex-start;
    }

    .nav-mobile-social {
        margin-top: auto;
        display: flex;
        gap: 20px;
        padding-top: 30px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-mobile-social a {
        color: white;
        font-size: 1.8rem;
    }

    /* Hide desktop social in mobile */
    .header-social.desktop-only {
        display: none;
    }


    /* Submenu styling for coral background */
    .nav-item.dropdown .dropdown-menu {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        margin-top: 10px;
        padding: 5px 15px;
    }
    
    .nav-item.dropdown .dropdown-menu .nav-link {
        font-size: 1.2rem;
        opacity: 0.9;
    }

    /* Compact Quote Form for Mobile */
    .quote-form {
        display: grid !important;
        grid-template-columns: 1fr !important; /* Forces single column */
        gap: 8px !important; /* Less gap */
    }
    .quote-form div {
        margin-bottom: 0px !important; /* Remove individual div spacers */
    }
    .quote-form label {
        margin-bottom: 2px !important; /* Very tight label-input spacing */
    }
    .nav-list {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        width: 100%;
    }

    .nav-item.dropdown .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        padding-top: 10px;
    }

    .nav-item.dropdown:hover .dropdown-menu,
    .nav-item.dropdown:focus-within .dropdown-menu {
        display: block;
    }

    .header-social {
        display: none;
    }

    /* Hide socials on mobile header for space */

    .hero-quote {
        font-size: 1.8rem;
    }

    .hero-video-background {
        gap: 5px; /* Reduce gap on mobile for the 3 side-by-side videos */
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* =========================================
   WOW ANIMATIONS & INTERSECTION OBSERVER
   ========================================= */

/* Base states: Invisible and transformed */
.fade-in-up, 
.fade-in-down, 
.fade-in-left, 
.fade-in-right, 
.scale-up {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in-up {
    transform: translateY(40px);
}

.fade-in-down {
    transform: translateY(-40px);
}

.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-right {
    transform: translateX(40px);
}

.scale-up {
    transform: scale(0.92);
}

/* Active states: Triggered by main.js observer */
.animate-show {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

/* Staggered Delays for Grid Elements */
.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.45s;
}

.delay-4 {
    transition-delay: 0.6s;
}

.delay-5 {
    transition-delay: 0.75s;
}

/* =========================================
   CONTACT CALENDAR
   ========================================= */

.cal-day {
    padding: 8px 0;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.cal-day.available {
    cursor: pointer;
    background-color: #f9f9f9;
}

.cal-day.available:hover {
    background-color: #eee;
}

.cal-day.selected {
    background-color: var(--color-accent-primary) !important;
    color: white !important;
    font-weight: bold;
}

/* =========================================
   COLABORADORES PAGE
   ========================================= */

.collaborator-section {
    padding: 100px 0;
    background-color: var(--color-bg-light);
}

.collaborator-card {
    display: flex;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.collaborator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.collaborator-image {
    flex: 1;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.collaborator-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.collaborator-card:hover .collaborator-image img {
    transform: scale(1.05);
}

.collaborator-content {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.collaborator-logo {
    max-width: 180px;
    margin-bottom: 25px;
    display: block;
}

.collaborator-title {
    color: var(--color-accent-primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.collaborator-desc {
    color: var(--color-text-main);
    line-height: 1.8;
    margin-bottom: 30px;
}

.synergy-tags {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.synergy-tag {
    background-color: #f7ede6;
    color: var(--color-accent-primary);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cta-collaborate {
    text-align: center;
    padding: 100px 20px 120px;
    background-color: white;
}

@media (max-width: 900px) {
    .collaborator-card {
        flex-direction: column;
    }
    .collaborator-image {
        min-height: 250px;
    }
    .collaborator-content {
        padding: 40px 30px;
        text-align: left;
    }
}

/* =========================================
   SQUARE CONTACT FORMS OVERRIDE
   ========================================= */

.contact-grid input,
.contact-grid select,
.contact-grid textarea,
.contact-grid button,
.contact-grid .btn,
.contact-grid .quote-container,
.contact-grid .calendar-mockup,
.contact-grid .cal-day {
    border-radius: 0 !important;
}

/* =========================================
   SOBRE NOSOTRAS - PREMIUM REDESIGN
   ========================================= */

.manifesto-hero {
    padding: 60px 20px 40px;
    background-color: var(--color-bg-primary); 
    text-align: center;
    position: relative;
    overflow: hidden;
}

.manifesto-text {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--color-accent-primary);
    max-width: 900px;
    margin: 0 auto;
    font-style: italic;
}

.manifesto-author {
    margin-top: 30px;
    font-size: 1.1rem;
    color: var(--color-text-main);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.values-section {
    padding: 120px 0;
    background-color: white;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.value-card {
    background: var(--color-bg-primary);
    padding: 60px 40px;
    border-radius: 0; /* Keep it square as requested generally, or let it be. Let's make it 0 to match the new sharp aesthetic, or use var(--border-radius-lg) */
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.6s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 1px solid rgba(224,95,89,0.1);
}

.value-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.value-icon {
    font-size: 3.5rem;
    color: var(--color-accent-primary);
    margin-bottom: 25px;
}

.value-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--color-text-main);
}

.value-desc {
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 1rem;
}

/* Backstage / Sensory Gallery */
.sensory-gallery-section {
    padding: 100px 0 120px;
    background-color: var(--color-bg-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 50px;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    height: 400px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

@media (max-width: 900px) {
    .manifesto-text {
        font-size: 2.2rem;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SERVICIOS - IMMERSIVE REDESIGN
   ========================================= */

/* Hero Accordion Slider */
.services-hero {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    display: flex;
    overflow: hidden;
    margin-bottom: 0;
    padding-top: 100px; /* offset for fixed header */
}

.hero-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border-right: 2px solid white;
}

.hero-panel:last-child {
    border-right: none;
}

.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 100%);
    transition: opacity 0.6s ease;
}

.hero-panel:hover {
    flex: 3;
}

.hero-panel:hover::before {
    opacity: 0.6;
}

.panel-content {
    position: absolute;
    bottom: 50px;
    left: 40px;
    right: 40px;
    color: white;
    opacity: 0.9;
    transition: all 0.6s ease;
    transform: translateY(20px);
}

.hero-panel:hover .panel-content {
    opacity: 1;
    transform: translateY(0);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: white !important; /* Force white for clarity */
}

.panel-desc {
    font-size: 1.1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, margin-top 0.6s ease;
    opacity: 0;
    line-height: 1.6;
}

.hero-panel:hover .panel-desc {
    max-height: 150px;
    margin-top: 15px;
    opacity: 1;
}

/* Anatomía Section */
.anatomy-section {
    padding: 120px 0;
    background-color: var(--color-bg-light); /* #fafaf5 */
}

.anatomy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 60px;
}

.anatomy-points {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.anatomy-point {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.anatomy-point:hover {
    transform: translateX(10px);
}

.point-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent-primary);
    font-weight: bold;
    line-height: 1;
}

/* Timeline / Recorrido */
.timeline-section {
    padding: 120px 0;
    background-color: white;
}

.timeline-container {
    max-width: 800px;
    margin: 60px auto 0;
    position: relative;
    padding-bottom: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background: var(--color-accent-primary);
    opacity: 0.3;
}

.timeline-step {
    position: relative;
    padding-left: 70px;
    margin-bottom: 50px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--color-accent-primary);
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-text-main);
    margin-bottom: 10px;
}

.timeline-desc {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Universos (Thematic Cards) */
.universes-section {
    padding: 100px 0;
    background-color: var(--color-bg-primary); /* #f2f2ea */
}

.universes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.universe-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s ease;
}

.universe-card:hover {
    transform: translateY(-10px);
}

.universe-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.universe-content {
    padding: 30px;
    text-align: center;
}

.dynamic-link-area {
    background-color: var(--color-accent-primary);
    padding: 80px 20px;
    text-align: center;
    color: white;
}

@media (max-width: 900px) {
    .services-hero {
        flex-direction: column;
        height: auto;
    }
    .hero-panel {
        min-height: 250px;
        border-right: none;
        border-bottom: 2px solid white;
    }
    .hero-panel:hover {
        flex: 1; /* Disable expanding effect on mobile for better UX */
        min-height: 250px;
    }
    .panel-content {
        transform: translateY(0);
    }
    .panel-desc {
        max-height: 200px;
        opacity: 1;
        margin-top: 10px;
    }
    .anatomy-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   WAVE TEXT ANIMATIONS (Letter by letter)
   ========================================= */

.animate-wave {
    display: inline-block;
    opacity: 1; /* parent stays visible, children hide initially */
}

.wave-word {
    display: inline-block;
    white-space: pre;
}

.wave-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
}

/* Base class triggers animation */
.wave-active .wave-char {
    animation-fill-mode: forwards;
}

/* ---------- Variant 1: Smooth Wave Up ---------- */
.wave-style-1.wave-active .wave-char {
    animation: waveUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes waveUp {
    0% { opacity: 0; transform: translateY(30px) rotate(5deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ---------- Variant 2: Bounce Wave ---------- */
.wave-style-2.wave-active .wave-char {
    animation: waveBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes waveBounce {
    0% { opacity: 0; transform: translateY(20px) scale(0.8); }
    50% { opacity: 1; transform: translateY(-5px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Variant 3: Float In Wave ---------- */
.wave-style-3.wave-active .wave-char {
    animation: waveFloat 0.7s ease-out forwards;
}
@keyframes waveFloat {
    0% { opacity: 0; transform: translateX(-20px) translateY(10px); }
    100% { opacity: 1; transform: translateX(0) translateY(0); }
}

/* ---------- Variant 4: Alternating Infinite Loop ---------- */
.wave-style-alt.wave-active .wave-char {
    display: inline-block;
    opacity: 0;
    /* 5s infinite loop, smooth easing */
    animation: waveAltTop 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.wave-style-alt.wave-active .wave-char:nth-child(even) {
    animation-name: waveAltBottom;
}

@keyframes waveAltTop {
    0%, 20% { opacity: 0; transform: translateY(-40px); }
    30%, 70% { opacity: 1; transform: translateY(0); }
    80%, 100% { opacity: 0; transform: translateY(-40px); }
}

@keyframes waveAltBottom {
    0%, 20% { opacity: 0; transform: translateY(40px); }
    30%, 70% { opacity: 1; transform: translateY(0); }
    80%, 100% { opacity: 0; transform: translateY(40px); }
}

/* =========================================
   MARTA SQUARED ANIMATION 
   ========================================= */

/* Marta Squared Title */
.marta-squared-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--color-accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .marta-squared-title {
        font-size: 2.2rem !important; /* Scale down for mobile */
    }
}

.m-paren-l, .m-paren-r, .m-squared {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    display: inline-block;
    animation: martaShow 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
}

.m-squared {
    position: relative;
    top: -15px; /* superscript alignment */
}

.m-cross {
    opacity: 1;
    max-width: 400px;
    overflow: hidden;
    display: inline-block;
    animation: martaHide 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    white-space: pre;
}

/* Phase 1 (0-15%): "Marta x Marta"
   Phase 2 (25-45%): Transition down
   Phase 3 (50-65%): "(Marta)²"
   Phase 4 (75-90%): Transition back
*/

@keyframes martaHide {
    0%, 15% { opacity: 1; max-width: 400px; margin: 0; }
    25%, 65% { opacity: 0; max-width: 0; margin: 0; }
    75%, 100% { opacity: 1; max-width: 400px; margin: 0; }
}

@keyframes martaShow {
    0%, 15% { opacity: 0; max-width: 0; margin: 0; }
    25%, 65% { opacity: 1; max-width: 50px; margin: 0 2px; }
    75%, 100% { opacity: 0; max-width: 0; margin: 0; }
}

/* =========================================
   LITTLE GLAMPING MORPHING ANIMATION
   ========================================= */

.glamping-morph-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    white-space: nowrap;
    overflow: visible; /* Prevent clipping during movement */
    padding-left: 20px; /* Give movement breathing room */
}

.g-hide {
    display: inline-block;
    max-width: 400px;
    opacity: 1;
    overflow: hidden;
    animation: glampingHide 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.g-stay-glamping {
    display: inline-block;
    animation: glampingMoveG 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.g-stay-little {
    display: inline-block;
    animation: glampingMoveL 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes glampingHide {
    0%, 15% { opacity: 1; max-width: 400px; }
    25%, 65% { opacity: 0; max-width: 0; }
    75%, 100% { opacity: 1; max-width: 400px; }
}

/* "The Glamping x Little JuegoLibre" -> "Little Glamping" */
/* Phase 1 (0-15%): "The |Glamping| x |Little| JuegoLibre" */
/* Phase 2 (25-65%): swap G and L position */

@keyframes glampingMoveG {
    0%, 15% { transform: translateX(0); opacity: 1; }
    25%, 65% { transform: translateX(75px); } /* Shifts right by width of "Little " */
    75%, 100% { transform: translateX(0); }
}

@keyframes glampingMoveL {
    0%, 15% { transform: translateX(0); }
    25%, 65% { transform: translateX(-140px); } /* Slightly less left to avoid edge */
    75%, 100% { transform: translateX(0); }
}

/* =========================================
   CUMPLEAÑOS - ANIMATED TIMELINE
   ========================================= */
.cumple-timeline {
    overflow: hidden;
}
.timeline-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}
/* Center Line */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: var(--color-accent-primary);
    opacity: 0.2;
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 50%;
    position: relative;
    margin-bottom: 120px;
    min-height: 600px;
}
.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: white;
    border: 4px solid var(--color-accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(224, 95, 89, 0.2);
}

.curvy-icon .material-symbols-rounded,
.timeline-icon .material-symbols-rounded,
.feat-icon .material-symbols-rounded {
    font-weight: 300;
}

.timeline-content {
    width: 65%; /* Reduced from 88% to prevent clashing with side images */
    max-width: 720px;
    background: white;
    padding: 35px;
    border-radius: var(--border-radius-md);
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}
.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 45px;
    border-right: 5px solid var(--color-accent-primary);
}
.timeline-item:nth-child(even) .timeline-content {
    margin-left: 45px;
    border-left: 5px solid var(--color-accent-primary);
}
.timeline-content h3 {
    color: var(--color-accent-primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.timeline-content p {
    color: var(--color-text-main);
    line-height: 1.6;
    font-size: 1.05rem;
}
.timeline-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}
.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: var(--color-bg-primary);
    padding: 15px;
    border-radius: var(--border-radius-sm);
}
.feat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.feature-row p {
    margin: 0;
    font-size: 0.95rem;
}

/* Timeline Image Boxes */
.timeline-img-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 320px !important;
    height: 620px !important;
    min-width: 320px !important;
    min-height: 620px !important;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    overflow: hidden;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.timeline-img-box img,
.timeline-img-box video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s ease;
}
.timeline-item:nth-child(odd) .timeline-img-box {
    right: 4%;
    transform: translateY(-50%) rotate(2deg);
    width: 320px !important;
    height: 620px !important;
}
.timeline-item:nth-child(even) .timeline-img-box {
    left: 4%;
    transform: translateY(-50%) rotate(-2deg);
    width: 320px !important;
    height: 620px !important;
}
.timeline-img-box:hover {
    transform: translateY(-55%) scale(1.05) rotate(0deg) !important;
    z-index: 10;
}
.timeline-img-box:hover img {
    transform: scale(1.1);
}

/* Specific Vertical Reel Format */
.vertical-reel {
    width: 320px !important;
    height: 580px !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-radius: 25px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    border: 8px solid white !important;
    z-index: 5 !important;
}

.timeline-item:nth-child(odd) .vertical-reel {
    right: 2% !important;
    transform: translateY(-50%) rotate(2deg) !important;
}

.timeline-item:nth-child(even) .vertical-reel {
    left: 2% !important;
    transform: translateY(-50%) rotate(-2deg) !important;
}

#vertical-reel-video,
#vertical-reel-image {
    width: 320px !important;
    height: 580px !important;
    min-width: 320px !important;
    min-height: 580px !important;
    max-width: 320px !important;
    max-height: 580px !important;
    aspect-ratio: 9 / 16 !important;
}

.vertical-reel video,
.vertical-reel img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Timeline Responsiveness */
@media (max-width: 935px) {

    /* Text block: always take full width, no absolute positioning */
    .timeline-content {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-right: none !important;
        border-left: 5px solid var(--color-accent-primary) !important;
    }

    .timeline-item, .timeline-item:nth-child(even) {
        flex-direction: column !important;
        padding: 0 20px 0 60px !important;
        align-items: flex-start !important;
        min-height: auto !important;
    }

    /* Images and videos: sit in normal document flow BELOW text */
    .timeline-img-box, .vertical-reel,
    #vertical-reel-video, #vertical-reel-image {
        position: relative !important;
        top: auto !important; right: auto !important;
        left: auto !important; bottom: auto !important;
        display: block !important;
        width: 100% !important;
        max-width: 85vw !important;
        height: 110vw !important;
        max-height: 520px !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 35px auto 60px auto !important; /* Increased margin to prevent clashing with text above */
        /* Start hidden - JS will reveal */
        opacity: 0;
        transform: translateY(60px) scale(0.93) !important;
        transition: none !important;
        border: 6px solid white !important;
        border-radius: 20px !important;
        box-shadow: 0 18px 40px rgba(0,0,0,0.18) !important;
        overflow: hidden !important;
    }

    /* Revealed state triggered by JS */
    .timeline-img-box.mob-img-show,
    .vertical-reel.mob-img-show,
    #vertical-reel-video.mob-img-show,
    #vertical-reel-image.mob-img-show {
        animation: mobImgReveal 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    }

    /* Images & video always fill their box */
    .timeline-img-box img, .timeline-img-box video,
    .vertical-reel img, .vertical-reel video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* Keyframes defined OUTSIDE media query for full browser compatibility */
@keyframes mobImgReveal {
    0%   { opacity: 0; transform: translateY(60px) scale(0.93); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-wrapper::before {
        left: 30px;
    }
    .timeline-item, .timeline-item:nth-child(even) {
        justify-content: flex-start;
        padding-left: 60px;
        padding-right: 15px;
    }
    .timeline-icon {
        left: 10px;
    }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-right: none;
        border-left: 5px solid var(--color-accent-primary);
    }
}

/* =========================================
   CUMPLEAÑOS - CONFETTI & BROOM ANIMATION
   ========================================= */
.cumple-title-wrapper {
    position: relative;
    display: inline-block;
    padding: 40px 80px;
}

.confetti-layer {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    z-index: 1;
    animation: confLayerGroup 8s infinite linear;
}

.conf-piece {
    position: absolute;
    width: 8px; height: 16px;
    border-radius: 2px;
    top: -8px; left: -4px;
    opacity: 0;
    animation: confParticle 8s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.broom-layer {
    position: absolute;
    top: 0;
    right: -150px;
    font-size: 5rem;
    z-index: 3;
    opacity: 0;
    transform-origin: bottom center;
    animation: broomMove 8s infinite linear;
}

@keyframes confParticle {
    0%, 5% { transform: translate(0, 0) scale(0); opacity: 0; }
    6% { opacity: 1; transform: translate(0, 0) scale(1); }
    20%, 100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(1); opacity: 1; }
}

@keyframes confLayerGroup {
    0%, 65% { transform: translateX(0); opacity: 1; }
    80% { transform: translateX(-600px); opacity: 1; } /* Swept to the left */
    81%, 100% { transform: translateX(-600px); opacity: 0; }
}

@keyframes broomMove {
    0%, 60% { transform: translate(250px, 10px) rotate(15deg); opacity: 0; }
    62% { transform: translate(250px, 10px) rotate(15deg); opacity: 1; }
    80% { transform: translate(-350px, 10px) rotate(-20deg); opacity: 1; } /* Sweeping motion */
    81%, 100% { transform: translate(-350px, 10px) rotate(-20deg); opacity: 0; }
}

/* =========================================
   JUEGO LIBRE - BENTO GRID & PEEK ANIMATION
   ========================================= */
/* Hero Kids Animation */
.peek-a-boo-container {
    position: relative;
    display: inline-block;
}
.peek-kid {
    position: absolute;
    font-size: 3rem;
    z-index: 1; /* Detrás del z-index 5 del título */
    animation: peekAndRunModern 10s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.kid-1 { --peek-y: -60px; --peek-x: 0; --run-x: 350px; --run-y: -50px; top: -10px; left: 10%; animation-delay: 0s; } /* Arriba */
.kid-2 { --peek-y: 60px; --peek-x: 0; --run-x: -350px; --run-y: 50px; bottom: -10px; right: 20%; animation-delay: 2.5s; } /* Abajo */
.kid-3 { --peek-y: 0; --peek-x: -60px; --run-x: 250px; --run-y: -80px; top: 30%; left: -20px; animation-delay: 5s; } /* Izquierda */
.kid-4 { --peek-y: -40px; --peek-x: 60px; --run-x: -300px; --run-y: 90px; top: -30px; right: -20px; animation-delay: 7.5s; } /* Derecha */

@keyframes peekAndRunModern {
    0%, 10% { transform: translate(0, 0) scale(0); opacity: 0; }
    /* PEEKING PHASE */
    15%, 35% { transform: translate(var(--peek-x), var(--peek-y)) scale(1); opacity: 1; }
    /* HIDE */
    40%, 55% { transform: translate(0, 0) scale(0); opacity: 0; }
    /* RUNNING PHASE */
    60% { transform: translate(calc(var(--run-x) * -1), var(--run-y)) scale(1); opacity: 0; }
    65%, 85% { transform: translate(var(--run-x), var(--run-y)) scale(1.2) rotate(15deg); opacity: 1; z-index: 10; } /* Corren por DELANTE */
    90%, 100% { transform: translate(calc(var(--run-x) + 100px), var(--run-y)) scale(0); opacity: 0; }
}

/* S-Curve Timeline System */
.curvy-row {
    position: relative;
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
}
.curvy-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.curvy-svg path {
    stroke-width: 6px; /* Thick, beautiful line */
}
.curvy-icon {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: white;
    border: 5px solid var(--color-accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(224, 95, 89, 0.3);
}
.curvy-content {
    position: relative;
    z-index: 2;
    background: white;
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.curvy-content h3 {
    color: var(--color-accent-primary);
    font-size: 1.6rem;
    margin-bottom: 10px;
}
.curvy-content p {
    color: var(--color-text-main);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive S-Curve */
@media (max-width: 768px) {
    /* Flatten the curve into a straight centered line for mobile */
    .curvy-row {
        flex-direction: column;
        justify-content: center;
        text-align: center !important;
        padding: 30px 0;
        min-height: 180px;
    }
    .curvy-svg {
        display: none; /* Hide SVG curves on vertical stacking format */
    }
    .curvy-row::before {
        content: '';
        position: absolute;
        top: 0; left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #E05F59, #F2C94C);
        z-index: 0;
    }
    .curvy-icon {
        position: relative;
        left: 50% !important;
        top: 0 !important;
        transform: translateX(-50%) !important;
        margin-bottom: 20px;
        z-index: 3;
    }
    .curvy-content {
        left: 0 !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 auto;
    }
}
@media (max-width: 500px) {
    .juegos-title { font-size: 2.2rem !important; }
}

/* =========================================
   INDEX - SERVICES SPLIT HEADER (CENTERED)
   ========================================= */
.services-header-split {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-bottom: 50px;
}

.services-cta-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-accent-primary);
    color: white !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    pointer-events: none;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(224, 95, 89, 0.3);
}

.services-header-split.animate-show .services-cta-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 2s;
    /* Extra subtle bounce animation after it appears */
    animation: ctaPulse 3s infinite 3s ease-in-out;
}

@keyframes ctaPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(224, 95, 89, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 8px 25px rgba(224, 95, 89, 0.5); }
}

.review-wiggle {
    animation: wiggleReview 2s infinite ease-in-out;
}

@keyframes wiggleReview {
    0%, 80%, 100% { transform: scale(1) rotate(0); }
    85% { transform: scale(1.05) rotate(3deg); }
    90% { transform: scale(1.05) rotate(-3deg); }
    95% { transform: scale(1.05) rotate(3deg); }
}

@media (max-width: 768px) {
    .services-header-split {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .services-cta-btn {
        margin-left: 0;
        transform: translateY(20px) scale(0.9);
    }
    .services-header-split.animate-show .services-cta-btn {
        transform: translateY(0) scale(1);
        transition-delay: 2s;
    }
}

/* ========================================= */
/* CUMPLEAÑOS - ACUARELA BLOBS CHOICE SCREEN */
/* ========================================= */
.bd-choice-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: 100%;
    min-height: 55vh;
    padding: 20px;
}

@media (max-width: 768px) {
    .bd-choice-container {
        flex-direction: column;
        gap: 60px;
        min-height: 70vh;
    }
}

.blob-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob-btn {
    position: relative;
    width: 320px;
    height: 320px;
    background-size: cover;
    background-position: center;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 10px 10px 20px rgba(255,255,255,0.2), 0 15px 35px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
    animation: morphBlob 8s ease-in-out infinite alternate;
}

@media (max-width: 768px) {
    .blob-btn {
        width: 260px;
        height: 260px;
    }
}

.blob-btn:hover {
    transform: scale(1.05) translateY(-8px);
    filter: brightness(1.05);
}

/* Watercolor styling using soft gradients */
.blob-coral {
    background: linear-gradient(135deg, rgba(224, 95, 89, 0.9) 0%, rgba(224, 95, 89, 0.6) 100%);
    backdrop-filter: blur(5px);
}
.blob-coral .blob-text {
    color: white;
}

.blob-sand {
    background: linear-gradient(135deg, rgba(229, 213, 188, 0.95) 0%, rgba(229, 213, 188, 0.7) 100%);
    backdrop-filter: blur(5px);
    animation-delay: -4s; /* Offset morph timing for independence */
    animation-direction: alternate-reverse;
}
.blob-sand .blob-text {
    color: var(--color-text-main);
}

.blob-text {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(255,255,255,0.4);
}

@keyframes morphBlob {
    0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 50% 50% 40% 60% / 40% 40% 60% 50%; }
}

.bd-hint-divider {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-style: italic;
    opacity: 0;
    max-width: 250px;
    text-align: center;
    padding: 0 10px;
    animation: fadeInHint 1s ease 5s forwards; /* 5s delay */
    pointer-events: none;
}

@media (max-width: 768px) {
    .bd-hint-divider {
        max-width: none;
        padding: 15px 0;
    }
}

@keyframes fadeInHint {
    to { opacity: 0.8; }
}

/* ========================================= */
/* CUMPLEAÑOS - A DOMICILIO LAYOUT           */
/* ========================================= */
.home-bd-hero {
    position: relative;
    padding-top: 20px;
}

.home-bd-card {
    transition: var(--transition-normal);
}
.home-bd-card:hover {
    transform: translateY(-10px);
}

/* =========================================
   VAN ANIMATION (Little a Domicilio)
   ========================================= */
.van-animation-container {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    height: 150px;
    position: relative;
    overflow: hidden;
    background: transparent;
    border-bottom: 2px solid #ddd;
}

.road {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 2px;
    background: repeating-linear-gradient(90deg, #ccc 0, #ccc 20px, transparent 20px, transparent 40px);
    animation: roadMove 2s linear infinite;
}

@keyframes roadMove {
    from { transform: translateX(0); }
    to { transform: translateX(-40px); }
}

.house {
    position: absolute;
    bottom: 5px;
    right: 50px;
    font-size: 4rem;
    z-index: 1;
}

.van {
    position: absolute;
    bottom: 10px;
    left: -140px;
    width: 120px;
    height: 70px;
    background: white;
    border-radius: 12px 25px 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 2;
    animation: vanDrive 10s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.van::before { /* Window */
    content: '';
    position: absolute;
    top: 12px;
    right: 8px;
    width: 35px;
    height: 28px;
    background: #a8d8ea;
    border-radius: 0 12px 0 0;
}

.van-logo {
    position: absolute;
    top: 18px;
    left: 10px;
    width: 60px;
    height: 35px;
    background: url('../assets/logo.png') no-repeat center;
    background-size: contain;
}

.wheel {
    position: absolute;
    bottom: -10px;
    width: 24px;
    height: 24px;
    background: #333;
    border-radius: 50%;
    border: 3px dashed #666;
    animation: wheelRotate 0.8s linear infinite;
}

.wheel-front { right: 20px; }
.wheel-back { left: 20px; }

@keyframes wheelRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes vanDrive {
    0% { left: -140px; opacity: 1; }
    20%, 60% { left: 60%; transform: translateX(-100%); } /* Stop at the house */
    80% { left: 120%; opacity: 1; }
    81%, 100% { left: 120%; opacity: 0; }
}

@media (max-width: 600px) {
    .van-animation-container {
        height: 120px;
    }
    .van {
        width: 100px;
        height: 60px;
    }
    .house {
        font-size: 3rem;
    }
}
/* ============================================================
   DEFINITIVE MOBILE OVERHAUL (Approved Plan)
   Ensures local overrides win over legacy rules
   ============================================================ */
@media (max-width: 768px) {
    /* 1. Personal Intro Background */
    .personal-intro {
        background-image: url('../assets/intro-juegolibre.jpg') !important;
        background-size: cover !important;
        background-position: center !important;
        position: relative !important;
        padding: 80px 20px !important;
        color: var(--color-text-main) !important;
    }

    .personal-intro::before {
        content: '';
        position: absolute;
        inset: 0;
        background-color: rgba(242, 242, 234, 0.88) !important; /* Elegant cream overlay */
        z-index: 1;
    }

    .personal-intro .container {
        position: relative !important;
        z-index: 2 !important;
    }

    .personal-intro-img {
        display: none !important;
    }

    .personal-intro-text {
        text-align: center !important;
        padding: 0 !important;
    }

    /* 2. Home Services (Premium Horizontal Carousel) */
    .services-hero {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 14px !important;
        padding: 20px !important;
        height: auto !important;
        min-height: 480px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .services-hero::-webkit-scrollbar { display: none; }

    .hero-panel {
        flex: 0 0 85% !important; /* Large, immersive panels */
        height: 420px !important;
        scroll-snap-align: center !important;
        border-radius: 24px !important;
        transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease-out !important;
        filter: brightness(0.8) scale(0.95);
        margin-bottom: 0 !important;
    }

    /* Active card scaling */
    .hero-panel.is-active {
        filter: brightness(1) scale(1) !important;
        z-index: 2;
    }

    .hero-panel.mobile-hide {
        display: none !important; /* As per user request: hide Little a domicilio on mobile home */
    }

    .panel-content {
        position: absolute !important;
        bottom: 25px !important;
        left: 20px !important;
        right: 20px !important;
        text-align: left !important;
        width: calc(100% - 40px) !important;
        padding: 0 !important;
        opacity: 1 !important;
    }

    .panel-title {
        display: inline-block !important;
        background: rgba(255, 255, 255, 0.96) !important;
        color: var(--color-accent-primary) !important;
        padding: 10px 22px !important;
        border-radius: 40px !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
        margin-bottom: 0 !important;
    }

    .panel-desc {
        display: block !important; /* Re-enable description on mobile for premium look */
        color: white !important;
        font-size: 0.9rem !important;
        margin-top: 10px !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.4);
        opacity: 0.9;
    }

    /* 3. General Alignment Fixes */
    .section-title, 
    .animate-wave {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        font-size: 2rem !important; /* Scale down titles slightly */
    }

    .services-header-split {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
    }
}

/* Birthday Page Mobile Refinements */
@media (max-width: 768px) {
    .cumple-title {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
    .cumple-title-wrapper {
        padding: 20px 10px !important;
    }
    .timeline-item {
        padding-left: 60px !important;
    }
    .timeline-icon {
        left: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    .timeline-content {
        padding: 20px !important;
    }
    .bd-hint-divider {
        opacity: 0;
        transition: opacity 0.8s ease;
        margin: 15px 0;
        font-size: 0.9rem;
        color: var(--color-text-light);
        text-align: center;
        width: 100%;
        display: block !important;
    }
    .bd-hint-divider.show-hint {
        opacity: 1;
    }
    .home-bd-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .home-bd-card {
        padding: 25px !important;
    }
    .home-bd-features {
        padding: 30px 15px !important;
    }
    .feature-item {
        gap: 12px !important;
    }
    .feature-item span {
        font-size: 1.5rem !important;
    }
    .feature-item p {
        font-size: 1rem !important;
    }
}

/* Mobile Header Refinements */
@media (max-width: 991px) {
    .logo-img {
        animation: rollLogoMobile 15s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
        transform-origin: center center;
    }
    
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-right: 15px !important;
    }

    /* Move Language Selector to the right, next to toggle */
    .custom-language-selector {
        margin-left: auto !important;
        margin-right: 15px !important;
    }

    .nav-toggle {
        margin-left: 0 !important;
    }
}

@keyframes rollLogoMobile {
    0% { transform: translateX(0) rotate(0deg); }
    5% { transform: translateX(0) rotate(0deg); }
    18% { transform: translateX(60px) rotate(360deg); }
    25% { transform: translateX(60px) rotate(360deg); }
    38% { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(0) rotate(0deg); }
}

/* Page Collision Fixes (Mobile) */
@media (max-width: 768px) {
    main, .page-main {
        padding-top: 150px !important; /* Extra room for fixed header */
    }
    
    /* Specific section fixes */
    .services-hero, .juegos-hero, .cumple-hero, .home-bd-hero {
        margin-top: 0 !important;
    }
}

/* Birthday Horizontal Layout (Phase 42) */
@media (max-width: 768px) {
    .bd-choice-container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        min-height: 60vh !important;
        padding: 0 10px !important;
    }

    .bd-choice-container .blob-wrapper {
        flex: 0 0 45% !important;
        max-width: 160px !important;
    }

    .blob-btn {
        width: 140px !important;
        height: 140px !important;
        padding: 10px !important;
    }

    .blob-text {
        font-size: 0.9rem !important;
    }

    .bd-hint-divider {
        order: 10 !important; /* Ensure it stays below in flex row wrap */
        margin-top: 30px !important;
        width: 100% !important;
        padding: 0 20px !important;
    }
}

/* Desktop-only spacing fix for Servicios page title */
@media (min-width: 992px) {
    .page-main {
        padding-top: 130px !important;
    }
}

/* ========================================================
   HOME SERVICES — MOBILE SWIPE CAROUSEL
   Completely replaces the stacked-cards layout on mobile.
   Applies only on screens ≤ 768px.
   ======================================================== */
@media (max-width: 768px) {

    /* ---- Section wrapper ---- */
    .home-services.bg-white {
        padding-top: 40px !important;
        padding-bottom: 50px !important;
        background: #f9f5f2 !important;
        overflow: hidden !important;
    }

    /* ---- Header row ---- */
    .services-header-split {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px !important;
        padding: 0 20px !important;
        margin-bottom: 28px !important;
    }

    /* ---- Carousel track ---- */
    .services-hero {
        /* Reset everything from desktop */
        display: flex !important;
        flex-direction: row !important;
        height: auto !important;
        min-height: auto !important;
        gap: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;

        /* Scroll snap */
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;        /* Firefox */
        -ms-overflow-style: none !important;     /* IE */

        /* Side peek: first card offset */
        padding-left: 24px !important;
        padding-right: 24px !important;
        scroll-padding-left: 24px !important;
        gap: 14px !important;
    }
    .services-hero::-webkit-scrollbar { display: none !important; }

    /* ---- Cards ---- */
    .hero-panel {
        /* Geometry */
        flex: 0 0 82vw !important;
        width: 82vw !important;
        height: 72vw !important;      /* ~300px on 375px screen */
        max-height: 340px !important;
        border-radius: 22px !important;
        scroll-snap-align: start !important;

        /* Layout */
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: stretch !important;
        overflow: hidden !important;
        cursor: pointer !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;

        /* Image */
        background-size: cover !important;
        background-position: center !important;

        /* Shadow */
        box-shadow: 0 12px 35px rgba(0,0,0,0.18) !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        position: relative !important;
    }

    .hero-panel:active {
        transform: scale(0.97) !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
    }

    /* Hide the 3rd panel (Little a Domicilio) as before */
    .hero-panel.mobile-hide {
        display: none !important;
    }

    /* ---- Dark gradient overlay (bottom fade) ---- */
    .hero-panel::before {
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.0) 30%,
            rgba(0,0,0,0.55) 75%,
            rgba(0,0,0,0.72) 100%
        ) !important;
        border-radius: 22px !important;
        z-index: 0 !important;
    }

    /* ---- Card content ---- */
    .panel-content {
        position: relative !important;
        z-index: 1 !important;
        padding: 0 20px 22px !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        text-align: left !important;
        opacity: 1 !important;
        transform: none !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .panel-title {
        /* Reset the "cartel" pill from previous design */
        display: block !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        animation: none !important;

        /* New style: plain white on dark overlay */
        color: white !important;
        font-family: var(--font-heading) !important;
        font-size: 1.45rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
        white-space: normal !important;
    }

    .panel-desc {
        /* Show it (was hidden before) */
        display: block !important;
        color: rgba(255,255,255,0.85) !important;
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
        margin: 0 !important;
        max-width: 95% !important;
    }

    /* Arrow pill button at bottom of card */
    .panel-content::after {
        content: 'Ver más →' !important;
        display: inline-flex !important;
        align-items: center !important;
        margin-top: 10px !important;
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.06em !important;
        color: white !important;
        background: rgba(255,255,255,0.18) !important;
        border: 1px solid rgba(255,255,255,0.35) !important;
        border-radius: 30px !important;
        padding: 5px 14px !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
    }

    /* ---- Dots indicator (injected by JS) ---- */
    .mob-svc-dots {
        display: flex;
        justify-content: center;
        gap: 7px;
        margin-top: 22px;
    }
    .mob-svc-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(224,95,89,0.25);
        transition: background 0.3s ease, transform 0.3s ease;
    }
    .mob-svc-dot.active {
        background: var(--color-accent-primary);
        transform: scale(1.35);
    }

    /* ---- Swipe hint animation on load ---- */
    @keyframes swipe-hint {
        0%   { transform: translateX(0); }
        30%  { transform: translateX(-22px); }
        60%  { transform: translateX(8px); }
        100% { transform: translateX(0); }
    }
    .services-hero.hint-anim {
        animation: swipe-hint 0.9s ease 1.2s both;
    }
}

/* =============================================
   FAQ ACCORDION STYLES
   ============================================= */
.faq-section-bg {
    position: relative;
    background-image: url('../assets/faq-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.faq-section-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.70);
    z-index: 1;
}
.faq-section-bg > * {
    position: relative;
    z-index: 2;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-accordion-item {
    background: white;
    margin-bottom: 12px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 15px rgba(224, 95, 89, 0.05);
    overflow: hidden;
    border-left: 4px solid rgba(224, 95, 89, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-accordion-item.active {
    border-left-color: var(--color-accent-primary);
    box-shadow: 0 8px 25px rgba(224, 95, 89, 0.12);
}

.faq-accordion-header {
    width: 100%;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text-main);
    transition: color 0.3s ease;
}

.faq-accordion-header span:first-child {
    padding-right: 15px;
    line-height: 1.3;
}

.faq-accordion-header .material-symbols-rounded {
    color: var(--color-accent-primary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-variation-settings: 'wght' 300;
}

.faq-accordion-item.active .faq-accordion-header {
    color: var(--color-accent-primary);
}

.faq-accordion-item.active .material-symbols-rounded {
    transform: rotate(180deg);
}

.faq-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fffcfb;
}

.faq-accordion-content {
    padding: 0 28px 25px 28px;
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 0.98rem;
}

/* Custom Mobile Overrides for Home Page */
@media (max-width: 768px) {
    .mobile-hide-btn {
        display: none !important;
    }
    section.testimonials {
        padding-top: 50px !important;
        padding-bottom: 80px !important;
    }

    .hero {
        min-height: 100vh !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .hero-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }

    .hero-content {
        margin: 0 auto !important;
        text-align: center !important;
        width: 88% !important;
        max-width: 420px !important;
        padding: 35px 22px !important;
    }
}
