/* ==========================================================
   TM PARLA · Club de Tenis de Mesa
   ----------------------------------------------------------
   Índice:
   1. Variables (colores, tipografías, tamaños)
   2. Base
   3. Utilidades y botones
   4. Cabecera y menú
   5. Portada (hero)
   6. Cinta animada
   7. Secciones
   8. Horarios
   9. Tarifas
   10. Equipos y ligas
   11. Contacto
   12. Pie de página
   13. Animaciones
   ========================================================== */


/* ---------- 1. Variables ---------- */
:root {
    /* Colores de marca */
    --pink: #f448cc;
    --pink-light: #ff9fe5;
    --pink-a10: rgba(244, 72, 204, .10);
    --pink-a20: rgba(244, 72, 204, .20);
    --pink-a40: rgba(244, 72, 204, .40);

    /* Colores de apoyo */
    --blue: #4f8cff;
    --blue-light: #8fb6ff;
    --green: #22c55e;
    --green-light: #4ade80;
    --red: #f43f5e;
    --red-light: #fb7185;
    --amber: #fbbf24;

    /* Color de acento: rosa por defecto. Una sección puede cambiarlo
       (por ejemplo .theme-blue en Tarifas) y sus botones, etiquetas
       y detalles cambian solos. */
    --accent: var(--pink);
    --accent-light: var(--pink-light);
    --accent-rgb: 244, 72, 204;

    /* Fondos y texto */
    --bg: #050505;
    --surface: #0e0e10;
    --surface-2: #16161a;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #f6f6f7;
    --muted: #a1a1aa;

    /* Colores de cada grupo en los horarios */
    --g-escuela: var(--pink);
    --g-adultos: var(--blue);
    --g-competicion: var(--amber);
    --g-libre: #e4e4e7;

    /* Tipografías */
    --font-display: "Unbounded", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Medidas */
    --radius: 18px;
    --radius-lg: 28px;
    --container: 1200px;
    --gutter: 16px;
    --header-h: 68px;

    --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) {
    :root {
        --gutter: 32px;
        --header-h: 76px;
    }
}


/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--pink);
    color: #000;
}


/* ---------- 3. Utilidades y botones ---------- */
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.text-pink {
    color: var(--pink);
}

.text-accent {
    color: var(--accent);
}

/* Variante azul (se usa en Tarifas) */
.theme-blue {
    --accent: var(--blue);
    --accent-light: var(--blue-light);
    --accent-rgb: 79, 140, 255;
}

.icon {
    width: 1.2em;
    height: 1.2em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--pink);
    color: #000;
    font-weight: 600;
}

.skip-link:focus {
    top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .9rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    transition: transform .25s var(--ease), background-color .25s, border-color .25s, color .25s, box-shadow .25s;
}

.btn .icon {
    transition: transform .25s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:hover .icon {
    transform: translateX(3px);
}

.btn--primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), .4);
}

.btn--primary:hover {
    background: var(--accent-light);
    box-shadow: 0 16px 40px -10px rgba(var(--accent-rgb), .6);
}

.btn--ghost {
    background: rgba(255, 255, 255, .03);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--dark {
    background: #000;
    color: #fff;
}

.btn--dark:hover {
    background: #1c1c1f;
}

.btn--outline-dark {
    border-color: rgba(0, 0, 0, .4);
    color: #000;
}

.btn--outline-dark:hover {
    background: rgba(0, 0, 0, .08);
}

.btn--block {
    width: 100%;
}


/* ---------- 4. Cabecera y menú ---------- */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-h);
}

/* El fondo con desenfoque va en un pseudo-elemento para no romper
   el menú móvil (que es position: fixed dentro de la cabecera). */
.header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(5, 5, 5, .75);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transition: opacity .3s;
}

.header.is-scrolled::before,
.menu-open .header::before {
    opacity: 1;
}

.header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    object-fit: cover;
}

/* Menú móvil (pantalla completa) */
.nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
    background: rgba(5, 5, 5, .98);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}

.nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nav__list {
    display: flex;
    flex-direction: column;
}

.nav__link {
    display: block;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 7vw, 2.1rem);
    font-weight: 700;
    transition: color .2s, background-color .2s;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--pink);
}

.nav__cta {
    width: 100%;
    padding-block: 1.1rem;
}

.menu-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
}

.menu-toggle span {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform .3s var(--ease);
}

.menu-toggle span:first-child {
    transform: translateY(-4px);
}

.menu-toggle span:last-child {
    transform: translateY(4px);
}

.menu-toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg);
}

/* Menú de escritorio */
@media (min-width: 900px) {
    .menu-toggle {
        display: none;
    }

    .nav {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        padding: 0;
        background: none;
        overflow: visible;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .nav__list {
        flex-direction: row;
        gap: .25rem;
    }

    .nav__link {
        padding: .5rem .95rem;
        border: 0;
        border-radius: 999px;
        font-family: var(--font-body);
        font-size: .92rem;
        font-weight: 500;
        color: var(--muted);
    }

    .nav__link:hover {
        color: var(--text);
        background: rgba(255, 255, 255, .06);
    }

    .nav__link.is-active {
        color: var(--pink);
    }

    .nav__cta {
        width: auto;
        padding: .75rem 1.25rem;
        font-size: .9rem;
    }
}


/* ---------- 5. Portada (hero) ---------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-h) + 3rem) 0 4rem;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(55% 50% at 78% 35%, rgba(244, 72, 204, .22), transparent 70%),
        radial-gradient(40% 40% at 5% 95%, rgba(244, 72, 204, .10), transparent 70%);
}

/* Cuadrícula sutil de fondo */
.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
}

.hero__inner {
    display: grid;
    gap: 3.5rem;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.5rem;
    padding: .45rem .95rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 500;
}

.eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pink);
    animation: pulse 2s infinite;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6.4vw, 4.4rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -.03em;
}

.hero__text {
    max-width: 52ch;
    margin: 1.5rem 0 2rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 520px;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat__value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.5vw, 2.3rem);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat__label {
    display: block;
    margin-top: .5rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Logo con anillo y pelota girando */
.hero__visual {
    display: flex;
    justify-content: center;
}

.logo-orb {
    position: relative;
    width: min(68vw, 300px);
    aspect-ratio: 1;
}

.logo-orb::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: var(--pink);
    filter: blur(70px);
    opacity: .35;
}

.logo-orb__img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--border);
    object-fit: cover;
    animation: float 6s ease-in-out infinite;
}

.logo-orb__orbit {
    position: absolute;
    inset: -7%;
    animation: spin 7s linear infinite;
}

.logo-orb__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg 190deg, var(--pink) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}

.logo-orb__ball {
    position: absolute;
    top: 0;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #e9e9e9 55%, #b9b9b9);
    box-shadow: 0 0 22px rgba(255, 255, 255, .55);
    transform: translate(-50%, -50%);
}

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.2fr .8fr;
        gap: 4rem;
    }

    .logo-orb {
        width: min(100%, 420px);
    }
}


/* ---------- 6. Cinta animada ---------- */
.marquee {
    overflow: hidden;
    padding-block: 1.5rem;
}

.marquee__band {
    width: 104%;
    margin-left: -2%;
    padding-block: 1rem;
    background: var(--pink);
    color: #000;
    transform: rotate(-1.5deg);
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
}

.marquee__track span {
    padding-inline: .9rem;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.marquee__track .marquee__sep {
    padding-inline: .2rem;
    font-size: .8em;
}


/* ---------- 7. Secciones ---------- */
.section {
    position: relative;
    padding-block: clamp(4.5rem, 10vw, 8rem);
}

.section--alt {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.section--alt.theme-blue {
    background:
        radial-gradient(50% 60% at 90% 0%, rgba(79, 140, 255, .14), transparent 70%),
        radial-gradient(40% 50% at 0% 100%, rgba(79, 140, 255, .08), transparent 70%),
        var(--surface);
}

.section--tight {
    padding-block: clamp(3rem, 6vw, 5rem);
}

.section__head {
    max-width: 680px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section__tag {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.section__tag::before {
    content: "";
    width: 24px;
    height: 2px;
    background: currentColor;
}

.section__tag--dark {
    color: #000;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.025em;
}

.section__text {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.footnote {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: .85rem;
}


/* ---------- 8. Horarios ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.75rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 500;
    transition: color .2s, background-color .2s, border-color .2s;
}

.chip:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, .35);
}

.chip.is-active {
    background: var(--text);
    border-color: var(--text);
    color: #000;
}

.swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

/* Color de cada grupo (lo usan los filtros y las sesiones) */
[data-group="escuela"],
[data-filter="escuela"] { --c: var(--g-escuela); }

[data-group="adultos"],
[data-filter="adultos"] { --c: var(--g-adultos); }

[data-group="competicion"],
[data-filter="competicion"] { --c: var(--g-competicion); }

[data-group="libre"],
[data-filter="libre"] { --c: var(--g-libre); }

.schedule {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.day {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .3s, box-shadow .3s;
}

.day.is-today {
    border-color: var(--pink);
    box-shadow: 0 20px 50px -30px var(--pink);
}

.day__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.day__name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.day__badge {
    display: none;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: var(--pink);
    color: #000;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.day.is-today .day__badge {
    display: inline-block;
}

.day__list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.session {
    padding: .75rem .9rem;
    border-left: 3px solid var(--c, var(--g-libre));
    border-radius: 12px;
    background: var(--surface-2);
    transition: opacity .3s, filter .3s;
}

.session__time {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.session__name {
    display: block;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.4;
}

.session.is-dimmed {
    opacity: .18;
    filter: grayscale(1);
}

@media (min-width: 600px) {
    .schedule { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .schedule { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
    .schedule { grid-template-columns: repeat(6, 1fr); }

    .day { padding: 1rem; }

    .session { padding: .7rem .75rem; }

    .session__time { font-size: .88rem; }
}


/* ---------- 9. Tarifas ---------- */
.pricing {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    transition: transform .3s var(--ease), border-color .3s;
}

.plan:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.plan--featured,
.plan--featured:hover {
    border-color: var(--accent);
    background:
        linear-gradient(180deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), 0) 55%),
        var(--surface-2);
    box-shadow: 0 30px 80px -35px rgba(var(--accent-rgb), .6);
}

.plan__badge {
    position: absolute;
    top: 0;
    left: 2rem;
    transform: translateY(-50%);
    padding: .35rem .8rem;
    border-radius: 999px;
    background: var(--accent);
    color: #000;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.plan__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.plan__desc {
    margin-top: .3rem;
    color: var(--muted);
    font-size: .92rem;
}

.plan__price {
    display: flex;
    align-items: baseline;
    gap: .3rem;
}

.plan__amount {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.04em;
}

.plan__period {
    color: var(--muted);
}

.plan__features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.plan__features li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .95rem;
}

/* Tick: círculo suave + check, ambos del color de acento */
.plan__features li::before {
    --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill-opacity='.2'/%3E%3Cpath d='M6 10.4l2.7 2.7L14.2 7.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    background: var(--accent);
    -webkit-mask: var(--check) center / contain no-repeat;
    mask: var(--check) center / contain no-repeat;
}

.notes {
    display: grid;
    gap: .75rem;
    margin-top: 2rem;
}

.note {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: .9rem;
}

.note strong {
    display: block;
    color: var(--text);
    font-size: .95rem;
}

.note__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent);
}

@media (min-width: 900px) {
    .pricing {
        grid-template-columns: repeat(3, 1fr);
        max-width: none;
    }

    .notes {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ---------- 10. Equipos y ligas ---------- */
.updated {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: .8rem;
}

.updated::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pink);
}

.teams {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.25rem;
}

.team {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color .3s;
}

/* Brillo rosa en la esquina */
.team::after {
    content: "";
    position: absolute;
    top: -90px;
    right: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pink-a20), transparent 70%);
    pointer-events: none;
}

.team:hover {
    border-color: var(--pink-a40);
}

.team__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team__badge {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--pink);
    color: #000;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
}

.team__badge--light {
    background: var(--text);
}

.tag {
    padding: .35rem .75rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.team__name {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 700;
    line-height: 1.15;
}

.team__league {
    margin-top: .35rem;
    color: var(--pink);
    font-size: .95rem;
    font-weight: 600;
}

/* Posición, puntos, ganados, perdidos */
.team__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
}

.team__stat {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: .15rem;
    padding: .85rem .4rem;
    border-radius: 14px;
    background: var(--surface-2);
    text-align: center;
}

.team__stat dt {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.team__stat dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
    line-height: 1.1;
}

.team__stat dd small {
    margin-left: .1em;
    font-size: .55em;
    font-weight: 500;
    opacity: .7;
}

.team__stat--main {
    background: var(--pink);
    color: #000;
}

.team__stat--main dt {
    color: rgba(0, 0, 0, .7);
}

.team__stat--win dd {
    color: var(--green-light);
}

.team__stat--loss dd {
    color: var(--red-light);
}

/* Racha de últimos partidos */
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.form-row__label {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.form {
    display: flex;
    gap: .35rem;
}

.form__item {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: .78rem;
    font-weight: 800;
    cursor: default;
}

.form__item.is-win {
    background: var(--green);
    color: #000;
}

.form__item.is-loss {
    background: var(--red);
    color: #000;
}

/* Próximo partido */
.next {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-2);
}

.next__label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--pink);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.next__label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pink);
    animation: pulse 2s infinite;
}

.next__rival {
    margin-top: .5rem;
    color: var(--muted);
}

.next__rival strong {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.next__info {
    margin-top: .2rem;
    font-size: .92rem;
    font-weight: 600;
}

.next__info::first-letter {
    text-transform: uppercase;
}

.next__venue {
    color: var(--muted);
    font-size: .85rem;
}

/* Desplegables: clasificación y calendario */
.drawer {
    border-top: 1px solid var(--border);
}

.drawer:last-child {
    border-bottom: 1px solid var(--border);
}

.drawer summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    transition: color .2s;
}

.drawer summary::-webkit-details-marker {
    display: none;
}

.drawer summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: .25rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .25s var(--ease);
}

.drawer[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.drawer summary:hover {
    color: var(--pink);
}

.drawer > :not(summary) {
    margin-bottom: 1rem;
}

.table-wrap {
    overflow-x: auto;
}

.standings {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.standings abbr {
    text-decoration: none;
}

.standings th {
    padding: .5rem .4rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
}

.standings td {
    padding: .55rem .4rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.35;
}

.standings th:first-child,
.standings td:first-child {
    width: 2rem;
    color: var(--muted);
}

.standings th:nth-child(n+3),
.standings td:nth-child(n+3) {
    width: 2.3rem;
    text-align: center;
}

.standings td:last-child {
    font-weight: 700;
}

.standings tr.is-us td {
    background: var(--pink-a20);
    border-bottom-color: transparent;
    font-weight: 700;
}

.standings tr.is-us td:first-child {
    border-radius: 8px 0 0 8px;
    color: var(--pink);
}

.standings tr.is-us td:last-child {
    border-radius: 0 8px 8px 0;
}

.fixtures {
    display: flex;
    flex-direction: column;
}

.fixture {
    display: grid;
    grid-template-columns: 3.4rem 1fr auto;
    grid-template-areas:
        "date rival side"
        "date meta  side";
    align-items: center;
    column-gap: .8rem;
    padding: .7rem .6rem;
    border-bottom: 1px solid var(--border);
}

.fixture:last-child {
    border-bottom: 0;
}

.fixture__date {
    grid-area: date;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.3;
}

.fixture__date small {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
}

.fixture__rival {
    grid-area: rival;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
}

.fixture__meta {
    grid-area: meta;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
}

.fixture__side {
    grid-area: side;
    justify-self: end;
    padding: .3rem .6rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fixture__side.is-home {
    border-color: var(--pink-a40);
    color: var(--pink);
}

.fixture__side.is-win,
.fixture__side.is-loss {
    font-size: .82rem;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.fixture__side.is-win {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .5);
    color: var(--green-light);
}

.fixture__side.is-loss {
    background: rgba(244, 63, 94, .14);
    border-color: rgba(244, 63, 94, .5);
    color: var(--red-light);
}

.fixture.is-past {
    opacity: .45;
}

.fixture.is-next {
    border-radius: 12px;
    border-bottom-color: transparent;
    background: var(--pink-a10);
    box-shadow: inset 3px 0 0 var(--pink);
}

.team__link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    align-self: flex-start;
    font-size: .9rem;
    font-weight: 600;
    transition: color .2s;
}

.team__link:hover {
    color: var(--pink);
}

/* Próximo partido en casa */
.home-match {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    border: 1px solid var(--pink-a40);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(244, 72, 204, .22), transparent 55%),
        var(--surface);
}

.home-match__label {
    color: var(--pink);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.home-match__title {
    margin-top: .5rem;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 3vw, 1.6rem);
    font-weight: 700;
    line-height: 1.2;
}

.home-match__vs {
    color: var(--pink);
}

.home-match__meta {
    margin-top: .4rem;
    color: var(--muted);
}

.home-match__meta::first-letter {
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .home-match {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 960px) {
    .teams { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- 11. Contacto ---------- */
.cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 2.5rem;
    padding: clamp(1.75rem, 6vw, 4rem);
    border-radius: var(--radius-lg);
    background: var(--pink);
    color: #000;
}

/* Círculos decorativos (como una pelota) */
.cta::before,
.cta::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .12);
}

.cta::before {
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -260px;
}

.cta::after {
    width: 300px;
    height: 300px;
    left: -120px;
    top: -170px;
}

.cta__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.6rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.03em;
}

.cta__text {
    max-width: 42ch;
    margin: 1rem 0 2rem;
    color: rgba(0, 0, 0, .78);
    font-size: 1.05rem;
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.contact {
    display: flex;
    flex-direction: column;
    padding: .5rem 1.5rem;
    border-radius: var(--radius);
    background: #000;
    color: var(--text);
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.contact__item:last-child {
    border-bottom: 0;
}

.contact__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--pink-a20);
    color: var(--pink);
}

.contact__label {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contact__value {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}

a.contact__value:hover {
    color: var(--pink);
}

.contact__sub {
    display: block;
    color: var(--muted);
    font-size: .85rem;
}

/* Mapa (oscurecido para que encaje con la web) */
.map {
    height: clamp(260px, 40vw, 380px);
    margin-top: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    filter: invert(.92) hue-rotate(180deg) saturate(.7);
}

@media (max-width: 479px) {
    .cta__actions .btn {
        width: 100%;
    }
}

@media (min-width: 900px) {
    .cta {
        grid-template-columns: 1.15fr 1fr;
        align-items: center;
        gap: 3rem;
    }
}


/* ---------- 12. Pie de página ---------- */
.footer {
    padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    color: var(--muted);
    font-size: .9rem;
}

.footer__links a:hover {
    color: var(--pink);
}

.footer__social {
    display: flex;
    gap: .5rem;
}

.footer__social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--muted);
    transition: color .2s, background-color .2s, border-color .2s;
}

.footer__social a:hover {
    background: var(--pink);
    border-color: var(--pink);
    color: #000;
}

.footer__copy {
    color: var(--muted);
    font-size: .85rem;
}

@media (min-width: 900px) {
    .footer__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}


/* ---------- 13. Animaciones ---------- */

/* Aparición al hacer scroll (solo si hay JavaScript) */
.js .reveal:not(.is-visible) {
    opacity: 0;
}

.js .reveal.is-visible {
    animation: reveal .8s var(--ease) var(--d, 0s) both;
}

@keyframes reveal {
    from {
        opacity: 0;
        translate: 0 28px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 72, 204, .6);
    }

    70%, 100% {
        box-shadow: 0 0 0 10px rgba(244, 72, 204, 0);
    }
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .js .reveal:not(.is-visible) {
        opacity: 1;
    }
}
