/* ==========================================================================
   AceSportsbook 2.0 — CSS global (única fuente de verdad del diseño)
   1. Tokens   2. Base   3. Tipografía   4. Layout   5. Componentes
   6. Header   7. Hero   8. Home   9. Formulario   10. Artículos/páginas
   11. Archivo   12. Footer   13. Panel lateral   14. Contenido heredado   15. Movimiento
   ========================================================================== */

/* 1. TOKENS ================================================================ */
:root {
  color-scheme: dark;

  /* Color: fondo, superficie, texto (3), marca (3), acento menta, acción, estado de error */
  /* Neutros con tinte azul de la marca (antes negros puros): el tema sigue oscuro pero con más vida */
  --c-bg: #04070d;
  --c-bg-alt: #081223;
  --c-surface: #0d1628;
  --c-surface-hi: #16223a;
  --c-line: rgb(255 255 255 / .1);
  --c-line-strong: rgb(255 255 255 / .3);
  --c-text: #ffffff;
  --c-text-2: #b4b4bc;
  --c-text-3: #8a8a93;
  --c-brand: #3b8fe0;      /* azul del logo, aclarado para contraste AA en fondos oscuros */
  --c-brand-soft: #7cb5ee;
  --c-brand-deep: #062c57;
  --c-accent: #4fe3c1;     /* menta: SOLO acentos pequeños (íconos, flechas, viñetas, +/–, "en vivo"). Nunca botones, títulos ni fondos */
  --c-action: #055fbf;     /* azul exacto del logo (texto blanco 6.2:1) */
  --c-action-hover: #044c99;
  --c-light-hover: #e4e4e7;
  --c-error: #fca5a5;

  /* Opacidades (escala fija): --o-low para imágenes de fondo y pulsos, --o-mid para estados deshabilitados */
  --o-low: .3;
  --o-mid: .6;
  --c-overlay: rgb(4 7 13 / .85);
  --c-overlay-mid: rgb(4 7 13 / .6);
  --c-tint-brand: rgb(59 143 224 / .1);
  --c-tint-brand-mid: rgb(59 143 224 / .3);
  --c-tint-light: rgb(255 255 255 / .1);

  /* Tipografía: 4 tamaños · 3 pesos */
  --ff-display: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
  /* Condensada con varios grosores: títulos de páginas internas y del artículo (Anton solo tiene uno, muy pesado) */
  --ff-condensed: 'Oswald', 'Arial Narrow', sans-serif;
  --fw-condensed: var(--fw-regular);
  --ff-text: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-display: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem);
  --fs-hero: clamp(3.25rem, 1.2rem + 6vw, 7.5rem); /* solo el titular del hero de la home */
  --fs-heading: clamp(1.1875rem, 1.05rem + .5vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-small: .8125rem;
  --fw-regular: 400;
  --fw-bold: 700;
  --fw-black: 800; /* Manrope llega hasta 800 */
  --lh-display: .95;
  --lh-heading: 1.2;
  --lh-body: 1.7;
  --lh-small: 1.5;
  --tr-display: -.005em;
  --tr-label: .14em;
  --tr-button: .06em;

  /* Radios y sombras */
  --r-sm: .75rem;
  --r-md: 1.5rem;
  --r-lg: 2rem;
  --r-pill: 999px;
  --sh-pop: 0 30px 60px -15px rgb(0 0 0 / .8);
  --sh-focus: 0 0 0 3px var(--c-tint-brand-mid);
  --sh-glow: 0 40px 90px -40px var(--c-brand); /* brillo azul bajo fotos e ilustraciones */

  /* Movimiento: 3 duraciones, 1 curva. Todo lo animado usa estos tokens */
  --dur-fast: .2s;    /* hover, foco, cambios de color, panel lateral */
  --dur-mid: .7s;     /* entrada de bloques y textos */
  --dur-slow: 1.6s;   /* fotos que se asientan (zoom suave) y fundido del video */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --stagger: 90ms;    /* retraso entre elementos de un mismo grupo */
  --shift: 1.5rem;    /* recorrido de la entrada (de abajo hacia arriba) */

  /* Espacio */
  --wrap: 80rem;
  --gutter: 1rem;
  --section-y: clamp(4rem, 3rem + 4vw, 6rem);
  --header-h: 4rem;
  --tabbar-h: 4.5rem; /* barra inferior móvil (sin contar la zona segura del dispositivo) */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --header-h: 7.5rem; } }

/* 2. BASE ================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text-2);
  font-family: var(--ff-text);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
::selection { background: var(--c-brand); color: var(--c-text); }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4, h5, h6 { font: inherit; color: var(--c-text); }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
strong, b { color: var(--c-text); font-weight: var(--fw-bold); }
:focus-visible { outline: 2px solid var(--c-brand-soft); outline-offset: 3px; }
.icon { width: 1em; height: 1em; flex: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--c-text); color: var(--c-bg); padding: .75rem 1.25rem; border-radius: var(--r-pill);
  font-weight: var(--fw-bold); font-size: var(--fs-small);
}
.skip-link:focus { top: 1rem; }
img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px; }

/* 3. TIPOGRAFÍA (solo estos tokens) ======================================= */
.t-display {
  font-family: var(--ff-display);
  font-size: var(--fs-display);
  font-weight: var(--fw-regular);
  font-synthesis: none;
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  text-transform: uppercase;
  color: var(--c-text);
}
.t-heading { font-size: var(--fs-heading); font-weight: var(--fw-black); line-height: var(--lh-heading); color: var(--c-text); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-small { font-size: var(--fs-small); line-height: var(--lh-small); }
.t-label {
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  line-height: var(--lh-small);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--c-text-3);
}
.accent { color: var(--c-brand); }

/* 4. LAYOUT ================================================================ */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--alt {
  background: radial-gradient(ellipse 70% 55% at 15% 0%, var(--c-tint-brand-mid), transparent), var(--c-bg-alt);
  border-block: 1px solid var(--c-line);
}
.section--alt.slide-section--flip { background: radial-gradient(ellipse 70% 55% at 85% 0%, var(--c-tint-brand-mid), transparent), var(--c-bg-alt); }

.section-head { display: grid; gap: 1.25rem; margin-bottom: 3rem; }
.section-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.section-head--split p { max-width: 32rem; }
@media (min-width: 1024px) {
  .section-head--split { grid-template-columns: 1.4fr 1fr; align-items: end; }
}
.split { display: grid; gap: 3rem; }
@media (min-width: 1024px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  
  
  
  
}
.split__aside { display: grid; gap: 1.5rem; align-content: start; }

/* 5. COMPONENTES =========================================================== */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9375rem 1.75rem; border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: var(--fs-small); font-weight: var(--fw-bold); line-height: var(--lh-small);
  letter-spacing: var(--tr-button); text-transform: uppercase; text-align: center;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.button--action { background: var(--c-action); color: var(--c-text); }
.button--action:hover { background: var(--c-action-hover); }
.button--light { background: var(--c-text); color: var(--c-bg); }
.button--light:hover { background: var(--c-light-hover); }
.button--ghost { border-color: var(--c-line-strong); color: var(--c-text); }
.button--ghost:hover { background: var(--c-tint-light); }
.button--outline { border-color: var(--c-line-strong); color: var(--c-text); }
.button--outline:hover { border-color: var(--c-text); }
.button--block { width: 100%; }
.button--small { padding: .625rem 1.125rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: var(--fw-bold); color: var(--c-text); }
.text-link:hover { color: var(--c-brand-soft); }
.icon-button {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--c-line); border-radius: var(--r-pill); color: var(--c-text-2);
}
.icon-button:hover { border-color: var(--c-brand); color: var(--c-text); }
.panel { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 1.5rem; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: .75rem; overflow: hidden;
  padding: 1.75rem; border-radius: var(--r-md); background: var(--c-surface); border: 1px solid var(--c-line);
  transition: border-color var(--dur-fast);
}
.tile__title { font-family: var(--ff-display); font-weight: var(--fw-regular); font-synthesis: none; text-transform: uppercase; }
.tile--link:hover, a.tile:hover { border-color: var(--c-tint-brand-mid); }
.tile__more { display: inline-flex; align-items: center; gap: .5rem; margin-top: auto; padding-top: .5rem; font-weight: var(--fw-bold); color: var(--c-text); }
a.tile:hover .tile__more { color: var(--c-brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; width: fit-content;
  padding: .375rem .875rem; border-radius: var(--r-pill); border: 1px solid var(--c-line);
  background: var(--c-surface); color: var(--c-text); font-size: var(--fs-small); font-weight: var(--fw-bold);
}
.chip.t-label { color: var(--c-text); }
.chip--brand { border-color: var(--c-tint-brand-mid); background: var(--c-tint-brand); color: var(--c-brand-soft) !important; }
.chip--brand:hover { background: var(--c-tint-brand-mid); }
.chip--light { background: var(--c-text); color: var(--c-bg) !important; border-color: var(--c-text); }
.chip--link:hover { border-color: var(--c-brand); }

@media (prefers-reduced-motion: no-preference) {
  
  @keyframes ace-pulse { 50% { opacity: var(--o-low); } }
}
.input {
  width: 100%; min-height: 3rem; padding: .75rem 1rem; border-radius: var(--r-sm);
  border: 1px solid var(--c-line); background: var(--c-surface-hi); color: var(--c-text); font-size: var(--fs-body);
}
.input:focus { outline: none; border-color: var(--c-brand); box-shadow: var(--sh-focus); }

/* 6. HEADER ================================================================ */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.header-top { background: var(--c-overlay); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--c-line); }
.header-top__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
@media (min-width: 1024px) { .header-top__inner { height: 4.5rem; } }
.header-logo { flex: none; }
.header-logo .custom-logo-link { display: block; }
.header-logo .custom-logo { display: block; height: 2.25rem; width: auto; max-width: 13rem; }
@media (min-width: 640px) { .header-logo .custom-logo { height: 2.5rem; max-width: 15rem; } }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }

.header-phone { display: none; align-items: center; gap: .5rem; font-weight: var(--fw-bold); color: var(--c-text); white-space: nowrap; }
.header-phone .icon { color: var(--c-accent); }
.header-phone:hover { color: var(--c-brand-soft); }
.header-cta { display: none; padding: .625rem 1.25rem; white-space: nowrap; }
.header-cta .icon { display: none; }
/* Móvil/tablet: arriba solo el logo, centrado; teléfono y CTA pasan a la barra inferior */
@media (max-width: 1023px) {
  .header-top__inner { justify-content: center; }
  .header-actions { display: none; }
}
@media (min-width: 1024px) { .header-phone, .header-cta { display: inline-flex; } }

/* Barra inferior (<1024px): menú, llamada y registro en la zona del pulgar */
.tabbar {
  position: fixed; inset: auto 0 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem;
  padding: .5rem var(--gutter) calc(.5rem + var(--safe-bottom));
  background: var(--c-overlay); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--c-line);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
  min-width: 3.5rem; min-height: 3.5rem; padding: 0 .5rem; border-radius: var(--r-sm);
  color: var(--c-text); font-size: var(--fs-small); font-weight: var(--fw-bold); line-height: var(--lh-small);
}
.tabbar__item .icon { width: 1.25rem; height: 1.25rem; }
a.tabbar__item .icon { color: var(--c-accent); }
.tabbar__item:hover, .tabbar__item[aria-expanded="true"] { background: var(--c-tint-light); }
.tabbar__icon { display: grid; }
.tabbar__icon--close, .tabbar__item[aria-expanded="true"] .tabbar__icon--open { display: none; }
.tabbar__item[aria-expanded="true"] .tabbar__icon--close { display: grid; }
/* Columnas fijas: Call a la izquierda, la acción en el centro y Menu a la derecha (aunque falte el botón de registro) */
.tabbar__call { grid-column: 1; justify-self: start; }
.tabbar__cta { grid-column: 2; min-height: 3rem; padding-inline: 1.5rem; white-space: nowrap; }
.tabbar__menu { grid-column: 3; justify-self: end; }
/* Reserva el alto de la barra al final de la página para que no tape el pie ni ningún CTA */
@media (max-width: 1023px) {
  body { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
  /* Con el teclado abierto (escribiendo en el formulario) la barra se oculta y deja sitio a los campos */
  body:has(:is(input, select, textarea):focus) .tabbar { display: none; }
}
@media (min-width: 1024px) { .tabbar { display: none; } }

/* Navegación: panel que sube desde la barra inferior en móvil, barra horizontal en escritorio */
.header-nav { display: none; }
.site-header.is-open .header-nav {
  position: fixed; inset: auto 0 calc(var(--tabbar-h) + var(--safe-bottom)); display: block;
  max-height: calc(100dvh - var(--header-h) - var(--tabbar-h) - var(--safe-bottom)); overflow-y: auto;
  background: var(--c-bg-alt); border-top: 1px solid var(--c-line); border-radius: var(--r-md) var(--r-md) 0 0;
  box-shadow: var(--sh-pop); padding-block: .75rem 1.25rem;
}
@media (prefers-reduced-motion: no-preference) {
  .site-header.is-open .header-nav { animation: ace-sheet var(--dur-fast) var(--ease-out); }
  @keyframes ace-sheet { from { transform: translateY(var(--shift)); opacity: 0; } }
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; gap: .375rem; flex: 1;
  padding: .875rem .25rem; color: var(--c-text); font-weight: var(--fw-bold); text-align: left;
}
.nav-link .icon { color: var(--c-brand); transition: transform var(--dur-fast); }
.nav-caret { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--c-brand); }
.nav-caret .icon { transition: transform var(--dur-fast); }
.nav-item.is-open > .nav-toggle .icon { transform: rotate(180deg); }
.nav-sub { display: none; list-style: none; margin: 0 0 .5rem; padding: 0 0 0 1rem; width: 100%; border-left: 1px solid var(--c-tint-brand-mid); }
.nav-item.is-open > .nav-sub { display: block; }
.nav-sub__link { display: block; padding: .5rem .75rem; color: var(--c-text-2); font-size: var(--fs-small); font-weight: var(--fw-bold); border-radius: var(--r-sm); }
.nav-sub__link:hover, .nav-sub__link[aria-current] { color: var(--c-text); background: var(--c-tint-brand); }

@media (min-width: 1024px) {
  .header-nav { display: block; background: var(--c-overlay); border-bottom: 1px solid var(--c-line); }
  .site-header.is-open .header-nav { position: static; max-height: none; padding: 0; overflow: visible; border-radius: 0; box-shadow: none; animation: none; }
  .nav-list { display: flex; justify-content: space-between; margin-inline: -.75rem; }
  .nav-item { flex-wrap: nowrap; }
  .nav-link {
    flex: none; padding: .8125rem .75rem; margin-bottom: -1px; border-bottom: 2px solid transparent;
    color: var(--c-text-2); font-size: var(--fs-small); letter-spacing: var(--tr-button); text-transform: uppercase;
  }
  .nav-item:hover > .nav-link, .nav-item.is-current > .nav-link, .nav-item:focus-within > .nav-link { color: var(--c-text); border-color: var(--c-brand); }
  .nav-caret { width: auto; height: auto; margin-left: -.5rem; padding: .25rem .5rem .25rem .25rem; }
  .nav-sub {
    position: absolute; top: 100%; left: 0; z-index: 5; width: auto; min-width: 16rem; margin: 0; padding: .5rem;
    background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--sh-pop);
  }
  .nav-item:last-child .nav-sub { left: auto; right: 0; }
  .nav-item--parent:hover > .nav-sub, .nav-item--parent:focus-within > .nav-sub { display: block; }
  .nav-item--parent:hover > .nav-toggle .icon { transform: rotate(180deg); }
  .nav-sub__link { padding: .625rem .75rem; }
}
.read-progress { height: 3px; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-brand), var(--c-accent)); }

/* 7. HERO ================================================================== */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + 2.5rem) 0 4rem; }
.hero__bg, .hero__bg img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--c-overlay) 0%, var(--c-overlay-mid) 45%, transparent 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; z-index: -1; background: linear-gradient(transparent, var(--c-bg)); }
/* Video de fondo de la home: aparece sobre la foto cuando empieza a reproducirse */
.hero__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--dur-slow); }
.hero__video.is-playing { opacity: 1; }
.hero__pause { position: absolute; right: var(--gutter); bottom: 1.5rem; z-index: 1; background: var(--c-overlay); }
.hero__pause-icon { display: grid; place-items: center; }
.hero__pause-icon--play, .hero__pause[aria-pressed="true"] .hero__pause-icon--pause { display: none; }
.hero__pause[aria-pressed="true"] .hero__pause-icon--play { display: grid; }
@media (min-width: 1280px) { .hero__pause { right: calc((100% - var(--wrap)) / 2 + var(--gutter)); } }
/* Páginas internas y archivo: degradado algo más denso que en la home (hay más texto), pero la foto se ve a la derecha */
.hero--page::before, .hero--archive::before { background: linear-gradient(90deg, var(--c-bg) 0%, var(--c-overlay) 40%, var(--c-overlay-mid) 70%, transparent 100%); }
.hero--archive { padding-bottom: 1rem; }
.hero--archive .hero__bg img { object-position: 50% 65%; } /* cabecera baja: se centra en el campo iluminado, no en el cielo */
.hero--home { min-height: min(100svh, 62rem); display: flex; align-items: center; }
@media (min-width: 1024px) { .hero--home { padding-top: calc(var(--header-h) + 3.5rem); } }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; margin-top: 2rem; }
.hero--home .hero__grid { margin-top: 0; }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.25fr 1fr; gap: 4rem; }
  .hero--page .hero__grid { grid-template-columns: 1.35fr 1fr; }
  .hero__grid--solo { grid-template-columns: 1fr !important; }
}
/* Hero apilado (páginas sin párrafo junto al título): título arriba, formulario horizontal debajo */
.hero__grid--stacked { gap: 2rem; }
@media (min-width: 1024px) { .hero--page .hero__grid--stacked { grid-template-columns: 1fr; } }
@media (min-width: 640px) {
  .hero__grid--stacked #signup_form_wrapper .form-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .hero__grid--stacked #signup_form_wrapper .line-wrap { margin: 0; }
}
/* Una sola fila desde 1280px; ancho de cada campo según su contenido (Your book necesita más) */
@media (min-width: 1280px) {
  .hero__grid--stacked #signup_form_wrapper .form-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; }
  .hero__grid--stacked #signup_form_wrapper .form-content { grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, 1.55fr); }
  .hero__grid--stacked #signup_form_wrapper .send-btn { margin: 0 !important; min-height: 3.125rem; padding: 0 2rem !important; white-space: nowrap; }
  .hero__grid--stacked .signup-card__legal { text-align: right; }
}
.hero__copy { display: grid; gap: 1.5rem; align-content: start; }
.hero__kicker { color: var(--c-text-2); }
.hero__headline span { display: block; }
.hero__accent { background: linear-gradient(180deg, var(--c-brand-soft), var(--c-action)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { color: var(--c-text); }
/* Hero de la home: el titular usa el tamaño --fs-hero (solo aquí) para equilibrar la columna con el formulario */
.hero--home .hero__copy { gap: 1.75rem; }
.hero--home .hero__headline { font-size: var(--fs-hero); }
.hero__contact { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin: 0; padding-top: 1.75rem; border-top: 1px solid var(--c-line); }
.hero__contact .t-label { color: var(--c-text-2); }
.hero__contact .text-link .icon { width: 1.25rem; height: 1.25rem; color: var(--c-accent); }

/* H1 de páginas internas y archivo: mismo tamaño y mayúsculas que .t-display, pero en la condensada ligera */
.page-title { overflow-wrap: anywhere; font-family: var(--ff-condensed); font-weight: var(--fw-condensed); line-height: 1.05; }
/* Primer párrafo del contenido, movido al hero junto al título (ace_extract_lead) */
.page-lead { max-width: 40rem; color: var(--c-text-2); }
.page-lead p { margin: 0; }
.page-lead a { color: var(--c-text); font-weight: var(--fw-bold); text-decoration: underline; text-decoration-color: var(--c-brand); text-underline-offset: 4px; }
.page-title__main, .page-title__sub { display: block; }
.page-title__sub { margin-top: .5rem; font-size: var(--fs-heading); line-height: var(--lh-heading); color: var(--c-brand); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--c-accent); }
.crumbs a:hover { color: var(--c-text); }
.crumbs [aria-current] span { display: inline-block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--c-text-2); }

/* "Best Pay Per Head Services" (home): dos paneles siempre visibles (You Get / Player Get).
   Arriba, una ilustración que muestra el producto (back office del agente / móvil del jugador);
   abajo, los beneficios con ícono para escanearlos rápido. */
.deal { display: grid; gap: 1.5rem; }
.deal__panel {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--c-line); background: var(--c-surface);
}
.deal__art { position: relative; display: block; height: 12rem; overflow: hidden; }
/* La foto se funde con el panel hacia los beneficios (sin línea de corte) */
.deal__art img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%;
  -webkit-mask-image: linear-gradient(var(--c-bg) 50%, transparent); mask-image: linear-gradient(var(--c-bg) 50%, transparent);
}
.deal__body { display: grid; gap: 1.75rem; padding: 1.75rem; }
.deal__list { display: grid; gap: 1.5rem 2rem; margin: 0; padding: 0; list-style: none; }
.deal__item { display: grid; grid-template-columns: auto 1fr; gap: .875rem; align-items: start; }
.deal__icon { display: grid; place-items: center; padding-top: .125rem; color: var(--c-accent); }
.deal__icon .icon { width: 1.5rem; height: 1.5rem; }
.deal__text { display: grid; gap: .375rem; }
.deal__item-title { font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--c-text); }
@media (min-width: 640px) {
  .deal__art { height: 16rem; }
  .deal__body { padding: 2.25rem; }
  .deal__list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) { .deal { grid-template-columns: 1fr 1fr; } }


/* Secciones de la home hechas con los slides del bloque "Hero Slider": título + texto a un lado y foto al otro
   (el lado alterna). Tratamientos de foto, sin recuadro: --immersive (Billing y Free) · --band (Features).
   Móvil: en los tres casos la foto va de borde a borde entre el título y el texto y se funde hacia abajo. */
.slide-section { position: relative; isolation: isolate; overflow: hidden; }
.slide-section__grid { display: grid; gap: 1.5rem 2rem; grid-template-areas: "head" "media" "copy"; }
.slide-section__head { grid-area: head; position: relative; z-index: 1; display: grid; gap: 1rem; align-content: start; }
.slide-section__head h2 span { display: block; }
.slide-section__copy { grid-area: copy; position: relative; z-index: 1; display: grid; gap: 1.25rem; justify-items: start; align-content: start; }
.slide-section__sub { color: var(--c-text); }
.slide-section__media {
  grid-area: media; position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3;
  margin-inline: calc(-1 * var(--gutter));
  -webkit-mask-image: linear-gradient(var(--c-bg) 60%, transparent); mask-image: linear-gradient(var(--c-bg) 60%, transparent);
}
.slide-section__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.slide-section__text { max-width: 38rem; color: var(--c-text-2); }
.slide-section__text a, .slide-section__text strong { color: var(--c-text); font-weight: var(--fw-bold); }
.slide-section__text a { text-decoration: underline; text-decoration-color: var(--c-brand); text-underline-offset: 4px; }
.slide-section__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.slide-section__links .icon { color: var(--c-accent); }
@media (min-width: 1024px) {
  .slide-section__grid { grid-template-columns: 1fr 1fr; grid-template-areas: ". head" ". copy"; gap: 1.75rem 4rem; }
  .slide-section--flip .slide-section__grid { grid-template-areas: "head ." "copy ."; }

  /* Fondo inmersivo: la foto ocupa toda la sección; el degradado oscurece el lado del texto */
  .slide-section--immersive { display: flex; align-items: center; min-height: 44rem; }
  .slide-section--immersive .slide-section__media {
    position: absolute; inset: 0; z-index: -2; margin: 0; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none;
  }
  .slide-section--immersive::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(270deg, var(--c-bg) 0%, var(--c-overlay) 42%, transparent 85%);
  }
  .slide-section--immersive.slide-section--flip::after { background: linear-gradient(90deg, var(--c-bg) 0%, var(--c-overlay) 42%, transparent 85%); }
  /* La foto arranca al 30% del lado del texto y se funde hacia él: el sujeto queda despejado del título */
  .slide-section--immersive .slide-section__media {
    inset: 0 30% 0 0;
    -webkit-mask-image: linear-gradient(270deg, transparent, var(--c-bg) 30%); mask-image: linear-gradient(270deg, transparent, var(--c-bg) 30%);
  }
  .slide-section--immersive.slide-section--flip .slide-section__media {
    inset: 0 0 0 30%;
    -webkit-mask-image: linear-gradient(90deg, transparent, var(--c-bg) 30%); mask-image: linear-gradient(90deg, transparent, var(--c-bg) 30%);
  }

  /* Banda cinematográfica: la foto ocupa toda la sección (de borde a borde) y sigue por detrás del texto;
     un degradado la oscurece hacia abajo para que el título y el párrafo se lean. */
  .slide-section--band { padding-top: clamp(16rem, 24vw, 26rem); }
  .slide-section--band .slide-section__grid { grid-template-columns: 1.1fr 1fr; grid-template-areas: "head copy"; align-items: start; }
  .slide-section--band.slide-section--flip .slide-section__grid { grid-template-columns: 1fr 1.1fr; grid-template-areas: "copy head"; }
  .slide-section--band .slide-section__media {
    position: absolute; inset: 0; z-index: -2; margin: 0; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none;
  }
  .slide-section--band .slide-section__media img { object-position: 50% 15%; }
  .slide-section--band::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, transparent 0%, var(--c-overlay-mid) 38%, var(--c-overlay) 60%, var(--c-bg) 100%);
  }
}

/* Sección "Why AcePerHead" (home): rejilla tipo bento. Video grande con portada propia + 5 tarjetas de razones.
   Escritorio: "video video r1" / "video video r2" / "r3 r4 r5" (colocación automática). */
.why__bento { display: grid; gap: 1rem; }
.why__video .youtube-player { height: 100%; border-radius: var(--r-lg); border: 1px solid var(--c-line); }
.why__video .youtube-player .play { width: 5.5rem; height: 3.75rem; border-radius: var(--r-md); }
.why__video .youtube-player .play::after { border-width: .75rem 0 .75rem 1.2rem; }
.why__card { display: grid; gap: .75rem; align-content: start; padding: 1.75rem; border-radius: var(--r-lg); border: 1px solid var(--c-line); background: var(--c-surface); }
.why__icon { color: var(--c-accent); }
.why__icon .icon { width: 1.75rem; height: 1.75rem; }
.why__card-title { font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--c-text); }
.why__card p { color: var(--c-text-2); }
.why__card p :is(strong, a) { color: var(--c-text); font-weight: var(--fw-bold); }
.why__card p a { text-decoration: underline; text-decoration-color: var(--c-brand); text-underline-offset: 4px; }
@media (min-width: 640px) {
  .why__bento { grid-template-columns: repeat(2, 1fr); }
  .why__video { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .why__bento { grid-template-columns: repeat(3, 1fr); }
  .why__video { grid-row: span 2; }
  .why__video .youtube-player__button { height: 100%; aspect-ratio: auto; }
}

.lead { color: var(--c-text-2); max-width: 32rem; }

.news-grid { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .news-grid { grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: start; } }
/* Destacada: foto arriba que se funde con la tarjeta; título a tamaño de tarjeta (no display) */
.news-feature { display: grid; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--c-line); background: var(--c-surface); transition: border-color var(--dur-fast); }
.news-feature:hover { border-color: var(--c-tint-brand-mid); }
.news-feature__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.news-feature__media img {
  display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-mid) var(--ease-out);
  -webkit-mask-image: linear-gradient(var(--c-bg) 60%, transparent); mask-image: linear-gradient(var(--c-bg) 60%, transparent);
}
.news-feature:hover .news-feature__media img { transform: scale(1.04); }
.news-feature__body { display: grid; gap: .75rem; padding: 0 1.75rem 1.75rem; }
.news-feature__excerpt { color: var(--c-text-2); }
.news-feature__more { display: inline-flex; align-items: center; gap: .5rem; margin-top: .5rem; font-weight: var(--fw-bold); color: var(--c-text); }
.news-feature__more .icon, .news-list__arrow { color: var(--c-accent); transition: transform var(--dur-fast); }
.news-feature:hover .news-feature__more .icon { transform: translateX(4px); }
.news-meta { color: var(--c-text-3); }
/* Lista: categoría · fecha, título y flecha */
.news-list { display: grid; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--c-line); }
.news-list li { border-top: 1px solid var(--c-line); }
.news-list a { display: grid; grid-template-columns: 1fr auto; gap: .375rem 1.5rem; align-items: center; padding-block: 1.25rem; }
.news-list__text { display: grid; gap: .375rem; }
.news-list__title { font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--c-text); }
.news-list a:hover .news-list__title { color: var(--c-brand-soft); }
.news-list a:hover .news-list__arrow { transform: translateX(4px); }
@media (min-width: 640px) { .news-feature__body { padding: 0 2.25rem 2.25rem; } }

.cta-band { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--section-y); background: var(--c-bg); border-top: 1px solid var(--c-tint-brand-mid); }
/* Foto del público de fondo; el degradado azul la tapa del lado del texto para mantener el contraste */
.cta-band__bg, .cta-band__bg img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--c-brand-deep) 0%, var(--c-overlay) 45%, var(--c-overlay-mid) 100%); }
.cta-band__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .cta-band__grid { grid-template-columns: 1.2fr 1fr; } }

.cta-band .button-row { margin-top: 2rem; }

/* 9. FORMULARIO (widget "Signup" + script de aceperhead.com) =============== */
.signup-card {
  position: relative; padding: 1.5rem; border-radius: var(--r-lg);
  background: var(--c-overlay); border: 1px solid var(--c-line); box-shadow: var(--sh-pop);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
@media (min-width: 640px) { .signup-card { padding: 2rem; } }
.signup-card .textwidget > style + p:empty { display: none; }
.signup-card #signup_form_wrapper { padding: 0 !important; }
.signup-card #signup_form_wrapper > .form-header h2,
.signup-card .form-header h2 {
  margin: 0 0 1.25rem; text-align: left !important;
  font-family: var(--ff-display); font-size: var(--fs-heading); font-weight: var(--fw-regular); font-synthesis: none;
  line-height: var(--lh-heading); letter-spacing: var(--tr-display); text-transform: uppercase; color: var(--c-text) !important;
}
#signup_form_wrapper form .form-header { display: none; }
#signup_form_wrapper .form-inner { margin: 0; }
#signup_form_wrapper .line-wrap { margin: 0 0 1rem; }
#signup_form_wrapper .d-none { display: none !important; }
#signup_form_wrapper .field-label { display: block; margin-bottom: .375rem; font-size: var(--fs-small); font-weight: var(--fw-bold); color: var(--c-text); }
#signup_form_wrapper .form-control,
#signup_form_wrapper .form-select {
  display: block; width: 100%; min-height: 3.125rem; margin: 0; padding: .75rem 1rem;
  border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface-hi);
  color: var(--c-text); font-size: var(--fs-body); line-height: var(--lh-small);
}
#signup_form_wrapper .form-control::placeholder { color: var(--c-text-3); opacity: 1; }
#signup_form_wrapper .form-control:focus,
#signup_form_wrapper .form-select:focus { outline: none; border-color: var(--c-brand); box-shadow: var(--sh-focus); }
#signup_form_wrapper .valid-feedback { display: none !important; }
#signup_form_wrapper .invalid-feedback { display: none; margin-top: .375rem; font-size: var(--fs-small); color: var(--c-error); }
#signup_form_wrapper .was-validated .form-control:invalid { border-color: var(--c-error); }
#signup_form_wrapper .was-validated .form-control:invalid ~ .invalid-feedback { display: block; }
#signup_form_wrapper .form-footer { margin: 0; }
#signup_form_wrapper .send-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%;
  margin: 1.25rem 0 0 !important; padding: 1rem !important; border: 0; border-radius: var(--r-pill);
  background: var(--c-action) !important; color: var(--c-text) !important;
  font-size: var(--fs-small); font-weight: var(--fw-bold); letter-spacing: var(--tr-button); text-transform: uppercase;
  transition: background-color var(--dur-fast);
}
#signup_form_wrapper .send-btn:hover { background: var(--c-action-hover) !important; }
#signup_form_wrapper .send-btn:disabled { opacity: var(--o-mid); cursor: progress; }
#signup_form_wrapper .send-btn .fa { display: none; }

.signup-card__legal { margin-top: .5rem; text-align: center; color: var(--c-text-3); }
.signup-card__legal summary { cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.signup-card__legal summary::-webkit-details-marker { display: none; }
.signup-card__legal p { margin-top: .5rem; }
.signup-card__legal a { text-decoration: underline; }
.grecaptcha-badge { visibility: hidden; }

/* 10. ARTÍCULOS Y PÁGINAS ================================================== */
.entry-layout { display: grid; gap: 3rem; padding-block: 1rem var(--section-y); }
@media (min-width: 1024px) {
  .entry-layout { grid-template-columns: minmax(0, 1fr) 18.75rem; gap: 4rem; }
  .entry-layout--full { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1280px) { .entry-layout { gap: 5rem; } }
/* Superficie de lectura: separa el artículo del fondo negro del sitio */
.entry-main {
  min-width: 0; padding: 1.5rem 1.25rem;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
}
@media (min-width: 640px) { .entry-main { padding: 2.5rem; } }
@media (min-width: 1280px) { .entry-main { padding: 3rem; } }
.entry-main :is(.toc-mobile, .entry blockquote, .entry .wp-block-quote, .entry-figure) { background: var(--c-surface-hi); }
.entry-layout:not(.entry-layout--full) .entry,
.entry-layout:not(.entry-layout--full) .inline-cta,
.entry-layout:not(.entry-layout--full) .share { max-width: 45rem; }
.entry-figure { margin-bottom: 2.5rem; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--c-line); background: var(--c-surface); }
.entry-figure img { display: block; width: 100%; }
.toc-mobile { margin-bottom: 2rem; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.toc-mobile summary { display: flex; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; list-style: none; color: var(--c-text); }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; color: var(--c-accent); }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile .toc-list { padding: .5rem 1.25rem 1rem; }
@media (min-width: 1024px) { .toc-mobile { display: none !important; } }
.toc-list { display: grid; margin: 0; padding: 0; list-style: none; font-size: var(--fs-small); font-weight: var(--fw-bold); }
.toc-list a { display: flex; gap: .75rem; padding: .5rem 0; color: var(--c-text-2); }
.toc-list a:hover { color: var(--c-text); }
.toc-list .toc-num { color: var(--c-accent); font-variant-numeric: tabular-nums; }
.toc .toc-list { margin-top: 1rem; border-left: 1px solid var(--c-line); }
.toc .toc-list a { margin-left: -1px; padding-left: 1rem; border-left: 2px solid transparent; }
.toc .toc-list a.is-active { color: var(--c-text); border-color: var(--c-brand); }
.entry-aside { display: none; }
@media (min-width: 1024px) { .entry-aside { display: block; } }
.entry-aside__sticky { position: sticky; top: calc(var(--header-h) + 2rem); display: grid; gap: 1.5rem; }
.toc .t-label { color: var(--c-brand); }

.sidebar-widgets { display: grid; gap: 1rem; }
.sidebar-widgets img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }
.sidebar-widgets h3 { font-size: var(--fs-small); font-weight: var(--fw-bold); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--c-text-3); }

.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }
.share__links { display: flex; gap: .5rem; }

/* Contenido editorial (the_content) — no afecta al widget [odds] (.bs-scope) */
.entry { color: var(--c-text-2); font-size: var(--fs-body); line-height: var(--lh-body); overflow-wrap: break-word; }
.entry > * + * { margin-top: 1.25em; }
.entry > :first-child { margin-top: 0; }
/* Títulos del artículo: condensada en mayúsculas (como antes), pero con un grosor más ligero que Anton */
.entry > h1, .entry > h2, .entry > .wp-block-heading:is(h1, h2) {
  margin-top: 2.5em; padding-top: 1.25em; border-top: 1px solid var(--c-line);
  font-family: var(--ff-condensed); font-size: var(--fs-heading); font-weight: var(--fw-condensed); font-synthesis: none;
  line-height: var(--lh-heading); text-transform: uppercase; color: var(--c-text);
}
.entry > h1:first-child, .entry > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.entry > h3, .entry > h4, .entry > h5, .entry > h6 { margin-top: 2em; font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--c-text); }
.entry > h3 { font-size: var(--fs-heading); }
.entry :is(p, li, td, figcaption, blockquote) a:not(.button) {
  color: var(--c-text); font-weight: var(--fw-bold);
  text-decoration: underline; text-decoration-color: var(--c-brand); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.entry :is(p, li, td) a:not(.button):hover { color: var(--c-brand-soft); }
.entry > ul, .entry > ol, .entry .wp-block-column > ul, .entry .wp-block-column > ol { padding-left: 1.25em; }
.entry li + li { margin-top: .5em; }
.entry ul > li::marker { color: var(--c-accent); }
.entry ol > li::marker { color: var(--c-accent); font-weight: var(--fw-bold); }
.entry blockquote, .entry .wp-block-quote { padding: 1.25rem 1.5rem; border-radius: var(--r-md); background: var(--c-surface); color: var(--c-text); }
.entry blockquote cite { display: block; margin-top: .75rem; font-size: var(--fs-small); color: var(--c-text-3); font-style: normal; }
.entry img { border-radius: var(--r-sm); }
.entry figure { margin-inline: 0; }
.entry figcaption, .entry .wp-caption-text { margin-top: .5rem; font-size: var(--fs-small); color: var(--c-text-3); text-align: center; }
.entry .wp-caption { max-width: 100%; }
.entry hr { border: 0; border-top: 1px solid var(--c-line); margin-block: 2.5em; }
.entry .alignleft { float: left; margin: .25em 1.5em 1em 0; }
.entry .alignright { float: right; margin: .25em 0 1em 1.5em; }
.entry .aligncenter { display: block; margin-inline: auto; }
/* WordPress pone display:table a las imágenes alineadas y display:table-caption a su leyenda: dentro de un
   bloque normal la leyenda se encoge al ancho mínimo (una palabra por línea). Leyenda como bloque normal. */
.entry .wp-block-image :is(.aligncenter, .alignleft, .alignright) { display: block; max-width: 100%; }
.entry .wp-block-image :is(.aligncenter, .alignleft, .alignright) > figcaption,
.entry .wp-block-image figcaption { display: block; caption-side: initial; }
.entry .wp-block-image :is(.aligncenter, .alignleft, .alignright) img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.entry::after { content: ""; display: table; clear: both; }
@media (max-width: 639px) { .entry .alignleft, .entry .alignright { float: none; margin: 1em auto; } }
.entry .wp-block-table, .entry .table-scroll { overflow-x: auto; }
.entry table:not(.bs-scope table) { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.entry table:not(.bs-scope table) :is(th, td) { padding: .75rem 1rem; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.entry table:not(.bs-scope table) th, .entry table:not(.bs-scope table) thead td { background: var(--c-surface-hi); color: var(--c-text); font-weight: var(--fw-bold); }
.entry iframe { border: 0; border-radius: var(--r-sm); }
.entry .wp-block-embed { margin-inline: 0; }
.entry .wp-block-columns { display: grid; gap: 1.5rem; }
@media (min-width: 782px) { .entry .wp-block-columns { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.entry .wp-block-column > * + * { margin-top: 1.25em; }
.entry-layout--full .entry { max-width: none; }

/* Contenido antiguo de WPBakery ([vc_row], [vc_column]…; ver includes/legacy-wpbakery.php).
   Rejilla de 12 columnas desde 768px; en móvil, una columna. Dentro de las columnas se repiten los estilos
   que .entry aplica a sus hijos directos (títulos, listas, espaciado), porque aquí van anidados en divs. */
.vc-row { display: grid; gap: 1.5rem 2rem; }
@media (min-width: 768px) {
  .vc-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .vc-col--1 { grid-column: span 1; } .vc-col--2 { grid-column: span 2; } .vc-col--3 { grid-column: span 3; }
  .vc-col--4 { grid-column: span 4; } .vc-col--5 { grid-column: span 5; } .vc-col--6 { grid-column: span 6; }
  .vc-col--7 { grid-column: span 7; } .vc-col--8 { grid-column: span 8; } .vc-col--9 { grid-column: span 9; }
  .vc-col--10 { grid-column: span 10; } .vc-col--11 { grid-column: span 11; } .vc-col--12 { grid-column: 1 / -1; }
}
.vc-col { min-width: 0; }
.entry .vc-col :where(h1, h2, h3, h4, p, ul, ol, table, figure, blockquote) { margin-block: 0; }
.entry .vc-col :where(h1, h2, h3, h4, p, ul, ol, table, figure, blockquote) + :where(h1, h2, h3, h4, p, ul, ol, table, figure, blockquote) { margin-top: 1.25em; }
.entry .vc-col :is(h1, h2) {
  margin-top: 2.5em; padding-top: 1.25em; border-top: 1px solid var(--c-line);
  font-family: var(--ff-condensed); font-size: var(--fs-heading); font-weight: var(--fw-condensed); font-synthesis: none;
  line-height: var(--lh-heading); text-transform: uppercase; color: var(--c-text);
}
.entry .vc-col :is(h3, h4) { margin-top: 2em; font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--c-text); }
.entry .vc-col h3 { font-size: var(--fs-heading); }
.entry .vc-col :is(ul, ol) { padding-left: 1.25em; }
.entry .vc-col a[name] + :is(h1, h2) { margin-top: 0; padding-top: 0; border-top: 0; }
/* El primer título de cada columna no lleva la línea separadora */
.entry .vc-col :is(h1, h2):first-child, .entry .vc-col a[name]:first-child + :is(h1, h2),
.entry .vc-col div:first-child > a[name]:first-child + :is(h1, h2) { margin-top: 0; padding-top: 0; border-top: 0; }
.entry .vc-col .columns-over > :is(a[name], p:has(> a[name]:only-child)):first-child + :is(h1, h2) { margin-top: 0; padding-top: 0; border-top: 0; }
/* Anclas antiguas (<a name>) que wpautop envuelve en un <p> vacío: sin hueco extra */
.entry .vc-col p:has(> a[name]:only-child:empty) { margin: 0; height: 0; }
/* Columna estrecha a la izquierda con un índice de anclas (p. ej. Full Rules): se queda fija al hacer scroll */
@media (min-width: 768px) {
  .entry .vc-row > .vc-col:first-child:is(.vc-col--2, .vc-col--3, .vc-col--4) > .vc-text { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
/* Índice de anclas del contenido antiguo (ul.vc-menu): mismo aspecto que el índice "In this article" */
.entry .vc-col ul.vc-menu { display: grid; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--c-line); font-size: var(--fs-small); font-weight: var(--fw-bold); }
.entry .vc-menu li + li { margin-top: 0; }
.entry .vc-menu li a:not(.button) {
  display: block; margin-left: -1px; padding: .5rem 0 .5rem 1rem; border-left: 2px solid transparent;
  color: var(--c-text-2); font-weight: var(--fw-bold); text-decoration: none;
}
.entry .vc-menu li a:not(.button):hover { color: var(--c-text); }
.entry .vc-menu li a.is-active { color: var(--c-text); border-color: var(--c-brand); }
@media (max-width: 767px) {
  /* En móvil va encima del contenido: en dos columnas para que no ocupe tanto */
  .entry .vc-col ul.vc-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .5rem; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface-hi); }
  .entry .vc-menu li a:not(.button) { margin-left: 0; padding: .5rem .75rem; border-left: 0; border-radius: var(--r-sm); }
  .entry .vc-menu li a.is-active { background: var(--c-tint-brand); }
}
.entry .vc-image img { width: 100%; height: auto; }
/* Rejilla de entradas ([vc_basic_grid]) dentro del artículo: como mucho 2 columnas */
.entry .vc-grid { margin-top: 1.5rem; }
@media (min-width: 1024px) { .entry-layout:not(.entry-layout--full) .entry .vc-grid { grid-template-columns: repeat(2, 1fr); } }
.entry .vc-grid .post-card { color: inherit; text-decoration: none; }

/* Home: el contenido de la página como lista numerada de ventajas */
.entry--home .wp-block-columns { display: block; }
.entry--home .wp-block-column + .wp-block-column { margin-top: 1.25em; }
.entry--home ol { counter-reset: none; padding-left: 0; list-style: none; }
.entry--home ol > li { padding-block: 1.5rem; border-top: 1px solid var(--c-line); }
.entry--home ol > li:first-child { border-top: 0; padding-top: 0; }
.entry--home .wp-block-column + .wp-block-column ol > li:first-child { border-top: 1px solid var(--c-line); padding-top: 1.5rem; }
.entry--home .youtube-player { margin-block: 1.5rem; }

/* 11. ARCHIVO ============================================================== */
.archive-head { display: grid; gap: 1.5rem; justify-items: start; max-width: 50rem; margin-top: 2rem; }
.archive-head__desc { color: var(--c-text-2); }
.post-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--c-line); background: var(--c-surface); transition: border-color var(--dur-fast); }
.post-card:hover { border-color: var(--c-tint-brand-mid); }
.post-card__media { position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; background: linear-gradient(135deg, var(--c-brand-deep), var(--c-surface-hi)); }
.post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-mid) var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: 1.5rem; }
.post-card__more { display: inline-flex; align-items: center; gap: .5rem; margin-top: auto; padding-top: 1rem; font-weight: var(--fw-bold); color: var(--c-text-2); }
.post-card:hover .post-card__title, .post-card:hover .post-card__more { color: var(--c-brand-soft); }
.pagination { margin-top: 3rem; }
.pagination :is(ol, ul, .nav-links) { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.pagination :is(a, span.current, .page-numbers, .gap) {
  display: inline-grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding-inline: .875rem;
  border-radius: var(--r-pill); border: 1px solid var(--c-line); font-size: var(--fs-small); font-weight: var(--fw-bold); color: var(--c-text-2);
}
.pagination a:hover { border-color: var(--c-brand); color: var(--c-text); }
.pagination :is(.current, [aria-current]) { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }
.pagination .title { display: none; }
.empty-state { display: grid; gap: 1.25rem; max-width: 40rem; }
.search-form { display: grid; gap: .5rem; margin-top: 1rem; }
.search-form label { font-weight: var(--fw-bold); color: var(--c-text); }
.search-form__row { display: flex; gap: .5rem; }

/* 12. FOOTER =============================================================== */
.site-footer { background: var(--c-bg); padding-top: 4rem; border-top: 1px solid var(--c-line); }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }
.footer-col h3, .footer-col .widget-title, .footer-col .side-title {
  margin-bottom: 1rem; text-align: left !important;
  font-size: var(--fs-small); font-weight: var(--fw-bold); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--c-text-3);
}
.footer-col ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; font-size: var(--fs-small); }
.footer-col a { color: var(--c-text-2); }
.footer-col a:hover { color: var(--c-text); }
.footer-col .textwidget > ul:first-child li { font-family: var(--ff-display); font-size: var(--fs-heading); color: var(--c-text); letter-spacing: var(--tr-display); }
.footer-col .footer_social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-col .footer_social a { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--c-line); border-radius: var(--r-pill); color: var(--c-text-2); }
.footer-col .footer_social a:hover { border-color: var(--c-brand); color: var(--c-text); }
/* El widget usa clases de Font Awesome: se dibujan con máscaras SVG (sin cargar la fuente) */
.footer-col .fa { display: inline-block; width: 1rem; height: 1rem; background: currentColor; -webkit-mask: var(--fa-icon) center / contain no-repeat; mask: var(--fa-icon) center / contain no-repeat; }
.footer-col .fa::before { content: none; }
.footer-col .fa-facebook { --fa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 8h3V4h-3a4 4 0 0 0-4 4v2H8v4h2v8h4v-8h3l1-4h-4V8z'/%3E%3C/svg%3E"); }
.footer-col .fa-twitter { --fa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 3h3.2l-7 8 8.3 10h-6.5l-5-6.2L4.8 21H1.6l7.5-8.6L1.2 3h6.6l4.5 5.7L17.5 3zm-1.1 16.2h1.8L6.7 4.7H4.8l11.6 14.5z'/%3E%3C/svg%3E"); }
.footer-menu__list { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 3rem 0 0; padding: 0; list-style: none; font-size: var(--fs-small); }
.footer-menu a:hover { color: var(--c-text); }
.footer-legal { display: grid; gap: .75rem; margin-top: 3.5rem; padding-block: 1.5rem; border-top: 1px solid var(--c-line); color: var(--c-text-3); }
@media (min-width: 768px) { .footer-legal { grid-template-columns: 1fr auto; align-items: start; gap: 2rem; } }
.footer-legal p:first-child { max-width: 42rem; }
.footer-legal__links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-legal a:hover { color: var(--c-text); }

/* 13. PANEL LATERAL DEL FORMULARIO (páginas sin formulario en el hero) ===== */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__backdrop { position: absolute; inset: 0; background: var(--c-overlay-mid); }
.drawer__panel {
  position: absolute; top: 0; right: 0; display: grid; align-content: start; gap: 1rem;
  width: min(30rem, 100%); height: 100%; overflow-y: auto; padding: 4rem 1rem 2rem;
  background: var(--c-bg-alt); border-left: 1px solid var(--c-line); box-shadow: var(--sh-pop);
}
@media (min-width: 640px) { .drawer__panel { padding: 4.5rem 1.5rem 2rem; } }
@media (prefers-reduced-motion: no-preference) {
  .drawer:not([hidden]) .drawer__panel { animation: ace-drawer var(--dur-fast) var(--ease-out); }
  @keyframes ace-drawer { from { transform: translateX(100%); } }
}
.drawer__close { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-pill); background: var(--c-tint-light); color: var(--c-text); }
.drawer__close .icon { width: 1.25rem; height: 1.25rem; }
.drawer .signup-card { box-shadow: none; }
.drawer__call { text-align: center; }
.drawer__call .text-link .icon { color: var(--c-accent); }

/* 14. CONTENIDO HEREDADO =================================================== */
/* YouTube: miniatura + play en la página, video en modal (ver theme.js) */
.youtube-player { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--c-surface); }
.youtube-player__button { position: relative; display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: none; cursor: pointer; }
/* La miniatura hqdefault es 4:3 con franjas negras: recortada a 16:9 quedan fuera */
.youtube-player img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: filter var(--dur-fast); }
.youtube-player__button:hover img, .youtube-player__button:focus-visible img { filter: brightness(75%); }
.youtube-player__button:focus-visible { outline: none; box-shadow: inset var(--sh-focus); }
.youtube-player .play { position: absolute; left: 50%; top: 50%; width: 4rem; height: 2.75rem; transform: translate(-50%, -50%); border-radius: var(--r-sm); background: var(--c-action); transition: transform var(--dur-fast); }
.youtube-player__button:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.youtube-player .play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: .5rem 0 .5rem .8rem; border-color: transparent transparent transparent var(--c-text); }

.video-modal { width: min(100% - 2rem, 64rem); max-width: none; padding: 0; overflow: visible; border: 0; background: none; }
.video-modal::backdrop { background: var(--c-overlay); }
.video-modal__frame { overflow: hidden; border-radius: var(--r-md); background: var(--c-bg); box-shadow: var(--sh-pop); }
.video-modal__frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.video-modal__close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0 0 .75rem auto; border-radius: var(--r-pill); background: var(--c-tint-light); color: var(--c-text); }
.video-modal__close:hover { background: var(--c-line-strong); }
.video-modal__close .icon { width: 1.25rem; height: 1.25rem; }
/* Clases de Bootstrap que aparecen en algunos contenidos/bloques */
.entry .ratio { position: relative; width: 100%; }
.entry .ratio-16x9 { aspect-ratio: 16 / 9; }
.entry .ratio > iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.entry .row:not(.bs-scope .row) { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.entry .row:not(.bs-scope .row) > [class*="col"] { flex: 1 1 16rem; min-width: 0; }
.entry .img-fluid { max-width: 100%; height: auto; }
.entry .text-center { text-align: center; }
.entry .list-group { padding-left: 0; list-style: none; }
.entry .border-top { border-top: 1px solid var(--c-line); }
/* Tabla de líneas heredada */
.sport-line-table { width: 100%; font-size: var(--fs-small); border-collapse: collapse; }
.sport-line-table th { background: var(--c-surface-hi); color: var(--c-text); }
.sport-line-table td, .sport-line-table th { padding: .625rem; text-align: left; border: 0; border-bottom: 1px solid var(--c-line); }
.sport-line-table tr:nth-child(even) td { background: var(--c-surface); }
/* Embeds de WordPress */
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper { position: relative; }
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.wp-block-embed.wp-has-aspect-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.twitter-tweet { margin-inline: auto !important; }
/* Comentarios */
.comments-area, #comments { margin-top: 3rem; }
.comment-list { padding: 0; list-style: none; }
.comment-respond :is(input[type="text"], input[type="email"], input[type="url"], textarea) { width: 100%; padding: .75rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface-hi); color: var(--c-text); }
.comment-respond .submit { padding: .875rem 1.5rem; border: 0; border-radius: var(--r-pill); background: var(--c-action); color: var(--c-text); font-weight: var(--fw-bold); cursor: pointer; }

/* 15. MOVIMIENTO =========================================================== */
/* Todo va dentro de prefers-reduced-motion: no-preference; con "reducir movimiento" el sitio queda estático.
   Propósito: (1) el hero entra en orden de lectura y termina en el formulario; (2) los bloques aparecen al
   llegar a ellos, así se lee una cosa a la vez; (3) las fotos se asientan con un zoom suave, dan vida sin
   distraer. Nada se mueve en bucle salvo el video (que tiene botón de pausa). */

/* Pulsación de botones: confirma el clic */
.button:active { transform: translateY(1px); }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: entrada en cascada al cargar (kicker → titular línea a línea → subtítulo → formulario → contacto) */
  .hero__copy > *, .hero__headline span, .hero__form { animation: ace-rise var(--dur-mid) var(--ease-out) both; }
  .hero__headline { animation: none; }
  .hero__copy > :nth-child(2), .hero__headline span:first-child { animation-delay: var(--stagger); }
  .hero__headline span + span, .hero__copy > :nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
  .hero__form { animation-delay: calc(var(--stagger) * 3); }
  .hero__copy > :nth-child(4) { animation-delay: calc(var(--stagger) * 4); }
  .hero__bg img { animation: ace-settle var(--dur-slow) var(--ease-out) both; }
  @keyframes ace-rise { from { opacity: 0; transform: translateY(var(--shift)); } }
  @keyframes ace-settle { from { transform: scale(1.06); } }

  /* Aparición al hacer scroll: theme.js marca con .reveal solo lo que está por debajo de la pantalla al cargar
     (lo visible no parpadea) y añade .is-in al entrar en pantalla. Sin JS, todo se ve normal. */
  .reveal { opacity: 0; transform: translateY(var(--shift)); transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); }
  .reveal.is-in { opacity: 1; transform: none; }
  /* Grupos (tarjetas, paneles, noticias): cada elemento entra un poco después del anterior */
  .reveal-group > .reveal:nth-child(2) { transition-delay: var(--stagger); }
  .reveal-group > .reveal:nth-child(3) { transition-delay: calc(var(--stagger) * 2); }
  .reveal-group > .reveal:nth-child(4) { transition-delay: calc(var(--stagger) * 3); }
  .reveal-group > .reveal:nth-child(5) { transition-delay: calc(var(--stagger) * 4); }
  .reveal-group > .reveal:nth-child(n+6) { transition-delay: calc(var(--stagger) * 5); }

  /* Fotos de sección: se asientan (zoom de 1.08 a 1) cuando su bloque entra en pantalla */
  .reveal-photo img { transform: scale(1.08); transition: transform var(--dur-slow) var(--ease-out); }
  .reveal-photo.is-in img { transform: none; }
}
