/*
 * RIAV — Single post styles.
 *
 * Extracted verbatim from the inline <style> block in tin-tuc-detail.html.
 * Loaded only on is_singular('post') via enqueue.php.
 *
 * Depends on: tokens.css, site.css (loaded first via enqueue.php).
 */

/* ---- Article header ---- */
.article-header {
  background: var(--neutral-100);
  border-bottom: 1px solid var(--neutral-200);
  padding-block: 48px 32px;
}

.article-header .crumbs {
  margin-bottom: 20px;
}

/* Badge on the detail page uses brand-primary background (v1 .article-header .badge) */
.article-header .badge {
  background: var(--brand-primary);
  color: white;
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  max-width: 820px;
  margin-top: 16px;
}

.article-meta {
  display: flex;
  gap: 20px 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 14px;
  color: var(--neutral-500);
  align-items: center;
}

.article-meta .author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--neutral-700);
  font-weight: 500;
}

.article-meta .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--brand-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ---- Hero image ---- */
.article-hero {
  margin-top: 32px;
  margin-bottom: 0;
}

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

.article-hero figcaption {
  font-size: 13px;
  color: var(--neutral-500);
  font-style: italic;
  margin-top: 12px;
  text-align: center;
}

/* ---- Article body ---- */
.article-body {
  max-width: 720px;
  margin-inline: auto;
  font-size: var(--fs-body-lg);
  line-height: 1.75;
  color: var(--neutral-700);
}

.article-body > * + * { margin-top: 24px; }

.article-body h2 {
  font-size: 28px;
  line-height: 1.3;
  margin-top: 48px;
  color: var(--neutral-900);
}

.article-body h3 {
  font-size: 22px;
  line-height: 1.35;
  margin-top: 32px;
  color: var(--neutral-900);
}

.article-body p { color: var(--neutral-700); }
.article-body p strong { color: var(--neutral-900); }

.article-body a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-decoration-color: var(--brand-accent);
  text-underline-offset: 3px;
}

.article-body a:hover { color: var(--brand-accent-700); }

.article-body blockquote {
  margin: 32px 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--brand-accent);
  font-style: italic;
  color: var(--neutral-900);
  font-size: 22px;
  line-height: 1.5;
}

.article-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  color: var(--neutral-500);
}

.article-body ul,
.article-body ol { padding-left: 24px; }

.article-body li { margin-top: 8px; }
.article-body li::marker { color: var(--brand-accent); }

.article-body figure { margin: 32px 0; }

.article-body figure .imgph {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
}

.article-body figure figcaption {
  font-size: 13px;
  font-style: italic;
  color: var(--neutral-500);
  margin-top: 10px;
  text-align: center;
}

/* ---- Key-stats block (optional meta box) ---- */
.key-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 0;
  padding: 28px;
  background: var(--brand-accent-softer);
  border-radius: var(--radius);
}

@media (min-width: 640px) {
  .key-stats { grid-template-columns: repeat(4, 1fr); }
}

.key-stat .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.key-stat .label {
  font-size: 12px;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ---- Article footer: tags + share ---- */
.article-footer {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--neutral-200);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--t);
  text-decoration: none;
}

.tag:hover {
  background: var(--brand-accent-soft);
  color: var(--brand-primary);
}

.share-row {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.share-row .label {
  font-size: 14px;
  color: var(--neutral-500);
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--neutral-200);
  display: inline-grid;
  place-items: center;
  color: var(--neutral-700);
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  flex-shrink: 0;
}

.share-btn:hover {
  border-color: var(--brand-accent);
  color: var(--brand-primary);
  background: var(--brand-accent-soft);
}

/* Confirmed state set by news-single.js after copy-link succeeds */
.share-btn--copied {
  color: var(--success);
  border-color: var(--success);
}

/* ---- Related posts grid ---- */
.related-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--brand-accent-700);
  text-decoration: underline;
}
