/*
 * Single post / media ARTICLE (single.php → slug "post-single").
 * Page-specific styles only. Chrome lives in base.css.
 * Extracted from sos-medical-article.html, plus the restyled reactions widget
 * (reused from the cpanel plugin — markup hooks unchanged: .js-make-reaction).
 */

/* Cover images dropped into the design's aspect-ratio image boxes */
.hero-image-wrap .media-cover,
.related-image .media-cover,
.more-card-image .media-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Link color reset — design relies on a global `a { color: inherit }` that is
 * absent from base.css (see SHARED-CHROME report). This file only loads on the
 * single article, so a bare `a` is effectively page-scoped while keeping the
 * design's 0-0-1 specificity: element rules (.donate-cta-btn, .share-btn,
 * .article-content a forest links) all out-rank it and win. Restores
 * --ink/inherited link color for bare links instead of the browser blue. */
a { color: inherit; text-decoration: none; }

/* READING PROGRESS BAR */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--forest);
  z-index: 200;
  transition: width 0.1s ease;
}

/* BREADCRUMBS */
.breadcrumbs {
  padding: 24px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.breadcrumbs a:hover { color: var(--forest); }
.breadcrumbs .sep { margin: 0 12px; opacity: 0.4; }
.breadcrumbs .current { color: var(--ink); }

/* ARTICLE HEADER */
.article-header {
  padding: 32px 0 56px;
  max-width: 880px;
  margin: 0 auto;
}
.article-header .container { padding: 0; }
.article-category {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-category::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--forest);
}
.article-title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}
.article-subtitle {
  font-family: var(--sans);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 720px;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.byline-author { display: flex; align-items: center; gap: 12px; }
.byline-avatar {
  width: 44px;
  height: 44px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.byline-info { line-height: 1.3; }
.byline-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.byline-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 3px;
}
.byline-divider { width: 1px; height: 32px; background: var(--line); }
.byline-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.byline-meta strong { color: var(--ink); font-weight: 600; }
.byline-share {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.byline-share-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 4px;
}
.share-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}
.share-btn:hover { border-color: var(--forest); color: var(--forest); }
.share-btn svg { width: 14px; height: 14px; }

/* HERO IMAGE */
.article-hero-image { padding: 0 0 56px; }
.hero-image-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--forest);
  overflow: hidden;
  max-width: 1240px;
  margin: 0 auto;
}
.hero-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    repeating-linear-gradient(45deg, transparent 0, transparent 3px, rgba(245, 242, 234, 0.025) 3px, rgba(245, 242, 234, 0.025) 6px);
}
.hero-image-wrap .media-cover { z-index: 1; }
.hero-image-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 242, 234, 0.55);
}
.hero-image-icon svg { width: 140px; height: 140px; }

/* ARTICLE BODY LAYOUT */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  align-items: start;
}
.article-body { max-width: 720px; }
.article-aside { position: sticky; top: 110px; }

/* ARTICLE CONTENT (the_content) */
.article-content {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
}
.article-content > p { margin-bottom: 28px; }
.article-content > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 84px;
  font-weight: 800;
  line-height: 0.85;
  float: left;
  margin: 6px 12px 0 0;
  color: var(--forest);
  letter-spacing: -0.04em;
}
.article-content h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 56px 0 24px;
  color: var(--ink);
}
.article-content h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
}
.article-content strong { font-weight: 700; }
.article-content a {
  color: var(--forest);
  border-bottom: 1px solid var(--forest);
  transition: background 0.2s ease;
}
.article-content a:hover { background: rgba(26, 61, 47, 0.08); }
.article-content ul,
.article-content ol { margin: 0 0 28px 24px; }
.article-content li { margin-bottom: 10px; }
.article-content img,
.article-content .wp-block-image img {
  max-width: 100%;
  height: auto;
  margin: 40px 0;
}
.article-content figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.article-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--paper-deep);
  border-left: 3px solid var(--forest);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  font-style: normal;
}
.article-content blockquote p { margin: 0 0 12px; }
.article-content blockquote p:last-child { margin: 0; }
.page-links {
  margin: 32px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-links a, .page-links > span { padding: 4px 10px; border: 1px solid var(--line); }

/* PULL QUOTE (if present in content markup) */
.pull-quote {
  margin: 48px 0;
  padding: 40px 24px;
  border-top: 2px solid var(--forest);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pull-quote-text {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* TAGS */
.article-tags {
  margin: 56px 0 0;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-tags-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 8px;
}
.article-tag {
  padding: 8px 16px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}
.article-tag:hover { border-color: var(--ink); color: var(--ink); }

/* ============================================================
 * REACTIONS WIDGET (restyled to the Volyn SOS system).
 * Markup + JS hooks reused AS-IS from the cpanel plugin:
 *   .article-reactions / .js-make-reaction[data-reaction] / span counter.
 * ============================================================ */
.article-reactions {
  margin: 40px 0 56px;
  padding: 32px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.article-reactions__title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.article-reactions__subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: -8px;
}
.article-reactions__items {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.article-reactions__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s ease;
}
.article-reactions__item:hover { border-color: var(--forest); transform: translateY(-2px); }
.article-reactions__item i {
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}
.article-reactions__item span {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.article-reactions__item.active {
  background: var(--forest);
  border-color: var(--forest);
}
.article-reactions__item.active span { color: var(--paper); }
.article-reactions__after {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.article-reactions__after .js-reactions-total { color: var(--ink); font-weight: 600; }

/* DONATE CTA */
.article-donate-cta {
  margin: 0 0 80px;
  padding: 48px;
  background: var(--forest);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.article-donate-cta::before {
  content: '+';
  position: absolute;
  top: -40px;
  right: -20px;
  font-family: var(--display);
  font-size: 320px;
  font-weight: 800;
  color: rgba(245, 242, 234, 0.05);
  line-height: 0.8;
  pointer-events: none;
}
.donate-cta-inner { position: relative; max-width: 540px; }
.donate-cta-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 242, 234, 0.8);
  margin-bottom: 16px;
}
.donate-cta-title {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.donate-cta-text {
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 28px;
  opacity: 0.9;
}
.donate-cta-btn {
  background: var(--paper);
  color: var(--ink);
  padding: 18px 28px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.donate-cta-btn:hover { background: var(--ink); color: var(--paper); }
.donate-cta-btn svg { width: 14px; height: 14px; }

/* SIDEBAR */
.aside-section { margin-bottom: 40px; }
.aside-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.related-list { display: grid; gap: 20px; }
.related-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-image {
  aspect-ratio: 1;
  background: var(--forest);
  position: relative;
  overflow: hidden;
}
.related-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 2px, rgba(245, 242, 234, 0.03) 2px, rgba(245, 242, 234, 0.03) 4px);
}
.related-image-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 242, 234, 0.55);
}
.related-image-icon svg { width: 28px; height: 28px; }
.related-cat {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 4px;
}
.related-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}
.related-item:hover .related-title { color: var(--forest); }
.related-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.aside-subscribe { background: var(--forest); color: var(--paper); padding: 24px; }
.aside-subscribe h4 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.aside-subscribe p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(245, 242, 234, 0.8);
  margin-bottom: 16px;
}
.aside-subscribe-form { display: grid; gap: 8px; }
.aside-subscribe-form input {
  background: rgba(245, 242, 234, 0.08);
  border: 1px solid rgba(245, 242, 234, 0.15);
  color: var(--paper);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
}
.aside-subscribe-form input::placeholder { color: rgba(245, 242, 234, 0.65); }
.aside-subscribe-form button {
  background: var(--paper);
  color: var(--forest);
  border: none;
  padding: 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.aside-subscribe-form button:hover { background: var(--paper-deep); color: var(--forest-deep); }

/* MORE STORIES */
.more-stories {
  background: var(--paper-deep);
  padding: 100px 0;
  border-top: 1px solid var(--line);
  margin-top: 56px;
}
.more-stories-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 48px;
}
.more-stories-head h2 {
  font-family: var(--display);
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}
.more-stories-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.2s ease, color 0.2s ease;
}
.more-stories-cta:hover { gap: 14px; color: var(--forest); border-color: var(--forest); }
.more-stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.more-card {
  background: var(--paper);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.more-card:hover { transform: translateY(-4px); }
.more-card:hover .more-card-title { color: var(--forest); }
.more-card-image {
  aspect-ratio: 16/10;
  background: var(--forest);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.more-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 3px, rgba(245, 242, 234, 0.02) 3px, rgba(245, 242, 234, 0.02) 6px);
}
.more-card-image-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 242, 234, 0.55);
}
.more-card-image-icon svg { width: 56px; height: 56px; }
.more-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  z-index: 2;
  font-weight: 500;
}
.more-card-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.more-card-meta .dot {
  width: 3px;
  height: 3px;
  background: var(--ink-muted);
  border-radius: 50%;
  opacity: 0.5;
}
.more-card-title {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; gap: 64px; }
  .article-aside { position: static; }
  .more-stories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .article-byline { gap: 16px; }
  .byline-divider { display: none; }
  .byline-share { width: 100%; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); margin-left: 0; }
  .article-bottom-share { grid-template-columns: 1fr; }
  .more-stories-grid { grid-template-columns: 1fr; }
  .more-stories-head { grid-template-columns: 1fr; }
  .article-reactions__items { gap: 8px; }
}
