/* ══════════════════════════════════════════════════════════
   MAREA — Single / Article  (v2)
══════════════════════════════════════════════════════════ */

/* ── READING PROGRESS ────────────────────────────────────── */
.reading-progress {
  position: sticky;
  top: calc(var(--header-h) + 3px);
  z-index: var(--z-progress);
  height: 3px;
  background: var(--mist);
}

.reading-bar {
  height: 100%;
  background: var(--wave);
  width: 0;
  transition: width 0.1s linear;
}

/* ── ARTICLE HERO ────────────────────────────────────────── */
.art-hero {
  background: var(--ink);
  border-bottom: 3px solid var(--wave);
}

.art-hero-img {
  height: 460px;
  position: relative;
  overflow: hidden;
  /* Imagen de fondo vía style="background-image:url(...)" desde PHP */
  background-color: #0D1117;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* Overlay gradient — sobre la foto, sin elementos extra en el DOM */
.art-hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(12,12,12,.2) 35%,
    rgba(12,12,12,.88) 72%,
    rgba(12,12,12,.99) 100%
  );
  z-index: 1;
}

/* Contenido sobre el overlay — z-index > 1 es crítico */
.art-hero-cnt {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--site-pad) 48px;
}

/* ── KICKER ──────────────────────────────────────────────── */
.art-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Badge base */
.art-badge {
  font-family: var(--font-condensed);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 3px 11px;
  flex-shrink: 0;
  text-decoration: none;
}
.art-badge.cat  { background: var(--wave); color: var(--ink); }
.art-badge.excl { background: var(--alert); color: #fff; }

.art-section   { font-family: var(--font-condensed); font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--fog); }
.art-sep       { width: 3px; height: 3px; border-radius: 50%; background: var(--fog); flex-shrink: 0; }
.art-timestamp { font-size: 11px; color: var(--fog); }

/* ── ARTICLE TITLE & EXCERPT ─────────────────────────────── */
.art-title {
  font-family: var(--font-display);
  font-size: 58px;
  line-height: 0.93;
  letter-spacing: -2px;
  color: var(--cream);
  max-width: 860px;
  margin-bottom: 18px;
}
.art-title .hl { color: var(--wave); }
.art-title em  { color: var(--wave); font-style: normal; }

.art-excerpt {
  font-size: 16px;
  color: rgba(196,168,130,.8);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 24px;
}

/* ── ARTICLE META (hero bottom bar) ─────────────────────── */
/* CRÍTICO: sin <img> — el avatar es .art-initials div puro */
.art-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* Avatar de iniciales: div puro, sin img, sin src */
.art-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wave);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink);
  line-height: 1;
  /* sin overflow:hidden para evitar que img fantasma se estire */
}

.art-author-info {}
.art-author-name { font-size: 13px; font-weight: 500; color: var(--cream); line-height: 1.2; }
.art-author-role { font-size: 11px; color: var(--fog); }

/* Divisor vertical */
.art-meta-div { width: 1px; height: 24px; background: rgba(255,255,255,.1); flex-shrink: 0; }

.art-meta-item {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fog);
  display: flex;
  align-items: center;
  gap: 5px;
}
.art-meta-item svg { opacity: 0.5; }

/* Share rápido en el hero */
.art-share-row { margin-left: auto; display: flex; align-items: center; gap: 7px; }

.art-share-btn {
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fog);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all var(--t-fast);
}
.art-share-btn:hover   { border-color: var(--wave); color: var(--wave); }
.art-share-btn.wa      { background: rgba(37,211,102,.12); color: #25D366; border-color: rgba(37,211,102,.25); }
.art-share-btn.wa:hover { background: rgba(37,211,102,.2); }

/* ── ARTICLE LAYOUT ──────────────────────────────────────── */
.article-layout {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 48px var(--site-pad) 0;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-art);
  gap: 56px;
  align-items: start;
}

/* ── ARTICLE BODY ────────────────────────────────────────── */
.article-lead {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--ink);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--ink);
}
.article-lead strong { font-weight: 700; }

.article-content { font-size: 17px; line-height: 1.82; color: #1E1A14; }
.article-content p            { margin-bottom: 24px; }
.article-content p:last-child { margin-bottom: 0; }
.article-content strong       { font-weight: 700; color: var(--ink); }
.article-content em           { font-style: italic; }
.article-content a            { color: var(--wave); text-decoration: underline; text-underline-offset: 3px; }
.article-content ul,
.article-content ol           { margin: 0 0 24px 24px; list-style: revert; }
.article-content li           { margin-bottom: 6px; }

.article-content h2 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--ink);
  margin: 40px 0 18px;
}
.article-content h3 {
  font-family: var(--font-condensed);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 32px 0 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* PULL QUOTE */
.pull-quote {
  margin: 40px 0;
  padding: 28px 32px;
  border-left: 4px solid var(--wave);
  background: var(--cream);
}
.pull-quote-text {
  font-family: var(--font-condensed);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 12px;
}
.pull-quote-attr {
  font-family: var(--font-condensed);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fog);
}

/* FACT BOX */
.fact-box { margin: 36px 0; background: var(--ink); padding: 28px 32px; }
.fact-box-label {
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--wave);
  margin-bottom: 16px;
}
.fact-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.fact-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.fact-num  { font-family: var(--font-display); font-size: 36px; color: var(--wave); line-height: 1; flex-shrink: 0; }
.fact-desc { font-size: 14px; color: var(--fog); line-height: 1.5; }
.fact-desc strong { color: var(--cream); font-weight: 500; }

/* ARTICLE IMAGE */
.article-image { margin: 36px 0; }
.art-img-box {
  height: 360px;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--fog);
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.art-img-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-img-credit {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: rgba(255,255,255,.4);
  background: rgba(0,0,0,.5);
  padding: 2px 8px;
  z-index: 2;
}
.art-img-caption {
  font-size: 13px;
  color: var(--fog);
  padding: 10px 0 0;
  border-top: 1px solid var(--mist);
  line-height: 1.55;
}

/* STAT HIGHLIGHT */
.stat-highlight {
  margin: 36px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  background: var(--mist);
}
.stat-block { background: var(--cream); padding: 24px 20px; text-align: center; }
.stat-block:nth-child(2) { background: var(--wave); }
.stat-num {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.stat-label { font-family: var(--font-condensed); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--fog); }
.stat-block:nth-child(2) .stat-label   { color: rgba(0,0,0,.55); }
.stat-context { font-size: 12px; color: var(--fog); margin-top: 4px; line-height: 1.4; }
.stat-block:nth-child(2) .stat-context { color: rgba(0,0,0,.45); }

/* RELATED INLINE */
.related-inline {
  margin: 36px 0;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-left: 4px solid var(--wave);
  padding: 18px 20px;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.related-inline:hover { background: var(--cream); }
.ri-label { font-family: var(--font-condensed); font-size: 10px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--wave); margin-bottom: 8px; }
.ri-title { font-family: var(--font-condensed); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }

/* TWEET EMBED */
.embed-tweet { margin: 32px 0; border: 1px solid var(--mist); border-radius: 14px; padding: 18px; background: #fff; }
.et-head     { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.et-avatar   { width: 38px; height: 38px; border-radius: 50%; background: var(--wave); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 14px; color: var(--ink); flex-shrink: 0; }
.et-name     { font-size: 14px; font-weight: 700; color: #0F1419; }
.et-handle   { font-size: 13px; color: #536471; }
.et-body     { font-size: 15px; color: #0F1419; line-height: 1.5; margin-bottom: 10px; }
.et-time     { font-size: 13px; color: #536471; }

/* ARTICLE TAGS */
.article-tags { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.article-tags-label { font-family: var(--font-condensed); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--fog); }
.art-tag {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--mist);
  color: var(--fog);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  display: inline-block;
}
.art-tag:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ── AUTHOR BOX (v2) ─────────────────────────────────────── */
/* CRÍTICO: .ab-initials es div puro con iniciales PHP — NO get_avatar(), NO <img> */
.author-box {
  margin-top: 48px;
  background: var(--ink);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.ab-initials {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wave);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  line-height: 1;
  /* sin overflow:hidden para evitar img fantasma */
}
.ab-tag    { font-family: var(--font-condensed); font-size: 9px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--wave); margin-bottom: 5px; }
.ab-name   { font-family: var(--font-display); font-size: 20px; color: var(--cream); letter-spacing: -0.2px; margin-bottom: 7px; }
.ab-role   { font-size: 12px; color: var(--fog); margin-bottom: 8px; }
.ab-bio    { font-size: 13px; color: var(--fog); line-height: 1.6; }
.ab-social { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ab-btn {
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--fog);
  cursor: pointer;
  background: none;
  text-decoration: none;
  display: inline-block;
  transition: all var(--t-fast);
}
.ab-btn:hover { border-color: var(--wave); color: var(--wave); }

/* ── SHARE BLOCK ─────────────────────────────────────────── */
.share-block {
  margin-top: 40px;
  padding: 24px;
  background: var(--cream);
  border: 1px solid var(--mist);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.share-block-label { font-family: var(--font-condensed); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--fog); }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sb-btn {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  transition: opacity var(--t-fast);
  text-decoration: none;
}
.sb-btn:hover { opacity: 0.85; }
.sb-wa   { background: #25D366; color: #fff; }
.sb-tw   { background: #000;    color: #fff; }
.sb-ig   { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.sb-copy { background: var(--ink); color: var(--cream); }
.sb-count { font-size: 13px; color: var(--fog); margin-left: auto; }

/* ── COMMENTS ────────────────────────────────────────────── */
.comments-section { max-width: var(--site-max); margin: 0 auto; padding: 48px var(--site-pad); }
.cs-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.cs-title  { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.3px; color: var(--ink); }
.cs-count  { background: var(--wave); color: var(--ink); font-family: var(--font-condensed); font-size: 13px; font-weight: 900; padding: 4px 12px; }
.cs-sub    { font-size: 13px; color: var(--fog); margin-left: 4px; }

.comment-form { background: var(--cream); border: 1px solid var(--mist); padding: 24px; margin-bottom: 32px; }
.cf-title {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 14px;
}
.cf-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--mist);
  background: var(--paper);
  font-size: 14px;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  resize: vertical;
  border-radius: 0;
  margin-bottom: 10px;
}
.cf-textarea:focus { border-color: var(--wave); }
.cf-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cf-input {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--mist);
  background: var(--paper);
  font-size: 14px;
  color: var(--ink);
  padding: 10px 14px;
  outline: none;
  border-radius: 0;
}
.cf-input:focus { border-color: var(--wave); }
.cf-submit-row  { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cf-submit {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 24px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.cf-submit:hover { background: var(--wave); color: var(--ink); }

/* Comment items */
.comment-list { list-style: none; }
.comment { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--mist); }
.comment:last-child { border-bottom: none; }

/* Avatar de comentario: iniciales, sin img */
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mist);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--fog);
}
.comment-avatar.reply { background: var(--wave); color: var(--ink); }

.comment-meta    { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-name    { font-size: 14px; font-weight: 700; color: var(--ink); }
.comment-time    { font-size: 12px; color: var(--fog); }
.comment-verified {
  background: var(--wave);
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 1px 7px;
}
.comment-text    { font-size: 14px; color: var(--ink); line-height: 1.65; }
.comment-actions { display: flex; gap: 12px; margin-top: 8px; }
.comment-btn {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fog);
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--t-fast);
}
.comment-btn:hover { color: var(--ink); }

/* Comentarios anidados */
.children { list-style: none; padding-left: 52px; }

/* ── RELATED SECTION ─────────────────────────────────────── */
.related-section {
  background: var(--mist);
}

.related-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 48px var(--site-pad);
}

.related-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.related-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.2px;
  color: var(--ink);
}

.related-see-all {
  margin-left: auto;
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wave);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.related-see-all:hover { opacity: 0.75; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

/* Ajuste cuando hay menos de 3 notas relacionadas */
.related-grid--1 { grid-template-columns: minmax(0, 420px); }
.related-grid--2 { grid-template-columns: repeat(2, 1fr); }

.rel-card {
  background: var(--paper);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.rel-card:hover { background: var(--cream); }

.rc-img {
  height: 130px;
  background: var(--mist);
  overflow: hidden;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.rc-img img              { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-img .img-placeholder { width: 100%; height: 100%; }
.rc-img .img-placeholder svg { width: 100%; height: 100%; }

.rc-cat   { font-family: var(--font-condensed); font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--wave); }
.rc-title { font-family: var(--font-condensed); font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.rc-time  { font-size: 11px; color: var(--fog); margin-top: auto; }

/* ── MISC ────────────────────────────────────────────────── */
.bc-active { color: var(--fog); }
.bc-active::after { display: none; }

/* Give article column a min-width so flex/grid doesn't squish it */
.article-main { min-width: 0; }

/* Article pagination (multi-page posts) */
.article-pagination {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--mist);
}
.apag-num {
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--mist);
  color: var(--fog);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  display: inline-block;
}
.apag-num:hover { border-color: var(--wave); color: var(--wave); }

/* ── Footer CSS → movido a base.css (cargado en todas las páginas) ── */

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .article-layout  { grid-template-columns: 1fr; padding-top: 32px; }
  .article-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .art-title       { font-size: 44px; }
  /* .footer-top responsive → responsive.css */
}

@media (max-width: 768px) {
  .art-hero-img   { height: 320px; }
  .art-title      { font-size: 32px; letter-spacing: -1px; }
  .art-excerpt    { font-size: 15px; }
  .art-share-row  { display: none; }
  .article-sidebar  { grid-template-columns: 1fr; }
  .stat-highlight   { grid-template-columns: 1fr; }
  .share-block      { flex-direction: column; align-items: flex-start; }
  .author-box       { flex-direction: column; }
  /* .footer-top responsive → responsive.css */
  .related-grid     { grid-template-columns: 1fr; }
  .children         { padding-left: 20px; }
}
