/* ==========================================================================
           1. VARIABLES PREMIUM Y RESET
           ========================================================================== */
:root {
    --bg-dark: #070504;
    --surface: #120d0b;
    --surface-light: #1f1512;

    --celeste: #75AADB;
    --celeste-glow: rgba(117, 170, 219, 0.3);
    --oro: #E5C158;
    /* Un oro más vibrante y moderno */
    --oro-glow: rgba(229, 193, 88, 0.5);
    --blanco: #ffffff;
    --texto-muted: #9e9590;

    /* Tipografías Nivel Lujo */
    --font-title: 'Bodoni Moda', serif;
    --font-text: 'Outfit', sans-serif;

    --glass-bg: rgba(7, 5, 4, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    background-color: var(--bg-dark);
    color: var(--blanco);
    line-height: 1.7;
    overflow-x: hidden;
    letter-spacing: 0.3px;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-title);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--oro);
}

/* ==========================================================================
           2. NAVBAR Y MENÚ ACTIVO (SCROLLSPY)
           ========================================================================== */
header.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--blanco);
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo i {
    color: var(--celeste);
    font-size: 1.8rem;
}

.logo span {
    color: var(--oro);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--blanco);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    border-color: var(--oro);
    color: var(--oro);
}

/* Regla estricta solicitada */
.navbar-collapse {
    width: 100%;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    font-family: var(--font-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    color: var(--texto-muted);
    transition: var(--transition);
    position: relative;
    padding: 10px 0;
}

/* Efecto Hover y Estado Activo (La línea debajo) */
.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--oro);
    transition: var(--transition);
    box-shadow: 0 0 10px var(--oro-glow);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blanco);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 100%;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .navbar-collapse {
        position: absolute;
        top: 90px;
        left: 0;
        background: rgba(7, 5, 4, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column !important;
        justify-content: center !important;
        border-bottom: 1px solid var(--glass-border);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
    }

    .navbar-collapse.mostrar {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 30px 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
}

/* ==========================================================================
           3. CARRUSEL HERO
           ========================================================================== */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out, transform 10s ease;
    transform: scale(1.05);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 10;
    transform: scale(1);
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(7, 5, 4, 0.3) 0%, var(--bg-dark) 100%);
    z-index: 2;
}

.slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6) contrast(1.1);
}

.slide-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 20px;
    transform: translateY(40px);
    opacity: 0;
    transition: all 1s ease 0.5s;
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

.slide-content h2 {
    font-size: 5.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 400;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to right, #fff, #d4d4d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-content h2 span {
    background: linear-gradient(to right, var(--oro), #f9d976);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
}

.slide-content p {
    font-size: 1.1rem;
    color: #dcdcdc;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 1px;
}

.btn-premium {
    display: inline-block;
    padding: 18px 45px;
    background: transparent;
    color: var(--blanco);
    border: 1px solid var(--oro);
    font-family: var(--font-text);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    z-index: 1;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(45deg, var(--oro), #b5852a);
    z-index: -1;
    transition: var(--transition);
}

.btn-premium:hover::before {
    width: 100%;
}

.btn-premium:hover {
    border-color: transparent;
    box-shadow: 0 0 20px var(--oro-glow);
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 20;
    transform: translateY(-50%);
}

.control-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--blanco);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.control-btn:hover {
    background: var(--oro);
    border-color: var(--oro);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--oro-glow);
}

/* ==========================================================================
           4. REPRODUCTOR DE MÚSICA CUSTOM
           ========================================================================== */
.audio-section {
    position: relative;
    margin-top: -70px;
    z-index: 30;
}

.custom-player-ui {
    background: rgba(18, 13, 11, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(229, 193, 88, 0.15);
    border-radius: 16px;
    padding: 25px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 25px;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 250px;
}

.play-pause-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--oro);
    border: none;
    color: var(--bg-dark);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--oro-glow);
    transition: var(--transition);
    outline: none;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--oro-glow);
}

.play-pause-btn i {
    margin-left: 3px;
}

.play-pause-btn.is-playing i {
    margin-left: 0;
}

.track-info h4 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin: 0;
    color: var(--blanco);
    font-weight: 600;
}

.track-info p {
    margin: 0;
    color: var(--oro);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.player-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
}

.time-display {
    font-size: 0.8rem;
    color: var(--texto-muted);
    font-weight: 500;
    min-width: 45px;
    text-align: center;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--oro);
    margin-top: -4.5px;
    box-shadow: 0 0 10px var(--oro-glow);
    transition: 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.player-right {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 120px;
}

.player-right i {
    color: var(--texto-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
           5. SECCIONES Y COMPONENTES
           ========================================================================== */
.section-padding {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h3 {
    font-size: 4rem;
    color: var(--blanco);
    display: inline-block;
    position: relative;
    padding-bottom: 20px;
    font-weight: 400;
}

.section-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--oro);
}

.section-header p {
    color: var(--texto-muted);
    font-size: 1rem;
    margin-top: 15px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Historia */
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.history-text h4 {
    font-size: 2.5rem;
    color: var(--blanco);
    margin-bottom: 25px;
    line-height: 1.2;
    font-weight: 400;
    font-style: italic;
}

.history-text p {
    color: var(--texto-muted);
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.history-img-wrapper {
    position: relative;
    padding: 20px;
}

.history-img-wrapper::before,
.history-img-wrapper::after {
    content: '';
    position: absolute;
    border: 1px solid var(--oro);
    transition: var(--transition);
}

.history-img-wrapper::before {
    top: 0;
    left: 0;
    width: 60%;
    height: 60%;
    border-right: none;
    border-bottom: none;
}

.history-img-wrapper::after {
    bottom: 0;
    right: 0;
    width: 60%;
    height: 60%;
    border-left: none;
    border-top: none;
}

.history-img {
    position: relative;
    z-index: 1;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.8);
    filter: grayscale(0.7);
    transition: var(--transition);
}

.history-img-wrapper:hover .history-img {
    filter: grayscale(0);
}

.history-img-wrapper:hover::before {
    top: -10px;
    left: -10px;
}

.history-img-wrapper:hover::after {
    bottom: -10px;
    right: -10px;
}

@media (max-width: 991px) {
    .history-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* Videos */
.videos-section {
    background: var(--surface);
    position: relative;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.video-card {
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
}

.video-card:hover {
    transform: translateY(-10px);
    border-color: rgba(229, 193, 88, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.video-thumb {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
    filter: grayscale(0.4) brightness(0.7);
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
    filter: grayscale(0) brightness(1);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 5, 4, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: var(--blanco);
    transition: 0.4s;
    transform: scale(0.8);
}

.video-card:hover .play-overlay i {
    transform: scale(1);
    text-shadow: 0 0 20px var(--oro);
}

.video-info {
    padding: 25px;
    text-align: center;
}

.video-info h5 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--blanco);
    font-weight: 400;
}

.video-info p {
    font-size: 0.75rem;
    color: var(--oro);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media (max-width: 991px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* Sponsors */
.sponsors-section {
    background: var(--bg-dark);
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Fuerza 3 columnas exactas */
    gap: 60px 20px;
    align-items: start; /* Fundamental: alinea las imágenes desde arriba sin importar la altura del texto */
    justify-items: center;
}

.sponsor-item {
    text-align: center;
    filter: grayscale(100%) opacity(0.3);
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
    max-width: 300px; /* Evita que los ítems se expandan demasiado horizontalmente */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sponsor-item:hover {
    filter: grayscale(0%) opacity(1);
    transform: translateY(-5px);
}

.sponsor-img-container {
    width: 100%;
    max-width: 180px;
    height: 120px; /* Caja estricta para que todas las imágenes compartan exactamente el mismo espacio */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.sponsor-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ajusta la imagen al contenedor sin distorsionarla */
    display: block;
}

/* Adaptación inteligente para los títulos largos */
.sponsor-item p {
    font-family: var(--font-title);
    font-size: 1.25rem; /* Tamaño balanceado */
    margin: 0;
    color: var(--blanco);
    font-weight: 400;
    line-height: 1.3;
    word-break: break-word; /* Permite que textos largos se rompan en 2 o 3 líneas si es necesario */
    width: 100%;
}

/* Diseño Responsivo */
@media (max-width: 991px) {
    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en Tablets */
    }
}

@media (max-width: 576px) {
    .sponsors-grid {
        grid-template-columns: 1fr; /* 1 columna en Celulares */
    }
    
    .sponsor-item p {
        font-size: 1.15rem;
    }
}
/* Footer */
footer {
    background: #050303;
    padding-top: 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col p {
    color: var(--texto-muted);
    margin-top: 20px;
    font-weight: 300;
    font-size: 0.95rem;
}

.footer-col h4 {
    font-family: var(--font-title);
    color: var(--blanco);
    margin-bottom: 30px;
    font-size: 1.8rem;
    letter-spacing: 1px;
    font-weight: 400;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--texto-muted);
    font-weight: 300;
    font-size: 0.95rem;
}

.contact-list i {
    color: var(--oro);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--blanco);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--oro);
    border-color: var(--oro);
    color: var(--bg-dark);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--oro-glow);
}

.footer-bottom {
    text-align: center;
    padding: 25px 0;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: #555;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-bottom strong {
    color: var(--oro);
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-list li,
    .social-links {
        justify-content: center;
    }
}

/* Convertimos el contenedor en una grilla para apilar las imágenes */
.history-img-wrapper {
    display: grid;
    overflow: hidden;
    /* Evita que nada sobresalga */
}

/* Hacemos que todas las imágenes ocupen la misma celda de la grilla */
.history-img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mantiene la proporción de la foto */
    opacity: 0;
    /* Las ocultamos por defecto */
    transition: opacity 1s ease-in-out;
    /* Animación de 1 segundo (fade) */
}

/* Solo la imagen con la clase "active" será visible */
.history-img.active {
    opacity: 1;
    z-index: 2;
}

/* 1. Estilos por defecto (para computadoras y laptops) */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 100px;
    /* Tamaño normal en pantallas grandes */
    height: auto;
    transition: width 0.3s ease;
    /* Opcional: hace que el cambio de tamaño sea suave */
}


/* 2. MEDIA QUERY (Para celulares y pantallas de hasta 768px) */
@media (max-width: 768px) {
    .logo img {
        width: 40px;
        /* Tamaño reducido para pantallas pequeñas */
    }

    /* Opcional: si la letra también se ve muy grande en celular */
    .logo {
        font-size: 1.1rem;
        /* Achica un poco el texto "Perlas Gauchas" */
        gap: 6px;
        /* Reduce la distancia entre el logo y el texto */
    }
}