/* ==========================================================================
   El Polígrafo — Theme "elpoligrafo" — style.css
   Diseño clean/blanco: paleta azul #1A73E8, fondo #F9FAFB, radius 12px,
   sombras sutiles, Inter 400/600/700. Ver DESIGN-SPEC.md (Fase 0).
   Las variables base y la nav viven en el critical CSS inline (header.php).
   ========================================================================== */

/* ── Tipografía y utilidades ─────────────────────────────────────────── */
.section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
.section--white { background: var(--surface); }

h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }

.h-display { font-size: clamp(34px, 4vw, 52px); font-weight: 700; line-height: 1.15; }
.h-section { font-size: clamp(28px, 3vw, 38px); font-weight: 700; }
.highlight  { color: var(--primary); }

.lede { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: var(--text-2); max-width: 60ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(26, 115, 232, 0.08); color: var(--primary-dark);
  font-size: 13px; font-weight: 600; letter-spacing: 0.03em;
  padding: 6px 14px; border-radius: 100px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; }

.breadcrumb { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }

.hairline { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; line-height: 1;
  padding: 15px 28px; border-radius: var(--radius-btn);
  border: 1.5px solid transparent; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(26, 115, 232, 0.06); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f1f5fb; color: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #2d9249; color: #fff; }
/* Botón sobre la banda azul del CTA (clase dinámica 'btn-' + style del JSON):
   fondo azul marino oscuro y texto blanco para que el teléfono se lea bien */
.btn-outline-white { background: #12233a; color: #fff; border-color: #12233a; }
.btn-outline-white:hover { background: #0d1a2c; color: #fff; box-shadow: var(--shadow-md); }

/* ── Reveal on scroll (sutil) ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 90ms; }
.reveal-delay-2 { transition-delay: 180ms; }
.reveal-delay-3 { transition-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Cabecera de sección centrada ────────────────────────────────────── */
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .lede { margin: 14px auto 0; }

/* ==========================================================================
   BLOQUE: hero (2 columnas + contadores)
   ========================================================================== */
.hero { background: var(--surface); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }

/* Variante con imagen de fondo (data.bg): overlay claro degradado para que
   el texto oscuro siga siendo legible sobre la foto. */
.hero--bg {
  background-image:
    linear-gradient(90deg, rgba(249, 250, 251, 0.96) 0%, rgba(249, 250, 251, 0.86) 48%, rgba(249, 250, 251, 0.55) 100%),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 4vw, 56px); align-items: center; }
.hero-grid--single { grid-template-columns: 1fr; }
.hero-grid--single .hero-copy { max-width: 820px; }
.hero-copy .eyebrow { margin-bottom: 20px; }
.hero-title { font-size: clamp(34px, 4vw, 52px); font-weight: 700; line-height: 1.15; max-width: 20ch; }
.hero-grid--single .hero-title { max-width: 26ch; }
.hero-lede { margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); object-fit: cover; }

/* Contadores dentro del hero */
.hero-counters {
  display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(36px, 5vw, 56px); padding-top: 28px;
  border-top: 1px solid var(--border);
}
.counter-label { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.counter-value { font-size: clamp(30px, 3vw, 40px); font-weight: 700; color: var(--primary); line-height: 1.1; }
.counter:nth-child(2n) .counter-value { color: var(--secondary); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  /* En móvil el texto ocupa todo el ancho: overlay uniforme más opaco */
  .hero--bg {
    background-image:
      linear-gradient(rgba(249, 250, 251, 0.94), rgba(249, 250, 251, 0.9)),
      var(--hero-bg);
  }
}

/* ==========================================================================
   BLOQUE: metrics (banda gris de contadores)
   ========================================================================== */
.metrics-band { background: var(--band); padding: clamp(28px, 4vw, 44px) 0; }
.metrics-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(28px, 5vw, 72px); }
.metric { display: flex; align-items: baseline; gap: 14px; }
.metric + .metric { border-left: 1px solid var(--border); padding-left: clamp(28px, 5vw, 72px); }
.metric-label { font-size: 15px; font-weight: 600; color: var(--text-2); }
.metric-value { font-size: clamp(28px, 3vw, 38px); font-weight: 700; color: var(--primary); line-height: 1.1; }
.metric:nth-child(2n) .metric-value { color: var(--secondary); }
@media (max-width: 680px) {
  .metrics-row { flex-direction: column; gap: 20px; }
  .metric + .metric { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; }
}

/* ==========================================================================
   BLOQUE: editorial (prosa clean / variante 2-col con imagen + inset)
   ========================================================================== */
.editorial-prose { max-width: 760px; margin: 0 auto; }
.editorial-prose .eyebrow { margin-bottom: 18px; }
.editorial-prose h2 { margin-bottom: 18px; }
.editorial-body p { margin-bottom: 1.1em; color: var(--text); }
.editorial-body p:last-child { margin-bottom: 0; }
.editorial-body a { font-weight: 600; }
.editorial-body a:hover { text-decoration: underline; }
.editorial-body h2, .editorial-body h3 { margin: 1.6em 0 0.6em; }
.editorial-body ul, .editorial-body ol { margin: 0 0 1.1em 1.4em; }
.editorial-body li { margin-bottom: 0.4em; }
.editorial-body img { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 1.2em 0; }
.editorial-body blockquote {
  border-left: 3px solid var(--primary); background: rgba(26,115,232,0.05);
  padding: 16px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4em 0;
  color: var(--text-2);
}

.editorial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: center; }
.editorial-media { position: relative; }
.editorial-media > img, .editorial-media > picture > img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.editorial-inset {
  position: absolute; left: -28px; bottom: -28px; width: 46%;
  background: #fff; padding: 8px; border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.editorial-inset img { width: 100%; border-radius: calc(var(--radius) - 4px); }
@media (max-width: 880px) {
  .editorial-grid { grid-template-columns: 1fr; }
  .editorial-inset { left: 12px; bottom: -20px; }
  .editorial-media { margin-bottom: 32px; }
}

/* ==========================================================================
   BLOQUE: cards (3 columnas con icono)
   ========================================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; text-align: center;
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.card-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; }
.card-icon--primary   { background: rgba(26, 115, 232, 0.1);  color: var(--primary); }
.card-icon--secondary { background: rgba(52, 168, 83, 0.12);  color: var(--secondary); }
.card-icon--accent    { background: rgba(234, 67, 53, 0.1);   color: var(--accent); }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.card-desc { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.card-link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; }
.card-link:hover { text-decoration: underline; }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cards-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) { .cards-grid, .cards-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-grid, .cards-grid--4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   BLOQUE: cta (banda azul de conversión)
   ========================================================================== */
.cta-band-wrap { padding: clamp(24px, 4vw, 48px) 0; }
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, #1765CC 100%);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(44px, 6vw, 72px) clamp(24px, 5vw, 72px);
  text-align: center; color: #fff;
  box-shadow: 0 16px 40px rgba(26, 115, 232, 0.25);
}
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); max-width: 24ch; margin: 0 auto; }
.cta-band .cta-lede { color: rgba(255, 255, 255, 0.88); max-width: 56ch; margin: 14px auto 0; font-size: clamp(15px, 1.2vw, 18px); }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

/* ==========================================================================
   BLOQUE: faq (acordeón accesible)
   ========================================================================== */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
  transition: box-shadow .25s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; background: none; border: none; text-align: left;
  font-size: 16px; font-weight: 600; color: var(--text);
  padding: 20px 24px; line-height: 1.4;
}
.faq-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(26, 115, 232, 0.08); color: var(--primary);
  font-size: 18px; font-weight: 600; line-height: 1;
  transition: transform .3s, background .3s, color .3s;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-answer-inner { padding: 0 24px 22px; color: var(--text-2); font-size: 15px; line-height: 1.7; }

/* ==========================================================================
   BLOQUE: stories-list (tarjetas de historias)
   ========================================================================== */
.stories-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.story-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; transition: box-shadow .25s, transform .25s;
}
.story-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.story-card-meta { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.story-card-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.story-card-title a { color: var(--text); }
.story-card-title a:hover { color: var(--primary); }
.story-card-excerpt { font-size: 14.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 18px; }
.story-card-link { margin-top: auto; font-size: 14px; font-weight: 600; }
.story-card-link:hover { text-decoration: underline; }
@media (max-width: 780px) { .stories-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   BLOQUE: contact-page (formulario + datos)
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
.contact-form-card, .contact-info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-sm);
}
.contact-card-title { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { margin-bottom: 16px; }
.cf-field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.cf-field input, .cf-field textarea {
  width: 100%; padding: 13px 15px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-btn);
  font-size: 15px; font-family: inherit; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.cf-field input::placeholder, .cf-field textarea::placeholder { color: #9AA0A6; }
.cf-field input:focus, .cf-field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}
.cf-field textarea { resize: vertical; min-height: 120px; }
.cf-privacy { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 20px; cursor: pointer; position: relative; }
.cf-privacy input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-check-mark {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px;
  border: 2px solid #B0B5BB; border-radius: 4px; background: #fff; transition: all .2s;
}
.cf-privacy input:checked + .cf-check-mark { background: var(--primary); border-color: var(--primary); }
.cf-privacy input:checked + .cf-check-mark::after {
  content: '\2713'; display: block; text-align: center;
  font-size: 12px; line-height: 14px; color: #fff; font-weight: 700;
}
.cf-privacy input:focus-visible + .cf-check-mark { box-shadow: 0 0 0 3px rgba(26,115,232,0.25); }
.cf-privacy-text { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.cf-privacy-text a { text-decoration: underline; }
.cf-status { margin-top: 14px; font-size: 14px; font-weight: 600; display: none; padding: 12px 16px; border-radius: var(--radius-btn); }
.cf-status--ok { background: rgba(52, 168, 83, 0.12); color: #1E7E34; }
.cf-status--error { background: rgba(234, 67, 53, 0.1); color: #C5221F; }

.ci-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.ci-item:last-child { border-bottom: none; }
.ci-label { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.ci-value { font-size: 16px; color: var(--text); line-height: 1.5; }
a.ci-value:hover { color: var(--primary); }
.contact-map { margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.contact-map iframe { display: block; width: 100%; height: 360px; border: 0; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } .cf-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   BLOG: listado, post, sidebar
   ========================================================================== */
.blog-hero { background: var(--surface); padding: clamp(44px, 6vw, 72px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--border); }
.blog-hero .eyebrow { margin-bottom: 18px; }
.blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(32px, 4vw, 56px); align-items: start; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.blog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-card-image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--band); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.blog-card-cat { color: var(--primary); font-weight: 600; }
.blog-card-title { font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.blog-card-title a { color: var(--text); }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { font-size: 14.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 16px; }
.blog-card-link { margin-top: auto; font-size: 14px; font-weight: 600; }
.blog-card-link:hover { text-decoration: underline; }

.blog-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; }
.blog-pagination a, .blog-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-btn);
  font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--surface);
}
.blog-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.blog-pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Post individual */
.post-hero { background: var(--surface); padding: clamp(44px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--border); }
.post-hero h1 { max-width: 26ch; }
.post-meta-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; font-size: 14px; color: var(--text-2); }
.post-meta-bar .post-cat { color: var(--primary); font-weight: 600; }
.post-featured { margin: 28px 0 0; }
.post-featured img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.post-layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(32px, 4vw, 56px); align-items: start; }
.post-content { min-width: 0; font-size: 16.5px; line-height: 1.75; }
.post-content > * + * { margin-top: 1em; }
.post-content h2 { font-size: clamp(24px, 2.4vw, 30px); margin-top: 1.8em; }
.post-content h3 { font-size: clamp(19px, 1.8vw, 23px); margin-top: 1.5em; }
.post-content img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.post-content a { font-weight: 600; }
.post-content a:hover { text-decoration: underline; }
.post-content ul, .post-content ol { margin-left: 1.4em; }
.post-content blockquote {
  border-left: 3px solid var(--primary); background: rgba(26,115,232,0.05);
  padding: 16px 22px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2);
}

/* ── Tablas dentro de un post ─────────────────────────────────────────────
   Cualquier <table> que escribas en el editor del panel: filo de 1px, aire
   dentro de las celdas y scroll horizontal en movil para que no desborde. */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 15.5px;
  line-height: 1.55;
  background: var(--surface);
  border: 1px solid var(--border);
}
.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}
.post-content thead th {
  background: #12233a;
  color: #fff;
  font-weight: 600;
  border-color: #12233a;
}
.post-content tbody tr:nth-child(even) td { background: rgba(18, 35, 58, .035); }
.post-content table caption {
  caption-side: bottom;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  text-align: left;
}
/* Las celdas heredan el ritmo vertical del post; dentro no hace falta. */
.post-content td > *, .post-content th > * { margin-top: 0; }
@media (max-width: 760px) {
  .post-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .post-content th, .post-content td { padding: 10px 12px; font-size: 14.5px; }
}

/* Sidebar */
.blog-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; }
.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.sidebar-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.sidebar-recent { list-style: none; }
.sidebar-recent li { border-bottom: 1px solid var(--border); }
.sidebar-recent li:last-child { border-bottom: none; }
.sidebar-recent a { display: block; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.45; }
.sidebar-recent a:hover { color: var(--primary); }
.sidebar-recent time { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); margin-top: 3px; }
.sidebar-cta { background: linear-gradient(135deg, var(--primary) 0%, #1765CC 100%); border: none; color: #fff; }
.sidebar-cta h3 { color: #fff; font-size: 18px; margin-bottom: 8px; }
.sidebar-cta p { font-size: 14px; color: rgba(255,255,255,0.88); margin-bottom: 18px; line-height: 1.55; }
.sidebar-cta .btn { width: 100%; }

@media (max-width: 980px) {
  .blog-layout, .post-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
}
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   404
   ========================================================================== */
.error-page { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.error-code { font-size: clamp(64px, 10vw, 120px); font-weight: 700; color: var(--primary); line-height: 1; letter-spacing: -0.03em; }
.error-page h1 { font-size: clamp(24px, 3vw, 34px); margin-top: 16px; }
.error-page .lede { margin: 16px auto 36px; }

/* ==========================================================================
   TESTIMONIALS (reseñas de Google, estático)
   ========================================================================== */
.testimonials-aggregate {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: -12px auto clamp(28px, 4vw, 40px); text-align: center;
}
.testimonials-aggregate-score { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--text); }
.testimonials-aggregate-stars { display: inline-flex; gap: 2px; color: #FBBC04; }
.testimonials-aggregate-count { font-size: 14px; color: var(--text-2); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 28px); box-shadow: var(--shadow-sm); margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.testimonial-stars { display: inline-flex; gap: 2px; }
.testimonial-stars .star { color: var(--border); }
.testimonial-stars .star--filled { color: #FBBC04; }
.testimonial-text { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text); flex: 1; }
.testimonial-author { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.testimonial-author-name { font-size: 14px; font-weight: 600; color: var(--text); }
.testimonial-source { font-size: 12px; font-weight: 600; color: var(--text-2); }
@media (max-width: 980px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .testimonials-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: clamp(40px, 6vw, 72px); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(28px, 4vw, 48px);
  padding: clamp(44px, 6vw, 64px) 0 clamp(32px, 4vw, 44px);
}
.footer-brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.02em; margin-bottom: 12px; }
.footer-brand-name .dot { color: var(--primary); }
.footer-tagline { font-size: 14px; color: var(--text-2); line-height: 1.65; max-width: 34ch; }
.footer-col-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { font-size: 14px; color: var(--text-2); margin-bottom: 10px; line-height: 1.5; }
.footer-col a { color: var(--text-2); transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-cta-link { color: var(--primary) !important; font-weight: 600; }
/* Iconos de redes sociales del pie */
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(26, 115, 232, 0.08); color: var(--primary-dark);
  transition: background .2s, color .2s, transform .15s;
}
.footer-social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
/* Vídeo embebido (bloque editorial de la home) */
.video-embed { position: relative; aspect-ratio: 16 / 9; max-width: 860px; margin: 8px auto 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Vídeo + columna lateral estrecha ("Antes de la prueba") */
.editorial-prose:has(.video-grid) { max-width: 1100px; }
.video-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: center; margin-top: 8px; text-align: left; }
.video-grid .video-embed { max-width: none; margin: 0; }
.video-aside h3 { font-size: 18px; margin-bottom: 10px; }
.video-aside p { font-size: 14.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 10px; }
.video-aside p:last-child { margin-bottom: 0; }
.video-aside a { font-weight: 600; }
@media (max-width: 880px) { .video-grid { grid-template-columns: 1fr; } }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border); padding: 22px 0;
  font-size: 13px; color: var(--text-2);
}
.footer-bottom-links { display: flex; gap: 18px; }
.footer-bottom-links a { color: var(--text-2); }
.footer-bottom-links a:hover { color: var(--primary); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   BLOQUE: timeline (línea central, puntos y tarjetas alternadas) + lightbox
   ========================================================================== */
.timeline-head { max-width: 760px; margin: 0 auto; text-align: center; }
.timeline-head .lede { margin-top: 14px; }

.timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.timeline-head + .timeline { margin-top: clamp(36px, 5vw, 56px); }
.timeline-line {
  position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(#5DC4EA, var(--primary));
}
.timeline-item { position: relative; margin-bottom: 14px; }
.timeline-dot {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--primary);
  border: 3px solid var(--bg); box-shadow: 0 0 0 2px #5DC4EA; z-index: 2;
}
.timeline-conn { position: absolute; top: 30px; height: 2px; background: #cfe0f2; }

.timeline-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(21, 87, 176, 0.05);
}
.timeline-card-head { background: #12233a; padding: 14px 22px; }
.timeline-card-head h3 { margin: 0; color: #fff; font-size: 15px; font-weight: 700; }
.timeline-card-body { padding: 20px 22px; }
.timeline-card-text p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: #3a4855; }
.timeline-card-text p:last-child { margin-bottom: 0; }
.timeline-card-text h4 { margin: 15px 0 4px; font-size: 13.5px; font-weight: 800; color: var(--primary-dark); }
.timeline-card-text a { font-weight: 600; }

.timeline-media { display: block; margin-top: 16px; cursor: zoom-in; }
.timeline-media img { width: 100%; border-radius: 10px; display: block; }

/* El solape alternado al 45% lo aplica js/script.js (§7) en pantallas >760px.
   En móvil (o sin JS) las tarjetas quedan apiladas a ancho completo. */
@media (max-width: 760px) {
  .timeline-line, .timeline-dot, .timeline-conn { display: none; }
  .timeline-item { margin-bottom: 18px; }
}

/* Lightbox de imágenes ([data-lightbox]) */
/* Galería de fotos dentro de un post (3 columnas + lightbox) */
.post-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 1.6em 0; }
.post-gallery-item { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); cursor: zoom-in; position: relative; }
.post-gallery-item img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; margin: 0; border-radius: 0; box-shadow: none; transition: transform .35s ease; }
.post-gallery-item::after { content: ""; position: absolute; inset: 0; background: rgba(26,115,232,0); transition: background .25s; }
.post-gallery-item:hover img { transform: scale(1.06); }
.post-gallery-item:hover::after { background: rgba(26,115,232,0.12); }
@media (max-width: 640px) { .post-gallery { grid-template-columns: 1fr 1fr; gap: 10px; } }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1000; cursor: zoom-out;
  background: rgba(15, 23, 42, 0.86);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox-overlay img { max-width: min(1100px, 100%); max-height: 92vh; border-radius: var(--radius); box-shadow: var(--shadow-md); cursor: default; }
.lightbox-close { position: absolute; top: 14px; right: 20px; background: none; border: 0; color: #fff; font-size: 36px; line-height: 1; cursor: pointer; }

/* ==========================================================================
   VARIANTE: .mp4-hero — vídeo de fondo en cualquier cabecera (p.ej. .blog-hero)
   El vídeo va detrás (object-fit cover) con overlay claro degradado encima
   para mantener la legibilidad del texto oscuro, como en .hero--bg.
   ========================================================================== */
.mp4-hero { position: relative; overflow: hidden; }
.mp4-hero .mp4-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.mp4-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(249, 250, 251, 0.95) 0%, rgba(249, 250, 251, 0.85) 48%, rgba(249, 250, 251, 0.6) 100%);
}
.mp4-hero .shell { position: relative; z-index: 2; }
@media (max-width: 880px) {
  .mp4-hero::after { background: linear-gradient(rgba(249, 250, 251, 0.94), rgba(249, 250, 251, 0.9)); }
}

/* Logo gráfico junto al nombre (cabecera y pie) */
.footer-brand-name { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.footer-brand-name .brand-logo { width: 34px; height: 34px; }

/* ==========================================================================
   VARIANTE: .hero--page — cabecera de página interior, calcada de .blog-hero
   (se activa sola cuando el hero lleva breadcrumb; la home queda intacta).
   Lleva vídeo de fondo vía .mp4-hero y el contenido posterior pasa a
   blanco roto (--bg #F9FAFB), como en el listado del blog.
   ========================================================================== */
.hero--page {
  padding-top: clamp(44px, 6vw, 72px);
  padding-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
}
.hero--page .hero-copy .eyebrow { margin-bottom: 0; }
.hero--page .hero-title { margin-top: 14px; font-size: clamp(34px, 4vw, 52px); }
.hero--page .hero-lede { margin-top: 14px; }

/* Contenido de páginas interiores sobre blanco roto, como el blog */
.hero--page ~ .section--white { background: var(--bg); }

/* Imagen de cabecera en tarjetas de relatos (stories-list) */
.story-card-img {
  display: block; margin: -30px -28px 18px; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
}
.story-card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.3s ease; }
.story-card:hover .story-card-img img { transform: scale(1.03); }

/* ==========================================================================
   BLOQUE: sidebar — columna lateral en páginas (reutiliza el sidebar del blog)
   El bloque va como última sección; main:has() activa el layout 2 columnas
   en escritorio con la cabecera a todo el ancho (truco 100vw).
   ========================================================================== */
@media (min-width: 981px) {
  main:has(> .page-sidebar) {
    display: grid;
    /* Mismas medidas que .blog-layout para que las páginas con sidebar
       tengan márgenes idénticos al blog */
    grid-template-columns: minmax(0, 1fr) 320px;
    column-gap: clamp(32px, 4vw, 56px);
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
    align-items: start;
  }
  main:has(> .page-sidebar) > * { grid-column: 1; min-width: 0; }
  main:has(> .page-sidebar) > .hero {
    grid-column: 1 / -1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  /* Dentro del layout las secciones pierden banda de fondo y gutter propio */
  main:has(> .page-sidebar) > section:not(.hero) { background: transparent; }
  main:has(> .page-sidebar) > section:not(.hero) > .shell { padding-left: 0; padding-right: 0; }
  main:has(> .page-sidebar) > .page-sidebar {
    grid-column: 2;
    grid-row: 2 / span 80;
    /* Mismo arranque exacto que el contenido (regla uniforme de 64px
       tras la cabecera): sidebar y primera tarjeta en la misma línea. */
    padding-top: 64px;
  }
}
@media (max-width: 980px) {
  main > .page-sidebar { padding: 0 var(--gutter) clamp(40px, 6vw, 72px); }
}

/* ── Páginas CON sidebar: cabeceras de sección justificadas a la izquierda.
     Solo las páginas sin sidebar mantienen el texto centrado. ───────────── */
main:has(> .page-sidebar) .section-head { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
main:has(> .page-sidebar) .section-head .lede { margin-left: 0; margin-right: 0; }
main:has(> .page-sidebar) .editorial-prose { margin-left: 0; }

/* ==========================================================================
   BLOQUE: pricing (planes + cómo reservar + notas) — diseño "Precios"
   Paleta: brand + cian del logo #5DC4EA. Radius 18 en tarjetas de plan.
   ========================================================================== */
.pricing-section .shell { max-width: 1120px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; margin-bottom: clamp(48px, 6vw, 72px); }
.plan { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 34px 28px; box-shadow: var(--shadow-sm); position: relative; }
.plan--featured { border: 2px solid var(--primary); box-shadow: 0 14px 34px rgba(26, 115, 232, 0.16); }
.plan--dark { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 14px 34px rgba(21, 87, 176, 0.22); }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 15px; border-radius: 999px; }
.plan-name { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5DC4EA; margin-bottom: 14px; }
.plan--featured .plan-name { color: var(--primary); }
.plan-price { font-size: 44px; font-weight: 800; color: var(--primary-dark); letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1; }
.plan--dark .plan-price { color: #fff; }
.plan-tagline { font-size: 14px; color: var(--text-2); margin: 0 0 26px; line-height: 1.5; }
.plan--dark .plan-tagline { color: #bcd6f5; }
.plan-features { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.plan-features li { display: flex; align-items: center; gap: 11px; font-size: 15px; }
.plan-features li.no { color: #b2bcc6; }
.plan--dark .plan-features li { color: #fff; }
.plan-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.plan-features li.ok .plan-mark { background: rgba(52, 168, 83, 0.14); color: var(--secondary); }
.plan-features li.no .plan-mark { background: rgba(234, 67, 53, 0.09); color: var(--accent); font-size: 12px; }
.plan--dark .plan-features li.ok .plan-mark { background: rgba(93, 196, 234, 0.28); color: #fff; }
.plan-cta { display: block; text-align: center; padding: 14px; border-radius: 11px; font-weight: 700; font-size: 15px; background: var(--primary); color: #fff; transition: filter 0.2s; }
.plan-cta:hover { filter: brightness(1.08); color: #fff; }
.plan-cta--outline { background: #fff; border: 1.5px solid #5DC4EA; color: var(--primary); }
.plan-cta--outline:hover { color: var(--primary-dark); }
.plan--dark .plan-cta { background: #5DC4EA; color: #0f3a6b; }

.booking-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; margin-bottom: 24px; scroll-margin-top: 92px; }
.booking-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 38px 36px; box-shadow: var(--shadow-sm); }
.booking-title { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin: 0 0 8px; letter-spacing: -0.01em; }
.booking-location { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--primary); font-weight: 600; margin-bottom: 26px; }
.dot-green { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); display: inline-block; }
.booking-steps { display: flex; flex-direction: column; gap: 20px; }
.booking-step { display: flex; gap: 16px; align-items: flex-start; }
.booking-step p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #3a4855; }
.booking-step p strong { color: var(--primary-dark); }
.booking-step-n { flex: none; width: 34px; height: 34px; border-radius: 9px; background: rgba(93, 196, 234, 0.16); color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.booking-step-n.is-alert { background: rgba(234, 67, 53, 0.11); color: var(--accent); }
.booking-panel { background: linear-gradient(160deg, var(--primary), var(--primary-dark)); border-radius: 18px; padding: 38px 34px; color: #fff; display: flex; flex-direction: column; box-shadow: 0 14px 34px rgba(21, 87, 176, 0.22); }
.booking-panel h2 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.booking-panel-lede { font-size: 15px; line-height: 1.6; color: #cfe0f8; margin: 0 0 28px; }
.b-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 15px; border-radius: 12px; font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.b-btn--wa { background: var(--secondary); color: #fff; }
.b-btn--wa:hover { filter: brightness(1.06); color: #fff; }
.b-btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); }
.b-btn--ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.booking-panel-note { margin-top: auto; padding-top: 26px; font-size: 13.5px; line-height: 1.6; color: #bcd6f5; }

.pricing-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.note-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px 30px; }
.note-card--cyan { border-left: 4px solid #5DC4EA; }
.note-card--blue { border-left: 4px solid var(--primary); }
.note-card h3 { font-size: 17px; font-weight: 800; color: var(--primary-dark); margin: 0 0 10px; }
.note-card p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.note-card p strong { color: var(--primary); }

@media (max-width: 980px) {
  .pricing-grid, .booking-grid, .pricing-notes { grid-template-columns: 1fr; }
  .plan--featured { order: -1; }
}

/* Lede dentro de la tarjeta del formulario de contacto */
.contact-card-lede { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: -12px 0 22px; }

/* Editorial con columna lateral de precios compactos (data.prices) */
.editorial-aside-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: start; }
.price-mini-stack { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.price-mini { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(21, 87, 176, 0.07); }
.price-mini-head { background: #12233a; padding: 16px 22px; display: flex; align-items: baseline; justify-content: space-between; }
.price-mini-head .name { color: #fff; font-size: 16px; font-weight: 700; }
.price-mini-head .price { color: #5DC4EA; font-size: 22px; font-weight: 800; }
.price-mini-body { padding: 18px 22px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.price-mini-cta { display: block; text-align: center; padding: 15px; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; }
.price-mini-cta:hover { background: var(--primary-dark); color: #fff; }
@media (max-width: 880px) {
  .editorial-aside-grid { grid-template-columns: 1fr; }
  .price-mini-stack { position: static; }
}

/* stories-list con 4 tarjetas: una única fila de 4 columnas */
.stories-grid--4 { grid-template-columns: repeat(4, 1fr); }
.stories-grid--4 .story-card { padding: 24px 22px; }
.stories-grid--4 .story-card-img { margin: -24px -22px 16px; }
@media (max-width: 1100px) { .stories-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) { .stories-grid--4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   EFECTOS DE SCROLL (js §8): aparición por capas, sutil y lenta + parallax
   Se apoyan en el sistema .reveal existente; JS añade las clases a los
   elementos que no las traen y escalona los retardos por grupo.
   ========================================================================== */
.reveal { transition-duration: 1.25s; transform: translateY(36px); }
.reveal--left  { transform: translateX(-46px); }
.reveal--right { transform: translateX(46px); }
.reveal--zoom  { transform: translateY(26px) scale(0.94); }
.reveal--left.in, .reveal--right.in, .reveal--zoom.in { transform: none; }

/* Parallax suave en imágenes grandes (JS actualiza --py al hacer scroll) */
.parallax-img { transform: translateY(var(--py, 0)) scale(1.05); will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .parallax-img { transform: none; }
}

/* Páginas con sidebar: menos aire vertical entre secciones de contenido */
main:has(> .page-sidebar) > section:not(.hero) {
  padding-top: clamp(24px, 3.5vw, 44px);
  padding-bottom: clamp(24px, 3.5vw, 44px);
}
/* Reseñas a todo el ancho de la caja, debajo del contenido y del sidebar */
@media (min-width: 981px) {
  main:has(> .page-sidebar) > .testimonials-section { grid-column: 1 / -1; }
}

/* La primera sección tras la cabecera recupera el aire del blog (--section-pad),
   alineando el arranque del contenido con el del sidebar; las siguientes
   mantienen el espaciado compacto. */
main:has(> .page-sidebar) > .hero + section { padding-top: var(--section-pad); }

/* ==========================================================================
   ESPACIADO UNIFORME cabecera → primer bloque, idéntico en TODAS las páginas
   (valor fijo, no dependiente del ancho de pantalla). Cubre: páginas con y
   sin sidebar, home (con hairline entre medias), listado del blog y posts.
   ========================================================================== */
.hero + .section,
.hero + .shell + .section,
.blog-hero + .section,
.post-hero + .section,
main:has(> .page-sidebar) > .hero + section {
  padding-top: 64px;
}

/* Bloques editoriales consecutivos (sin hairline entre medias): un solo aire
   entre ellos, no el doble padding de sección (quedaban ~200px de hueco) */
.section--white + .section--white { padding-top: 0; }

/* ==========================================================================
   Titulación y acreditaciones (EEAT): miniaturas de certificados con lightbox
   (usa el sistema [data-lightbox] del theme, js/script.js §5)
   ========================================================================== */
.credentials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.credential {
  display: block; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
  transition: box-shadow .25s, transform .25s;
}
.credential:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.credential img { width: 100%; height: 220px; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: none; margin: 0; }
.credential span { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
/* La sección de titulación ocupa todo el ancho de contenido (no el max-width
   estrecho de .editorial-prose) para que los logos y el carrusel respiren */
.editorial-prose:has(.credentials-grid) { max-width: 1080px; }
/* Subtítulo de la titulación */
.credentials-subhead { font-size: 16px; font-weight: 700; margin: 28px 0 14px; }
.credential--titulo span { display: flex; flex-direction: column; line-height: 1.3; }
.credential--titulo span em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--primary-dark); margin-top: 3px; }

/* Carrusel de títulos académicos */
.titulos-carousel { position: relative; display: flex; align-items: center; gap: 8px; }
.titulos-carousel .tc-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; padding: 4px; flex: 1;
}
.titulos-carousel .tc-track::-webkit-scrollbar { display: none; }
.titulos-carousel .credential { scroll-snap-align: start; margin: 0; padding: 12px; }
.titulos-carousel .credential--titulo img { width: 100%; height: auto; aspect-ratio: 400 / 282; object-fit: cover; }
.tc-nav {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  font-size: 22px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: background .2s, color .2s, transform .15s;
}
.tc-nav:hover { background: var(--primary); color: #fff; transform: scale(1.05); }
.tc-nav:disabled { opacity: .35; cursor: default; transform: none; background: #fff; color: var(--primary); }
@media (max-width: 980px) { .titulos-carousel .tc-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); } }
@media (max-width: 760px) { .titulos-carousel .tc-track { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 520px) { .titulos-carousel .tc-track { grid-auto-columns: 82%; } .tc-nav { display: none; } }
/* Currículum del examinador bajo los certificados */
.credentials-bio {
  margin-top: 22px; padding: 16px 20px;
  background: rgba(26, 115, 232, 0.05); border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px !important; line-height: 1.7; color: var(--text-2) !important;
}
@media (max-width: 780px) { .credentials-grid { grid-template-columns: 1fr; } .credential img { height: auto; max-height: 320px; } }

/* Tablas dentro de contenido editorial (p. ej. Cookies usadas) */
.table-scroll { overflow-x: auto; margin: 1.2em 0; }
.editorial-body table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.editorial-body th {
  background: var(--band); text-align: left; font-weight: 600;
  padding: 10px 12px; border: 1px solid var(--border); white-space: nowrap;
}
.editorial-body td { padding: 9px 12px; border: 1px solid var(--border); vertical-align: top; }
.editorial-body td a { font-weight: 600; }

/* ==========================================================================
   BOTONES FLOTANTES (webchat + WhatsApp): aparición escalonada con el scroll
   (js §10). El estado oculto solo se aplica con JS activo (.fabs-managed).
   ========================================================================== */
.fabs-managed .wcx-chat,
.fabs-managed .wa-fab {
  opacity: 0;
  transform: translateY(26px) scale(0.7);
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.fabs-managed .wcx-chat.fab-visible,
.fabs-managed .wa-fab.fab-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* WhatsApp entra (y sale) un poco después que el chat */
.fabs-managed .wa-fab { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  .fabs-managed .wcx-chat, .fabs-managed .wa-fab { transition: none; }
}

/* ==========================================================================
   CTAs dinámicos (lib/ctas.php · Panel → CTAs): colores llamativos + animación
   ========================================================================== */
.rxm-cta {
  margin: 2em 0; padding: 26px 28px; border-radius: 14px; text-align: center;
  color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.rxm-cta--naranja { background: linear-gradient(135deg, #F57C00, #E65100); }
.rxm-cta--rojo    { background: linear-gradient(135deg, #EA4335, #C62828); }
.rxm-cta--azul    { background: linear-gradient(135deg, #1A73E8, #1557B0); }
.rxm-cta--verde   { background: linear-gradient(135deg, #34A853, #1E7E34); }
.rxm-cta-title { font-size: 21px; font-weight: 700; margin-bottom: 6px; color: #fff; }
.rxm-cta-text  { font-size: 15px; line-height: 1.55; margin: 0 0 16px; color: rgba(255,255,255,0.92); }
.rxm-cta-btn {
  display: inline-block; background: #fff; color: #1a2530; font-weight: 700;
  font-size: 15px; padding: 13px 28px; border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rxm-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); color: #1a2530; }
.rxm-cta--naranja .rxm-cta-btn { color: #E65100; }
.rxm-cta--rojo    .rxm-cta-btn { color: #C62828; }
.rxm-cta--azul    .rxm-cta-btn { color: #1557B0; }
.rxm-cta--verde   .rxm-cta-btn { color: #1E7E34; }

@keyframes rxmCtaPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
/* Glow compuesto en GPU: la sombra intensa vive en un pseudo-elemento fijo
   y solo se anima su opacidad (no box-shadow, que fuerza repintados). */
@keyframes rxmCtaGlow  { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes rxmCtaShake { 0%, 88%, 100% { transform: rotate(0); } 90% { transform: rotate(-1.2deg); } 94% { transform: rotate(1.2deg); } 98% { transform: rotate(-0.6deg); } }
.rxm-cta--anim-pulse .rxm-cta-btn { animation: rxmCtaPulse 2.2s ease-in-out infinite; }
.rxm-cta--anim-glow { position: relative; }
.rxm-cta--anim-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 10px 44px rgba(255, 255, 255, 0.35);
  opacity: 0; animation: rxmCtaGlow 2.8s ease-in-out infinite;
  pointer-events: none;
}
.rxm-cta--anim-shake { animation: rxmCtaShake 5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .rxm-cta, .rxm-cta-btn, .rxm-cta--anim-glow::after { animation: none !important; }
}

/* ============================================================
   Ajustes página /poligrafo-infidelidad-malaga/ (variante reorg)
   ============================================================ */

/* Planes: solo 2 (sin "Avanzado") -> centrar en vez de dejar hueco */
.pricing-grid:has(> .plan:nth-child(2):last-child){
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
}
@media (max-width: 700px){
  .pricing-grid:has(> .plan:nth-child(2):last-child){ grid-template-columns: minmax(0, 380px); }
}

/* NOTA a 100% de ancho, justo debajo de los precios */
.pricing-alert{
  display:flex; gap:14px; align-items:flex-start;
  background:#eef4fe; border:1px solid #cfe0f8; border-left:4px solid var(--primary);
  border-radius:14px; padding:18px 22px; margin-bottom:24px;
  color:#33425a; font-size:15px; line-height:1.6;
}
.pricing-alert-ico{
  flex:none; width:26px; height:26px; border-radius:50%;
  background:var(--primary); color:#fff; display:grid; place-items:center;
  font-weight:800; font-size:15px; margin-top:1px;
}
.pricing-alert strong, .pricing-alert-title{ color:var(--primary-dark); }

/* Bloque reservar (variante): "Pedir cita" arriba y "Cómo reservar" debajo */
.pricing-section--reorg .booking-grid{ display:flex; flex-direction:column; gap:24px; }
.pricing-section--reorg .booking-panel{ order:0; }
.pricing-section--reorg .booking-card{ order:1; }

/* Botones de telefono uno al lado del otro */
.pricing-section--reorg .booking-panel-actions{ flex-direction:row; flex-wrap:wrap; }
.pricing-section--reorg .booking-panel-actions .b-btn{ flex:1 1 200px; }
@media (max-width:600px){ .pricing-section--reorg .booking-panel-actions{ flex-direction:column; } }

/* Fila de botones: base apilada (no cambia la pagina general) */
.booking-panel-actions{ display:flex; flex-direction:column; gap:12px; }
.booking-panel-actions .b-btn{ margin-bottom:0; }

/* Bloque 'La fiabilidad del polígrafo': párrafo + tabla en 2 columnas */
.editorial-prose:has(.reli-grid){max-width:1080px}
.reli-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:clamp(28px,3vw,48px);align-items:start;margin:.4em 0 0}
.reli-grid .table-scroll{margin:0}
@media(max-width:760px){.reli-grid{grid-template-columns:1fr;gap:20px}}

/* Bloque table: tabla de datos citable (mismo lenguaje visual del theme) */
.data-table-scroll{border-radius:16px;box-shadow:0 1px 3px rgba(18,35,58,.05),0 12px 34px rgba(18,35,58,.07)}
.data-table{width:100%;border-collapse:separate;border-spacing:0;font-size:15px;background:#fff}
.data-table thead th{background:#12233a;color:#fff;text-align:left;font-weight:600;padding:18px 22px;vertical-align:top;border:none}
.data-table thead th:last-child{color:#5dc4ea}
.data-table tbody td{padding:18px 22px;border:none;border-top:1px solid var(--border);vertical-align:top;color:#3a4655;line-height:1.5}
.data-table tbody tr:nth-child(even) td{background:#f6f8fb}
.data-table td:first-child{color:#1a73e8;font-weight:700}
.data-table-note{margin-top:14px;font-size:13.5px;color:var(--muted)}
@media(max-width:760px){.data-table thead th,.data-table tbody td{padding:12px 14px}.data-table{font-size:14px}}

/* Tabla 'La fiabilidad del polígrafo': mismo look navy que el bloque table */
.reli-tbl .table-scroll{border-radius:14px;box-shadow:0 1px 3px rgba(18,35,58,.05),0 12px 34px rgba(18,35,58,.07)}
.editorial-body .reli-tbl table{border-collapse:separate;border-spacing:0;font-size:14.5px}
.editorial-body .reli-tbl thead th{background:#12233a;color:#fff;border:none;padding:15px 20px;font-weight:600;vertical-align:top}
.editorial-body .reli-tbl thead th:nth-child(2){color:#5dc4ea}
.editorial-body .reli-tbl tbody td{border:none;border-top:1px solid var(--border);padding:14px 20px;color:#3a4655;vertical-align:top}
.editorial-body .reli-tbl tbody tr:nth-child(even) td{background:#f6f8fb}
.editorial-body .reli-tbl tbody td:nth-child(2){font-weight:700;color:#12233a}
.editorial-body .reli-text strong{color:#1a73e8}

.post-author-role{margin:8px 0 0;font-size:13.5px;color:var(--muted);line-height:1.4}
.post-updated{opacity:.75}
