/* ══════════════════════════════════════════════
   UPDATES & ARTICLE PAGES
   ══════════════════════════════════════════════ */

/* ─── Page Hero ─── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a3d7a 100%);
  padding: clamp(var(--space-16), 8vw, var(--space-20)) 0 clamp(var(--space-12), 5vw, var(--space-16));
  color: var(--white);
}
.page-hero__title {
  font-size: var(--text-2xl);
  color: var(--white);
  margin-bottom: var(--space-5);
  line-height: 1.18;
}
.page-hero__title .zh {
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 400;
}
.page-hero__desc {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.75);
  max-width: 64ch;
  line-height: 1.7;
}
.page-hero__desc .zh {
  color: rgba(255,255,255,0.5);
}

/* ─── Filter Bar ─── */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-4);
  position: sticky;
  top: 72px;
  z-index: 50;
}
.filter-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--off-white);
  border: 1px solid var(--mid-grey);
  border-radius: 100px;
  padding: var(--space-2) var(--space-4);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tab:hover {
  background: var(--light-grey);
  color: var(--navy);
}
.filter-tab--active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.filter-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--off-white);
  border: 1px solid var(--mid-grey);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  color: var(--text-muted);
  min-width: 200px;
}
.filter-search svg { flex-shrink: 0; }
.filter-search input {
  border: none;
  background: transparent;
  font-size: var(--text-sm);
  width: 100%;
  outline: none;
}

/* ─── Articles Grid ─── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-6);
}

/* ─── Article Card ─── */
.article-card {
  background: var(--white);
  border: 1px solid var(--mid-grey);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.article-card__tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-light);
  padding: 2px var(--space-3);
  border-radius: 100px;
}
.article-card__date {
  font-size: var(--text-xs);
  color: var(--text-faint);
}
.article-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--navy);
  line-height: 1.3;
}
.article-card__title .zh {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8em;
  margin-top: var(--space-1);
}
.article-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__read {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold);
  margin-top: auto;
}
.article-card:hover .article-card__read { color: var(--gold-hover); }

/* New badge */
.article-card__new {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--white);
  background: #D4513D;
  padding: 2px 6px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

/* ─── Loading / Empty States ─── */
.articles-loading, .articles-empty {
  text-align: center;
  padding: var(--space-16) 0;
  color: var(--text-muted);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--mid-grey);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-4);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   SINGLE ARTICLE PAGE
   ══════════════════════════════════════════════ */
.article__container {
  max-width: var(--content-narrow);
  padding-top: var(--space-10);
  padding-bottom: var(--space-16);
}
.article__back {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold);
  margin-bottom: var(--space-8);
  transition: color var(--transition);
}
.article__back:hover { color: var(--gold-hover); }

/* Header */
.article__header { margin-bottom: var(--space-10); }
.article__tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-light);
  padding: 3px var(--space-3);
  border-radius: 100px;
  display: inline-block;
  margin-bottom: var(--space-4);
}
.article__title {
  font-size: var(--text-2xl);
  color: var(--navy);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}
.article__title-zh {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  font-weight: 400;
}
.article__date {
  font-size: var(--text-sm);
  color: var(--text-faint);
}
.article__divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border: none;
  margin-top: var(--space-6);
}

/* Body content (rendered from Google Doc) */
.article__body {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.8;
}
.article__body h1, .article__body h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--navy);
  margin: var(--space-10) 0 var(--space-5);
}
.article__body h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  margin: var(--space-8) 0 var(--space-4);
}
.article__body p {
  margin-bottom: var(--space-5);
  max-width: 100%;
}
.article__body ul, .article__body ol {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}
.article__body li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
}
.article__body a {
  color: var(--navy-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article__body a:hover { color: var(--gold); }
.article__body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
  color: var(--text-muted);
  font-style: italic;
}
.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
}
.article__body th, .article__body td {
  border: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  text-align: left;
}
.article__body th {
  background: var(--off-white);
  font-weight: 700;
  color: var(--navy);
}
.article__body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
}

/* CTA */
.article__cta {
  margin-top: var(--space-16);
  padding: var(--space-10);
  background: var(--off-white);
  border-radius: var(--radius-lg);
  text-align: center;
}
.article__cta h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--navy);
  margin-bottom: var(--space-3);
}
.article__cta p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  max-width: 100%;
}

/* Active nav state */
.nav__link--active {
  color: var(--gold) !important;
  font-weight: 700;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .articles-grid { grid-template-columns: 1fr; }
  .filter-bar__inner { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: 100%; }
  .article__container { padding-top: var(--space-6); }
}
