
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Bebas+Neue&display=swap');

/* ── Variables ── */
:root {
    --navy:       #0a0e1a;
    --navy-mid:   #0f1629;
    --navy-card:  #141b2d;
    --navy-light: #1e2a3d;
    --gold:       #f0b429;
    --gold-light: #ffd166;
    --accent:     #3b82f6;
    --green:      #22c55e;
    --red:        #ef4444;
    --text:       #e2e8f0;
    --text-muted: #8899aa;
    --border:     rgba(255,255,255,0.07);
    --glow:       0 0 30px rgba(240,180,41,0.15);
    --radius:     12px;
    --radius-lg:  20px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--navy);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

main {
    flex: 1;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ── Header / Nav ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,14,26,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s ease;
}
header.header-hidden {
    transform: translateY(-100%);
}

.header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-wrap img { height: 75px; width: 75px; object-fit: contain; border-radius: 8px; }
.logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--gold);
    line-height: 1;
}
.logo-text span { display: block; font-family: 'Inter', sans-serif; font-size: 0.6rem; letter-spacing: 4px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; }

nav { display: flex; gap: 4px; align-items: center; }

.nav-link {
    display: flex; align-items: center; gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--navy-light); }
.nav-link.active {
    color: var(--gold);
    background: rgba(240,180,41,0.1);
}
.nav-link .nav-icon { font-size: 1rem; }

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Hero (only on index) ── */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0e1a 0%, #0f1629 40%, #1a0a2e 100%);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(240,180,41,0.12) 0%, transparent 70%);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(240,180,41,0.12);
    border: 1px solid rgba(240,180,41,0.3);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 2rem;
    position: relative;
}
.hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 4px;
    background: linear-gradient(135deg, #ffffff 0%, var(--gold) 60%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
    position: relative;
}
.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    position: relative;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 12px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(240,180,41,0.35); }
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* Hero stats bar */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    position: relative;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1;
}
.hero-stat-label { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }

/* ── Page Header (inner pages) ── */
.page-hero {
    background: linear-gradient(135deg, var(--navy-mid), var(--navy));
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(240,180,41,0.08) 0%, transparent 70%);
}
.page-hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 3px;
    color: var(--gold);
    position: relative;
}
.page-hero p { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.5rem; position: relative; }

/* ── Main container ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ── Section titles ── */
.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold), transparent);
    opacity: 0.4;
}

/* ── Cards ── */
.card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(240,180,41,0.2);
    box-shadow: var(--glow);
}

/* ── Tabla de Clasificación ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); -webkit-overflow-scrolling: touch; display: block; max-width: 100%; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
    min-width: 700px;
}
thead th {
    background: var(--navy-light);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 14px 12px;
    text-align: center;
    white-space: nowrap;
}
thead th:first-child { text-align: left; padding-left: 20px; }
thead th:nth-child(2) { text-align: left; }

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
tbody tr:hover { background: rgba(255,255,255,0.03); }

tbody td {
    padding: 14px 12px;
    text-align: center;
    color: var(--text);
}
tbody td:first-child { padding-left: 20px; font-weight: 700; color: var(--text-muted); font-size: 0.85rem; }
tbody td:nth-child(2) { text-align: left; font-weight: 700; }

.pts-col { font-weight: 800 !important; color: var(--gold) !important; font-size: 1rem !important; }

/* Ocultar columnas secundarias en móvil */
.col-hide-mobile { display: table-cell; }

@media (max-width: 768px) {
    table {
        min-width: 0;
        font-size: 0.78rem;
    }
    thead th {
        padding: 10px 5px;
        font-size: 0.58rem;
        letter-spacing: 0.5px;
    }
    tbody td {
        padding: 10px 5px;
    }
    tbody td:first-child {
        padding-left: 10px;
    }
    thead th:nth-child(2) {
        min-width: 110px;
    }
    .col-hide-mobile {
        display: none;
    }
}

/* Position highlights */
.pos-1 td:first-child { color: var(--gold) !important; }
.pos-2 td:first-child { color: #c0c0c0 !important; }
.pos-3 td:first-child { color: #cd7f32 !important; }

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
}
.pos-badge.gold { background: rgba(240,180,41,0.15); color: var(--gold); }
.pos-badge.silver { background: rgba(192,192,192,0.12); color: #c0c0c0; }
.pos-badge.bronze { background: rgba(205,127,50,0.12); color: #cd7f32; }

.dg-pos { color: var(--green) !important; }
.dg-neg { color: var(--red) !important; }

.equipo-color-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ── Tarjetas de partido ── */
.jornada-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.jornada-title::before, .jornada-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.partido-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
}
.partido-card:hover {
    border-color: rgba(240,180,41,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.partido-card.pendiente { opacity: 0.6; border-style: dashed; }

/* Result accent border */
.partido-card.res-local-win  { border-left-color: var(--green); }
.partido-card.res-visita-win { border-left-color: var(--red); }
.partido-card.res-draw       { border-left-color: var(--gold); }

.equipo-match {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}
.equipo-match.local  { justify-content: flex-end; }
.equipo-match.visitante { justify-content: flex-start; }

/* Logo inside match card */
.equipo-logo-res { display: flex; align-items: center; flex-shrink: 0; }
.equipo-logo-res img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; }

/* Team name + result color */
.equipo-nombre-res { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.res-ganador { color: var(--green) !important; }
.res-perdedor { color: var(--red) !important; opacity: 0.8; }
.res-empate   { color: var(--gold) !important; }

/* Dot size in match cards */
.partido-card .equipo-color-dot { width: 12px; height: 12px; flex-shrink: 0; }

.marcador {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 2px;
    padding: 8px 20px;
    border-radius: 10px;
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
}
.marcador.pendiente {
    background: var(--navy-light);
    color: var(--text-muted);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid var(--border);
}

/* ── Fichas de Equipo ── */
.equipos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.equipo-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--text);
}
.equipo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.equipo-card-banner {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    overflow: hidden;
}
.equipo-card-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    opacity: 0.35;
}
.equipo-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    margin: -28px auto 0;
    background: var(--navy-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}
.equipo-card-body { padding: 1rem 1.25rem 1.5rem; text-align: center; }
.equipo-card-nombre { font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.equipo-card-estadio { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.equipo-card-stats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.equipo-stat-mini {
    background: var(--navy-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.equipo-stat-mini span { color: var(--gold); margin-right: 3px; }

/* ── Countdown ── */
.countdown-wrap {
    background: linear-gradient(135deg, var(--navy-card), var(--navy-light));
    border: 1px solid rgba(240,180,41,0.25);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.countdown-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(240,180,41,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.countdown-jornada {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 4px;
    position: relative;
}
.countdown-fecha {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    position: relative;
}
.countdown-boxes {
    display: flex;
    justify-content: center;
    gap: 12px;
    position: relative;
}
.countdown-box {
    background: var(--navy);
    border: 1px solid rgba(240,180,41,0.2);
    border-radius: var(--radius);
    padding: 12px 10px 10px;
    min-width: 64px;
    text-align: center;
    transition: border-color 0.3s;
}
.countdown-box:hover {
    border-color: var(--gold);
}
.countdown-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.countdown-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}
.countdown-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: var(--green);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 1rem;
    position: relative;
}
.countdown-live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}
.countdown-done {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--gold);
    position: relative;
}

/* ── Index: Mini Clasificación ── */
.mini-tabla { min-width: 0; }
.mini-tabla tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ── Próximos Partidos (index) ── */
.proximos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.proximo-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: all 0.25s ease;
}
.proximo-card:hover { border-color: rgba(240,180,41,0.25); transform: translateY(-2px); }
.proximo-jornada { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.75rem; }
.proximo-vs { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 0.75rem; }
.proximo-equipo { font-weight: 700; font-size: 0.9rem; flex: 1; }
.proximo-equipo.l { text-align: right; }
.proximo-equipo.v { text-align: left; }
.proximo-vs-badge {
    background: var(--navy-light);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* ── Footer ── */
footer {
    background: var(--navy-mid);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: 4rem;
    width: 100%;
    box-sizing: border-box;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* ── Developer Credit ── */
.dev-credit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(240,180,41,0.08), rgba(59,130,246,0.08));
    border: 1px solid rgba(240,180,41,0.15);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.dev-credit:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(240,180,41,0.15), 0 0 40px rgba(240,180,41,0.05);
}
.dev-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.dev-link {
    position: relative;
    text-decoration: none;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    overflow: hidden;
}
.dev-link:hover {
    color: var(--gold-light);
}
.dev-link .dev-name {
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}
.dev-link .dev-glow {
    position: absolute;
    inset: -4px -8px;
    border-radius: 8px;
    background: radial-gradient(ellipse, rgba(240,180,41,0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.dev-link:hover .dev-glow {
    opacity: 1;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 200% center; }
}

/* ── Layout Utilities ── */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.card--flush { padding: 0; overflow: hidden; }
.card-footer-link {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
}
.btn--sm { padding: 8px 20px; font-size: 0.8rem; }
.btn--neutral { background: var(--navy-light); color: var(--text); }
.text-center-mt { margin-top: 1rem; text-align: center; }
.section-equipos { margin-top: 3rem; }

/* ── Table Header Variants ── */
.th-pos { width: 40px; }
.th-pos-lg { width: 50px; }
.th-equipo { text-align: left; }
.th-equipo-full { text-align: left; min-width: 180px; }
.th-forma { min-width: 80px; }

/* ── Leyenda (clasificacion) ── */
.leyenda {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.leyenda-item { display: flex; align-items: center; gap: 6px; }
.leyenda-highlight { color: var(--gold); font-weight: 700; }

/* ── Stats Grid (clasificacion) ── */
.stats-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.stat-card { text-align: center; }
.stat-icon { font-size: 2rem; margin-bottom: 8px; }
.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.stat-value { font-weight: 700; }

/* ── Filtros Jornada (resultados) ── */
.filtros-jornada {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* ── Calendario Controles ── */
.calendario-controles {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    border: 1px solid var(--gold);
    background: rgba(240, 180, 41, 0.05);
}
.mes-label {
    margin: 0;
    color: var(--gold);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 2px;
}
.detalle-jornadas { margin-top: 4rem; }
.detalle-header { text-align: center; margin-bottom: 2rem; }
.detalle-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--text);
    letter-spacing: 2px;
}
.detalle-subtitle { color: var(--text-muted); }

/* ── Modal de Equipo (equipos) ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
}
.modal-banner {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}
.modal-body { padding: 1.5rem 2rem 2rem; }
.modal-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}
.modal-stat {
    background: var(--navy-light);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}
.modal-stat-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--gold);
    line-height: 1;
}
.modal-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
}
.modal-info { font-size: 0.85rem; color: var(--text-muted); }
.modal-info span { color: var(--text); font-weight: 600; }
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.modal-close:hover { background: rgba(240, 180, 41, 0.3); }

/* ── Forma (W/D/L) ── */
.forma-w { color: var(--green); font-weight: 700; }
.forma-d { color: var(--gold); font-weight: 700; }
.forma-l { color: var(--red); font-weight: 700; }

/* ── Animaciones ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease both; }
.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 768px) {
    body { overflow-x: hidden; min-width: 0; }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 68px;
        left: 0; right: 0;
        background: var(--navy-mid);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 4px;
    }
    nav.open { display: flex; }
    .hamburger { display: flex; }

    .header-inner { height: 60px; padding: 0 1rem; }
    .logo-wrap img { height: 50px; width: 50px; }
    .logo-text { font-size: 1.4rem; }

    .two-col-grid { grid-template-columns: 1fr !important; }

    .partido-card {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 0.75rem;
    }
    .equipo-match.local, .equipo-match.visitante { justify-content: center !important; flex-wrap: wrap; }
    .marcador { width: fit-content; margin: 0 auto; }

    .hero-stats { gap: 2rem; }
    .hero-stat-num { font-size: 2rem; }

    /* Calendar controles */
    .calendario-controles {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    .mes-label { font-size: 1.6rem; }
    .calendario-controles .btn { font-size: 0.7rem; padding: 6px 10px; }

    /* Calendar jornada cards */
    .card[id^="jornada-"] > div:first-child {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .card[id^="jornada-"] > div:first-child h3 {
        font-size: 1.5rem;
    }

    /* Stats grid */
    .stats-extra-grid { grid-template-columns: 1fr 1fr; }

    /* Footer */
    footer { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
    .equipos-grid { grid-template-columns: 1fr 1fr; }
    .proximos-grid { grid-template-columns: 1fr; }
    .stats-extra-grid { grid-template-columns: 1fr; }
    .calendario-controles { gap: 0.4rem; padding: 0.5rem; }
    .calendario-controles .btn { font-size: 0.65rem; padding: 5px 8px; }
    .mes-label { font-size: 1.3rem; }
}

/* ── Fix zoom-out móvil ── */
html {
    overflow-x: clip;
}

header {
    width: 100%;
    box-sizing: border-box;
    left: 0;
    right: 0;
}

footer {
    width: 100%;
    box-sizing: border-box;
}