/* ─────────────────────────────────────────────────────────────────────────
   Article Page Styles
───────────────────────────────────────────────────────────────────────── */

.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.article-header {
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.article-category {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-sm);
}



.article-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.article-content {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--spacing-2xl);
}

.article-content p {
  margin: 0 0 var(--spacing-md);
}

.article-content h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: var(--spacing-xl) 0 var(--spacing-md);
}

.article-content h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.article-content ul,
.article-content ol {
  margin: 0 0 var(--spacing-md);
  padding-left: var(--spacing-xl);
}

.article-content li {
  margin-bottom: var(--spacing-xs);
}

.article-content blockquote {
  border-left: 4px solid var(--color-primary);
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--spacing-lg) 0;
}

.article-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: var(--spacing-lg) 0;
}

.article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.article-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-button:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.comments-section {
  margin-top: var(--spacing-2xl);
}

.comments-section h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0 0 var(--spacing-lg);
  color: var(--color-text);
}

.comments-form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  border: 1px solid var(--color-border);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}


/* ─────────────────────────────────────────────────────────────────────────
   Article Gallery  —  big hero + soft thumbnail strip
───────────────────────────────────────────────────────────────────────── */

.ag {
  margin: var(--spacing-xl) 0;
}

/* ── Hero ── */
.ag-hero {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  /* Matches the old .article-cover look exactly */
}

.ag-hero-media {
  position: relative;
  width: 100%;
  cursor: zoom-in;
}



.ag-hero-media video {
  width: 100%;
  max-height: 520px;
  display: block;
  background: #000;
  cursor: default; /* video has its own controls */
}

.ag-hero-media--audio {
  cursor: default;
  padding: var(--spacing-lg);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.ag-hero-media--audio audio {
  width: 100%;
  display: block;
}

/* Expand hint — subtle icon bottom-right, fades in on hover */
.ag-expand-hint {
  position: absolute;
  bottom: 0.875rem;
  right: 0.875rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.ag-hero-media:hover .ag-expand-hint {
  opacity: 1;
}

/* ── Thumbnail strip ── */
.ag-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  /* hide scrollbar but keep functionality */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ag-strip::-webkit-scrollbar {
  display: none;
}

/* Individual thumbnail */
.ag-thumb {
  flex: 0 0 88px;
  height: 66px;
  border-radius: var(--radius-md, 8px); /* soft edges — matches .article-cover */
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  border: 2.5px solid transparent;
  background: var(--color-surface);
  transition:
    border-color 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
  position: relative;
}

.ag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border-radius: calc(var(--radius-md, 8px) - 2px); /* inner radius stays flush */
}

/* Active state */
.ag-thumb--active {
  border-color: var(--color-primary);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Inactive state */
.ag-thumb:not(.ag-thumb--active) {
  opacity: 0.55;
}

.ag-thumb:not(.ag-thumb--active):hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* Video / audio icon placeholder inside thumb */
.ag-thumb-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-raised, #2a2a2a);
  color: var(--color-text-secondary, #aaa);
  font-size: 1.5rem;
}


/* ─────────────────────────────────────────────────────────────────────────
   Responsive
───────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .article-page {
    padding: var(--spacing-md);
  }



  .article-content {
    font-size: var(--text-base);
  }



  .ag-thumb {
    flex: 0 0 72px;
    height: 54px;
  }
}

@media (max-width: 480px) {
  .ag-hero-media img,
  .ag-hero-media video {
    max-height: 220px;
  }

  .ag-thumb {
    flex: 0 0 60px;
    height: 46px;
  }
}
/* ─────────────────────────────────────────────────────────────────────────
   Article Gallery  —  hero + thumbnail strip
   Inherits all tokens from global.css (--radius-lg, --border, --accent, etc.)
───────────────────────────────────────────────────────────────────────── */

.ag {
  margin-bottom: 1.75rem; /* same rhythm as .article-cover margin-bottom */
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
/* Mirrors .article-cover exactly: radius-lg, overflow hidden, aspect 16/9 */

.ag-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  position: relative;
}

.ag-hero-media {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: zoom-in;
}

.ag-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease; /* matches .article-cover img hover */
}

.ag-hero:hover .ag-hero-media img {
  transform: scale(1.02); /* matches .article-cover:hover img */
}

.ag-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  cursor: default;
}

.ag-hero-media--audio {
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.ag-hero-media--audio audio {
  width: 80%;
  max-width: 400px;
}

/* Expand hint — fades in on hover, matches lightbox aesthetic */
.ag-expand-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.ag-hero-media:hover .ag-expand-hint {
  opacity: 1;
}

/* ── Thumbnail strip ───────────────────────────────────────────────────── */
/* Matches .media-strip spacing; scrolls horizontally, no visible scrollbar */

.ag-strip {
  display: flex;
  gap: 0.5rem; /* matches .media-strip gap */
  margin-top: 0.625rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ag-strip::-webkit-scrollbar {
  display: none;
}

/* ── Individual thumbnail ──────────────────────────────────────────────── */
/* Mirrors .media-strip-item: same size, radius, border, hover transform   */

.ag-thumb {
  flex: 0 0 80px;
  height: 80px;                        /* square, same as .media-strip-item */
  border-radius: var(--radius);        /* soft — matches .media-strip-item  */
  overflow: hidden;
  border: 2px solid transparent;       /* reserve space; colour set below  */
  background: var(--surface2);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.ag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Active: accent border + slight lift, no dim */
.ag-thumb--active {
  border-color: var(--accent);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Inactive: dimmed */
.ag-thumb:not(.ag-thumb--active) {
  opacity: 0.55;
}

/* Inactive hover: restore brightness, small lift — same as .media-strip-item */
.ag-thumb:not(.ag-thumb--active):hover {
  opacity: 1;
  transform: scale(1.05); /* matches .media-strip-item:hover */
  border-color: var(--border2);
}

/* Video / audio placeholder icon inside thumb */
/* Matches .media-thumb--video / .media-thumb--audio colours */
.ag-thumb-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;           /* matches .media-thumb font-size */
}

.ag-thumb-icon--video {
  background: #e8e8f0;
  color: #4a6eff;              /* matches .media-thumb--video */
}

.ag-thumb-icon--audio {
  background: #e8f0e8;
  color: #2e8b57;              /* matches .media-thumb--audio */
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .ag-thumb {
    flex: 0 0 68px;
    height: 68px;
  }
}

@media (max-width: 480px) {
  .ag-hero {
    aspect-ratio: 4 / 3; /* taller crop on small screens */
  }

  .ag-thumb {
    flex: 0 0 56px;
    height: 56px;
  }
}
.article-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 2rem 0;

  border-radius: var(--radius-lg);
}
.btn--plain {
  background: none;
  border-color: transparent;
  color: var(--accent);
  padding-left: 0;
  text-decoration: underline;
}
.btn--plain:hover { background: none; color: var(--accent-d); }
