/* =========================
   ROOT VARIABLES
========================= */
:root {
  --max-width: 1100px;
  --text-color: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --bg: #ffffff;
}
.article-container {
  /* padding: 0 15rem 0 15rem; */
  width: 100%;
  justify-self: center;
  margin-top: 2rem;
  margin-bottom: var(--space-20);
  padding: 0.5rem 1rem 0.5rem 1rem;
}
/* =========================
   GLOBAL ARTICLE
========================= */
.single-article {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  color: var(--text-color);
  line-height: 1.7;
}

/* =========================
   HERO
========================= */
.article-hero {
  margin-bottom: 2rem;
}

.article-breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.article-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.article-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}

.article-deck {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Category badge */
.cat-badge {
  background: var(--accent);
  color: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  text-decoration: none;
}

/* Read time */
.read-time {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* =========================
   BYLINE
========================= */
.byline-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.byline-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.author-avatar {
  border-radius: 50%;
}

.byline-name a {
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color);
}

.byline-date {
  font-size: 0.8rem;
  color: var(--muted);
}

/* =========================
   SHARE BUTTONS
========================= */
.share-bar {
  width: 100%;
  display: flex;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-4);
}

.share-btn {
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.share-btn--copy.copied {
  background: #16a34a;
  color: #fff;
}

/* =========================
   FEATURED IMAGE
========================= */
.article-figure {
  margin: 2rem 0;
}

.article-featured-img {
  width: 100%;
  border-radius: 10px;
}

.article-caption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* =========================
   LAYOUT
========================= */
.article-layout {
  display: flex;
  justify-content: center;
}/* Sidebar */
.article-sidebar {
  position: relative;
}

.toc-widget {
  position: sticky;
  top: 100px;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.toc-link {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.3rem 0;
  text-decoration: none;
}

.toc-link--sub {
  padding-left: 1rem;
  font-size: 0.85rem;
}

.toc-link--active {
  color: var(--accent);
  font-weight: 600;
}

/* =========================
   CONTENT
========================= */
/* .article-content {
  max-width: 760px;
} */

.article-content h2 {
  margin-top: 2rem;
  font-size: 1.6rem;
}

.article-content h3 {
  margin-top: 1.5rem;
  font-size: 1.3rem;
}

.article-content p {
  margin: 1rem 0;
  font-size: 18px;
  line-height: 1.66;
  text-align: justify;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
}

.article-share-footer {
  width: 100%;
  margin-top: var(--space-10);
}
/* =========================
   PROGRESS BAR
========================= */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 999;
}

.read-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* =========================
   TAGS
========================= */
.article-tags {
  margin-top: 2rem;
}

.tag-pill {
  display: inline-block;
  background: #f3f4f6;
  padding: 0.3rem 0.6rem;
  margin: 0.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text-color);
}

/* =========================
   AUTHOR CARD
========================= */
.author-card {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.author-card-avatar {
  border-radius: 50%;
}

.author-card-name {
  font-weight: 600;
}

.author-card-bio {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================
   NAVIGATION
========================= */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.post-nav-item {
  flex: 1;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-color);
}

.post-nav-item:hover {
  border-color: var(--accent);
}

/* =========================
   RELATED POSTS
========================= */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.news-card {
  /* border: 1px solid var(--border); */
  overflow: hidden;
  transition: 0.2s;
}

.news-card:hover {
  transform: translateY(-3px);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Video player wrapper ──────────────────────────────── */
.video-single {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.video-article {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.video-header {
    /* nothing special needed — just flows naturally in the column */
}

.video-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.25;
    margin: var(--space-3) 0;
}

.video-meta {
    color: var(--color-ink-mid);
    font-size: 13px;
}

.video-content {
    line-height: 1.7;
}

/* ── Player box ─────────────────────────────────────────── */
.video-player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-poster,
.video-embed-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    transition: background 0.2s;
}
.video-play-btn:hover {
    background: rgba(0, 0, 0, 0.55);
}

.video-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-accent, #e00);
    font-size: 28px;
    padding-left: 4px;
    transition: transform 0.2s;
}
.video-play-btn:hover .video-play-icon {
    transform: scale(1.1);
}

.video-play-label {
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: sans-serif;
}

.video-embed-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}
/* ── Single video page layout ──────────────────────────── */
.video-single {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.video-header {
    margin-top: var(--space-5);
}

.video-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.25;
    margin: var(--space-3) 0;
}

.video-meta {
    color: var(--color-ink-mid);
    font-size: 13px;
}

.video-content {
    margin-top: var(--space-5);
    line-height: 1.7;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    display: none;
  }

  .article-title {
    font-size: 2rem;
  }
}
@media (max-width: 640px) {
  .article-container {
    width: 95%;
  }
}