/* ============================================================
   ContArtVic — Blog / Artículo (estilo editorial 2026)
   ============================================================ */

/* ---------- Reading progress ---------- */
.reading-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad-cta); z-index: 200; transition: width .1s linear;
}

/* ---------- Hero ---------- */
.article-hero { padding-top: 152px; padding-bottom: 0; }

.article-topnav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 30px;
}

.breadcrumb {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-3); transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-current] { color: var(--ink-2); }

/* ---------- Related articles ---------- */
.article-related { margin-top: 56px; }
.article-related h3 { font-size: 1.2rem; margin-bottom: 18px; }
.article-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.article-related-card {
  display: block; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--surface-2); transition: border-color .2s, transform .2s;
}
.article-related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.article-related-card .cat-tag { margin-bottom: 10px; }
.article-related-card h4 { font-size: .98rem; line-height: 1.4; letter-spacing: -0.01em; }
@media (max-width: 640px) {
  .article-related-grid { grid-template-columns: 1fr; }
}

.article-back {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); transition: color .2s, gap .2s;
}
.article-back:hover { color: var(--accent); gap: 11px; }
.article-back svg { width: 14px; height: 14px; }

@media (max-width: 560px) {
  .article-topnav { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.article-meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.article-meta-row .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.article-meta-row .meta-text { font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; color: var(--ink-3); }

.article-title {
  margin-top: 22px; font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.04; letter-spacing: -0.035em;
}
.article-sub {
  margin-top: 22px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-2); font-weight: 450;
}

.article-author-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 38px; padding-bottom: 34px; }
.article-author { display: flex; align-items: center; gap: 13px; }
.article-author .pf { width: 46px; height: 46px; border-radius: 50%; background: var(--grad-cta); flex: none; box-shadow: var(--shadow-sm); }
.article-author b { font-family: var(--font-display); font-size: 14.5px; display: block; letter-spacing: -0.01em; }
.article-author span { font-size: 12.5px; color: var(--ink-3); }

.article-share { display: flex; align-items: center; gap: 8px; }
.share-icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-2);
  transition: all .25s;
}
.share-icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.share-icon-btn.copied { color: var(--accent); border-color: var(--accent); }
.share-icon-btn.copied::after {
  content: "¡Enlace copiado!"; position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: 11px; letter-spacing: .01em;
  padding: 5px 10px; border-radius: 7px; white-space: nowrap; box-shadow: var(--shadow-sm); pointer-events: none;
}
.article-share svg { width: 16px; height: 16px; }

/* share dropdown */
.share-menu-wrap { position: relative; }
.share-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; min-width: 180px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.share-menu-wrap.open .share-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.share-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-align: left;
  transition: background .2s, color .2s;
}
.share-menu button:hover { background: var(--surface-2); color: var(--ink); }
.share-menu button svg { width: 17px; height: 17px; flex: none; }

/* full-bleed cover */
.article-cover-wrap { border-top: 1px solid var(--border); }
.article-cover {
  aspect-ratio: 21/8; border-radius: 0;
}
@media (min-width: 860px) {
  .article-cover-wrap { padding: 0 var(--pad); }
  .article-cover { border-radius: var(--r-xl); margin-top: 4px; }
}

/* ---------- Body layout ---------- */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
  padding-block: clamp(56px, 8vw, 96px);
}
.article-layout > * { grid-column: 1; }

.article-rail {
  grid-column: 1; justify-self: end; align-self: start; position: sticky; top: 120px;
  display: none; padding-right: 40px; width: 220px;
}
@media (min-width: 1200px) {
  .article-rail { display: block; }
  .article-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .article-layout > * { grid-column: 2; }
  .article-rail { grid-column: 1; }
}
.rail-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.rail-list { display: flex; flex-direction: column; gap: 11px; }
.rail-list a { font-size: 13.5px; color: var(--ink-3); line-height: 1.4; transition: color .2s, padding .2s; border-left: 2px solid var(--border); padding-left: 12px; }
.rail-list a:hover, .rail-list a.active { color: var(--ink); border-color: var(--accent); }

.article-body p.lede-p {
  font-size: 1.28rem; color: var(--ink); font-weight: 460; line-height: 1.6; text-wrap: pretty;
  margin-bottom: 8px;
}
.article-body h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem); margin-top: 58px; margin-bottom: 20px; letter-spacing: -0.025em;
  scroll-margin-top: 110px;
}
.article-body h2:first-of-type { margin-top: 40px; }
.article-body p {
  font-size: 1.08rem; color: var(--ink-2); line-height: 1.8; margin-bottom: 20px; text-wrap: pretty;
  font-weight: 400;
}
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 13px; }
.article-body ol { counter-reset: steps; }
.article-body ul li, .article-body ol li {
  font-size: 1.03rem; color: var(--ink-2); line-height: 1.65; position: relative; padding-left: 30px;
}
.article-body ul li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad-cta);
}
.article-body ol li { counter-increment: steps; }
.article-body ol li::before {
  content: counter(steps); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 12px;
  display: grid; place-items: center;
}
.article-body strong { color: var(--ink); font-weight: 650; }

/* pull-quote callout */
.article-callout {
  margin: 42px 0; padding: 30px 32px; border-radius: var(--r-lg);
  background: var(--surface-2); border-left: 3px solid var(--accent);
  display: flex; gap: 16px; align-items: flex-start; position: relative;
}
.article-callout svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 3px; }
.article-callout p {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--ink);
  line-height: 1.5; letter-spacing: -0.01em;
}

/* CTA block */
.article-cta {
  margin-top: 64px; padding: clamp(32px, 5vw, 52px); border-radius: var(--r-xl);
  background: var(--grad-ink); position: relative; overflow: hidden; text-align: center;
}
.article-cta::before { content: ""; position: absolute; inset: 0; background: var(--grad-mesh); opacity: .9; }
.article-cta::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(70% 70% at 50% 40%,#000,transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%,#000,transparent 75%);
}
.article-cta > * { position: relative; z-index: 1; }
.article-cta h3 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 12px; letter-spacing: -0.02em; }
.article-cta p { color: #d8c8a0; max-width: 460px; margin: 0 auto 24px; }
.article-cta .btn { margin-top: 4px; }

/* in-article figure */
.article-figure { margin: 42px 0; }
.article-figure img {
  width: 100%; height: auto; display: block; border-radius: var(--r-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.article-figure figcaption {
  margin-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center;
}

/* tags */
.article-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--border); }
.article-tags .tag {
  height: 34px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; font-family: var(--font-display); color: var(--ink-2); display: inline-flex; align-items: center;
}

@media (max-width: 760px) {
  .article-hero { padding-top: 130px; }
  .article-author-row { align-items: flex-start; }
}
