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

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

:root {
  --ink:    #0f172a;
  --ink2:   #1e293b;
  --muted:  #64748b;
  --light:  #f8fafc;
  --border: #e2e8f0;
  --red:    #e8272e;
  --dark:   #0f172a;
  --white:  #ffffff;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─── */
.af-header {
  background: var(--white);
  height: 72px;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 var(--border);
}

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

.af-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.af-logo img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.logo-text small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: rgba(0,0,0,0.2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.af-nav { display: flex; gap: 2px; }

.af-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.af-nav a:hover { color: var(--ink); background: var(--light); }
.af-nav a.active { color: var(--red); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--muted); border-radius: 2px; }

/* ─── HERO ─── */
.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 40px 32px;
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-rows: auto 1fr;
  gap: 0;
}

.hero-eyebrow {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 24px;
}

.hero-body {
  grid-column: 1;
  grid-row: 2;
  padding-right: 48px;
  align-self: start;
}

.hero-eyebrow span {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s;
}

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink2) !important; color: #ffffff !important; transform: scale(1.05); }

.hero-image {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 420px;
}

/* ─── BANNER SLOT ─── */
.banner-slot {
  background: var(--white);
  padding: 16px 40px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 314px; /* 250px billboard + 64px padding */
}

.banner-box {
  width: 970px;
  max-width: 100%;
  height: 90px;
  border: 1px dashed #e2e8f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ─── LEAGUE CARDS ─── */
.leagues-section { background: var(--light); }

.leagues-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 40px;
}

.leagues-header { text-align: center; margin-bottom: 40px; }

.leagues-header h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.leagues-header h2 em { font-style: normal; color: var(--red); }
.leagues-header p { font-size: 14px; color: var(--muted); }

.league-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.league-card {
  height: 300px;
  perspective: 1000px;
  cursor: pointer;
  text-decoration: none;
}

.league-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.league-card:hover .league-card-inner,
.league-card.flipped .league-card-inner { transform: rotateY(180deg); }

.league-card-front,
.league-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.league-card-front {
  background: var(--light);
  border-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.league-card-front img { width: 130px; height: 130px; object-fit: contain; }

.league-name { font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.league-name-laliga  { color: #EF3E42; }
.league-name-premier { color: #37003C; }
.league-name-seriea  { color: #1B6FEA; }

.league-card-back {
  background: var(--ink);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 24px;
}

.league-card-back h3 { font-size: 17px; font-weight: 800; color: var(--white); margin-bottom: 10px; line-height: 1.25; }
.league-card-back h3 em { font-style: normal; color: rgba(255,255,255,0.75); }
.league-card-back p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.65; margin-bottom: 20px; flex: 1; }
.league-card-back a {
  display: block;
  text-align: center;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.18s;
}
.league-card-back a:hover { background: rgba(255,255,255,0.88); }

.card-back-laliga  { background: #EF3E42; border-color: #EF3E42; }
.card-back-premier { background: #37003C; border-color: #37003C; }
.card-back-seriea  { background: linear-gradient(145deg, #2BA7F5 0%, #0047C8 100%); border: none; }
.card-back-laliga  a { color: #CC2226; }
.card-back-premier a { color: #37003C; }
.card-back-seriea  a { color: #0047C8; }

/* ─── SECTIONS ─── */
.section { max-width: 1140px; margin: 0 auto; padding: 72px 40px; }
.section-bg-light { background: var(--light); }
.section-bg-white { background: var(--white); }
.section-bg-dark  { background: var(--dark); position: relative; overflow: hidden; }

.section-bg-dark .eyebrow      { color: var(--red); }
.section-bg-dark .section-title { color: #ffffff; }
.section-bg-dark .section-lead  { color: rgba(255,255,255,0.5); margin-bottom: 32px; }
.section-bg-dark .step { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); transition: transform 0.25s ease, border-color 0.25s ease; }
.section-bg-dark .step:hover { transform: translateY(-8px); border-color: rgba(232,39,46,0.4); }
.section-bg-dark .step-num   { color: var(--red); }
.section-bg-dark .step-title { color: #ffffff; }
.section-bg-dark .step-desc  { color: rgba(255,255,255,0.5); }

.bg-shape { position: absolute; border: 1px solid rgba(255,255,255,0.07); pointer-events: none; animation: bgFloat linear infinite; }

@keyframes bgFloat {
  0%   { transform: translateY(0)     rotate(0deg);   opacity: 0.07; }
  50%  { transform: translateY(-30px) rotate(90deg);  opacity: 0.13; }
  100% { transform: translateY(0)     rotate(180deg); opacity: 0.07; }
}

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }

.section-title { font-size: 32px; font-weight: 900; color: var(--ink); line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 16px; }

.section-lead { font-size: 15px; color: var(--muted); line-height: 1.75; max-width: 580px; margin-bottom: 48px; }

/* ─── QUÉ SON ─── */
.que-grid { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; margin-top: 24px; }
.que-text p { font-size: 15px; color: var(--muted); line-height: 1.85; margin-bottom: 20px; }
.que-text strong { color: var(--ink); font-weight: 700; }
.que-stats { display: flex; flex-direction: column; gap: 14px; }

.stat-card { background: var(--light); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; display: flex; align-items: center; gap: 20px; }
.stat-card-num { font-size: 32px; font-weight: 900; color: var(--red); line-height: 1; letter-spacing: -1px; min-width: 90px; text-align: center; flex-shrink: 0; }
.stat-card-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.stat-card-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ─── METODOLOGÍA ─── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 28px 22px; }
.step-num { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--red); text-transform: uppercase; margin-bottom: 14px; }
.step-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; line-height: 1.3; }
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ─── FAQ ─── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; margin-top: 40px; }
.faq-col { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-col .faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 10px; display: flex; align-items: flex-start; gap: 12px; }
.faq-q::before { content: 'P'; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: var(--red); color: var(--white); font-size: 10px; font-weight: 800; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.faq-a { font-size: 13.5px; color: var(--muted); line-height: 1.75; padding-left: 34px; }

/* ─── SOBRE NOSOTROS ─── */
.sobre-section { background: var(--light); border-top: 1px solid var(--border); }
.sobre-inner { max-width: 1140px; margin: 0 auto; padding: 72px 40px; display: grid; grid-template-columns: 1fr 340px; gap: 80px; align-items: center; }
.sobre-text h2 { font-size: 28px; font-weight: 900; color: var(--ink); letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 20px; }
.sobre-text p { font-size: 15px; color: var(--muted); line-height: 1.85; margin-bottom: 28px; }
.sobre-text strong { color: var(--ink); font-weight: 700; }
.sobre-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--red); text-decoration: none; transition: gap 0.2s ease; }
.sobre-link:hover { gap: 14px; }
.sobre-aside { display: flex; flex-direction: column; gap: 16px; }
.sobre-pill { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; display: flex; align-items: center; gap: 16px; }
.sobre-pill-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.sobre-pill-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.sobre-pill-text span { font-size: 12px; color: var(--muted); }

/* ─── FOOTER ─── */
.af-footer { background: var(--dark); padding: 32px 40px; }
.footer-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; opacity: 0.6; }
.footer-logo span { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.75); }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { font-size: 13px; color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-nav a:hover { color: rgba(255,255,255,0.9); }
.footer-copy { font-size: 11.5px; color: rgba(255,255,255,0.45); width: 100%; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-copy a { color: rgba(255,255,255,0.45); text-decoration: none; }
.footer-copy a:hover { color: rgba(255,255,255,0.7); }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .que-grid { grid-template-columns: 1fr; gap: 40px; }
  .league-cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sobre-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .af-header { padding: 0 20px; }
  .af-nav { display: none; }
  .af-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 12px 20px 16px;
    gap: 4px;
    z-index: 199;
  }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle span { transition: transform 0.2s, opacity 0.2s; }
  .af-logo img { width: 40px; height: 40px; }
  .logo-text { font-size: 17px; }
  .logo-text small { display: none; }

  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 28px 20px 0; }
  .hero-eyebrow { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  .hero-image   { grid-column: 1; grid-row: 2; justify-content: center; margin: 12px 0; }
  .hero-body    { grid-column: 1; grid-row: 3; padding-right: 0; }
  .hero-image img { max-width: 220px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .hero-sub { margin-bottom: 24px; }

  .league-cards { grid-template-columns: 1fr; }
  .leagues-inner { padding: 40px 20px; }

  .section { padding: 48px 20px; }
  .steps { grid-template-columns: 1fr; }
  .que-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-grid { grid-template-columns: 1fr; }
  .que-stats { flex-direction: column; }

  .af-footer { padding: 24px 20px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .footer-nav { flex-direction: column; align-items: center; gap: 14px; }
  .footer-nav a { font-size: 13px; }
  .footer-copy { text-align: center; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .hero-ctas { flex-direction: column; }
  .btn { text-align: center; }
  .que-stats { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   LIGA PAGES — LaLiga, Premier League, Serie A
   ═══════════════════════════════════════════════ */

/* ─── HERO WRAP (liga pages) ─── */
.hero-wrap { background: var(--white); }

/* ─── CONTENT SECTION ─── */
.content-section { background: var(--white); padding: 40px 40px 56px; }
.content-inner { max-width: 1140px; margin: 0 auto; }

.content-header-bar {
  background: var(--ink);
  border-radius: 14px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.content-header-bar h2 { font-size: 18px; font-weight: 800; color: var(--white); white-space: nowrap; margin: 0; }

.leyenda-items { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.leyenda-item { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.75); }
.leyenda-icon { font-size: 15px; line-height: 1; }
.leyenda-icon-arrow { font-size: 17px; font-weight: 900; }

.content-placeholder {
  background: transparent;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
}
.content-placeholder-icon { font-size: 36px; opacity: .4; }
.content-placeholder-label { font-size: 13px; font-weight: 700; color: #64748b; }
.content-placeholder-sub { font-size: 12px; }

/* ─── SEO SECTION 1 ─── */
.seo-section { background: var(--light); padding: 64px 40px; border-top: 1px solid var(--border); }
.seo-inner { max-width: 1140px; margin: 0 auto; }
.seo-intro { font-size: 15px; line-height: 1.75; color: #475569; max-width: 680px; margin-bottom: 32px; }

/* flip cards */
.seo-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.seo-flip-card { height: 260px; perspective: 1000px; cursor: pointer; }
.seo-flip-inner { position: relative; width: 100%; height: 100%; transition: transform 0.55s cubic-bezier(.4,0,.2,1); transform-style: preserve-3d; }
.seo-flip-card:hover .seo-flip-inner,
.seo-flip-card.flipped .seo-flip-inner { transform: rotateY(180deg); }
.seo-flip-front, .seo-flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; padding: 28px 24px; display: flex; flex-direction: column; }
.seo-flip-front { background: var(--white); border: 1px solid var(--border); justify-content: space-between; }
.seo-flip-back { background: var(--ink); transform: rotateY(180deg); justify-content: center; }

.seo-flip-front-icon { font-size: 36px; font-weight: 900; color: var(--red); line-height: 1; margin-bottom: 16px; letter-spacing: -1px; }
.seo-flip-front-title { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.2; margin-bottom: 8px; }
.seo-flip-front-teaser { font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
.seo-flip-front-hint { font-size: 11px; font-weight: 700; color: var(--red); letter-spacing: .05em; text-transform: uppercase; margin-top: 16px; }
.seo-flip-back p { font-size: 13px; line-height: 1.75; color: rgba(255,255,255,0.82); }
.seo-flip-back strong { color: var(--white); }

/* ─── SEO SECTION 2 — Cómo usar ─── */
.como-section { background: var(--white); padding: 64px 40px; border-top: 1px solid var(--border); }
.como-inner { max-width: 1140px; margin: 0 auto; }
.como-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.como-text p { font-size: 15px; line-height: 1.85; color: #334155; margin-bottom: 18px; }
.como-text p:last-child { margin-bottom: 0; }
.como-text strong { color: var(--ink); }
.como-tips { display: flex; flex-direction: column; gap: 0; }
.tip-item { display: flex; gap: 18px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.tip-item:first-child { padding-top: 0; }
.tip-item:last-child { border-bottom: none; }
.tip-num { font-size: 28px; font-weight: 900; color: #e2e8f0; line-height: 1; flex-shrink: 0; width: 36px; }
.tip-body-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.tip-body-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ─── FAQ SECTION (liga pages) ─── */
.faq-section { background: var(--light); padding: 64px 40px; border-top: 1px solid var(--border); }
.faq-inner { max-width: 1140px; margin: 0 auto; }

/* ─── RESPONSIVE LIGA PAGES ─── */
@media (max-width: 960px) {
  .seo-cards-grid { grid-template-columns: 1fr; }
  .seo-flip-card { height: auto; min-height: 220px; }
  .como-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .content-section { padding: 24px 20px 40px; }
  .content-header-bar { flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px 20px; }
  .content-header-bar h2 { font-size: 16px; white-space: normal; }
  .leyenda-items { gap: 12px; }
  .leyenda-item { font-size: 11px; }
  .seo-section { padding: 48px 20px; }
  .como-section { padding: 48px 20px; }
  .faq-section { padding: 48px 20px; }
}
