:root {
    --primary-color: #0b5e32; /* Strong green */
    --secondary-color: #003b1d; /* Darker green */
    --accent-color: #fbf0bb; /* Light yellow accent */
    --bg-dark: #004b26; /* Dark green background instead of black */
    --text-light: #ffffff;
    --text-dark: #333333;
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #fafafa;
    overflow-x: hidden; /* Prevent horizontal scroll/swipe bleed on mobile */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #000000;
    text-shadow: none;
}

.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.bg-dark { background-color: var(--bg-dark); }
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}
/* Reduce height when scrolled */
header.scrolled .header-container {
    padding: 5px 40px;
    transition: padding 0.3s ease;
}
header.scrolled {
    background-color: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: none;
}
/* When header is at the very top over the bright hero image */
header.header-hero nav ul li a {
    color: #000000; /* Black text */
}
header.header-hero nav ul li a:hover {
    color: var(--primary-color);
}
/* When header is in dark mode (over white background) */
header.header-dark nav ul li a {
    color: #000000; /* Black text */
}
header.header-dark nav ul li a:hover {
    color: var(--primary-color);
}
/* Hacer que el logo negro se vea más grande visualmente para compensar el recorte */
header.header-dark .nav-logo-img {
    transform: none;
    margin-left: 0;
}
/* When header is in light mode (over dark backgrounds) */
header.header-light nav ul li a {
    color: #ffffff;
}
header.header-light nav ul li a:hover {
    color: var(--accent-color);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center the logo and nav container */
    padding: 15px 40px;
}
.logo h1 {
    font-size: 24px;
    color: var(--secondary-color);
    margin: 0;
}
.logo-link {
    display: block;
    position: relative;
    width: 250px;
    height: 90px;
}
.nav-logo-img {
    position: absolute;
    top: 0;
    left: 0;
    height: 90px;
    width: auto;
    transition: opacity 0.3s ease;
}
.logo-black {
    transform: none;
}
header.header-hero .logo-white { opacity: 1; }
header.header-hero .logo-black { opacity: 0; }

header.header-dark .logo-white { opacity: 0; }
header.header-dark .logo-black { opacity: 1; }

header.header-light .logo-white { opacity: 1; }
header.header-light .logo-black { opacity: 0; }

nav {
    margin-bottom: 30px; /* Pushes the words higher up relative to the tall logo */
}
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-left: auto;
}
nav ul li a {
    color: var(--text-light); /* Default color overridden by header state classes */
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.3s;
    letter-spacing: 1px;
}
nav a:hover {
    color: var(--secondary-color);
}
.main-sponsors-header {
    display: none;
}

/* Hero Section */
.hero {
    width: 100%;
    position: relative;
    display: flex;
    background-color: #fff;
}
.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-beneficio {
    position: absolute;
    bottom: 30px;
    left: 8%; /* Tirado a la izquierda */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.beneficio-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.9);
    text-transform: uppercase;
}

.beneficio-logo {
    width: 95px; /* Más chiquito que los del centro */
    height: auto;
}

/* Section Shared */
.section {
    padding: 250px 0; /* SEPARACIÓN ENORME SOLICITADA */
}
/* Excepciones de espaciado a pedido */
#que-es.section {
    padding-top: 50px;
    padding-bottom: 50px; /* Reducido para achicar espacio con el carrousel */
}
#itinerario.section {
    padding-bottom: 50px;
}
#imagenes.section {
    padding-top: 50px;
    padding-bottom: 0px; /* Reduced space below imagenes section */
}
#donde-es.section {
    padding-top: 50px;
    padding-bottom: 50px; /* Reducido para acercarlo a contacto/main sponsors */
}
#contacto.section {
    padding-top: 20px; /* Even less space */
}
.section h2 {
    font-size: 2.5rem;
    color: #000000; /* Black color for all titles */
    margin-bottom: 40px;
    text-transform: uppercase;
    text-shadow: none; /* No shadow */
}
.section.bg-dark h2 {
    color: #ffffff; /* White title if background is dark */
}
.empty-content {
    color: #999;
    font-style: italic;
    font-size: 1.2rem;
}

/* Logos Section (New) */
.logos-section {
    padding: 20px 20px 30px 20px; /* Aún más reducido arriba */
    background-color: #fff;
    text-align: center;
}
.logos-container {
    display: flex;
    justify-content: center;
    gap: 100px;
    max-width: 1000px;
    margin: 0 auto;
}
.logos-title {
    font-size: 1.5rem;
    color: #000000; /* Negro sólido como todos los títulos */
    margin-bottom: 30px;
    text-shadow: none;
}
.logos-grid {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}
.sponsor-img {
    height: 100px;
    object-fit: contain;
}
.placeholder-logo {
    display: none; /* No longer used */
}
.main-sponsor-img {
    max-width: 100%;
    height: 100px; /* Igualamos la altura a la de Producciones */
    object-fit: contain;
}

/* Carousel Section */
.carousel-section {
    background-color: #f9f9f9;
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}
.carousel {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}
.carousel-track {
    display: flex;
    width: max-content;
    gap: 100px;
    padding-right: 100px;
    animation: scroll 26s linear infinite;
    will-change: transform; /* Force GPU - prevents layout reflows causing jumps */
}
.carousel-item {
    width: 200px;
    flex-shrink: 0;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    overflow: hidden; /* Strict containment - images can't bleed out and cause reflow */
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Glassmorphism Premium Style */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

/* Itinerario Timeline sobre fondo Verde */
.bg-green-gradient {
    background: linear-gradient(135deg, #07381e 0%, var(--secondary-color) 100%);
    color: var(--text-light);
}
/* Editorial Itinerary Style (Solid Background) */
.bg-editorial-gradient {
    background-color: #052c16; /* Solid green, no gradient */
    color: #ffffff;
}
.relative-section { position: relative; overflow: hidden; padding-top: 100px; padding-bottom: 100px; }
.relative-container { position: relative; z-index: 2; }

/* Giant Background Watermarks */
.floral-watermark {
    position: absolute;
    width: 600px;
    height: 600px;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
}
.watermark-top-left { top: -100px; left: -150px; transform: rotate(15deg); }
.watermark-bottom-right { bottom: -100px; right: -150px; transform: rotate(-15deg); }

.editorial-main-title {
    color: #ffffff !important; 
    font-family: 'Playfair Display', serif; 
    font-size: 8rem; /* Aún más grande */
    margin-bottom: 40px;
    text-shadow: none !important;
}

.editorial-ticket {
    max-width: 500px;
    margin: 0 auto 60px auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
    color: #ffffff;
}
.editorial-ticket i {
    font-size: 2rem;
    margin-bottom: 15px;
}
.editorial-ticket p {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 300;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.editorial-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    opacity: 0.4;
}

.editorial-day-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 40px;
    line-height: 1.2;
    text-align: center;
}
.editorial-day-title span {
    font-family: var(--font-main);
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 2px;
}

.editorial-agenda {
    list-style: none;
}
.editorial-agenda li {
    display: flex;
    margin-bottom: 25px;
    align-items: baseline;
    color: #fff;
    font-weight: 300;
}
.editorial-agenda .time {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #ffffff;
    width: 90px;
    flex-shrink: 0;
    font-size: 1.3rem;
}
.editorial-agenda .event {
    font-size: 1.1rem;
    padding-left: 15px;
    border-left: 1px solid rgba(251, 240, 187, 0.2);
    margin-left: 15px;
}
.break-row .time, .break-row .event {
    color: rgba(255,255,255,0.4);
    font-style: italic;
    border-left-color: rgba(255,255,255,0.1);
}

/* Location Map */
.location-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}
.location-details h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}
.location-details p {
    font-size: 1.1rem;
    color: #555;
}
.map-container {
    padding: 10px;
}
.map-container iframe {
    border-radius: 8px;
    display: block;
}

/* Contacto & Formulario Premium */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}
.contact-text {
    text-align: center;
}
.contact-text h2 {
    color: var(--secondary-color);
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-transform: none;
}
.contact-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}
.sponsor-placeholder-large {
    width: 100%;
    max-width: 800px;
    height: 120px;
    background-color: rgba(0,0,0,0.02);
    margin: 20px auto 60px;
    border: 2px dashed #ddd;
    border-radius: 10px;
}
.form-container {
    width: 100%;
}
.form-floating {
    position: relative;
    margin-bottom: 25px;
}
.form-floating input {
    width: 100%;
    padding: 15px 15px 15px 5px;
    border: none;
    border-bottom: 2px solid #ddd;
    background-color: transparent;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-floating label {
    position: absolute;
    top: 15px;
    left: 5px;
    color: #999;
    font-weight: 400;
    transition: 0.3s ease all;
    pointer-events: none;
}
.form-floating input:focus,
.form-floating input:not(:placeholder-shown) {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}
.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
    top: -12px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}
.premium-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.premium-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(11,94,50,0.2);
}
.form-notes {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #888;
    line-height: 1.8;
}
.form-notes i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background-color: #003b1d;
    color: #e0e0e0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 15px;
    }
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        margin-left: 0;
    }
    .timeline-container, .location-wrapper,    .editorial-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .editorial-divider {
        display: none;
    }
    .floral-watermark {
        width: 300px;
        height: 300px;
    }
    .logos-container {
        flex-direction: column;
        gap: 40px;
    }
}

/* Masonry Grid */
.masonry-grid {
    column-count: 1;
    column-gap: 1rem;
    width: 100%;
    margin-top: 40px;
}
@media (min-width: 640px) {
    .masonry-grid { column-count: 2; }
}
@media (min-width: 1024px) {
    .masonry-grid { column-count: 3; }
}
@media (min-width: 1280px) {
    .masonry-grid { column-count: 4; }
}
.grid-item-wrapper {
    margin-bottom: 1rem;
    break-inside: avoid;
    perspective: 1000px;
}
.grid-item {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: #fff;
    transition: transform 0.1s ease-out, box-shadow 0.3s;
    transform-style: preserve-3d;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}
.grid-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.grid-item:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

/* Lightbox */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from {transform:scale(0.8); opacity:0} 
    to {transform:scale(1); opacity:1}
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* =====================
   MOBILE RESPONSIVENESS
   ===================== */
.hamburger-menu {
    display: none;
    font-size: 28px;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 2000;
}
/* Always green, white only over the dark itinerario section */
header.header-hero .hamburger-menu {
    color: var(--primary-color);
}
header.header-light .hamburger-menu {
    color: #fff;
}
header.header-dark .hamburger-menu {
    color: var(--primary-color);
}

/* Hide sidebar close button on desktop */
.close-sidebar {
    display: none;
}
/* Mobile sidebar - hidden on desktop */
.mobile-sidebar {
    display: none;
}
/* Sidebar logo hidden on desktop */
.sidebar-logo {
    display: none;
}

@media (max-width: 900px) {
    /* Hide desktop nav and logo on mobile */
    header nav {
        display: none;
    }
    .logo {
        display: none;
    }
    /* Show hamburger on mobile */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 20px;
        top: 18px;
        color: var(--primary-color);
    }
    /* Hide hamburger when sidebar is open - scoped to mobile only */
    .hamburger-menu.hamburger-hidden {
        display: none;
    }
    /* Header centered on mobile */
    .header-container {
        padding: 10px 20px;
        position: relative;
        justify-content: center;
    }
    /* White hamburger only on itinerario section */
    header.header-light .hamburger-menu {
        color: #fff;
    }

    /* Mobile Sidebar */
    .mobile-sidebar {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        transition: right 0.35s ease;
        z-index: 3000;
        padding-top: 70px;
        list-style: none;
    }
    .mobile-sidebar.active {
        right: 0;
    }
    .close-sidebar {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 28px;
        color: var(--primary-color);
        cursor: pointer;
    }
    .sidebar-logo {
        display: block;
        text-align: center;
        padding: 0 20px 15px 20px;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .sidebar-logo img {
        height: 65px;
        width: auto;
    }
    .mobile-sidebar ul {
        list-style: none;
        padding: 0 30px;
        margin: 0;
    }
    .mobile-sidebar ul li {
        margin-bottom: 20px;
    }
    .mobile-sidebar ul li a {
        color: var(--secondary-color);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 1px;
    }
    /* Swap hero image for mobile version */
    .hero-image {
        content: url('PORTADA MOVIL.png');
    }
    .hero {
        flex-direction: column;
    }
    .hero-beneficio {
        position: static;
        margin: 40px auto 10px auto;
    }
    .beneficio-logo {
        width: 150px;
    }
    .beneficio-text {
        font-size: 1.1rem;
    }
    /* Less space form/footer on mobile */
    #contacto.section {
        padding-bottom: 30px;
    }
}
