/* ==========================================================================
   TIPOGRAFÍA CORPORATIVA Y LECTURA EDITORIAL
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--c-text-main);
  background-color: var(--c-bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.24;
  color: var(--c-petroleum-900);
  letter-spacing: -0.015em;
  text-transform: none;
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 700;
}

p {
  margin-bottom: var(--space-4);
  color: var(--c-text-body);
}

a {
  color: var(--c-turquoise-700);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--c-red-600);
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
}

strong, b {
  font-weight: 700;
  color: var(--c-text-main);
}

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  background-color: var(--c-bg-alt);
  border-left: 4px solid var(--c-turquoise-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--c-petroleum-900);
}

/* ==========================================================================
   PROSA DE ARTÍCULO (.article-body / .prose) - LECTURA CÓMODA MÓVIL Y PC
   ========================================================================== */
.article-body {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.82;
  color: var(--c-text-body);
  overflow-wrap: break-word;
}

.article-body p {
  margin-bottom: 1.45rem;
  color: var(--c-text-body);
}

.article-body > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--c-text-main);
  font-weight: 450;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  color: var(--c-petroleum-900);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--c-bg-alt);
  line-height: 1.28;
}

.article-body h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--c-petroleum-800);
  margin-top: 1.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-body a {
  color: var(--c-turquoise-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(23, 96, 79, 0.35);
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--c-red-600);
  text-decoration-color: var(--c-red-600);
}

.article-body ul,
.article-body ol {
  margin: 1.25rem 0 1.6rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.65rem;
  line-height: 1.75;
}

.article-body li::marker {
  color: var(--c-turquoise-600);
  font-weight: 700;
}

.article-body hr {
  border: 0;
  height: 1px;
  background: var(--c-border);
  margin: 2.5rem 0;
}

.article-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.75rem 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
}

.article-figure {
  margin: 2rem 0;
  background: var(--c-bg-main);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-figure img {
  margin: 0;
  border: none;
  border-radius: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 0.85rem 1.15rem;
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  background: var(--c-bg-surface);
  border-top: 1px solid var(--c-border);
  line-height: 1.5;
}

.article-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin: 2rem 0;
}

.article-gallery-grid .article-figure {
  margin: 0;
}

/* Tablas Responsivas dentro de artículos */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  background: var(--c-bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--c-border);
  display: block;
  overflow-x: auto;
}

.article-body th {
  background-color: var(--c-petroleum-900);
  color: var(--c-text-light);
  font-weight: 700;
  text-align: left;
  padding: 0.9rem 1rem;
}

.article-body td {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-body);
  vertical-align: top;
}

.article-body tr:nth-child(even) td {
  background-color: var(--c-bg-main);
}

@media (max-width: 768px) {
  .article-body {
    font-size: 1.05rem;
    line-height: 1.76;
  }

  .article-body > p:first-of-type {
    font-size: 1.1rem;
  }

  .article-gallery-grid {
    grid-template-columns: 1fr;
  }
}
