/* ============================================================
   blog.css — Estilos para artículos del blog de Sergio Tavares
   Fuentes: Cormorant Garamond (titulares) + DM Sans (cuerpo)
   Paleta: arena #F5F0E8 · blanco #FFFFFF · caribe #1B5E7B · tinta #1A1A2E
   ============================================================ */

/* ---- Variables (hereda del sistema, pero se declaran aquí por si blog.css
        se carga solo o en un contexto diferente) ---- */
:root {
  --arena: #F5F0E8;
  --caribe: #1B5E7B;
  --tinta: #1A1A2E;
  --blanco: #FFFFFF;
  --gris-medio: #6B7280;
  --borde: rgba(27, 94, 123, 0.15);
}

/* ============================================================
   PÁGINA DE ARTÍCULO — layout de lectura
   ============================================================ */

.article-page {
  background: var(--blanco);
  color: var(--tinta);
  min-height: 100vh;
}

/* ---- Header del artículo (subhero corto reutilizado) ---- */
.article-hero {
  background: var(--tinta);
  padding: 140px 24px 64px;
  text-align: center;
  position: relative;
}

.article-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
}

.article-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,26,46,0.72) 0%, rgba(26,26,46,0.88) 100%);
}

.article-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.article-hero__cat {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.75);
  margin-bottom: 20px;
}

.article-hero__title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.18;
  color: var(--blanco);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.article-hero__meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.65);
  margin: 0;
}

.article-hero__meta span + span::before {
  content: ' · ';
}

/* ---- Cuerpo del artículo ---- */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* Lead / entradilla */
.article-lead {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  color: var(--tinta);
  border-left: 3px solid var(--caribe);
  padding-left: 20px;
  margin: 0 0 40px;
}

/* Headings */
.article-body h2 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.22;
  color: var(--tinta);
  margin: 56px 0 20px;
  padding-top: 8px;
  border-top: 1px solid var(--borde);
}

.article-body h3 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.28;
  color: var(--tinta);
  margin: 36px 0 12px;
}

/* Párrafos */
.article-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: #2D2D3E;
  margin: 0 0 20px;
}

/* Listas */
.article-body ul,
.article-body ol {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #2D2D3E;
  padding-left: 24px;
  margin: 0 0 24px;
}

.article-body li {
  margin-bottom: 8px;
}

/* Blockquote / dato verificado */
.article-body blockquote {
  background: var(--arena);
  border-left: 4px solid var(--caribe);
  border-radius: 0 8px 8px 0;
  margin: 32px 0;
  padding: 20px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.975rem;
  color: var(--tinta);
  line-height: 1.65;
}

.article-body blockquote p {
  font-size: 0.975rem;
  margin: 0;
}

/* Tablas */
.article-body .table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(26,26,46,0.08);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
}

.article-body thead {
  background: var(--caribe);
  color: var(--blanco);
}

.article-body thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.82rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.article-body tbody tr:nth-child(even) {
  background: var(--arena);
}

.article-body tbody tr:hover {
  background: rgba(27, 94, 123, 0.06);
}

.article-body td {
  padding: 11px 16px;
  color: var(--tinta);
  border-bottom: 1px solid rgba(26,26,46,0.06);
}

/* Paso numerado destacado */
.article-body .paso {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.article-body .paso__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--caribe);
  color: var(--blanco);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.article-body .paso__text {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #2D2D3E;
}

.article-body .paso__text strong {
  color: var(--tinta);
  font-weight: 600;
}

/* Notas al pie / fuentes */
.article-body .article-sources {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--borde);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--gris-medio);
  line-height: 1.6;
  font-style: italic;
}

/* ---- CTA inline ---- */
.article-cta {
  background: linear-gradient(135deg, var(--caribe) 0%, #0F3D54 100%);
  border-radius: 16px;
  padding: 40px 36px;
  margin: 48px 0;
  text-align: center;
}

.article-cta__text {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 500;
  color: var(--blanco);
  line-height: 1.35;
  margin: 0 0 24px;
}

.article-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--blanco);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.article-cta__btn:hover {
  background: #1DA851;
  transform: translateY(-1px);
}

.article-cta__btn svg {
  flex-shrink: 0;
}

/* ---- Bloque de autor ---- */
.article-author {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 56px 0 16px;
  padding: 28px;
  background: var(--arena);
  border-radius: 14px;
}

.article-author__img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--caribe);
}

.article-author__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-author__name {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--tinta);
  margin: 0;
}

.article-author__bio {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--gris-medio);
  margin: 0 0 10px;
  line-height: 1.5;
}

.article-author__wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: var(--blanco);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s;
  width: fit-content;
}

.article-author__wa:hover {
  background: #1DA851;
}

/* ---- Breadcrumb ---- */
.article-breadcrumb {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--gris-medio);
}

.article-breadcrumb a {
  color: var(--caribe);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-breadcrumb span + span::before {
  content: ' / ';
  color: var(--gris-medio);
  margin: 0 4px;
}

/* ---- FAQ section (para artículos con JSON-LD FAQPage) ---- */
.article-faq {
  margin: 40px 0;
}

.article-faq__item {
  border-bottom: 1px solid var(--borde);
  padding: 20px 0;
}

.article-faq__item:first-child {
  border-top: 1px solid var(--borde);
}

.article-faq__q {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--tinta);
  margin: 0 0 10px;
}

.article-faq__a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.975rem;
  line-height: 1.68;
  color: #2D2D3E;
  margin: 0;
}

/* ---- Navegación entre artículos ---- */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--borde);
  flex-wrap: wrap;
}

.article-nav__link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--caribe);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-nav__link:hover {
  text-decoration: underline;
}

.article-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--caribe);
  text-decoration: none;
  margin-bottom: 32px;
}

.article-nav__back:hover {
  text-decoration: underline;
}

/* ---- Strong y em en el cuerpo ---- */
.article-body strong {
  font-weight: 700;
  color: var(--tinta);
}

.article-body em {
  font-style: italic;
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 600px) {
  .article-hero {
    padding: 120px 20px 48px;
  }

  .article-body {
    padding: 40px 20px 64px;
  }

  .article-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
  }

  .article-cta {
    padding: 28px 20px;
  }

  .article-body thead th,
  .article-body td {
    padding: 10px 10px;
    font-size: 0.82rem;
  }
}
