/* ============================================================
   Grupo Zeppelin — paginas.css
   Rediseño (nov 2026) de Productos, Herramientas IA, Talleres VigIA
   y Artículo Electoral. Se carga DESPUÉS del CSS propio de cada página.
   No se usa en la portada (home.css) ni en el libro.
============================================================ */

/* ---------- Hero con imagen (la imagen llega por --hero-img) ---------- */
.hero--img{
  min-height:calc(100svh - var(--header-h));
  display:flex; align-items:center;
  padding:clamp(28px,6vh,72px) 0 clamp(24px,5vh,64px);
  background:
    linear-gradient(90deg, rgba(61,44,74,.94) 0%, rgba(61,44,74,.78) 38%, rgba(61,44,74,.12) 78%),
    var(--hero-img) right center / cover no-repeat,
    var(--purple-deep);
}
.hero--img > .wrap{ width:100%; }
.hero--img .h1{
  font-size:clamp(2rem, min(2.4vw + 1.2rem, 6.6vh), 3.5rem);
  max-width:24ch; text-wrap:balance; line-height:1.1;
}
.hero--img .subhead{
  font-size:clamp(1rem, 2.3vh, 1.2rem); max-width:58ch;
  margin-top:clamp(12px,2.4vh,22px);
}
.hero--img .hero-cta-row{ margin-top:clamp(18px,3.6vh,36px); }
.hero--img .reveal{ transition-duration:.7s; transition-timing-function:cubic-bezier(.2,.7,.2,1); }
.hero--img .btn--primary{ background:var(--accent-warm); color:var(--on-accent-warm); }
.hero--img .btn--primary:hover{ background:var(--accent-warm-hover); }
.hero--img .btn--ghost{ border-color:rgba(245,243,238,.55); }
@media (max-width:600px){
  /* Cualquier botón largo baja de línea en vez de salirse de la pantalla */
  main .btn{ white-space:normal; text-align:center; line-height:1.25; }
  /* Botones del hero a todo el ancho y con texto que baja de línea (antes desbordaban) */
  .hero--img .hero-cta-row{ flex-direction:column; align-items:stretch; }
  .hero--img .btn{ white-space:normal; text-align:center; line-height:1.25; padding:14px 22px; }
}
@media (max-width:760px){
  .hero--img{
    padding:40px 0 36px;
    background:
      linear-gradient(180deg, rgba(61,44,74,.88) 0%, rgba(61,44,74,.82) 100%),
      var(--hero-img) 72% center / cover no-repeat,
      var(--purple-deep);
  }
  .hero--img .h1{ font-size:clamp(1.9rem, 7.4vw, 2.3rem); }
}

/* ---------- Cierre oscuro con imagen ---------- */
.section--cierre{
  background:
    linear-gradient(90deg, rgba(61,44,74,.72) 0%, rgba(61,44,74,.25) 100%),
    url('/assets/img/home/cierre.webp') right bottom / cover no-repeat,
    var(--purple-deep);
}
.section--cierre .form{ box-shadow:var(--shadow-lg); }
.section--dark .form .checkbox-row label,
.section--dark .form fieldset legend{ color:var(--text-1); }

/* ---------- Productos: tarjetas con respuesta al cursor ---------- */
.product-card{ transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.product-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }

/* ---------- Herramientas IA: imagen en cada herramienta ---------- */
.bento-item{ overflow:hidden; }
.bento-img{
  display:block; width:calc(100% + 64px); max-width:none;
  margin:-32px -32px 8px; height:auto; aspect-ratio:16/10; object-fit:cover;
  transition:transform .45s ease;
}
.bento-item--lg .bento-img{ aspect-ratio:21/8; }
.bento-item:hover .bento-img{ transform:scale(1.03); }
@media (max-width:600px){
  .bento-img{ width:calc(100% + 48px); margin:-24px -24px 6px; }
}
/* La cuarta herramienta ocupa todo el ancho para que no quede sola en la última fila */
@media (min-width:820px){
  .bento > .bento-item:nth-child(4):last-child{ grid-column:span 2; }
  .bento > .bento-item:nth-child(4):last-child .bento-img{ aspect-ratio:21/8; }
}

/* ---------- Talleres VigIA: imagen con el texto de cada seminario ---------- */
.seminar-card.has-img{ padding-top:0; }
.seminar-card.has-img::before{ z-index:2; }
.seminar-img{
  display:block; width:calc(100% + 48px); max-width:none;
  margin:0 -24px 20px; height:auto; aspect-ratio:4/3; object-fit:cover;
  transition:transform .45s ease;
}
.seminar-card.has-img:hover .seminar-img{ transform:scale(1.02); }
/* Seminario destacado (ocupa todo el ancho): imagen a la izquierda, datos a la derecha */
@media (min-width:900px){
  .seminar-card--flagship.has-img{
    display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr);
    column-gap:36px; align-content:start; padding:0 28px 24px 0;
  }
  .seminar-card--flagship.has-img > .seminar-img{
    grid-column:1; grid-row:1 / span 6; align-self:start; width:100%; margin:0;
  }
  .seminar-card--flagship.has-img > :not(.seminar-img):not(.flagship-badge){ grid-column:2; }
  .seminar-card--flagship.has-img > .seminar-meta{ margin-top:28px; }
}

/* El texto ya está en la imagen: el HTML se conserva solo para lectores de pantalla y buscadores */
.seminar-card.has-img > .seminar-num,
.seminar-card.has-img > .seminar-title{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; margin:0;
}

/* ---------- Artículo Electoral: hero con amanecer dorado ---------- */
/* El morado eléctrico del artículo chocaba con la marca: el hero usa el morado oscuro */
.e-hero{
  background:
    linear-gradient(90deg, rgba(61,44,74,.96) 0%, rgba(61,44,74,.7) 45%, rgba(61,44,74,0) 85%),
    url('/assets/img/home/cierre.webp') right bottom / cover no-repeat,
    var(--purple-deep);
}
.e-hero::before{ display:none; }

/* ============================================================
   Fase 4 (nov 2026): resto de las páginas interiores
============================================================ */

/* ---------- Problemas: tarjetas con filete (igual que la portada) ---------- */
.problem-card{ padding-top:22px; border-top:3px solid var(--purple-mid); }
.problem-card:nth-child(2){ border-top-color:var(--accent-warm-hover); }
.problem-card:nth-child(3){ border-top-color:var(--purple-deep); }
.problem-card:nth-child(4){ border-top-color:var(--purple-mid); }
@media (min-width:800px){ .problem-grid{ grid-template-columns:repeat(2,1fr); gap:32px 40px; } }
@media (min-width:1100px){ .problem-grid{ grid-template-columns:repeat(4,1fr); } }

/* ---------- Listas "method": tarjetas numeradas ---------- */
.method-list{ counter-reset:paso; grid-template-columns:1fr; }
@media (min-width:900px){ .method-list{ grid-template-columns:1fr 1fr; gap:16px; } }
.method-list > .method-item{
  counter-increment:paso; position:relative;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r);
  padding:22px 24px 22px 70px; box-shadow:var(--shadow-sm);
  transition:box-shadow .18s ease, transform .18s ease;
}
.method-list > .method-item:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.method-list > .method-item::before{
  content:counter(paso); position:absolute; left:22px; top:18px;
  font-family:var(--serif); font-size:2rem; font-weight:600; line-height:1; color:var(--purple-mid);
}
main .wrap-narrow:has(> .method-list){ max-width:var(--max); }
@media (min-width:900px){ .method-list > .method-item:last-child:nth-child(odd){ grid-column:1 / -1; } }
.section--dark .method-list > .method-item{ background:rgba(245,243,238,.07); border-color:rgba(245,243,238,.18); box-shadow:none; }
.section--dark .method-list > .method-item::before{ color:var(--accent-warm); }
.section--dark .method-list > .method-item p,
.section--dark .method-list > .method-item strong{ color:var(--cream); }

/* ---------- Pasos en cuatro peldaños (misma pieza de la portada) ---------- */
.section--escalera .wrap-narrow{ max-width:var(--max); }
.section--escalera .section-intro{ max-width:60ch; }
.section--escalera .ladder{ display:grid; grid-template-columns:1fr; gap:18px; margin-top:8px; }
@media (min-width:900px){ .section--escalera .ladder{ grid-template-columns:repeat(4,1fr); gap:20px; } }
.section--escalera .ladder-item{
  position:relative; flex-direction:column; align-items:flex-start; gap:12px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r);
  padding:30px 24px 26px; overflow:hidden; box-shadow:var(--shadow-sm);
  transition:box-shadow .18s ease, transform .18s ease;
}
.section--escalera .ladder-item:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.section--escalera .ladder-item::before{ content:""; position:absolute; left:0; top:0; height:5px; width:25%; background:var(--purple-mid); }
.section--escalera .ladder-item:nth-child(2)::before{ width:50%; }
.section--escalera .ladder-item:nth-child(3)::before{ width:75%; }
.section--escalera .ladder-item:nth-child(4)::before{ width:100%; background:var(--purple-deep); }
.section--escalera .ladder-num{ width:auto; height:auto; background:none; border-radius:0; justify-content:flex-start; font-size:2.6rem; line-height:1; font-weight:600; color:var(--purple-mid); }
.section--escalera .ladder-item p{ padding-top:0; font-size:.98rem; }
.section--escalera .ladder-item strong{ display:block; margin-bottom:8px; font-family:var(--serif); font-size:1.3rem; font-weight:600; line-height:1.25; color:var(--purple-deep); }
.section--escalera .ladder-close{ margin-top:32px; padding-left:18px; border-left:3px solid var(--accent-warm-hover); font-family:var(--serif); font-size:1.25rem; line-height:1.5; }

/* ---------- Preguntas frecuentes: título a la izquierda, lista a la derecha ---------- */
.section--faq .wrap-narrow{ max-width:var(--max); }
@media (min-width:980px){
  .section--faq .wrap-narrow{ display:grid; grid-template-columns:5fr 7fr; gap:64px; align-items:start; }
  .section--faq .section-head{ position:sticky; top:calc(var(--header-h) + 32px); margin-bottom:0; }
}
.section--faq .faq-list{ margin-top:0; gap:12px; }
.section--faq .faq-item{ border-radius:var(--r); padding:2px 26px; transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.section--faq .faq-item:hover{ border-color:var(--purple-mid); transform:translateY(-2px); }
.section--faq .faq-item[open]{ border-color:var(--purple-mid); box-shadow:var(--shadow-md); border-left:4px solid var(--accent-warm-hover); }
.section--faq .faq-item summary{ font-size:1.05rem; padding:20px 0; }
.section--faq .faq-answer{ font-size:1rem; }

/* ---------- Sección oscura con el mapa de México de fondo ---------- */
.section--bgmap{
  background:
    linear-gradient(90deg, rgba(61,44,74,.97) 0%, rgba(61,44,74,.8) 38%, rgba(61,44,74,.1) 75%),
    url('/assets/img/home/mexico.webp') right center / auto 100% no-repeat,
    var(--purple-deep);
}

/* ---------- VigIA: perfiles con respuesta al cursor ---------- */
.segment-grid > *{ transition:box-shadow .18s ease, transform .18s ease; }
.segment-grid > *:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.segment-num{ font-family:var(--serif); }

/* ---------- Productos: panel de imagen en cada tarjeta ---------- */
.product-card{ overflow:hidden; }
.product-card .product-icon{
  position:relative; display:flex; align-items:center; justify-content:center;
  width:calc(100% + 56px); max-width:none; height:auto; aspect-ratio:16/9;
  margin:-28px -28px 18px; border-radius:0; color:var(--accent-warm);
  background:
    linear-gradient(180deg, rgba(61,44,74,.35), rgba(61,44,74,.72)),
    url('/assets/img/home/hero.webp') var(--art-x, 80%) var(--art-y, 40%) / var(--art-s, 260%) no-repeat,
    var(--purple-deep);
  transition:background-position .6s ease;
}
.product-card .product-icon svg{ width:34%; height:auto; max-height:70%; stroke-width:1.1; filter:drop-shadow(0 0 14px rgba(199,154,70,.45)); }
.product-card:nth-child(4n+1) .product-icon{ --art-x:85%; --art-y:30%; }
.product-card:nth-child(4n+2) .product-icon{ --art-x:60%; --art-y:70%; --art-s:300%; }
.product-card:nth-child(4n+3) .product-icon{ --art-x:92%; --art-y:75%; --art-s:240%; }
.product-card:nth-child(4n) .product-icon{ --art-x:70%; --art-y:15%; --art-s:320%; }
.product-card:hover .product-icon{ --art-x:75%; }
/* Cuando exista la imagen del producto (Nano Banana) basta con poner un img.product-img al inicio de la tarjeta */
.product-card .product-img{ display:block; width:calc(100% + 56px); max-width:none; height:auto; aspect-ratio:16/9; object-fit:cover; margin:-28px -28px 18px; transition:transform .45s ease; }
.product-card:hover .product-img{ transform:scale(1.03); }
@media (max-width:600px){ .product-card .product-img{ width:calc(100% + 40px); margin:-20px -20px 16px; } }

/* ---------- Artículo Electoral: misma paleta y tipografía que el sitio ---------- */
:root{
  --e-bg:var(--bg); --e-accent:var(--purple-deep-2); --e-accent-hover:var(--purple-deep);
  --e-accent-soft:var(--purple-soft); --e-border:var(--border); --e-border-soft:var(--border-soft);
  --e-serif:var(--serif); --e-text-1:var(--text-1); --e-text-2:var(--text-2); --e-text-3:var(--text-3);
}
.e-inline-link{ color:var(--purple-mid); }
.e-sec-num{ color:var(--accent-warm-hover); opacity:.35; }
.e-ico.r{ color:var(--purple-mid); }
.e-card::before{ background:var(--accent-warm-hover); }
.e-err-n{ color:var(--purple-deep); }
.e-chk-box{ border-color:var(--purple-mid); }
.e-sub-title{ border-bottom-color:var(--purple-soft); }
.e-cmp-head.cons{ color:var(--purple-deep); }
.e-quote-card{ background:var(--purple-deep); border-bottom:3px solid var(--accent-warm); }
.e-closing{
  border-top:0; position:relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.88)),
    url('/assets/img/home/puertas.webp') right top / cover no-repeat,
    var(--e-surface);
}
.e-closing::before{ content:""; position:absolute; left:0; right:0; top:0; height:4px; background:linear-gradient(90deg,var(--purple-deep),var(--accent-warm)); }
.e-cta{ background:var(--purple-deep); }
.e-cta:hover{ background:var(--purple-deep-2); }
.e-cta--ghost{ background:transparent; color:var(--purple-deep); border-color:var(--purple-deep); }
.e-card, .e-err-item{ transition:box-shadow .18s ease, transform .18s ease; }
.e-card:hover, .e-err-item:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
