/* =========================================
   VARIABLES & RESET (COPIADO DE STYLE.CSS)
   ========================================= */
:root {
    --primary-navy: #0a1e36;
    --brand-blue: #1E5F9E;
    --accent-cyan: #00d4ff;
    --text-white: #ffffff;
    --text-silver: #b8c2cc;
    --text-dark: #1a202c;
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-height-mobile: 60px;
    --nav-height-desktop: 70px;
    --page-padding-mobile: 20px;
    --page-padding-desktop: 6vw;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background-color: var(--primary-navy); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }

/* =========================================
   NAVBAR (COPIADO DE STYLE.CSS + FIX LOGO)
   ========================================= */
.navbar { position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height-mobile); background: #ffffff; display: flex; align-items: center; justify-content: center; padding: 0 var(--page-padding-mobile); z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.menu-toggle { position: absolute; left: var(--page-padding-mobile); font-size: 1.8rem; color: var(--primary-navy); cursor: pointer; z-index: 1002; }
.nav-group { display: none; } 
.logo-wrapper { height: 100%; display: flex; align-items: center; }
.logo-box { height: 40px; width: auto; }
.logo-box img { height: 100%; width: auto; object-fit: contain; }

/* Menú Móvil */
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--primary-navy); z-index: 1001; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.5rem; transform: translateY(-100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-menu-overlay.active { transform: translateY(0); }
.mobile-link { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text-white); opacity: 0; transform: translateY(20px); }

/* =========================================
   ESTILOS ESPECÍFICOS: HISTORIA
   ========================================= */
.section-label-light { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent-cyan);}
.section-label-light i { font-size: 1.3rem; }

.section-label-blue { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 0.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: var(--brand-blue); margin-bottom: 1rem; }
.section-label-blue.align-left { justify-content: center; }
.section-label-blue i { font-size: 1.3rem; }

.section-title { font-family: var(--font-heading); font-size: 2.8rem; font-weight: 900; line-height: 1; margin-bottom: 1.5rem; text-transform: uppercase; }
.text-white { color: white !important; }
.text-navy { color: var(--primary-navy); }

.section-history {
    position: relative; /* Necesario para los elementos absolutos */
    background-color: var(--primary-navy);
    padding-top: 140px; 
    padding-bottom: 80px; 
    padding-left: var(--page-padding-mobile); 
    padding-right: var(--page-padding-mobile);
    color: white; 
    display: flex; align-items: center;
    overflow: hidden; /* Corta la imagen parallax que sobra */
}
.hist-bg-parallax {
    position: absolute;
    top: -20%; 
    left: 0; 
    width: 100%; 
    height: 140%; /* Más alto para permitir movimiento */
    /* Usamos una textura de cancha de tenis o similar */
    background-image: url('https://mrwallpaper.com/images/high/australian-open-sydney-court-ff5mp52mty109ass.jpg');
    background-size: cover; 
    background-position: center; 
    opacity: 0.15; /* Sutil */
    z-index: 1; 
    pointer-events: none; 
    filter: grayscale(100%); /* Elegancia */
}
.hist-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(30, 95, 158, 0.15) 0%, rgba(10, 30, 54, 1) 90%);
    z-index: 2; 
    pointer-events: none;
}

.history-container {
    position: relative;
    z-index: 3; /* Por encima del fondo */
    max-width: 1400px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 40px; 
    align-items: center;
}
.section-title { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 900; line-height: 1; margin-bottom: 0.5rem; margin-top: 1rem;text-transform: uppercase; }
.text-white { color: white !important; }
.accent-line { width: 60px; height: 4px; background: var(--accent-cyan); margin: 20px 0; }
.history-col-text p { font-size: 0.8rem; line-height: 1.8; color: var(--text-silver); margin-bottom: 1.5rem; }
.history-col-img img { width: 100%; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }

@media (min-width: 1024px) {
    .section-history { 
        padding-top: 180px; 
        padding-bottom: 100px;
        padding-left: var(--page-padding-desktop);
        padding-right: var(--page-padding-desktop);
    }
    .history-container { grid-template-columns: 1fr 1fr; gap: 80px; }
}

/* =========================================
   2. INDUMENTARIA (RESPONSIVE FIX)
   ========================================= */
.section-kit {
    background-color: white;
    padding: 60px var(--page-padding-mobile);
    overflow: hidden; 
    position: relative;
    display: flex;
    align-items: center;
    /* Altura automática en móvil para que el contenido empuje */
    min-height: auto; 
}

.kit-container-split {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    align-items: center;
}

/* --- COLUMNA IZQUIERDA (TEXTO) --- */
.kit-text-col {
    text-align: center;
    max-width: 600px;
    z-index: 5;
    position: relative;
    margin: 0 auto;
    width: 100%;
}

.kit-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 30px;
}

.kit-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columnas en móvil está bien para iconos */
    gap: 15px;
    text-align: left;
}

.feat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s;
}
.feat-item:hover { transform: translateY(-3px); border-color: var(--accent-cyan); }
.feat-item i { font-size: 1.4rem; color: var(--brand-blue); flex-shrink: 0; }
.feat-item h4 { font-family: var(--font-heading); font-size: 0.8rem; font-weight: 800; color: var(--primary-navy); margin-bottom: 0; line-height: 1.2; }
.feat-item span { font-size: 0.7rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; }

/* --- COLUMNA DERECHA (IMÁGENES) --- */
.kit-image-col {
    position: relative;
    display: flex;
    /* FIX MOBILE: Columna vertical para que quepan bien */
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    gap: 40px; /* Espacio entre la frontal y dorsal */
    width: 100%;
    padding: 20px 0;
}

.kit-bg-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100%; 
    background: radial-gradient(circle, rgba(224, 242, 254, 0.7) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.shirt-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* FIX MOBILE: Ancho controlado para que no se salga */
    width: 100%;
    max-width: 320px; /* Tamaño ideal para móvil */
    min-width: 0; /* Eliminamos restricciones anteriores */
}

/* Animación Flotante */
@keyframes floatShirt {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.float-anim-1 { animation: floatShirt 5s ease-in-out infinite; }
.float-anim-2 { animation: floatShirt 6s ease-in-out infinite 0.5s; }

/* CAJA INTERACTIVA */
.shirt-interactive-box {
    width: 100%;
    display: flex;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    transform-origin: center center;
}

.shirt-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 25px rgba(10, 30, 54, 0.25));
    transition: all 0.4s ease;
}

/* --- EFECTO HOVER --- */
.shirt-wrapper:hover { z-index: 10; }

.shirt-wrapper:hover .shirt-interactive-box {
    transform: scale(1.1) translateY(-10px) rotate(-2deg);
}
.float-anim-2:hover .shirt-interactive-box {
    transform: scale(1.1) translateY(-10px) rotate(2deg);
}
.shirt-wrapper:hover .shirt-img {
    filter: drop-shadow(0 30px 40px rgba(10, 30, 54, 0.4));
}

/* Píldora Detalles */
.shirt-detail-card {
    margin-top: 15px;
    background: white;
    padding: 8px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transition: transform 0.3s;
}
.shirt-wrapper:hover .shirt-detail-card { transform: translateY(10px); }

.sd-title { font-family: var(--font-heading); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--primary-navy); }
.sd-icons { display: flex; gap: 8px; color: var(--accent-cyan); font-size: 1.1rem; margin-top: 2px; }

/* --- MEDIA QUERY DESKTOP (VUELVE A LADO A LADO) --- */
@media (min-width: 1024px) {
    .section-kit { 
        padding: 60px var(--page-padding-desktop); 
        min-height: 80vh; /* Altura controlada */
    }
    
    .kit-container-split {
        flex-direction: row; /* Lado a lado */
        align-items: center;
        justify-content: space-between;
        gap: 40px; 
    }

    .kit-text-col {
        text-align: left;
        width: 38%; 
        margin: 0;
        margin-top: -40px; 
    }
    .kit-description { font-size: 1.1rem; }
    .section-label-blue.align-left { justify-content: flex-start; }
    
    .kit-image-col {
        /* Volvemos a fila en escritorio */
        flex-direction: row; 
        width: 58%; 
        justify-content: space-around;
        gap: 20px;
        padding: 50px 0; 
    }
    
    .shirt-wrapper {
        width: 48%; 
        /* En escritorio pueden ser más grandes */
        max-width: 350px; 
    }

    .kit-bg-decoration { left: 60%; width: 90%; }
}

/* =========================================
   3. STAFF (CARRUSEL 3D - FIXED BOX & SPACING)
   ========================================= */
.section-staff {
    position: relative;
    background-color: #0a1e36;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Padding equilibrado */
    padding-top: 80px; 
    padding-bottom: 40px;
}

.staff-bg-dynamic {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 70% 30%, #153e6b 0%, #0a1e36 60%); z-index: 1;
}

.staff-stripes {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(-45deg, transparent, transparent 100px, rgba(255, 255, 255, 0.03) 100px, rgba(255, 255, 255, 0.03) 200px);
}

.staff-container {
    position: relative; z-index: 5; width: 100%; max-width: 1600px;
    margin: 0 auto; padding: 0 var(--page-padding-mobile);
}

.staff-layout {
    display: flex; flex-direction: column; align-items: center; gap: 30px;
}

/* --- WRAPPER DEL CARRUSEL --- */
.staff-visual-wrapper {
    position: relative;
    width: 100%;
    height: 60vh; 
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1); color: white; border: 1px solid rgba(255, 255, 255, 0.2);
    width: 45px; height: 45px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
    z-index: 20; transition: 0.3s; display: flex; align-items: center; justify-content: center;
}
.nav-arrow:hover { background: var(--accent-cyan); color: var(--primary-navy); }
.nav-arrow.prev { left: 0; }
.nav-arrow.next { right: 0; }

.staff-carousel-track {
    position: relative; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: flex-end;
}

/* --- TARJETA DE ENTRENADOR (IMAGEN) --- */
.coach-card {
    position: absolute; bottom: 0; width: 280px; height: auto;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); transform-origin: bottom center;
    opacity: 0; filter: grayscale(100%) brightness(0.4) blur(1px); z-index: 1;
}

.coach-card img {
    width: 100%; height: auto; max-height: 55vh; object-fit: contain; display: block;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.coach-card.active {
    transform: translateX(0) scale(1.1); opacity: 1;
    filter: grayscale(0%) brightness(1.1) blur(0px) drop-shadow(0 0 40px rgba(0, 212, 255, 0.2));
    z-index: 10; left: 0; right: 0; margin: 0 auto;
}
.coach-card.prev { transform: translateX(-80%) scale(0.8) translateY(20px); opacity: 0.5; z-index: 5; left: 0; right: 0; margin: 0 auto; }
.coach-card.next { transform: translateX(80%) scale(0.8) translateY(20px); opacity: 0.5; z-index: 5; left: 0; right: 0; margin: 0 auto; }
.coach-card.hidden { transform: translateX(0) scale(0.5); opacity: 0; z-index: 0; left: 0; right: 0; margin: 0 auto; }

/* --- PANEL DE INFO (ESTANDARIZADO) --- */
.staff-info-panel {
    background: rgba(10, 30, 54, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 20px;
    color: white;
    width: 100%;
    /* En móvil dejamos que crezca según contenido, en desktop lo fijamos */
    max-width: 500px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    position: relative;
    transition: opacity 0.3s;
}

.staff-name { font-family: var(--font-heading); font-size: 2rem; line-height: 1; margin-bottom: 8px; text-transform: uppercase; color: white; }
.staff-role { font-size: 0.9rem; color: var(--accent-cyan); font-weight: 700; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.05em; border-left: 3px solid var(--accent-cyan); padding-left: 10px; }
.staff-stats { display: flex; gap: 30px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.s-stat { display: flex; flex-direction: column; }
.s-stat .label { font-size: 0.65rem; text-transform: uppercase; color: var(--text-silver); font-weight: 600; letter-spacing: 0.1em; margin-bottom: 5px; }
.s-stat .value { font-size: 1rem; font-weight: 700; color: white; }
.staff-bio { font-size: 0.9rem; line-height: 1.6; color: #cbd5e1; font-weight: 300; }

/* --- MEDIA QUERY DESKTOP --- */
@media (min-width: 1024px) {
    .section-staff {
        padding-top: 60px;
    }

    .staff-layout {
        flex-direction: row;
        justify-content: flex-start; /* Cambiamos a flex-start para controlar con margenes */
        align-items: center; 
        height: 80vh;
        gap: 0;
    }

    .staff-visual-wrapper {
        /* Reducimos un poco el ancho del wrapper visual para dar espacio al panel */
        width: 50%; 
        height: 100%;
        perspective: 1500px;
    }

    /* ... Dentro de @media (min-width: 1024px) { ... */

    .staff-info-panel {
        /* TAMAÑO ESTÁNDAR FIJO */
        width: 450px;
        height: 550px;
        flex-shrink: 0;
        
        /* PADDING AJUSTADO */
        /* Reducimos un poco el padding vertical para ganar espacio para el texto */
        padding: 50px; 
        
        /* ALINEACIÓN SUPERIOR */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        
        /* POSICIONAMIENTO */
        margin-left: 100px;
        
        /* SIN SCROLL (CLAVE) */
        overflow: hidden; 
    }

    /* AJUSTES COMPACTOS PARA QUE QUEPA TODO */
    
    .staff-header-anim {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .staff-role {
        /* Reducimos margen inferior (antes 40px) */
        margin-bottom: 25px; 
    }

    .staff-stats-anim {
        flex-shrink: 0;
        width: 100%;
    }
    
    .staff-stats {
        /* Reducimos márgenes del bloque de estadísticas */
        margin-bottom: 25px; 
        padding-bottom: 25px;
    }

    .staff-bio-anim {
        flex-grow: 1;
        overflow: hidden; /* Asegura que no desborde */
    }

    /* REDUCCIÓN DE FUENTE PARA EL PÁRRAFO */
    .staff-bio {
        /* Hacemos la letra un poco más pequeña para que entre el texto largo */
        font-size: 0.85rem !important; 
        line-height: 1.6 !important;
        color: #cbd5e1;
        
        /* Seguridad: Si el texto es EXCESIVAMENTE largo, pone puntos suspensivos (...) */
        display: -webkit-box;
        -webkit-line-clamp: 9; /* Muestra máximo 9 líneas */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Ocultamos las barras de scroll por si acaso */
    .staff-info-panel::-webkit-scrollbar { display: none; }

/* ... fin del media query ... */
    
    .nav-arrow { width: 60px; height: 60px; font-size: 2rem; }
    .nav-arrow.prev { left: 0%; }
    .nav-arrow.next { right: 0%; }
    
    /* Ajuste de tamaño de cartas en desktop */
    .coach-card { width: 340px; }
    .coach-card img { max-height: 65vh; }
    
    .coach-card.active { transform: translateX(0) scale(1.15); }
    
    /* Movemos las cartas laterales más cerca del centro para que no choquen con el panel */
    .coach-card.prev { transform: translateX(-90%) scale(0.85) translateY(30px); }
    .coach-card.next { transform: translateX(90%) scale(0.85) translateY(30px); }
}

/* =========================================
   ESTILOS ESPECÍFICOS: BANNER & RANKING
   ========================================= */
.section-players-banner { background-color: var(--primary-navy); padding: 80px var(--page-padding-mobile); text-align: center; border-top: 1px solid rgba(255,255,255,0.1); }
.banner-content h2 { font-family: var(--font-heading); font-size: 2.5rem; color: white; margin-bottom: 10px; }
.banner-content p { color: var(--text-silver); margin-bottom: 30px; }
.btn-banner { display: inline-flex; align-items: center; gap: 10px; padding: 18px 40px; background: var(--accent-cyan); color: var(--primary-navy); font-weight: 800; text-transform: uppercase; border-radius: 50px; font-size: 1rem; transition: 0.3s; border: none; cursor: pointer; }
.btn-banner:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 212, 255, 0.4); }

/* =========================================
   5. RANKING (RESPONSIVE FIX & PREMIUM LOOK)
   ========================================= */
.section-ranking {
    position: relative;
    background-color: white;
    /* Padding reducido en móvil para ganar ancho útil */
    padding: 60px 15px; 
    z-index: 5;
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ranking-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* HEADER CENTRADO */
.ranking-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap; /* Permite que los botones bajen si no caben */
    width: 100%;
}

.rank-tab {
    padding: 10px 20px; /* Un poco más pequeño en móvil */
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    flex-grow: 1; /* Botones se estiran para llenar huecos en móvil */
    max-width: 150px;
}
.rank-tab.active, .rank-tab:hover {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(30, 95, 158, 0.3);
}

/* LISTA DE JUGADORES (CONTENEDOR RÍGIDO) */
.ranking-list-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px; 
    
    /* CAMBIO: Altura calculada para 10 items pequeños de móvil */
    /* (10 items * ~65px) + gaps = ~750px */
    min-height: 750px; 
    
    justify-content: flex-start;
}

/* TARJETA DE JUGADOR (MOBILE OPTIMIZED) */
.rank-row {
    display: flex;
    align-items: center;
    /* Padding reducido drásticamente para móvil */
    padding: 12px 10px; 
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 5px solid transparent; /* Reserva espacio para borde de color */
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    /* Gap reducido para que quepa todo */
    gap: 10px; 
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* --- COLORES DE MEDALLAS --- */
/* ORO */
.rank-row.rank-gold {
    border-color: #fbbf24;
    border-left: 5px solid #fbbf24;
    background: linear-gradient(to right, #fffdf5, #ffffff);
}
.rank-row.rank-gold .rank-pos { color: #d97706; text-shadow: 0 1px 5px rgba(251, 191, 36, 0.3); }
.rank-row.rank-gold .rank-score { background-color: #fbbf24; color: white; }

/* PLATA */
.rank-row.rank-silver {
    border-color: #cbd5e1;
    border-left: 5px solid #cbd5e1;
    background: linear-gradient(to right, #f8fafc, #ffffff);
}
.rank-row.rank-silver .rank-pos { color: #64748b; }
.rank-row.rank-silver .rank-score { background-color: #94a3b8; color: white; }

/* BRONCE */
.rank-row.rank-bronze {
    border-color: #d97706;
    border-left: 5px solid #d97706;
    background: linear-gradient(to right, #fff7ed, #ffffff);
}
.rank-row.rank-bronze .rank-pos { color: #b45309; }
.rank-row.rank-bronze .rank-score { background-color: #d97706; color: white; }

/* ELEMENTOS INTERNOS (MOBILE) */
.rank-pos {
    font-family: var(--font-heading);
    font-size: 1.1rem; /* Más pequeño en móvil */
    font-weight: 900;
    color: #cbd5e1;
    /* Reducimos el ancho reservado */
    width: 30px; 
    text-align: center;
    font-style: italic;
    flex-shrink: 0; /* No encoger */
}

.rank-avatar {
    /* Avatar más pequeño para dar espacio al texto */
    width: 40px; 
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f1f5f9;
    flex-shrink: 0;
}

.rank-info { 
    flex: 1; /* Ocupa el espacio disponible */
    text-align: left;
    /* Evita que el nombre largo rompa el diseño */
    min-width: 0; 
    padding-left: 5px;
}

.rank-name { 
    font-weight: 800; 
    color: var(--primary-navy); 
    /* Tamaño de fuente adaptable */
    font-size: 0.95rem; 
    display: block; 
    line-height: 1.2;
    /* Si el nombre es muy largo, usa puntos suspensivos */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-score {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.9rem; /* Letra más chica */
    background: var(--brand-blue); 
    color: white; 
    /* Padding reducido */
    padding: 6px 12px;
    border-radius: 6px;
    /* Ancho automático o mínimo pequeño */
    min-width: 75px; 
    text-align: center;
    white-space: nowrap; /* Evita salto de línea "150 pts" */
    flex-shrink: 0;
}

/* PAGINACIÓN */
.ranking-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; 
    
    /* CAMBIO: Reducimos el margen superior para acercarlo a la lista */
    margin-top: 20px; 
    margin-bottom: 20px;
    
    margin-left: auto;
    margin-right: auto;
    background: white;
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    width: fit-content;
    max-width: 90%; 
}

.ranking-pagination button {
    width: 38px; height: 38px; /* Botones un poco más chicos */
    border-radius: 50%;
    background: var(--brand-blue);
    color: white;
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(30, 95, 158, 0.3);
    flex-shrink: 0;
}

.ranking-pagination button:hover:not(:disabled) {
    background: var(--primary-navy);
    transform: scale(1.1);
}

.ranking-pagination button:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

#pageIndicator {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-navy);
    font-size: 0.8rem; /* Texto paginación más chico */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-align: center;
}

/* =========================================
   MEDIA QUERY DESKTOP (RESTAURAR TAMAÑOS GRANDES)
   ========================================= */
@media (min-width: 1024px) {
    .section-ranking { 
        padding: 100px var(--page-padding-desktop); 
    }

    .ranking-tabs {
        justify-content: center;
        width: auto;
    }
    
    .rank-tab {
        padding: 12px 30px;
        flex-grow: 0;
        max-width: none;
        font-size: 1rem;
    }
    
    /* Restaurar tamaños grandes en Desktop */
    .rank-row {
        padding: 15px 25px;
        gap: 20px;
    }
    
    .rank-pos { 
        font-size: 1.3rem; 
        width: 50px; 
    }
    
    .rank-avatar { 
        width: 55px; height: 55px; 
    }
    
    .rank-name { 
        font-size: 1.1rem; 
    }
    
    .rank-score {
        font-size: 1.1rem;
        padding: 8px 15px;
        min-width: 100px;
    }

    .ranking-list-wrapper {
        gap: 15px;
        /* Volvemos a la altura para tarjetas grandes */
        min-height: 1025px; 
    }
    
    /* Paginación grande */
    .ranking-pagination {
        gap: 30px;
        padding: 10px 30px;
        margin-top: 60px; /* Más aire en PC */
    }
    .ranking-pagination button {
        width: 45px; height: 45px; font-size: 1.2rem;
    }
    #pageIndicator {
        font-size: 1rem;
        min-width: 140px;
    }
}

/* MODAL */
.players-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--primary-navy); z-index: 2000; padding: 40px var(--page-padding-mobile); overflow-y: auto; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.players-modal.active { transform: translateY(0); }
.pm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; color: white; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; }
.pm-header h2 { font-family: var(--font-heading); margin: 0; font-size: 1.5rem; }
.pm-close { color: white; font-size: 2rem; background: none; border: none; cursor: pointer; }
.pm-controls { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.pm-search { position: relative; width: 100%; }
.pm-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-silver); }
.pm-search input { width: 100%; padding: 15px 15px 15px 45px; border-radius: 8px; border: none; background: rgba(255,255,255,0.1); color: white; font-family: inherit; }
.pm-filter select { width: 100%; padding: 15px; border-radius: 8px; border: none; background: var(--brand-blue); color: white; font-family: inherit; font-weight: 600; cursor: pointer; }
.pm-grid-container { display: flex; flex-direction: column; gap: 20px; }
.pm-column { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.player-card-list { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 12px; display: flex; align-items: center; gap: 15px; border: 1px solid rgba(255,255,255,0.05); }
.pc-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #334155; }
.pc-info { color: white; flex: 1; }
.pc-name { font-weight: 700; font-size: 1rem; display: block; margin-bottom: 4px; }
.pc-meta { font-size: 0.75rem; color: var(--text-silver); display: flex; gap: 10px; flex-wrap: wrap; }
.pc-cat-badge { background: var(--accent-cyan); color: var(--primary-navy); padding: 2px 6px; border-radius: 4px; font-weight: 800; font-size: 0.7rem; }

/* =========================================
   FOOTER (COPIADO DE STYLE.CSS)
   ========================================= */
.main-footer { background-color: var(--primary-navy); color: var(--text-silver); padding-top: 80px; font-size: 0.9rem; position: relative; z-index: 10; }
.footer-container { width: 100%; max-width: 1300px; margin: 0 auto; padding: 0 var(--page-padding-mobile); }
.footer-top { display: flex; flex-direction: column; gap: 40px; margin-bottom: 60px; align-items: center; text-align: center; }
.footer-col { display: flex; flex-direction: column; align-items: center; width: 100%; }
.footer-logo-wrap { display: inline-block; cursor: pointer; }
.footer-logo { height: 60px; width: auto; margin-bottom: 20px; filter: brightness(0) invert(1); opacity: 0.8; transition: all 0.4s ease; }
.footer-logo:hover { opacity: 1; filter: brightness(0) invert(1) drop-shadow(0 0 8px var(--accent-cyan)); }
.footer-slogan { line-height: 1.6; max-width: 300px; color: var(--text-silver); }
.footer-heading { color: white; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin-bottom: 25px; }
.contact-list { display: flex; flex-direction: column; gap: 15px; }
.contact-list li { display: flex; align-items: flex-start; justify-content: center; gap: 12px; color: var(--text-silver); }
.contact-list li i { color: var(--accent-cyan); font-size: 1.2rem; margin-top: 2px; }
.footer-link-highlight { color: var(--text-white); font-weight: 600; border-bottom: 1px solid transparent; transition: all 0.3s; }
.footer-link-highlight:hover { color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav li a { transition: color 0.2s; color: var(--text-silver); }
.footer-nav li a:hover { color: var(--accent-cyan); }
.footer-divider { width: 100%; height: 1px; background: rgba(255,255,255,0.1); margin-bottom: 30px; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-bottom: 40px; text-align: center; }
.legal-links { display: flex; gap: 20px; font-size: 0.85rem; }
.legal-links a:hover { color: white; text-decoration: underline; }

/* =========================================
   MEDIA QUERIES DESKTOP
   ========================================= */
@media (min-width: 1024px) {
    /* Navbar Desktop */
    /* NAVBAR ESTANDARIZADA (IGUAL A INDEX) */
    .navbar { 
        height: var(--nav-height-desktop); 
        /* CAMBIO CLAVE: Usar Grid en lugar de Flex para estructura rígida */
        display: grid; 
        grid-template-columns: 1fr 140px 1fr; /* 140px fijos para el centro */
        padding: 0 var(--page-padding-desktop); /* Mismo padding que Index */
        overflow: visible; 
    }
    
    .menu-toggle { display: none; }
    
    .nav-group { 
        display: flex; 
        align-items: center; 
        gap: 2.5vw; /* Mismo espaciado entre links que Index */
        justify-content: center; /* Centra los links en su espacio disponible */
    } 
    
    .nav-link { 
        font-size: 0.8rem; 
        font-weight: 700; 
        text-transform: uppercase; 
        color: var(--primary-navy); 
        position: relative; 
        padding-bottom: 5px; 
    }
    
    .nav-link::after { 
        content: ''; 
        position: absolute; 
        bottom: 0; 
        left: 0; 
        width: 0%; 
        height: 2px; 
        background-color: var(--brand-blue); 
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    }
    
    .nav-link:hover::after { width: 100%; }
    
    /* LOGO WRAPPER: Configuración para Grid */
    .logo-wrapper { 
        width: 140px; /* Ancho fijo igual a la columna del grid */
        height: 100%;
        display: flex; 
        justify-content: center; 
        align-items: flex-start; 
        position: relative; 
        z-index: 1100;
    }
    
    /* LOGO BOX: Posición absoluta centrada */
    .logo-box { 
        position: absolute; 
        top: 0; 
        left: 50%; 
        transform: translateX(-50%); 
        height: 110px; 
        width: 130px; 
        background: white; 
        border-radius: 0 0 25px 25px; 
        box-shadow: 0 15px 40px rgba(0,0,0,0.15); 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        padding-bottom: 10px; 
    }
    
    .logo-box img { width: 65%; }

    /* Estilos Específicos Desktop */
    .section-history { padding-top: 180px; padding-bottom: 100px; padding-left: var(--page-padding-desktop); padding-right: var(--page-padding-desktop); }
    .history-container { grid-template-columns: 1fr 1fr; gap: 80px; }

    /* KIT Desktop (2 Col) */
    .section-kit { padding: 50px var(--page-padding-desktop); }
    .kit-container-split { flex-direction: row; align-items: center; justify-content: space-between; gap: 5%; }
    .kit-text-col { text-align: left; width: 40%; max-width: none; margin-top: -70px;}
    .section-label-blue.align-left { justify-content: flex-start; }
    .kit-features { justify-content: flex-start; }
    .kit-image-col { width: 50%; gap: 40px; justify-content: flex-end; }
    .shirt-box { width: 45%; }

    /* Staff Desktop */
    .staff-layout { flex-direction: row; justify-content: center; align-items: center; height: 80vh; }
    .staff-visual { width: 50%; max-width: none; text-align: center; }
    .staff-visual img { max-height: 80vh; width: auto; }
    .staff-info-panel { width: 30%; }
    .section-staff {
        /* En escritorio, como es 100vh y centrado, reducimos aún más el padding 
           para que el bloque suba y quede perfecto */
        padding-top: 10px; 
    }

    /* Modal Desktop */
    .pm-controls { flex-direction: row; justify-content: space-between; align-items: center; }
    .pm-search { width: 400px; }
    .pm-filter { width: auto; display: flex; align-items: center; gap: 10px; color: white; }
    .pm-filter select { width: 200px; }
    .pm-grid-container { flex-direction: row; gap: 40px; }

    /* Footer Desktop */
    /* FOOTER DESKTOP ALINEACIÓN PERFECTA */
    .footer-container { padding: 0 var(--page-padding-desktop); }
    
    .footer-top { 
        display: grid; 
        /* Mantenemos las mismas columnas que arriba */
        grid-template-columns: 1.5fr 1.5fr 1fr; 
        gap: 40px; 
        align-items: start; 
        text-align: left; 
    }
    
    .footer-col { align-items: flex-start; }
    .contact-list li { justify-content: flex-start; }
    
    .footer-bottom { 
        /* CAMBIO: Usamos Grid en lugar de Flex */
        display: grid;
        /* Replicamos las columnas de arriba para alineación exacta */
        grid-template-columns: 1.5fr 1.5fr 1fr; 
        gap: 40px;
        text-align: left; 
        align-items: center;
    }
    
    /* El copyright ocupa las dos primeras columnas (Logo + Contacto) */
    .footer-bottom .copyright {
        grid-column: 1 / 3;
        margin: 0;
    }
    
    /* Los links legales caen automáticamente en la columna 3 (Debajo de Menú) */
    .legal-links { 
        display: flex; 
        gap: 20px; 
        font-size: 0.85rem;
        /* Aseguramos que se alineen al inicio de su columna */
        justify-self: start; 
    }
}

#indumentaria { scroll-margin-top: 50px; }
#staff { scroll-margin-top: 65px; }
#ranking { scroll-margin-top: 50px; }