/* ─── Custom scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 7px; }
::-webkit-scrollbar-track        { background: var(--bg, #f3f2ef); }
::-webkit-scrollbar-thumb        { background: #27476E; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover  { background: #F26419; }

/* ─── Reset & Variables ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue:    #009EDB;
  --blue-dk: #27476E;
  --orange:  #F26419;
  --bg:      #f3f2ef;
  --card:    #ffffff;
  --text:    #1d1d1f;
  --muted:   #666666;
  --border:  #e0e0e0;
  --radius:  10px;
  --shadow:  0 2px 8px rgba(0, 0, 0, 0.10);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.16);
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
body > header {
  background: var(--blue);
  height: 62px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20);
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  grid-column: 2;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  text-decoration: none;
  white-space: nowrap;
  justify-self: center;
}

.logo:hover { color: rgba(255, 255, 255, 0.85); }

.header-nav {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.80);
  margin-left: 28px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active { color: #ffffff; }

.header-nav a.active {
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #ffffff;
  padding: 4px 8px;
}

/* ─── Mobile nav ────────────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--blue-dk);
  padding: 8px 32px 16px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active,
.mobile-nav a:hover { color: #ffffff; }

/* ─── Hero banner ───────────────────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, var(--blue-dk) 0%, var(--blue) 100%);
  padding: 44px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid texture */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.hero-left  { position: relative; z-index: 1; }
.hero-right { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.hero-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.hero-monogram {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: -0.04em;
  line-height: 1;
  width: 148px;
  height: 148px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: border-color 0.3s, color 0.3s;
}

.hero-banner:hover .hero-monogram {
  border-color: rgba(242, 100, 25, 0.5);
  color: rgba(255, 255, 255, 0.22);
}

/* Animated orange accent line across the bottom */
.hero-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--orange);
  animation: accent-grow 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes accent-grow {
  to { width: 100%; }
}

@media (max-width: 600px) {
  .hero-banner {
    grid-template-columns: 1fr;
    padding: 32px 24px 36px;
  }
  .hero-right { display: none; }
}

/* ─── Stats bar ─────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

.stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 3px;
  letter-spacing: -0.03em;
}

.stat-plus {
  font-size: 1.2rem;
  color: var(--orange);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .stat-item  { padding: 8px 18px; }
  .stat-num   { font-size: 1.4rem; }
}

/* ─── Main ──────────────────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 24px;
  width: 100%;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ─── Grid ──────────────────────────────────────────────────────────────── */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 920px) {
  .pdf-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .pdf-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .menu-toggle { display: block; }
}

/* ─── Pagination ────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 44px 0 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.page-btn:hover:not(:disabled) {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.page-btn.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ─── Card ──────────────────────────────────────────────────────────────── */
.pdf-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}

.pdf-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* ─── Canvas wrapper ────────────────────────────────────────────────────── */
.canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 85 / 110;
  background: #ebebeb;
  overflow: hidden;
  cursor: default;
}

.canvas-wrapper canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ─── Loading placeholder ───────────────────────────────────────────────── */
.loading-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.loading-placeholder.hidden { display: none; }

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  font-size: 0.75rem;
  color: #c00;
  text-align: center;
  padding: 12px;
}

/* ─── Prev / Next buttons ───────────────────────────────────────────────── */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
  user-select: none;
}

.canvas-wrapper:hover .nav-btn { opacity: 1; }
.nav-btn:hover { background: #fff; }
.nav-btn.prev { left: 8px; }
.nav-btn.next { right: 8px; }

.nav-btn:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

/* ─── Page indicator ────────────────────────────────────────────────────── */
.page-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 12px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}

.canvas-wrapper:hover .page-indicator { opacity: 1; }

.page-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  pointer-events: none;
  z-index: 5;
}

.page-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, transform 0.2s;
}

.page-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ─── Card title overlay ────────────────────────────────────────────────── */
.card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  z-index: 4;
  pointer-events: none;
  transition: padding-bottom 0.2s;
}

.card-title-overlay span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pdf-card:hover .card-title-overlay {
  padding-bottom: 16px;
}

/* ─── Entrance animations ────────────────────────────────────────────────── */
.card-enter {
  opacity: 0;
  transform: translateY(22px);
}

.card-enter.card-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
  background: var(--blue);
  text-align: center;
  padding: 22px 24px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.80);
  margin-top: 48px;
}

footer a {
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
}

footer a:hover { color: #fff; }

/* ─── Featured row ───────────────────────────────────────────────────────── */
.featured-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .featured-row { grid-template-columns: 1fr; }
}

/* Left column — stacked articles + pagination */
.articles-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.articles-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* Each compact article card */
.featured-article {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--orange);
  transition: box-shadow 0.2s;
  flex: 1;
}

.featured-article:hover { box-shadow: var(--shadow-hover); }

.featured-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.featured-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 5px;
  text-decoration: none;
  display: block;
}

.featured-title:hover { color: var(--blue); }

.featured-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.featured-excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  transition: gap 0.2s;
  margin-top: auto;
}

.featured-read-link:hover { gap: 9px; }

/* Article pagination bar */
.article-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 0 2px;
}

.article-nav-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s;
}

.article-nav-btn:hover:not(:disabled) {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.article-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.article-nav-count {
  font-size: 0.8125rem;
  color: var(--muted);
  min-width: 48px;
  text-align: center;
}

/* Right column — PDF card fills full height */
.featured-pdf-slot {
  display: flex;
  flex-direction: column;
}

.featured-pdf-slot .pdf-card {
  flex: 1;
}

/* ─── Article author bar ────────────────────────────────────────────────── */
.author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  margin: 20px 0 32px;
}

.author-bar-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-bar-monogram {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-dk);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-bar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-bar-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.author-bar-role {
  font-size: 0.8rem;
  color: var(--muted);
}

.author-bar-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.author-bar-sep { color: var(--border); }
.author-bar-plus { color: var(--orange); font-size: 0.7rem; }

.author-bar-stats a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.author-bar-stats a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .author-bar { flex-direction: column; align-items: flex-start; }
}

/* ─── Page banner (videos / inner pages) ────────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, var(--blue-dk) 0%, var(--blue) 100%);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-banner-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.page-banner-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 6px;
}

.page-banner-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.page-banner-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.page-banner-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  color: #fff;
}

.page-banner-stat strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}

.page-banner-stat span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.page-banner-plus {
  color: var(--orange);
  font-size: 1rem;
}

.page-banner-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.page-banner-link {
  margin-left: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.page-banner-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@media (max-width: 720px) {
  .page-banner { padding: 24px; }
  .page-banner-stats { display: none; }
}

/* ─── Article reader ────────────────────────────────────────────────────── */
.article-main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  width: 100%;
  flex: 1;
}

.article-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.article-content-col {
  flex: 0 0 76%;
  min-width: 0;
}

.article-sidebar {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: 82px; /* header (62px) + gap */
}

.article-sidebar-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.article-sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 900px) {
  .article-layout {
    flex-direction: column;
  }
  .article-content-col {
    flex: none;
    width: 100%;
  }
  .article-sidebar {
    position: static;
    width: 100%;
  }
}

.back-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--orange); }

.article-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.article-error {
  color: #c00;
  padding: 20px 0;
}

.article-body {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 48px;
}

@media (max-width: 600px) {
  .article-body { padding: 28px 20px; }
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.article-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 10px;
}

.article-date {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Markdown content styles */
.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2a2a;
}

.article-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 14px;
}

.article-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}

.article-content p {
  margin-bottom: 18px;
}

.article-content strong {
  font-weight: 700;
  color: var(--text);
}

.article-content ul,
.article-content ol {
  margin: 0 0 18px 24px;
}

.article-content li { margin-bottom: 8px; }

.article-content a {
  color: var(--blue);
  text-decoration: underline;
}

.article-content a:hover { color: var(--orange); }

.article-content blockquote {
  border-left: 4px solid var(--orange);
  margin: 24px 0;
  padding: 12px 20px;
  background: #fff8f4;
  color: #444;
  border-radius: 0 6px 6px 0;
}

.article-content code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.article-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.article-content em {
  font-style: italic;
  color: var(--muted);
}

/* ─── Lightbox ──────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(820px, 95vw);
  max-height: 95vh;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: lb-in 0.2s ease;
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #111;
  gap: 12px;
  flex-shrink: 0;
}

.lightbox-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lightbox-page-info {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin-right: 4px;
  white-space: nowrap;
}

.lb-btn {
  background: rgba(255, 255, 255, 0.10);
  border: none;
  border-radius: 6px;
  color: #fff;
  width: 34px;
  height: 34px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-btn:disabled { opacity: 0.25; pointer-events: none; }

.lb-close {
  font-size: 14px;
  margin-left: 4px;
  background: rgba(255, 60, 60, 0.25);
}

.lb-close:hover { background: rgba(255, 60, 60, 0.55); }

.lightbox-canvas-wrap {
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  background: #2a2a2a;
  padding: 16px;
  position: relative;
  min-height: 200px;
}

#lightbox-canvas {
  display: block;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.lightbox-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-spinner.hidden { display: none; }

/* ─── Video grid ────────────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 920px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .video-grid { grid-template-columns: 1fr; }
}

.video-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #111;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--blue-dk) 0%, #0a2540 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.video-overlay:hover {
  background: linear-gradient(160deg, #1a5080 0%, var(--blue-dk) 100%);
}

.video-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  padding-left: 4px;
  transition: background 0.2s, transform 0.2s;
}

.video-overlay:hover .video-play-btn {
  background: var(--orange);
  border-color: var(--orange);
  transform: scale(1.1);
}

.video-overlay-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-footer {
  padding: 12px 14px 14px;
}

.video-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ─── About page ────────────────────────────────────────────────────────── */
.about-hero {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 48px;
  margin-bottom: 32px;
}

.about-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.about-title {
  font-size: 1rem;
  color: var(--blue);
  font-weight: 500;
  line-height: 1.5;
}

.about-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 48px;
  margin-bottom: 24px;
}

.about-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.about-section p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}

.about-section ul {
  list-style: none;
  padding: 0;
}

.about-section ul li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  padding: 6px 0 6px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.about-section ul li:last-child { border-bottom: none; }

.about-section ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-size: 0.75rem;
  top: 8px;
}

/* ─── Contact page ──────────────────────────────────────────────────────── */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 720px) {
  .contact-wrapper { grid-template-columns: 1fr; }
  .about-hero, .about-section { padding: 28px 24px; }
}

.contact-info {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.contact-info h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.contact-info p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
}

.contact-form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
}

.contact-form-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.btn-submit {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover { background: #d4540f; }

@media (max-width: 560px) {
  .contact-form-card { padding: 24px 20px; }
}

/* ─── Articles section heading ──────────────────────────────────────────── */
#articles-heading {
  margin-bottom: 0;
}

/* Full-width articles layout (no PDF card alongside) */
.featured-row.articles-only {
  grid-template-columns: 1fr;
}

.featured-row.articles-only .articles-left {
  width: 100%;
}

.featured-row.articles-only .articles-stack {
  flex-direction: row;
  gap: 16px;
}

.featured-row.articles-only .featured-article {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .featured-row.articles-only .articles-stack {
    flex-direction: column;
  }
}

/* ─── Filter bar ────────────────────────────────────────────────────────── */
#resources-heading {
  margin-top: 36px;
  margin-bottom: 12px;
}

#filter-bar-container {
  position: sticky;
  top: 62px; /* height of the site header */
  z-index: 100;
  background: var(--bg);
  margin: 0 -24px; /* break out of main's 24px padding */
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px; /* room for focus ring */
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}

.filter-pill:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(0, 158, 219, 0.06);
}

.filter-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  font-weight: 600;
}

/* ─── Category sections ─────────────────────────────────────────────────── */
#pdf-categories {
  margin-top: 32px;
}

.cat-section {
  margin-bottom: 56px;
  border-radius: var(--radius);
  padding: 0;
  transition: outline 0.2s;
}

.cat-section.cat-highlighted {
  outline: 2px solid var(--blue);
  outline-offset: 8px;
  border-radius: var(--radius);
}

.cat-header {
  margin-bottom: 20px;
}

/* Count badge beside the heading */
.cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  min-width: 26px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  margin-left: 10px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* ─── Show more / show less button ──────────────────────────────────────── */
.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  background: none;
  border: none;
  padding: 6px 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  transition: color 0.18s, gap 0.18s;
  text-decoration: none;
}

.show-more-btn:hover {
  color: var(--orange);
  gap: 8px;
}

/* Section divider between articles and first PDF category */
#filter-bar-container + #pdf-categories .cat-section:first-child {
  padding-top: 0;
}

/* ─── Category pages ────────────────────────────────────────────────────── */
#cat-page-container {
  padding-top: 32px;
  padding-bottom: 48px;
}

.cat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.cat-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.cat-breadcrumb a:hover { text-decoration: underline; }
.crumb-sep { color: var(--muted); }
.crumb-current { color: var(--text); font-weight: 500; }
