/* ============================================================
   Fútbol Predicción — Estilos
   ============================================================ */
:root {
  --bg: #060b15;
  --bg-soft: #0b1322;
  --surface: #0f1a2e;
  --surface-2: #16253f;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #eaf1fc;
  --muted: #9aa8c0;
  --green: #22c55e;
  --green-2: #4ade80;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --grad: linear-gradient(120deg, #22c55e 0%, #2dd4bf 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,197,94,.16), rgba(45,212,191,.16));
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.6);
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --header-h: 72px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1000px 600px at 100% -10%, rgba(34,197,94,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(45,212,191,.08), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
::selection { background: rgba(34,197,94,.35); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--green); color: #04130a; padding: 10px 16px; border-radius: 0 0 12px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1001;
  background: var(--grad); transition: width .1s linear;
}

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer;
  display: grid; place-items: center; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s; box-shadow: var(--shadow);
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--surface-2); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn--primary { background: var(--grad); color: #04130a; box-shadow: 0 10px 30px -10px rgba(34,197,94,.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(34,197,94,.7); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--green); color: var(--green-2); transform: translateY(-2px); }

/* Chips de categoría */
.chip {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--grad-soft); color: var(--green-2); font-size: 12px; font-weight: 600;
  letter-spacing: .02em; border: 1px solid rgba(34,197,94,.25);
}
.chip:hover { background: rgba(34,197,94,.22); }

.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green-2); margin-bottom: 14px;
}

.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: rgba(6, 11, 21, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; font-size: 20px; box-shadow: 0 8px 20px -6px rgba(34,197,94,.5);
}
.brand__text { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand__accent { color: var(--green-2); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 9px 16px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav__link.is-active { color: var(--text); background: var(--grad-soft); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Footer
   ============================================================ */
.footer { margin-top: 80px; background: var(--bg-soft); border-top: 1px solid var(--border); }
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 56px 20px 40px;
}
.footer__brand .brand { margin-bottom: 14px; }
.footer__desc { color: var(--muted); max-width: 340px; font-size: 15px; }
.footer__title { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; font-family: var(--font-display); }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--text); font-size: 15px; opacity: .85; transition: opacity .2s, color .2s; }
.footer__col a:hover { opacity: 1; color: var(--green-2); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px;
}
.footer__bottom a { color: var(--green-2); }
/* ============================================================
   Hero (inicio)
   ============================================================ */
.hero { padding: 72px 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__title { font-size: clamp(34px, 5vw, 58px); font-weight: 800; margin-bottom: 18px; }
.hero__desc { color: var(--muted); font-size: 18px; max-width: 480px; margin-bottom: 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__card {
  position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); aspect-ratio: 4/3;
  background: var(--surface); transition: transform .3s, box-shadow .3s;
}
.hero__card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.hero__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(4,9,18,.92)); }
.hero__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; background: var(--grad-soft); }
.hero__card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hero__card-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.3; }
.hero__card-meta { color: var(--muted); font-size: 13px; }

/* ============================================================
   Secciones
   ============================================================ */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; gap: 16px; }
.section__title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }

/* ============================================================
   Grid y tarjetas
   ============================================================ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 48px; background: var(--grad-soft); }
.card__body { display: flex; flex-direction: column; gap: 12px; padding: 20px; flex: 1; }
.card__cats { display: flex; gap: 8px; flex-wrap: wrap; }
.card__title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.card__title a:hover { color: var(--green-2); }
.card__desc { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.card__meta { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding-top: 8px; }

/* ============================================================
   Categorías
   ============================================================ */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); transition: transform .2s, border-color .2s, background .2s;
}
.cat-card:hover { transform: translateY(-4px); border-color: rgba(34,197,94,.4); background: var(--surface-2); }
.cat-card__avatar {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #04130a;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 20px; flex-shrink: 0;
}
.cat-card__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; flex: 1; }
.cat-card__count { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ============================================================
   Cabecera de página (listado)
   ============================================================ */
.page-head { padding: 48px 0 8px; }
.page-head__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin-bottom: 12px; }
.page-head__desc { color: var(--muted); font-size: 17px; max-width: 640px; }

/* ============================================================
   Paginación
   ============================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 44px 0 8px; flex-wrap: wrap; }
.pagination__btn {
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border-strong); font-weight: 600; font-size: 14px;
  transition: border-color .2s, color .2s, background .2s;
}
.pagination__btn:hover { border-color: var(--green); color: var(--green-2); background: var(--grad-soft); }
.pagination__btn.is-disabled { opacity: .4; pointer-events: none; }
.pagination__info { color: var(--muted); font-size: 14px; }
/* ============================================================
   Artículo (single)
   ============================================================ */
.post__hero { position: relative; padding: 40px 0 30px; }
.post__hero-img { margin-bottom: 30px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.post__hero-img img { width: 100%; height: auto; }
.post__hero-body { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.post__title { font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; }
.post__desc { color: var(--muted); font-size: 18px; }
.post__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.post__author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.post__author::before { content: '⚽'; font-size: 14px; }

.post__layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px; padding: 20px 20px 40px; }

/* ============================================================
   Prosa / contenido
   ============================================================ */
.prose { font-size: 17px; color: #dbe4f3; max-width: 760px; }
.prose h2 { font-size: 26px; font-weight: 700; margin: 2.2em 0 .8em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.8em 0 .6em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose p { margin: 0 0 1.2em; }
.prose a { color: var(--green-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
  margin: 1.4em 0; padding: 16px 20px; border-left: 4px solid var(--green);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border-strong); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose img { border-radius: var(--radius); }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--surface); padding: 16px; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* ============================================================
   Índice (TOC)
   ============================================================ */
.post__toc { align-self: start; position: sticky; top: calc(var(--header-h) + 20px); }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.toc__title { font-family: var(--font-display); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.toc #TableOfContents ul { list-style: none; margin: 0; padding: 0; }
.toc #TableOfContents li { margin: 0 0 6px; }
.toc #TableOfContents a { color: var(--muted); font-size: 14px; line-height: 1.45; display: block; padding: 4px 0 4px 10px; border-left: 2px solid var(--border); transition: color .2s, border-color .2s; }
.toc #TableOfContents a:hover { color: var(--green-2); border-color: var(--green); }
.toc #TableOfContents li li a { padding-left: 20px; }
/* ============================================================
   FAQ (acordeón)
   ============================================================ */
.faq { margin-top: 48px; }
.faq__title { font-size: 24px; font-weight: 700; margin-bottom: 20px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq__q { cursor: pointer; padding: 18px 20px; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: '+'; font-size: 22px; color: var(--green-2); transition: transform .2s; flex-shrink: 0; }
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 20px 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ============================================================
   Relacionados
   ============================================================ */
.related { margin-top: 56px; }
.related__title { font-size: 24px; font-weight: 700; margin-bottom: 20px; }

/* ============================================================
   Página 404
   ============================================================ */
.error { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; padding: 60px 0; }
.error__inner { text-align: center; max-width: 560px; }
.error__ball { font-size: 84px; animation: bounce 2s infinite; display: inline-block; margin-bottom: 20px; }
.error__title { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin-bottom: 12px; }
.error__desc { color: var(--muted); font-size: 17px; margin-bottom: 28px; }
.error__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .post__layout { grid-template-columns: 1fr; }
  .post__toc { position: static; order: -1; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(6,11,21,.98); border-bottom: 1px solid var(--border); padding: 16px; gap: 6px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__link { padding: 13px 16px; }
  .nav-toggle { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  .footer__bottom { justify-content: center; text-align: center; }
}




