/* ══════════════════════════════════════════
   OXALIS Blog — Estilos de artículo individual
   Usa las variables CSS globales de ../styles.css
   ══════════════════════════════════════════ */

/* ── HERO DEL ARTÍCULO ── */
.article-hero {
  padding-top: 120px;
  padding-bottom: 64px;
  text-align: left;
}

.article-hero .container {
  max-width: 820px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  transition: color 0.2s, transform 0.2s;
}

.article-back:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.article-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(125, 216, 125, 0.12);
  padding: 6px 14px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.article-deck {
  font-size: 19px;
  line-height: 1.55;
  color: rgba(240, 247, 240, 0.8);
  margin-bottom: 28px;
  max-width: 680px;
}

.article-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(240, 247, 240, 0.6);
}

.article-meta i {
  margin-right: 6px;
  color: var(--accent);
}

/* ── CUERPO DEL ARTÍCULO ── */
.article-section {
  padding-top: 64px;
  padding-bottom: 96px;
}

.article-section .container {
  max-width: 820px;
}

.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-body);
}

.article-cover {
  margin: 0 -20px 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-light);
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-lede {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--dark-green);
  margin-bottom: 40px;
  padding-left: 20px;
  border-left: 3px solid var(--sage);
  font-weight: 500;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--dark-green);
  margin: 56px 0 20px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-green);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.article-body h4 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 32px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
  color: var(--text-body);
}

.article-body a {
  color: var(--sage);
  border-bottom: 1px solid rgba(74, 158, 74, 0.3);
  transition: border-color 0.2s, color 0.2s;
}

.article-body a:hover {
  color: var(--dark-green);
  border-bottom-color: var(--dark-green);
}

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

.article-body ul,
.article-body ol {
  margin: 0 0 24px 24px;
  padding-left: 4px;
}

.article-body li {
  margin-bottom: 10px;
  padding-left: 4px;
  color: var(--text-body);
}

.article-body ul li::marker {
  color: var(--sage);
  font-size: 1.1em;
}

.article-body ol li::marker {
  color: var(--sage);
  font-weight: 700;
}

.article-body blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--bg-light);
  border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-body table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-body thead {
  background: var(--bg-light);
}

.article-body th,
.article-body td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-body th {
  font-weight: 700;
  color: var(--dark-green);
  font-family: var(--font-body);
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:hover {
  background: rgba(74, 158, 74, 0.03);
}

.article-body code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--dark-green);
}

.article-body hr {
  margin: 56px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.article-figure {
  margin: 40px -20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-light);
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

/* ── CTA DENTRO DEL ARTÍCULO ── */
.article-cta {
  margin: 72px 0 48px;
  padding: 48px 40px;
  background: linear-gradient(135deg, var(--bark) 0%, var(--soil) 100%);
  border-radius: var(--radius-lg);
  color: var(--cream);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(125, 216, 125, 0.18), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(74, 158, 74, 0.14), transparent 60%);
  pointer-events: none;
}

.article-cta > * {
  position: relative;
}

.article-cta-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(125, 216, 125, 0.15);
  border: 1px solid rgba(125, 216, 125, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
}

.article-cta h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--cream);
  line-height: 1.3;
}

.article-cta p {
  font-size: 16px;
  color: rgba(240, 247, 240, 0.75);
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── RELACIONADOS ── */
.article-related {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.article-related-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--dark-green);
  margin-bottom: 28px;
  text-align: center;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.article-related-card {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  color: inherit;
  border-bottom: 1px solid var(--border) !important;
}

.article-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  color: inherit;
}

.article-related-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.article-related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-related-card:hover .article-related-image img {
  transform: scale(1.04);
}

.article-related-body {
  padding: 20px 22px;
}

.article-related-body h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--dark-green);
  line-height: 1.4;
  margin-top: 10px;
}

/* ── MÓVIL ── */
@media (max-width: 768px) {
  .article-hero {
    padding-top: 100px;
    padding-bottom: 48px;
  }
  .article-deck {
    font-size: 17px;
  }
  .article-cover,
  .article-figure {
    margin-left: 0;
    margin-right: 0;
  }
  .article-body {
    font-size: 16px;
  }
  .article-body h2 {
    font-size: 26px;
    margin-top: 40px;
  }
  .article-body h3 {
    font-size: 20px;
  }
  .article-lede {
    font-size: 19px;
  }
  .article-cta {
    padding: 36px 24px;
  }
  .article-cta h3 {
    font-size: 22px;
  }
  .article-related-grid {
    grid-template-columns: 1fr;
  }
}
