/* ============================================================
   SearchEngineInfo — Main Stylesheet
   Design System: Clean, editorial, Core Web Vitals-first
   ============================================================ */

/* ── 1. Design Tokens ────────────────────────────────────── */
:root {
  --clr-primary:     #0a3d7c;   /* deep authority blue */
  --clr-primary-lt:  #1557b0;
  --clr-accent:      #e63946;   /* red: breaking/featured */
  --clr-accent-lt:   #ff6b74;
  --clr-text:        #1a1a2e;
  --clr-text-muted:  #64748b;
  --clr-bg:          #ffffff;
  --clr-bg-alt:      #f8fafc;
  --clr-border:      #e2e8f0;
  --clr-card-hover:  #f1f5f9;

  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

  --container: 1200px;
  --content-w: 760px;
  --gap: 24px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── 3. Layout Utilities ─────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.grid-main { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }

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

.text-accent { color: var(--clr-accent); }
.text-muted  { color: var(--clr-text-muted); }
.text-primary { color: var(--clr-primary); }

/* ── 4. Breaking News Ticker ─────────────────────────────── */
.breaking-bar {
  background: var(--clr-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  overflow: hidden;
  padding: 8px 0;
}
.breaking-bar .container { display: flex; align-items: center; gap: 14px; }
.breaking-label {
  white-space: nowrap;
  background: rgba(0,0,0,.2);
  padding: 2px 10px;
  border-radius: 3px;
  flex-shrink: 0;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
}
.breaking-ticker {
  overflow: hidden;
  flex: 1;
}
.breaking-ticker ul {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.breaking-ticker li { margin-right: 60px; }
.breaking-ticker a { color: #fff; opacity: .9; }
.breaking-ticker a:hover { opacity: 1; text-decoration: underline; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── 5. Header ───────────────────────────────────────────── */
.site-header {
  background: var(--clr-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo .logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
}
.site-logo .logo-text span { color: var(--clr-accent-lt); }
.logo-tagline {
  font-size: 10px;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

/* Primary Nav */
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}
.primary-nav a {
  display: block;
  padding: 8px 12px;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: rgba(255,255,255,.12);
  color: #fff;
}
/* WP auto-generates class as .menu-item-object-category + category slug class */
.primary-nav .menu-ai-search > a,
.primary-nav .cat-item-6 > a,
.primary-nav li.menu-item:has(a[href*="ai-search"]) > a { color: #fbbf24; }
.primary-nav .menu-ai-search > a:hover,
.primary-nav li.menu-item:has(a[href*="ai-search"]) > a:hover { background: rgba(251,191,36,.15); color: #fde68a; }

/* Dropdown */
.primary-nav li { position: relative; }
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px 0;
  z-index: 200;
  border-top: 3px solid var(--clr-accent);
}
.primary-nav li:hover > .sub-menu { display: block; }
.primary-nav .sub-menu a {
  color: var(--clr-text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 0;
}
.primary-nav .sub-menu a:hover { background: var(--clr-bg-alt); color: var(--clr-primary); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-search-btn {
  color: rgba(255,255,255,.8);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.header-search-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.header-search-btn svg { width: 18px; height: 18px; }

.btn-newsletter {
  background: var(--clr-accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background .15s, transform .1s;
  letter-spacing: .3px;
}
.btn-newsletter:hover { background: var(--clr-accent-lt); transform: translateY(-1px); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  color: #fff;
  padding: 8px;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* Search Overlay */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,61,124,.96);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.search-overlay.active { display: flex; }
.search-overlay-inner { width: min(600px, 90vw); }
.search-overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  opacity: .7;
  padding: 8px;
}
.search-overlay-close:hover { opacity: 1; }
.search-form-big {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-form-big input {
  flex: 1;
  padding: 18px 20px;
  font-size: 18px;
  border: none;
  outline: none;
}
.search-form-big button {
  background: var(--clr-accent);
  color: #fff;
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 700;
}
.search-form-big button:hover { background: var(--clr-accent-lt); }

/* ── 6. Hero Section ─────────────────────────────────────── */
.hero-section { background: var(--clr-bg-alt); padding: 32px 0 40px; }

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.hero-main .post-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
.hero-main .post-card-img { aspect-ratio: 16/9; overflow: hidden; }
.hero-main .post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hero-main .post-card:hover .post-card-img img { transform: scale(1.03); }
.hero-main .post-card-body { padding: 24px; }
.hero-main .post-title { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 10px 0 12px; letter-spacing: -.3px; }
.hero-main .post-title a:hover { color: var(--clr-primary); }
.hero-main .post-excerpt { color: var(--clr-text-muted); font-size: 15px; line-height: 1.65; }

.hero-sidebar { display: flex; flex-direction: column; gap: 16px; }
.hero-sidebar .post-card-sm {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.hero-sidebar .post-card-sm:hover { box-shadow: var(--shadow-md); }
.hero-sidebar .post-card-sm-img { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; }
.hero-sidebar .post-card-sm-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-sidebar .post-title-sm { font-size: 14px; font-weight: 700; line-height: 1.35; margin: 6px 0 4px; }
.hero-sidebar .post-title-sm a:hover { color: var(--clr-primary); }

/* ── 7. Post Meta (shared) ───────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--clr-text-muted);
}
.post-meta a { color: var(--clr-text-muted); }
.post-meta a:hover { color: var(--clr-primary); }
.post-meta .sep { opacity: .4; }

.cat-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--clr-accent);
  background: #fff0f1;
  padding: 3px 8px;
  border-radius: 3px;
}
.cat-label.cat-seo     { color: #0a3d7c; background: #e8f0fe; }
.cat-label.cat-ppc     { color: #065f46; background: #d1fae5; }
.cat-label.cat-content { color: #92400e; background: #fef3c7; }
.cat-label.cat-social  { color: #5b21b6; background: #ede9fe; }
.cat-label.cat-ai      { color: #7c3aed; background: #f5f3ff; }
.cat-label.cat-news    { color: #9f1239; background: #fff1f2; }
.cat-label.cat-tools   { color: #0369a1; background: #e0f2fe; }
.cat-label.cat-guides  { color: #166534; background: #dcfce7; }

.reading-time { display: inline-flex; align-items: center; gap: 4px; }
.reading-time::before { content: ''; display: inline-block; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") no-repeat center/contain; }

/* ── 8. Section Headers ──────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--clr-border);
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--clr-text);
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--clr-accent);
  border-radius: 2px;
}
.section-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-view-all:hover { text-decoration: underline; }
.section-view-all::after { content: '→'; }

/* ── 9. Post Cards ───────────────────────────────────────── */
.post-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-card-img { overflow: hidden; aspect-ratio: 16/9; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 18px; }
.post-card .post-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 8px 0 10px;
}
.post-card .post-title a:hover { color: var(--clr-primary); }
.post-card .post-excerpt {
  font-size: 13.5px;
  color: var(--clr-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

/* List-style card (for news feed) */
.post-list-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--clr-border);
}
.post-list-item:last-child { border-bottom: none; }
.post-list-img { width: 120px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; }
.post-list-img img { width: 100%; height: 100%; object-fit: cover; }
.post-list-body { flex: 1; }
.post-list-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin: 6px 0 8px; }
.post-list-title a:hover { color: var(--clr-primary); }

/* ── 10. Homepage Sections ───────────────────────────────── */
.home-section { padding: 40px 0; }
.home-section:nth-child(even) { background: var(--clr-bg-alt); }

/* ── 11. Sidebar ─────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.widget {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.widget-title {
  background: var(--clr-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 18px;
}
.widget-body { padding: 16px 18px; }

/* Newsletter widget */
.newsletter-widget { background: var(--clr-primary); color: #fff; border: none; }
.newsletter-widget .widget-inner { padding: 24px; }
.newsletter-widget h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.newsletter-widget p { font-size: 13px; opacity: .85; margin-bottom: 16px; line-height: 1.5; }
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  margin-bottom: 10px;
  outline: none;
}
.newsletter-form button {
  width: 100%;
  background: var(--clr-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px;
  border-radius: var(--radius-sm);
  transition: background .15s;
  letter-spacing: .3px;
}
.newsletter-form button:hover { background: var(--clr-accent-lt); }

/* Popular posts widget */
.popular-list { display: flex; flex-direction: column; }
.popular-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--clr-border);
}
.popular-item:last-child { border-bottom: none; }
.popular-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--clr-border);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}
.popular-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.popular-title a:hover { color: var(--clr-primary); }

/* ── 12. Single Post ─────────────────────────────────────── */
.single-layout { padding: 40px 0 60px; }

.article-header { margin-bottom: 28px; }
.article-cat-date { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.article-title {
  font-family: var(--font-sans);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 24px;
}
.author-chip { display: flex; align-items: center; gap: 10px; }
.author-chip img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.author-chip-name { font-size: 14px; font-weight: 700; display: block; line-height: 1.2; }
.author-chip-name a:hover { color: var(--clr-primary); }
.author-chip-role { font-size: 12px; color: var(--clr-text-muted); }

.share-bar { display: flex; align-items: center; gap: 8px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  transition: opacity .15s;
}
.share-btn:hover { opacity: .85; }
.share-btn.tw { background: #1da1f2; color: #fff; }
.share-btn.li { background: #0077b5; color: #fff; }
.share-btn.fb { background: #1877f2; color: #fff; }
.share-label { font-size: 12px; font-weight: 700; color: var(--clr-text-muted); margin-right: 4px; }

/* Featured image */
.article-featured-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}
.article-featured-img img { width: 100%; height: auto; }
.img-caption {
  font-size: 12px;
  color: var(--clr-text-muted);
  text-align: center;
  padding: 8px 0;
  font-style: italic;
}

/* Article body typography */
.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: #1e293b;
}
.article-content h2 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin: 40px 0 16px;
  color: var(--clr-text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--clr-border);
}
.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article-content h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 10px;
}
.article-content p { margin-bottom: 20px; }
.article-content ul,
.article-content ol {
  margin: 0 0 20px 24px;
  list-style: revert;
}
.article-content li { margin-bottom: 8px; }
.article-content a { color: var(--clr-primary); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--clr-accent); }
.article-content blockquote {
  border-left: 4px solid var(--clr-accent);
  background: var(--clr-bg-alt);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 18px;
  font-style: italic;
  color: var(--clr-primary);
}
.article-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  font-family: 'Courier New', monospace;
}
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
}
.article-content pre code { background: none; color: inherit; }
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.article-content th {
  background: var(--clr-primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--clr-border);
}
.article-content tr:nth-child(even) td { background: var(--clr-bg-alt); }

/* Key takeaway box */
.key-takeaway {
  background: linear-gradient(135deg, #e8f0fe 0%, #f0fdf4 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
}
.key-takeaway-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--clr-primary);
  margin-bottom: 8px;
}

/* Tags */
.article-tags { margin: 32px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.article-tags-label { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); margin-right: 4px; }
.tag-pill {
  display: inline-block;
  padding: 5px 12px;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--clr-text-muted);
  transition: all .15s;
}
.tag-pill:hover { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

/* Author box */
.author-box {
  display: flex;
  gap: 24px;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
}
.author-box-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-box-name { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.author-box-name a:hover { color: var(--clr-primary); }
.author-box-role { font-size: 12px; color: var(--clr-text-muted); text-transform: uppercase; letter-spacing: .7px; font-weight: 600; margin-bottom: 10px; }
.author-box-bio { font-size: 14px; color: var(--clr-text-muted); line-height: 1.65; margin-bottom: 12px; }
.author-social { display: flex; gap: 8px; }
.author-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--clr-border);
  border-radius: 50%;
  color: var(--clr-text-muted);
  font-size: 14px;
  transition: all .15s;
}
.author-social a:hover { background: var(--clr-primary); color: #fff; }

/* Related posts */
.related-posts { margin: 40px 0; }
.related-posts h3 { font-size: 20px; font-weight: 800; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--clr-border); }

/* ── 13. Archive / Category Page ─────────────────────────── */
.archive-header {
  background: linear-gradient(135deg, var(--clr-primary) 0%, #1557b0 100%);
  color: #fff;
  padding: 48px 0 40px;
  margin-bottom: 40px;
}
.archive-cat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: .7; margin-bottom: 8px; }
.archive-title { font-size: clamp(28px, 5vw, 44px); font-weight: 900; margin-bottom: 12px; letter-spacing: -.5px; }
.archive-description { font-size: 16px; opacity: .85; max-width: 600px; line-height: 1.65; }
.archive-count { font-size: 13px; opacity: .6; margin-top: 10px; }

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }

/* Subcategory pills */
.subcat-nav { margin-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.subcat-pill {
  padding: 7px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text-muted);
  transition: all .15s;
}
.subcat-pill:hover,
.subcat-pill.active { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

/* ── 14. Pagination ──────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--clr-border);
  color: var(--clr-text-muted);
  transition: all .15s;
}
.pagination a:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.pagination .current { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }
.pagination .prev, .pagination .next { width: auto; padding: 0 14px; gap: 4px; }

/* ── 15. Breadcrumbs ─────────────────────────────────────── */
.breadcrumbs {
  font-size: 12.5px;
  color: var(--clr-text-muted);
  padding: 12px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumbs a { color: var(--clr-text-muted); }
.breadcrumbs a:hover { color: var(--clr-primary); }
.breadcrumbs .sep { opacity: .4; }
.breadcrumbs .current { color: var(--clr-text); font-weight: 600; }

/* ── 16. Glossary Page ───────────────────────────────────── */
.glossary-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--clr-bg-alt);
  border-radius: var(--radius-md);
}
.alpha-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 1.5px solid var(--clr-border);
  color: var(--clr-text-muted);
  transition: all .15s;
}
.alpha-btn:hover,
.alpha-btn.active { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

.glossary-letter-section { margin-bottom: 40px; }
.glossary-letter { font-size: 32px; font-weight: 900; color: var(--clr-primary); border-bottom: 2px solid var(--clr-border); padding-bottom: 10px; margin-bottom: 16px; }
.glossary-terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.glossary-term-card {
  padding: 14px 16px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.glossary-term-card:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: var(--clr-bg-alt); }

/* ── 17. Footer ──────────────────────────────────────────── */
.site-footer { background: #0d1b2a; color: rgba(255,255,255,.75); margin-top: 60px; }

.footer-main { padding: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .logo-text { font-size: 22px; font-weight: 800; color: #fff; }
.footer-brand .logo-text span { color: var(--clr-accent-lt); }
.footer-tagline { font-size: 13px; opacity: .6; margin: 8px 0 18px; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  font-size: 15px;
  color: rgba(255,255,255,.7);
  transition: all .15s;
}
.footer-social a:hover { background: var(--clr-accent); color: #fff; }

.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #fff; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 13.5px; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-col ul a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; gap: 20px; }

/* ── 18. Page Templates ──────────────────────────────────── */
/* About page */
.about-hero {
  background: linear-gradient(135deg, var(--clr-primary) 0%, #1a56db 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.about-hero h1 { font-size: 40px; font-weight: 900; margin-bottom: 16px; }
.about-hero p { font-size: 18px; opacity: .85; max-width: 600px; margin: 0 auto; line-height: 1.7; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 40px 0; }
.team-card {
  text-align: center;
  padding: 24px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
}
.team-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.team-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.team-card p { font-size: 12px; color: var(--clr-text-muted); }

/* 404 page */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 120px; font-weight: 900; color: var(--clr-border); line-height: 1; }
.error-page h1 { font-size: 28px; font-weight: 800; margin: 16px 0 12px; }
.error-page p { color: var(--clr-text-muted); margin-bottom: 28px; }
.btn-primary {
  display: inline-block;
  background: var(--clr-primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  transition: background .15s;
}
.btn-primary:hover { background: var(--clr-primary-lt); }

/* ── 19. Search Results ──────────────────────────────────── */
.search-header { background: var(--clr-bg-alt); padding: 32px 0; margin-bottom: 32px; }
.search-header h1 { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.search-form-inline { display: flex; max-width: 500px; }
.search-form-inline input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--clr-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 15px;
  outline: none;
}
.search-form-inline input:focus { border-color: var(--clr-primary); }
.search-form-inline button {
  background: var(--clr-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 700;
  transition: background .15s;
}
.search-form-inline button:hover { background: var(--clr-primary-lt); }

/* ── 20. Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .glossary-terms { grid-template-columns: 1fr 1fr; }

  .primary-nav { display: none; }
  .primary-nav.open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: var(--clr-primary); padding: 10px 20px; box-shadow: var(--shadow-md); }
  .primary-nav.open ul { flex-direction: column; gap: 0; }
  .primary-nav.open .sub-menu { display: none; position: static; box-shadow: none; border: none; background: rgba(255,255,255,.1); border-radius: 0; }
  .primary-nav.open li.open > .sub-menu { display: block; }
  .menu-toggle { display: block; }

  .header-actions .btn-newsletter { display: none; }

  .author-box { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  :root { --gap: 16px; }
  .glossary-terms { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── 21. Utility Classes ─────────────────────────────────── */
.visually-hidden { position: absolute !important; clip: rect(1px,1px,1px,1px); padding: 0 !important; border: 0 !important; height: 1px !important; width: 1px !important; overflow: hidden; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }

/* ── 22. Loading / Skeleton ──────────────────────────────── */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
.skeleton { background: var(--clr-border); border-radius: var(--radius-sm); animation: skeleton-pulse 1.5s ease-in-out infinite; }

/* ── 23. Progress Bar ────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--clr-accent);
  z-index: 1000;
  transition: width .1s linear;
}
