/* ==========================================================================
   SITE CSS — Editorial / Magazine Design System
   Uses CSS custom properties from base.html:
     --color-primary, --color-primary-light, --color-primary-dark,
     --color-secondary, --color-accent,
     --color-bg, --color-bg-alt, --color-bg-dark,
     --color-surface, --color-surface-hover,
     --color-text, --color-text-muted, --color-text-on-dark,
     --color-border,
     --color-gradient-from, --color-gradient-to,
     --font-heading, --font-body
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body), system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading), system-ui, -apple-system, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Article content — tailles plus lisibles */
.article-content h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.article-content h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-content li { margin-bottom: 0.375rem; }
.article-content img { border-radius: 0.5rem; margin: 1.5rem 0; }
.article-content blockquote { border-left: 3px solid var(--color-primary); padding-left: 1.25rem; margin: 1.5rem 0; color: var(--color-text-muted); font-style: italic; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* --------------------------------------------------------------------------
   2. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-md {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-lg {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2rem 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.grid-4 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.text-xs  { font-size: 0.75rem; }
.text-sm  { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.font-heading { font-family: var(--font-heading), system-ui, sans-serif; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.75; }

.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }

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

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. SITE HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.site-logo {
  font-family: var(--font-heading), system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-logo:hover {
  opacity: 0.8;
  color: var(--color-primary);
}

.nav {
  display: none;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-surface-hover);
}

.nav-link--active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Mobile menu using details/summary */
.mobile-menu {
  position: relative;
}

.mobile-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  list-style: none;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.mobile-menu summary:hover {
  background-color: var(--color-surface-hover);
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu .mobile-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  z-index: 200;
}

.mobile-menu .mobile-menu-panel a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu .mobile-menu-panel a:hover {
  background-color: var(--color-surface-hover);
  color: var(--color-primary);
}

/* Header ticker / marquee */
.header-ticker {
  background-color: var(--color-primary);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0;
}

.header-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--color-gradient-from), var(--color-gradient-to));
}

/* --------------------------------------------------------------------------
   5. HERO SECTIONS
   -------------------------------------------------------------------------- */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}

.hero:hover .hero-bg {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 2rem 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-family: var(--font-heading), system-ui, sans-serif;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  color: #fff;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--color-gradient-from), var(--color-gradient-to));
  color: #fff;
}

.hero-gradient .hero-title,
.hero-gradient .hero-subtitle {
  color: #fff;
}

/* Decorative blur circles for gradient hero */
.hero-gradient::before,
.hero-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.hero-gradient::before {
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.2);
  top: -100px;
  right: -100px;
}

.hero-gradient::after {
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.15);
  bottom: -80px;
  left: -60px;
}

.hero-typographic {
  text-align: center;
  padding: 6rem 1.5rem;
  border-bottom: 4px solid var(--color-primary);
}

.hero-split {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}

/* --------------------------------------------------------------------------
   6. CARDS
   -------------------------------------------------------------------------- */
.card {
  border-radius: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.card-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-family: var(--font-heading), system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-title a:hover {
  color: var(--color-primary);
}

.card-excerpt {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Card overlay variant */
.card-overlay {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
}

.card-overlay .card-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.card-overlay .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: #fff;
}

.card-overlay .card-title a {
  color: #fff;
}

.card-overlay .card-meta {
  color: rgba(255,255,255,0.7);
}

/* Card horizontal */
.card-horizontal {
  display: flex;
  flex-direction: column;
}

.card-horizontal .card-image {
  aspect-ratio: 16 / 9;
}

/* Card minimal */
.card-minimal {
  border-radius: 0.5rem;
  border-top: 3px solid var(--color-primary);
}

.card-minimal .card-image {
  display: none;
}

/* Card glass */
.card-glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Card featured */
.card-featured {
  border-radius: 1.25rem;
}

.card-featured .card-body {
  padding: 2rem;
}

.card-featured .card-title {
  font-size: 1.375rem;
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-surface-hover);
  border-color: var(--color-text-muted);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   8. BADGES
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
}

.badge-sm {
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
}

/* --------------------------------------------------------------------------
   9. PAGINATION
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.pagination .active,
.pagination .active:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. BREADCRUMB
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 1rem 0;
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb .separator {
  opacity: 0.4;
}

.breadcrumb .separator::before {
  content: "\203A";
}

.breadcrumb .current {
  color: var(--color-text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   11. SIDEBAR
   -------------------------------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 6rem;
}

.sidebar-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary);
}

.sidebar-link {
  display: block;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
}

.sidebar-link:last-child {
  border-bottom: none;
}

.sidebar-link:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-bg-dark, #1a1a2e);
  color: var(--color-text-on-dark, #e0e0e0);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #fff;
}

.footer-link {
  display: block;
  padding: 0.25rem 0;
  opacity: 0.7;
  color: inherit;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: opacity 0.3s ease;
}

.footer-link:hover {
  opacity: 1;
  color: inherit;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.5;
}

.footer-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
}

/* --------------------------------------------------------------------------
   13. ARTICLE CONTENT
   -------------------------------------------------------------------------- */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading), system-ui, sans-serif;
  color: var(--color-text);
  font-size: 1.75rem;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading), system-ui, sans-serif;
  font-size: 1.375rem;
}

.article-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

.article-content img {
  border-radius: 0.75rem;
  margin: 2rem auto;
  display: block;
}

.article-content code {
  background-color: var(--color-bg-alt, #f5f5f5);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.article-content pre {
  background-color: var(--color-bg-alt, #f5f5f5);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--color-border);
}

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

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  border: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  text-align: left;
}

.article-content th {
  background-color: var(--color-bg-alt);
  font-weight: 600;
}

.article-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

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

/* --------------------------------------------------------------------------
   14. FAQ SECTION
   -------------------------------------------------------------------------- */
.faq-section details {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-section summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--color-surface);
  transition: background-color 0.2s ease;
  list-style: none;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::after {
  content: "+";
  float: right;
  font-weight: 300;
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.faq-section details[open] summary::after {
  content: "\2212";
}

.faq-section summary:hover {
  background-color: var(--color-surface-hover);
}

.faq-section details[open] summary {
  border-bottom: 1px solid var(--color-border);
}

.faq-section details > div {
  padding: 1rem 1.25rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   15. CONTACT FORM
   -------------------------------------------------------------------------- */
.contact-form {
  max-width: 640px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

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

/* --------------------------------------------------------------------------
   16. TABLE OF CONTENTS
   -------------------------------------------------------------------------- */
.toc {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.toc-title {
  font-family: var(--font-heading), system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}

.toc-link {
  display: block;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.toc-link:last-child {
  border-bottom: none;
}

.toc-link:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   17. DIRECTORY SPECIFIC
   -------------------------------------------------------------------------- */
.stats-bar {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--color-surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
}

.stat-item {
  text-align: center;
  padding: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.region-card,
.dept-card,
.city-card {
  border-radius: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.region-card:hover,
.dept-card:hover,
.city-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.establishment-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

.establishment-item:last-child {
  border-bottom: none;
}

.establishment-item:hover {
  background-color: var(--color-surface);
}

.map-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  background-color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   18. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.marquee-track {
  animation: marquee 35s linear infinite;
  display: inline-block;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   19. UTILITY CLASSES
   -------------------------------------------------------------------------- */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

.rounded { border-radius: 0.5rem; }
.rounded-lg { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.shadow-md { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.shadow-lg { box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 16px 48px rgba(0,0,0,0.12); }

.no-underline { text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* --------------------------------------------------------------------------
   20. RESPONSIVE
   -------------------------------------------------------------------------- */

/* sm — 640px */
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-split {
    flex-direction: row;
    align-items: center;
  }

  .hero-split > * {
    flex: 1;
  }

  .sm-show { display: block; }
  .sm-hide { display: none; }
}

/* md — 768px */
@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .mobile-menu {
    display: none;
  }

  .section {
    padding: 5rem 0;
  }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-horizontal {
    flex-direction: row;
  }

  .card-horizontal .card-image {
    width: 280px;
    flex-shrink: 0;
    aspect-ratio: auto;
    height: 100%;
  }

  .md-show { display: block; }
  .md-hide { display: none; }
}

/* lg — 1024px */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 6rem 0;
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .lg-show { display: block; }
  .lg-hide { display: none; }
}

/* xl — 1280px */
@media (min-width: 1280px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  h1 { font-size: 3.5rem; }
}

/* --------------------------------------------------------------------------
   21. AUTHOR CARD
   -------------------------------------------------------------------------- */
.author-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background-color: var(--color-surface);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--color-border);
}

.author-photo {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-family: var(--font-heading), system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-bio {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   22. SCROLLBAR & SELECTION
   -------------------------------------------------------------------------- */
::selection {
  background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
  color: var(--color-text);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) var(--color-bg);
}

/* --------------------------------------------------------------------------
   PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .pagination,
  .breadcrumb,
  .mobile-menu {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .article-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
