/* =============================================================
   Blog Ligas Femeninas At Pozuelo
   Paleta: verde bosque · rosa coral · negro
   Estilo: editorial deportivo moderno
   ============================================================= */

:root {
    /* Paleta principal */
    --verde: #0f3d2e;          /* verde bosque profundo */
    --verde-claro: #1f6b4f;    /* verde medio */
    --verde-neon: #34d399;     /* acento vivo */
    --rosa: #ff3d7f;           /* rosa coral vibrante */
    --rosa-suave: #ffd6e3;     /* rosa muy claro */
    --negro: #0a0a0a;
    --gris-900: #1a1a1a;
    --gris-500: #737373;
    --gris-300: #d4d4d4;
    --gris-100: #f5f5f5;
    --crema: #faf7f2;

    /* Semánticos */
    --bg: var(--crema);
    --fg: var(--negro);
    --fg-muted: var(--gris-500);
    --border: rgba(10, 10, 10, 0.12);
    --primary: var(--verde);
    --accent: var(--rosa);

    /* Tipografía */
    --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Espaciado */
    --container: 1200px;
    --radius: 4px;
    --radius-lg: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay decorativo en el fondo */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Tipografía */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--negro);
}

h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* =============================================================
   Navegación
   ============================================================= */
.nav {
    background: var(--verde);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.nav-brand .dot {
    display: inline-block;
    width: 10px; height: 10px;
    background: var(--rosa);
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    font-size: .92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color .15s;
}
.nav-links a:hover { color: var(--rosa); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--verde);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .nav-links.open { max-height: 500px; }
    .nav-links a { display: block; padding: .5rem 0; }
}

/* =============================================================
   Flash messages
   ============================================================= */
.flashes {
    max-width: var(--container);
    margin: 1rem auto 0;
    padding: 0 1.5rem;
    list-style: none;
}
.flash {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: .5rem;
    font-size: .95rem;
    border-left: 3px solid;
}
.flash.success { background: #e6f7ef; border-color: var(--verde-neon); color: var(--verde); }
.flash.error { background: #ffe4ec; border-color: var(--rosa); color: #a01040; }
.flash.warning { background: #fff4e0; border-color: #d97706; color: #92400e; }
.flash.info { background: #e7f0ff; border-color: #2563eb; color: #1e3a8a; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
    background: var(--verde);
    color: white;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 8rem);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    right: -10%;
    top: -20%;
    width: 60%;
    height: 140%;
    background: radial-gradient(circle at center, var(--rosa) 0%, transparent 60%);
    opacity: 0.25;
    pointer-events: none;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--rosa);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.hero-eyebrow::before {
    content: '';
    width: 30px; height: 1px;
    background: var(--rosa);
}

.hero h1 {
    color: white;
    max-width: 900px;
}
.hero h1 em {
    font-style: italic;
    color: var(--rosa);
    font-weight: 400;
}

.hero-sub {
    max-width: 620px;
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    max-width: 800px;
}
.hero-stat-num {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--rosa);
    line-height: 1;
}
.hero-stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.7);
    margin-top: .5rem;
}

/* =============================================================
   Botones
   ============================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
}
.btn-primary {
    background: var(--rosa);
    color: white;
}
.btn-primary:hover {
    background: #e6356f;
    color: white;
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
    color: var(--verde);
}
.btn-outline:hover { background: var(--verde); color: white; }

/* =============================================================
   Secciones
   ============================================================= */
section { padding: clamp(3rem, 6vw, 5rem) 0; }

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--rosa);
    margin-bottom: .75rem;
}

.section-title {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.section-title a {
    font-family: var(--font-body);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* =============================================================
   Estadillo (la pieza estrella)
   ============================================================= */
.estadillo-hero {
    background: var(--negro);
    color: white;
    padding: 3rem 0;
    border-bottom: 4px solid var(--rosa);
}

.estadillo-score {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}
@media (max-width: 680px) {
    .estadillo-score { grid-template-columns: 1fr; text-align: center; }
}

.score-big {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 700;
    color: var(--rosa);
    line-height: 1;
    letter-spacing: -0.04em;
}
.score-label {
    font-family: var(--font-mono);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.6);
    margin-top: .5rem;
}

.progress-container {
    padding: 0 1rem;
}
.progress-track {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--verde-neon), var(--rosa));
    border-radius: 3px;
    transition: width .8s ease;
}
.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: .75rem;
    font-family: var(--font-mono);
    font-size: .85rem;
    color: rgba(255,255,255,0.7);
}

/* Tabla del estadillo */
.grupo-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.grupo-header {
    padding: 1rem 1.5rem;
    background: var(--verde);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.grupo-header h3 {
    color: white;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}
.grupo-stat {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--rosa-suave);
}

.tabla-estadillo {
    width: 100%;
    border-collapse: collapse;
}
.tabla-estadillo th,
.tabla-estadillo td {
    padding: .9rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: .92rem;
}
.tabla-estadillo th {
    background: var(--gris-100);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-muted);
    font-weight: 600;
}
.tabla-estadillo tr:last-child td { border-bottom: 0; }
.tabla-estadillo tr.vacia td {
    color: var(--gris-500);
    font-style: italic;
    background: repeating-linear-gradient(
        45deg,
        transparent 0 8px,
        rgba(255,61,127,0.04) 8px 16px
    );
}
.tabla-estadillo .prueba-nombre {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--negro);
}
.tabla-estadillo .atleta-nombre {
    font-weight: 600;
}
.tabla-estadillo .marca {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--verde);
}
.tabla-estadillo .puntos {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rosa);
    text-align: right;
}
.tabla-estadillo .falta {
    color: var(--gris-500);
    font-size: .85rem;
}

@media (max-width: 680px) {
    .tabla-estadillo { display: block; }
    .tabla-estadillo thead { display: none; }
    .tabla-estadillo tbody, .tabla-estadillo tr { display: block; }
    .tabla-estadillo td {
        display: flex;
        justify-content: space-between;
        padding: .5rem 1rem;
        border: 0;
    }
    .tabla-estadillo td::before {
        content: attr(data-label);
        font-size: .7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--fg-muted);
        font-weight: 600;
        margin-right: 1rem;
    }
    .tabla-estadillo tr {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }
    .tabla-estadillo .puntos { text-align: right; }
}

/* =============================================================
   Timeline de hitos
   ============================================================= */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--verde);
}
.hito {
    position: relative;
    padding-bottom: 2.5rem;
}
.hito::before {
    content: '';
    position: absolute;
    left: -2.45rem;
    top: .4rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rosa);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--rosa);
}
.hito-fecha {
    font-family: var(--font-mono);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--rosa);
    margin-bottom: .4rem;
}
.hito h3 {
    font-size: 1.35rem;
    margin-bottom: .5rem;
}
.hito-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    font-family: var(--font-mono);
    font-size: .85rem;
}
.hito-meta .tag {
    background: var(--verde);
    color: white;
    padding: .15rem .6rem;
    border-radius: 100px;
}
.hito-meta .puntos {
    color: var(--rosa);
    font-weight: 600;
}

/* =============================================================
   Cards (noticias, atletas)
   ============================================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
}
.card-img {
    aspect-ratio: 16/10;
    background: var(--verde);
    background-image: linear-gradient(135deg, var(--verde), var(--verde-claro));
    position: relative;
    overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
    font-weight: 700;
}
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-eyebrow {
    font-family: var(--font-mono);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--rosa);
    margin-bottom: .5rem;
}
.card h3 {
    font-size: 1.25rem;
    margin-bottom: .5rem;
    line-height: 1.25;
}
.card-excerpt {
    color: var(--fg-muted);
    font-size: .92rem;
    margin-bottom: 1rem;
    flex: 1;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: var(--fg-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Card atleta especial */
.card-atleta .card-img {
    aspect-ratio: 1;
}
.card-atleta .placeholder {
    font-size: 4rem;
    letter-spacing: -0.04em;
}

/* =============================================================
   Páginas de contenido
   ============================================================= */
.page-header {
    padding: 3rem 0 2rem;
    background: white;
    border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: .5rem; }
.page-header p { color: var(--fg-muted); max-width: 700px; }

.article {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}
.article h1 { margin-bottom: 1rem; }
.article .meta {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--fg-muted);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.article p { margin-bottom: 1.25rem; }
.article h2, .article h3 { margin: 2rem 0 1rem; }

/* =============================================================
   Formularios
   ============================================================= */
.form {
    max-width: 560px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.form h1 { margin-bottom: 1.5rem; font-size: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--fg-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--bg);
    transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: 0;
    border-color: var(--verde);
}
.form-group textarea { min-height: 180px; resize: vertical; font-family: inherit; }

/* =============================================================
   Footer
   ============================================================= */
.footer {
    background: var(--negro);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    font-size: .9rem;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 680px) { .footer-inner { grid-template-columns: 1fr; } }
.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.footer a { color: rgba(255,255,255,0.7); display: block; padding: .25rem 0; }
.footer a:hover { color: var(--rosa); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    font-size: .8rem;
    font-family: var(--font-mono);
    color: rgba(255,255,255,0.5);
    text-align: center;
}

/* =============================================================
   Utilidades
   ============================================================= */
.notif-badge {
    position: absolute;
    top: -6px;
    right: -14px;
    background: var(--rosa);
    color: white;
    font-family: var(--font-mono);
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 100px;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
}

.text-rosa { color: var(--rosa); }
.text-verde { color: var(--verde); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

/* Animaciones de entrada */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease forwards; }
.fade-up-delay-1 { animation-delay: .1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: .2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: .3s; opacity: 0; }
