/* --- CONFIGURACIÓN DE MARCA --- */
:root {
    --bg-black: #0a0a0a;       /* Negro Mate Profundo */
    --bg-dark-gray: #121212;   /* Contraste ligero */
    --brand-pink: #e08d9e;     /* Rosa Ribeye (Ajustado para elegancia) */
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Make images responsive by default */
img { max-width: 100%; height: auto; display: block; }

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden; /* Evita scroll lateral */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- NAV --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-white);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray);
}

.nav-links a:hover {
    color: var(--brand-pink);
}

/* --- HERO SECTION --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}

/* Placeholder para tu imagen de fondo */
.hero-bg-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Aquí pondrás tu url de imagen real */
    background: url('https://images.unsplash.com/photo-1518605348399-f2339d675b68?q=80&w=2000&auto=format&fit=crop') no-repeat center center/cover; 
    filter: grayscale(100%) brightness(0.3); /* Efecto Dark */
    z-index: -2;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 0%, var(--bg-black) 90%);
    z-index: -1;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-content .highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-white); /* Efecto Outline */
}

.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid var(--brand-pink);
    color: var(--brand-pink);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.cta-button:hover {
    background-color: var(--brand-pink);
    color: var(--bg-black);
    box-shadow: 0 0 20px rgba(224, 141, 158, 0.4);
}

/* --- GENERAL SECTIONS --- */
.section-container, .section-darker {
    padding: 100px 10%;
}

.section-darker {
    background-color: var(--bg-dark-gray);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
}

.text-pink { color: var(--brand-pink); }
.text-outline { 
    color: transparent; 
    -webkit-text-stroke: 1px var(--brand-pink); 
}

/* --- MANIFIESTO (Split) --- */
.split-layout {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.text-block { flex: 1; min-width: 300px; }
.text-block h2 { font-size: 2.5rem; margin-bottom: 20px; text-transform: uppercase; font-family: var(--font-heading); }
.text-block p { color: var(--text-gray); line-height: 1.8; margin-bottom: 20px; font-size: 1.1rem;}

.image-block { flex: 1; min-width: 300px; }
.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
}

/* --- ARMADURA (Grid) --- */
.section-desc { text-align: center; color: var(--text-gray); margin-bottom: 60px; }

.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-black);
    padding: 20px;
    border: 1px solid #222;
    text-align: center;
    transition: 0.4s;
}

.card:hover {
    border-color: var(--brand-pink);
    transform: translateY(-5px);
}

.img-wrap {
    height: 300px;
    background: #000;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* fill the card while preserving aspect ratio */
    object-position: center;
    /* filter for depth */
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.card h3 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--brand-pink);
    font-family: var(--font-heading);
}

/* --- ALIADOS ESTRATÉGICOS (LOGOS MONOCROMÁTICOS) --- */
.sponsors-grid {
    display: flex;
    justify-content: center;
    gap: 80px; /* Un poco más de aire entre ellos */
    align-items: center;
    flex-wrap: wrap;
    margin-top: 60px;
}

.sponsor-item {
    /* Contenedor para asegurar el tamaño */
    width: 220px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* LA MAGIA DEL CSS MASKING */
.sponsor-logo {
    display: block;
          /* Adjustable size via CSS variables. Override inline or globally. */
          width: var(--sponsor-logo-width, 220px); /* default slightly larger */
          height: var(--sponsor-logo-height, 150px);
    
    /* 1. Definimos el color que queremos que tenga el logo.
       Usamos el rosa de la marca, pero con un poco de transparencia inicial
       para que se vea elegante y no tan agresivo de golpe. */
    background-color: var(--brand-pink); 
    opacity: 0.7; 

    /* 2. Usamos la imagen PNG como máscara. 
       La variable --logo-path viene de tu HTML */
    -webkit-mask-image: var(--logo-path);
    mask-image: var(--logo-path);

    /* 3. Aseguramos que el logo se ajuste al contenedor sin deformarse */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;

    /* Transición suave para el hover */
    transition: all 0.4s ease;
}

/* Efecto Hover: Al pasar el mouse, el logo brilla con el rosa completo */
.sponsor-item:hover .sponsor-logo {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(224, 141, 158, 0.5)); /* Un sutil brillo neón */
    transform: scale(1.05); /* Un ligero aumento de tamaño */
}

/* Ajuste responsivo para móviles */
@media (max-width: 768px) {
    .sponsors-grid {
        gap: 40px;
    }
    .sponsor-item {
        width: auto;
        height: auto;
    }
        /* Increase default mobile logo size and allow overrides */
        .sponsor-logo { width: var(--sponsor-logo-width-mobile, 160px); height: var(--sponsor-logo-height-mobile, 110px); }
}

/* Example usage:
   - Per-logo inline override: <div class="sponsor-logo" style="--logo-path: images/sitoc.png; --sponsor-logo-width:200px; --sponsor-logo-height:48px"></div>
   - Global override: set variables in :root, e.g. :root { --sponsor-logo-width:180px; }
*/

/* --- FOOTER --- */
footer {
    padding: 50px;
    text-align: center;
    border-top: 1px solid #222;
}

/* --- FOOTER LOGO (CORREGIDO) --- */
.footer-logo-container {
    width: 100px;       /* Un poco más grande para que se aprecien los detalles */
    height: 100px;
    margin: 0 auto 20px auto;
}

.footer-logo {
    display: block;
    width: 100%;
    height: 100%;
    
    /* 1. Ponemos la imagen de fondo normalmente */
    background-image: var(--logo-path);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    /* 2. EL TRUCO DEL FILTRO PARA LOGRAR EL ROSA (#e08d9e) */
    /* Esto toma los blancos/grises del logo y los fuerza hacia el rosa */
    filter: brightness(0.5) sepia(1) hue-rotate(300deg) saturate(1.5) brightness(1.2);
    
    /* Transición suave */
    transition: all 0.3s ease;
    opacity: 0.9;
}

.footer-logo:hover {
    /* Al pasar el mouse, recuperamos los colores originales o damos brillo */
    filter: none; /* Opción A: Muestra el logo original a todo color */
    /* filter: brightness(1.2) sepia(1) hue-rotate(300deg) saturate(2); Opción B: Más rosa brillante */
    opacity: 1;
    transform: scale(1.05);
}

.brand { font-family: var(--font-heading); font-weight: 900; font-size: 1.5rem; margin-bottom: 10px; }
.est { font-size: 0.8rem; color: var(--brand-pink); letter-spacing: 2px; margin-bottom: 20px; }
.socials a { margin: 0 10px; color: var(--text-gray); font-size: 0.9rem; }
.socials a:hover { color: var(--text-white); }

/* --- ANIMACIONES (JS Trigger) --- */
.reveal-text, .reveal-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-text.active, .reveal-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-200 { transition-delay: 0.2s; }
.delay-400 { transition-delay: 0.4s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .split-layout { flex-direction: column; }
    .nav-links { display: none; } /* En versión simple ocultamos menú móvil por ahora */

    /* Center and enlarge navbar logo on mobile */
    .navbar { justify-content: center; padding: 12px 20px; }
    .logo { margin: 0; }
    .logo-img { height: var(--logo-img-mobile-height, 56px); }
}

/* Logo image sizing */
.logo { display: flex; align-items: center; }
.logo-img {
    height: 90px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-img { height: 90px; }
}

/* --- TIMELINE (EL LEGADO) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
    padding: 20px 0;
}

/* La línea vertical central */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px; /* Alineado a la izquierda en móviles, ajustable */
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1); /* Línea sutil */
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px; /* Espacio para la línea */
}

/* El punto en la línea */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px; /* Centrado en la línea de 2px */
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--bg-black);
    border: 2px solid var(--brand-pink);
    border-radius: 50%;
    z-index: 1;
    transition: 0.3s;
}

.timeline-item:hover::before {
    background: var(--brand-pink);
    box-shadow: 0 0 15px var(--brand-pink);
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.timeline-date.text-pink {
    color: var(--brand-pink);
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-white);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.timeline-content p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
}

/* Destacado especial para el último campeonato */
.timeline-content.border-pink {
    border-left: 3px solid var(--brand-pink);
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(224, 141, 158, 0.05) 0%, transparent 100%);
}

.timeline-footer {
    text-align: center;
    margin-top: 50px;
    font-family: var(--font-heading);
    letter-spacing: 3px;
    color: var(--text-gray);
    font-size: 0.8rem;
    padding-left: 20px; /* Compensar alineación */
}

/* Ajuste para pantallas grandes (opcional: estilo zig-zag) */
@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 40px;
        margin-left: 0;
        text-align: right;
    }
    
    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: 40px;
        text-align: left;
    }

    .timeline-item::before {
        left: auto;
        right: -10px; /* Punto a la derecha para los items izquierdos */
    }

    .timeline-item:nth-child(even)::before {
        left: -10px; /* Punto a la izquierda para los items derechos */
        right: auto;
    }
    
    /* Ajuste especial para el borde rosa en desktop */
    .timeline-content.border-pink {
        border-left: none;
        border-right: 3px solid var(--brand-pink);
        padding-left: 0;
        padding-right: 20px;
        background: linear-gradient(-90deg, rgba(224, 141, 158, 0.05) 0%, transparent 100%);
    }
}