/* Página de inicio. Paleta de master: naranja #fb6401 sobre oscuros #141414 / #0a0a0a. */
.home {
    --home-primary: #fb6401;
    --home-accent: #fb6401;
    --home-dark: #141414;
    --home-darker: #0a0a0a;
    --home-ink: #141414;
    --home-muted: #6b6b6b;
    --home-surface: #ffffff;
    --home-bg: #f4f4f4;
    --home-radius: 16px;
    --home-shadow: 0 6px 24px rgba(10, 10, 10, .08);
    --home-shadow-hover: 0 14px 36px rgba(10, 10, 10, .16);
    background: var(--home-bg);
    color: var(--home-ink);
    padding-bottom: 32px;
}
.home *, .home *::before, .home *::after { box-sizing: border-box; }
.home a { color: inherit; text-decoration: none; }
.home [hidden] { display: none !important; } /* el JS oculta reloj/secciones con hidden */

/* ---------- Hero ---------- */
.home-hero {
    margin-top: 65px;
    position: relative;
    overflow: hidden;
    padding: 48px 16px 32px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(251, 100, 1, .35), transparent 45%),
        linear-gradient(135deg, var(--home-dark) 0%, var(--home-darker) 100%);
}
.home-hero::after { /* líneas de cancha decorativas */
    content: "";
    position: absolute; inset: auto -10% -40% auto;
    width: 520px; height: 520px;
    border: 3px solid rgba(251, 100, 1, .25);
    border-radius: 50%;
    pointer-events: none;
}
.home-hero__inner {
    position: relative; z-index: 1;
    max-width: 1180px; margin: 0 auto;
    display: grid; gap: 28px;
}
.home-hero__title { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 8px; color: #fff; }
.home-hero__subtitle { font-size: 17px; opacity: .9; margin: 0 0 20px; max-width: 520px; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.home-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px;
    font-weight: 700; font-size: 15px; cursor: pointer; border: 2px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.home-btn:hover { transform: translateY(-2px); }
.home-btn--light { background: var(--home-primary); color: #fff !important; }
.home-btn--ghost { border-color: rgba(255,255,255,.7); color: #fff !important; }
.home-btn--accent { background: var(--home-accent); color: #fff !important; margin-top: 16px; }

.home-countdown {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 22px; border-radius: var(--home-radius);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
    color: #fff !important;
    transition: transform .25s ease, background .25s ease;
}
.home-countdown:hover { transform: translateY(-4px); background: rgba(255,255,255,.18); }
.home-countdown__label { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; opacity: .85; }
.home-countdown__name { font-size: 22px; margin: 4px 0; }
.home-countdown__meta { font-size: 14px; opacity: .9; }
.home-countdown__clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; width: 100%; }
.home-countdown__clock div {
    background: rgba(0,0,0,.18); border-radius: 12px; padding: 10px 4px; text-align: center;
}
.home-countdown__clock b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.home-countdown__clock small { font-size: 11px; text-transform: uppercase; opacity: .8; }
.home-countdown__live { margin-top: 14px; font-weight: 700; color: var(--home-accent); }

.home-stats {
    position: relative; z-index: 1;
    max-width: 1180px; margin: 32px auto 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.home-stats__item { text-align: center; padding: 12px 4px; border-top: 1px solid rgba(255,255,255,.25); }
.home-stats__item b { display: block; font-size: clamp(24px, 4vw, 36px); font-variant-numeric: tabular-nums; }
.home-stats__item span { font-size: 13px; opacity: .85; }

/* ---------- Secciones ---------- */
.home-section { max-width: 1180px; margin: 40px auto 0; padding: 0 16px; }
.home-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-section__head h2 { font-size: clamp(22px, 3vw, 28px); margin: 0; position: relative; padding-left: 14px; }
.home-section__head h2::before {
    content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 5px;
    border-radius: 3px; background: var(--home-primary);
}
.home-section__head a { color: var(--home-primary); font-weight: 700; font-size: 14px; white-space: nowrap; }

.home-card {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--home-surface); border-radius: var(--home-radius);
    padding: 18px; box-shadow: var(--home-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.home-card:hover { transform: translateY(-4px); box-shadow: var(--home-shadow-hover); }
.home-card__top { display: flex; flex-wrap: wrap; gap: 6px; }
.home-card__title { font-size: 18px; font-weight: 800; margin: 4px 0 0; line-height: 1.25; }
.home-card__date, .home-card__meta { margin: 0; color: var(--home-muted); font-size: 14px; }
.home-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.home-card__chips span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--home-bg); color: var(--home-muted); }
.home-card__cupos { margin: auto 0 0; padding-top: 10px; font-weight: 700; font-size: 14px; color: #1a8a4a; }
.home-card__cupos.is-low { color: #c0392b; }

.home-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 6px; }
.home-badge--master { background: var(--home-dark); color: var(--home-accent); }
.home-badge--estado { background: var(--home-bg); color: var(--home-muted); }

/* Carrusel de torneos */
.home-carousel {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 82%);
    gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 4px 4px 16px; margin: 0 -4px;
    scrollbar-width: thin;
}
.home-carousel > * { scroll-snap-align: start; }

/* Banner */
.home-banner { position: relative; max-width: 1180px; margin: 40px auto 0; padding: 0 16px; }
.home-banner__slide { display: none; border-radius: var(--home-radius); overflow: hidden; box-shadow: var(--home-shadow); }
.home-banner__slide.is-active { display: block; animation: home-fade .6s ease; }
.home-banner__slide img { display: block; width: 100%; max-height: 220px; object-fit: cover; }

/* Campeones */
.home-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.home-card--campeon { position: relative; overflow: hidden; }
.home-card__trophy {
    position: absolute; right: -10px; top: -10px; font-size: 84px;
    color: var(--home-accent); opacity: .18; transform: rotate(12deg);
}
.home-campeones { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.home-campeones li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--home-bg); }
.home-campeones__cat { font-size: 12px; color: var(--home-muted); text-transform: uppercase; letter-spacing: .05em; }
.home-campeones__names a { font-weight: 700; }
.home-campeones__names a:hover { color: var(--home-primary); }

/* Ranking */
.home-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; scrollbar-width: none; }
.home-chips:empty { display: none; }
.home-chip {
    flex: 0 0 auto; border: 1px solid #d7dfe8; background: var(--home-surface); color: var(--home-ink);
    border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.home-chip:hover { border-color: var(--home-primary); }
.home-chip.is-active { background: var(--home-primary); border-color: var(--home-primary); color: #fff; }
.home-ranking { list-style: none; margin: 12px 0 0; padding: 0; background: var(--home-surface); border-radius: var(--home-radius); box-shadow: var(--home-shadow); overflow: hidden; }
.home-ranking li { border-bottom: 1px solid #eef2f6; animation: home-slide .35s ease both; }
.home-ranking li:last-child { border-bottom: 0; }
.home-ranking a { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; }
.home-ranking a:hover { background: var(--home-bg); }
.home-ranking__pos {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 800; background: var(--home-bg); color: var(--home-muted);
}
.home-ranking li:nth-child(1) .home-ranking__pos { background: #f6c945; color: #5a4300; }
.home-ranking li:nth-child(2) .home-ranking__pos { background: #cfd6de; color: #36414d; }
.home-ranking li:nth-child(3) .home-ranking__pos { background: #e0a46e; color: #4d2a0b; }
.home-ranking__name { font-weight: 700; display: block; }
.home-ranking__club { font-size: 13px; color: var(--home-muted); }
.home-ranking__pts { font-weight: 800; color: var(--home-primary); font-variant-numeric: tabular-nums; }
.home-ranking__pts small { font-weight: 600; color: var(--home-muted); margin-left: 2px; }

/* Noticias */
.home-news { display: grid; gap: 16px; grid-template-columns: 1fr; }
.home-news__item { display: flex; flex-direction: column; background: var(--home-surface); border-radius: var(--home-radius); overflow: hidden; box-shadow: var(--home-shadow); transition: transform .25s ease, box-shadow .25s ease; }
.home-news__item:hover { transform: translateY(-4px); box-shadow: var(--home-shadow-hover); }
.home-news__img {
    aspect-ratio: 16 / 9; background: var(--home-primary) center / cover no-repeat;
    display: grid; place-items: center; color: rgba(255,255,255,.6); font-size: 40px;
}
.home-news__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.home-news__body time { font-size: 12px; color: var(--home-muted); text-transform: uppercase; letter-spacing: .05em; }
.home-news__body h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.home-news__body p { margin: 0; color: var(--home-muted); }
.home-news__more { margin-top: auto; padding: 8px 0 0; background: none; border: 0; color: var(--home-primary) !important; font-weight: 700; cursor: pointer; text-align: left; font-size: 14px; }
.home-news__ad { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--home-radius); background: var(--home-surface); box-shadow: var(--home-shadow); }
.home-news__ad span { font-size: 11px; color: var(--home-muted); text-transform: uppercase; letter-spacing: .08em; }
.home-news__ad img { width: 100%; border-radius: 10px; object-fit: cover; }

.home-dialog { border: 0; border-radius: var(--home-radius); padding: 24px; max-width: min(640px, 92vw); max-height: 85vh; box-shadow: var(--home-shadow-hover); }
.home-dialog::backdrop { background: rgba(20, 32, 46, .55); backdrop-filter: blur(3px); }
.home-dialog img { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.home-dialog time { font-size: 12px; color: var(--home-muted); text-transform: uppercase; }
.home-dialog h3 { margin: 4px 0 12px; }
.home-dialog__close { position: sticky; top: 0; float: right; border: 0; background: var(--home-bg); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; }

/* Auspiciadores */
.home-sponsors { margin: 48px 0 0; padding: 24px 0; background: var(--home-surface); overflow: hidden; }
.home-sponsors__title { text-align: center; margin: 0 0 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--home-muted); }
.home-sponsors__track { display: flex; width: max-content; animation: home-marquee 35s linear infinite; }
.home-sponsors__track:hover { animation-play-state: paused; }
.home-sponsors__list { display: flex; align-items: center; gap: 48px; list-style: none; margin: 0; padding: 0 24px; }
.home-sponsors__list img { height: 48px; max-width: 140px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .2s ease, opacity .2s ease; }
.home-sponsors__list li:hover img { filter: none; opacity: 1; }

/* ---------- Reveal ---------- */
.home.js-on .js-reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.home.js-on .js-reveal.is-visible { opacity: 1; transform: none; }

@keyframes home-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes home-slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes home-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
    .home-carousel { grid-auto-columns: minmax(280px, 40%); }
    .home-grid--campeones { grid-template-columns: repeat(2, 1fr); }
    .home-news { grid-template-columns: repeat(2, 1fr); }
    .home-news__item--featured { grid-column: 1 / -1; flex-direction: row; }
    .home-news__item--featured .home-news__img { aspect-ratio: auto; flex: 1 1 55%; min-height: 280px; }
    .home-news__item--featured .home-news__body { flex: 1 1 45%; padding: 24px; }
    .home-news__item--featured h3 { font-size: 24px; }
}
@media (min-width: 1024px) {
    .home-hero { padding: 72px 16px 40px; margin-top: 90px; }
    .home-hero__inner { grid-template-columns: 1.2fr 1fr; align-items: center; }
    .home-carousel { grid-auto-columns: calc((100% - 48px) / 4); }
    .home-grid--campeones { grid-template-columns: repeat(3, 1fr); }
    .home-news { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .home.js-on .js-reveal { opacity: 1; transform: none; transition: none; }
    .home-sponsors__track, .home-ranking li, .home-banner__slide.is-active { animation: none; }
    .home-card, .home-news__item, .home-btn, .home-countdown { transition: none; }
}
