/* ══════════════════════════════════════════════════
   MTP — Academy article detail page
   Estilo editorial tipo Medium sobre la base oscura.
   ══════════════════════════════════════════════════ */


/* ── Wrapper ─────────────────────────────────────── */

.article-page {
  padding-bottom: var(--section-gap);
}

.article-page__inner {
  width: min(960px, 100% - var(--space-64));
  margin-inline: auto;
  padding-top: var(--space-48);
}



/* ── Article header ──────────────────────────────── */

.article-header {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-40);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
}

.article-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-32);
  background: var(--color-primary);
  color: var(--color-accent);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.article-header__title {
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: clamp(-1px, -0.12vw, -2px);
  color: var(--color-white);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.article-meta__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.article-meta__author {
  font-size: var(--text-ui);
  font-weight: 600;
  color: var(--color-white);
}

.article-meta__sep {
  color: var(--color-accent);
  opacity: 0.35;
}

.article-meta__date,
.article-meta__read {
  font-size: var(--text-ui);
  color: var(--color-accent);
  opacity: 0.6;
}


/* ── Hero image ──────────────────────────────────── */

.article-hero-figure {
  margin-bottom: var(--space-48);
}

.article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-16);
  display: block;
}

.article-hero-figure--logo {
  background: #fff;
  border-radius: var(--radius-16);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-48) var(--space-64);
  min-height: 240px;
}

.article-hero-img--logo {
  aspect-ratio: unset;
  width: auto;
  max-width: 320px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}

.article-hero-figure figcaption {
  text-align: center;
  font-size: var(--text-caption);
  color: var(--color-accent);
  opacity: 0.5;
  margin-top: var(--space-12);
}


/* ── Article body ────────────────────────────────── */

.article-body {
  max-width: 680px;
  margin-inline: auto;
  font-size: var(--text-body-lg);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.85);
}

.article-body h2 {
  font-size: clamp(22px, 2.2vw, var(--text-h2));
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--color-white);
  margin-top: var(--space-64);
  margin-bottom: var(--space-20);
}

.article-body h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--lh-h3);
  color: var(--color-white);
  margin-top: var(--space-40);
  margin-bottom: var(--space-12);
}

.article-body p {
  margin-bottom: var(--space-24);
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--space-24);
  padding-left: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

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

/* Pull quote */
.article-pullquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-16) var(--space-24);
  margin: var(--space-40) 0;
  font-size: clamp(18px, 2vw, 22px);
  font-style: italic;
  color: var(--color-accent);
  line-height: 1.5;
}

/* Inline image — puede sobresalir del body */
.article-figure {
  margin: var(--space-40) clamp(-20px, -4vw, -60px);
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-16);
  display: block;
}

.article-figure figcaption {
  text-align: center;
  font-size: var(--text-caption);
  color: var(--color-accent);
  opacity: 0.5;
  margin-top: var(--space-12);
}


/* ── Author bio ──────────────────────────────────── */

.article-author {
  max-width: 680px;
  margin: var(--space-64) auto;
  background: var(--color-bg-mid);
  border-radius: var(--radius-24);
  padding: var(--space-32);
  display: flex;
  align-items: flex-start;
  gap: var(--space-24);
}

.article-author__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.article-author__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.article-author__name {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--color-white);
}

.article-author__role {
  font-size: var(--text-ui);
  color: var(--color-accent);
  opacity: 0.6;
}

.article-author__bio {
  font-size: var(--text-body);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--lh-body);
}

.article-author__social {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-top: var(--space-8);
}

.article-author__social a {
  opacity: 0.6;
  transition: opacity 0.15s ease;
  display: flex;
}

.article-author__social a:hover { opacity: 1; }


/* ── Related articles ────────────────────────────── */

.article-related {
  padding-top: var(--space-64);
  padding-bottom: var(--section-gap);
  border-top: 1px solid rgba(214, 241, 245, 0.1);
}

.article-related__inner {
  width: min(1200px, 100% - var(--space-64));
  margin-inline: auto;
}

.article-related__title {
  font-size: clamp(20px, 2.2vw, var(--text-h2));
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: var(--space-32);
}


/* ── Two-column layout (sidebar) ─────────────────── */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-48);
  align-items: start;
  width: min(1100px, 100% - var(--space-64));
  margin-inline: auto;
  padding-top: var(--space-48);
}

.article-sidebar {
  position: sticky;
  top: calc(73px + var(--space-32));
}

.article-demo-card {
  background: var(--color-bg-mid);
  border-radius: var(--radius-24);
  padding: var(--space-32);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.article-demo-card__eyebrow {
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-accent);
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-demo-card__title {
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--color-white);
  line-height: var(--lh-h3);
}

.article-demo-card__desc {
  font-size: var(--text-body);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--lh-body);
}

/* Mobile bottom bar */
.article-demo-bar { display: none; }


/* ── Responsive ──────────────────────────────────── */

@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; padding-top: var(--space-32); }
  .article-sidebar { display: none; }

  .article-demo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-16);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 80;
    padding: var(--space-16) var(--space-24);
    background: rgb(var(--color-bg-rgb) / 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(214, 241, 245, 0.1);
  }

  .article-demo-bar__text {
    font-size: var(--text-ui);
    font-weight: 500;
    color: var(--color-accent);
    opacity: 0.85;
    min-width: 0;
  }

  .article-demo-bar .btn { flex-shrink: 0; }

  .article-author { flex-direction: column; }
  .article-figure { margin-inline: 0; }

  .article-hero-figure--logo {
    padding: var(--space-24);
    min-height: 160px;
  }

  .article-hero-img--logo { max-width: 100%; }
}

@media (max-width: 600px) {
  .article-page__inner { padding-top: var(--space-32); }
  .article-pullquote { font-size: 17px; }
  .article-body { font-size: var(--text-body); line-height: 1.65; }
}
