/* --- Reseteo Básico y Variables --- */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #48dbfb;
    --text-color: #576574;
    --text-color-dark: #222f3e;
    --background-color: #eef2f7;
    --gradient-primary: linear-gradient(45deg, #ff6b6b, #ff9a9e);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* --- Estilos Globales y Reseteo --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 96%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-color-dark);
    line-height: 1.3;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 32px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 1.3rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 80px 0;
    overflow: hidden;
    /* Previene desbordamientos */
    position: relative;
    /* Necesario para z-index */
}

/* --- Encabezado y Navegación --- */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    position: fixed;
    /* Fijado en la parte superior */
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

header nav ul {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    padding: 10px 12px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Menú Hamburguesa */
.menu-toggle {
    display: none;
    /* Oculto por defecto (desktop) */
}

header nav {
    display: block;
    /* Siempre mostrar nav en desktop */
}

/* --- Sección Hero (Solución Estable) --- */
.hero {
    color: white;
    text-align: center;
    padding: 180px 20px 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    /* Capa de superposición oscura */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.video-background {
    position: fixed;
    /* Fondo fijo y estable */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: var(--secondary-color);
    text-shadow: 0.08em 0.08em 0em rgba(0, 0, 0, 0.4);
    line-height: 1.1;
    margin-bottom: 0.1em;
    text-align: center;
    margin-top: 100px;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
    text-align: center;
}

.hero-countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-btn-wrap {
    text-align: center;
    margin: 32px auto 0 auto;
    display: flex;
    justify-content: center;
}

/* --- Contador --- */
#countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.time-box {
    background: rgba(0, 0, 0, 0.55);
    padding: 15px 25px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    text-align: center;
    min-width: 100px;
    box-shadow: 0 2px 12px #0008;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.time-box .value {
    font-size: 2rem !important;
    font-weight: 900;
    color: #fff !important;
    line-height: 1;
    text-shadow: 0 2px 16px #000c, 0 1px 0 #fff2;
    opacity: 1 !important;
}

.time-box .label {
    font-size: clamp(0.7rem, 1.5vw, 0.95rem) !important;
    text-transform: uppercase;
    color: #fff !important;
    text-shadow: 0 1px 8px #000b;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .time-box {
        padding: 10px;
        min-width: 80px;
    }

    .time-box .value {
        font-size: 2rem !important;
    }
}

/* --- Botones --- */
.btn-primary {
    background-image: var(--gradient-primary);
    color: #000;
    padding: 18px 36px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    margin: 0 0 0 0;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* ===== Botón destacado Ticketera (estilo mejorado) ===== */
.nav-btn-special {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff6b6b 0%, #ff4b4b 60%, #ff9f43 100%);
    color: #fff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border: none;
    text-decoration: none;
    cursor: pointer;
}

.nav-btn-special:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 24px rgba(255, 107, 107, 0.4);
    filter: saturate(1.05);
    text-decoration: none !important;
}

.nav-btn-special:active {
    transform: translateY(0);
}

.nav-btn-special:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.35), 0 10px 20px rgba(255, 107, 107, 0.35);
}

/* Evitar que estilos genéricos de enlaces neutralicen el botón */
header nav ul li a:not(.nav-btn-special) {
    background: transparent !important;
    border: 0;
}

/* Asegurar separación visual sin romper el flex del nav */
header nav ul li:last-child .nav-btn-special {
    margin-left: 4px;
}

/* --- Sección Pilares --- */
.pillars-section {
    margin-top: 100px;
    border-radius: 0;
    padding: 0;
    background: none;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.pillar-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    padding: 0 0 24px 0;
    color: #fff;
    isolation: isolate;
    box-shadow: 0 4px 24px #0002;
}

.pillar-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(.4, .2, .2, 1);
}

.pillar-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 1;
}

.pillar-title {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 900;
    margin: 0 0 0 12px;
    text-shadow: 0 2px 12px #0008;
    letter-spacing: -1px;
    color: #fff;
}

.pillar-card i {
    display: none;
}

.pillar-card:hover .pillar-overlay {
    opacity: 0.85;
}

.pillar-card .pillar-overlay {
    animation: gradientFade 2.5s cubic-bezier(.4, .2, .2, 1) forwards;
}

@keyframes gradientFade {
    0% {
        opacity: 0.2;
    }

    100% {
        opacity: 0.7;
    }
}

/* Forzar 3 columnas en pantallas medianas */
@media (max-width: 1200px) {
    .pillars-section .pillars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pillars-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .evento-details {
        flex-direction: column;
        gap: 20px;
    }

    #countdown {
        flex-wrap: wrap;
        gap: 10px;
    }

    .time-box {
        padding: 10px;
        min-width: 80px;
    }

    .time-box .value {
        font-size: 2rem !important;
    }

    .videos-container {
        gap: 30px;
    }

    .video-embed-wrapper {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .videos-container.reverse {
        flex-direction: column;
        /* Apila en vez de invertir */
    }

    .videos-container.reverse .video-text-content {
        text-align: left;
        /* Restaura alineación en móvil */
    }

    .videos-container.reverse .video-text-content h2::after {
        margin-left: 0;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .pillars-grid {
        grid-template-columns: repeat(1, 1fr);
        /* Una columna en móviles pequeños */
    }

    .distancias-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Info Section --- */
.info-section {
    background-color: #fff;
}

.evento-details {
    display: flex;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    flex-wrap: wrap;
    gap: 30px;
}

.evento-details>div {
    background: #fff;
    padding: 25px 35px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.evento-details>div i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.evento-details>div:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

/* --- Sección Sobre Nosotros (Estable) --- */
.about-section {
    background-color: var(--background-color);
    position: relative;
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 20px;
}

/* --- Animaciones de Scroll --- */
[data-animation] {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animation="slide-in-left"] {
    transform: translateX(-50px);
}

[data-animation="slide-in-right"] {
    transform: translateX(50px);
}

[data-animation="fade-in-up"] {
    transform: translateY(50px);
}

[data-animation].is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}


/* --- Sección Distancias --- */
.distancias-section {
    background-color: #fff;
}

.distancias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.distancia-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.distancia-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.distancia-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.distancia-card h3 {
    font-size: 1.2rem;
    color: var(--text-color-dark);
    margin: 10px 0;
}

.distancia-card p {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--secondary-color);
    margin: 0;
}

/* --- Sección Kit --- */
.kit-section {
    background-color: var(--background-color);
}

.kit-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.kit-item {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    text-align: center;
    width: 160px;
    transition: transform 0.3s ease;
}

.kit-item:hover {
    transform: scale(1.05);
}

.kit-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- Sección FAQ --- */
.faq-section {
    background-color: #fff;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding: 0 20px 20px 20px;
    line-height: 1.7;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    /* Ajustar si las respuestas son muy largas */
}

/* --- Videos --- */
.videos {
    background-color: var(--background-color);
}

.videos-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.stylized-video-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(3rem, 10vw, 7rem);
    color: var(--secondary-color);
    text-shadow: 0.08em 0.08em 0em rgba(0, 0, 0, 0.4);
    line-height: 1.1;
}

.video-text-content {
    flex: 1;
    min-width: 300px;
}

.video-text-content i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.video-text-content h2 {
    text-align: left;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 15px;
}

.video-text-content h2::after {
    margin-left: 0;
    margin-right: auto;
}

.video-text-content p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.video-embed-wrapper {
    flex: 0 0 400px;
    max-width: 400px;
    width: 100%;
}

.video-aspect-ratio {
    position: relative;
    padding-top: 177.78%;
    /* Proporción 9:16 para video vertical */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-medium);
}

.video-aspect-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Modificador para invertir el orden */
.videos-container.reverse {
    flex-direction: row-reverse;
}

.videos-container.reverse .video-text-content {
    text-align: right;
}

.videos-container.reverse .video-text-content h2::after {
    margin-left: auto;
    margin-right: 0;
}


/* --- Patrocinadores --- */
.sponsors {
    background-color: #fff;
}

.sponsors h2 {
    color: #aaa;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.sponsors h2::after {
    display: none;
}

.sponsor-logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.sponsor-item {
    transition: transform 0.3s ease;
}

.sponsor-item:hover {
    transform: scale(1.1);
}

.sponsor-item img {
    max-height: 60px;
    width: auto;
    filter: none !important;
    opacity: 1 !important;
    transition: none;
}

.logo-presenta img {
    max-height: 90px;
    filter: none !important;
    opacity: 1 !important;
}

/* --- Footer --- */
footer {
    background: #232a31;
    color: #fff;
    padding: 25px 0 0 0;
    text-align: center;
    position: relative;
    width: 100%;
}

.footer-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin: 0 auto;
    padding-bottom: 16px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.footer-col {
    flex: 1 1 180px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    text-align: center;
    padding: 0 12px;
}

.footer-logo img {
    margin-bottom: 8px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.footer-underline {
    width: 60px;
    height: 3px;
    background: #fd3d0d;
    border-radius: 2px;
    margin-bottom: 16px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fd3d0d;
}

.footer-social {
    font-size: 1.6rem;
    color: #fff;
    background: #232a31;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.footer-social:hover {
    background: #fd3d0d;
    color: #fff;
}

.footer-bottom {
    background: #000;
    color: #fff;
    padding: 18px 0 12px 0;
    font-size: 0.95rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin: 0;
    left: 0;
    right: 0;
    position: relative;
    box-sizing: border-box;
}

.footer-copyright,
.footer-legal {
    color: #fff;
    text-align: center;
    flex: unset;
    margin: 0;
    display: inline-block;
}

.footer-legal a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    margin-left: 18px;
    transition: color 0.2s;
}

.footer-legal a:first-child {
    margin-left: 0;
}

.footer-legal a:hover {
    color: #ff6b6b;
}

@media (max-width: 900px) {
    .footer-main {
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-width: 100%;
        text-align: center;
    }
    .footer-col {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .footer-main {
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-width: 100%;
        padding-bottom: 8px;
    }
    .footer-col {
        margin-bottom: 4px;
        padding: 0;
    }
    .footer-logo img {
        height: 36px !important;
        margin-bottom: 4px;
    }
    .footer-title {
        font-size: 1rem;
    }
    .footer-underline {
        width: 40px;
        height: 2px;
    }
    .footer-col a {
        font-size: 0.95rem;
    }
    .footer-social {
        font-size: 1.2rem;
        width: 30px;
        height: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        padding: 12px 0 8px 0;
        font-size: 0.9rem;
    }
}

/* --- Responsividad --- */
@media (max-width: 980px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        /* Mueve la imagen arriba en móvil */
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 20px;
    }

    nav.is-active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 992px) {
    .menu-toggle {
        display: inline-flex;
    }

    header nav {
        display: none;
    }

    /* cuando el header tenga clase is-open se muestra el nav */
    header.is-open nav {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        gap: 12px;
    }
}

h1,
h2,
h3 {
    text-align: center;
}

/* --- Evitar subrayado en nav-btn-special --- */
.nav-btn-special,
.nav-btn-special:hover,
.nav-btn-special:focus,
.nav-btn-special:active {
    text-decoration: none !important;
}

/* --- Scrollbar personalizado mejorado --- */
body, html, * {
    scrollbar-width: thin;
    scrollbar-color: #ff6b00 #f7f7f7;
}

::-webkit-scrollbar {
    width: 5px;
    background: #f7f7f7;
}
::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 12px;
    min-height: 40px;
    border: 2px solid #f7f7f7;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff9f43;
}