/* ==========================================================================
   Clic ID — estilos de páginas de contenido (guías / comparativas)
   Se carga SOLO en las páginas nuevas (no afecta a index.html).
   Usa los tokens ya definidos en styles.css (:root).
   ========================================================================== */

.page-main {
  display: block;
}

/* --- migas de pan --- */
.crumbs {
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.crumbs .container {
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.crumbs a {
  color: var(--primary);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.crumbs span[aria-current] {
  color: var(--text-body);
  font-weight: 600;
}

/* --- hero de página --- */
.page-hero {
  background: linear-gradient(160deg, #fbfaff 0%, #f3ecff 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 44px 0 40px;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  color: var(--text-dark);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.page-hero .eyebrow-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.page-hero .lead {
  margin-top: 14px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 62ch;
}

/* --- caja de respuesta directa (GEO) --- */
.answer-box {
  margin-top: 22px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  max-width: 68ch;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
}

.answer-box strong {
  color: var(--text-dark);
}

.answer-box .answer-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.page-hero .btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* --- secciones de contenido --- */
.page-section {
  padding: 48px 0;
}

.page-section.alt {
  background: var(--bg-subtle, #f8fafc);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-section h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: var(--text-dark);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.page-section h3 {
  font-size: 1.05rem;
  color: var(--text-dark);
  font-weight: 700;
  margin: 22px 0 8px;
}

.page-section h2 + p,
.page-section h3 + p {
  margin-top: 0;
}

.prose {
  max-width: 72ch;
}

.prose p,
.prose li {
  color: var(--text-body);
  font-size: 0.97rem;
  line-height: 1.68;
}

.prose p {
  margin-bottom: 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 7px;
}

.prose strong {
  color: var(--text-dark);
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose .note {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-top: 18px;
}

/* --- tablas comparativas --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 18px 0;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 560px;
}

table.data caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

table.data th,
table.data td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

table.data thead th {
  background: var(--primary-subtle, #f8f5fe);
  color: var(--text-dark);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data td strong {
  color: var(--text-dark);
}

table.data .hl {
  background: #f6f0ff;
}

/* --- tarjetas de ventajas --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.card .card-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft, #ede6fd);
  color: var(--primary-dark, #3b1480);
  font-size: 1rem;
  margin-bottom: 12px;
}

/* --- FAQ (details nativos) --- */
.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-width: 80ch;
}

details.pag-faq {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

details.pag-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
  list-style: none;
}

details.pag-faq summary::-webkit-details-marker {
  display: none;
}

details.pag-faq summary::after {
  content: "+";
  float: right;
  color: var(--primary);
  font-weight: 800;
}

details.pag-faq[open] summary::after {
  content: "−";
}

details.pag-faq p {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-body);
}

/* --- CTA final --- */
.cta-band {
  background: var(--primary-dark, #3b1480);
  color: #fff;
  padding: 40px 0;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.86);
  margin-top: 10px;
  max-width: 60ch;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cta-band .btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.cta-band .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.cta-band .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* --- enlaces a otras guías --- */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.related a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary-dark, #3b1480);
  text-decoration: none;
  transition: var(--transition);
}

.related a:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* --- móvil --- */
@media (max-width: 768px) {
  .page-hero {
    padding: 30px 0 28px;
  }

  .page-section {
    padding: 34px 0;
  }

  .answer-box {
    font-size: 0.92rem;
  }

  .cta-band {
    padding: 32px 0;
  }

  .cta-band .btns .btn {
    width: 100%;
    justify-content: center;
  }
}
