/* ==========================================================================
   The Gun Safety Report — Main Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ── VARIABLES ── */
:root {
  --navy: #1a2332;
  --navy-light: #243044;
  --accent: #c4453c;
  --accent-hover: #a83830;
  --text: #2d3748;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --bg: #fafbfc;
  --white: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --tag-bg: #fef2f2;
  --tag-text: #991b1b;
  --tag-legislation-bg: #eff6ff;
  --tag-legislation-text: #1e40af;
  --tag-education-bg: #f0fdf4;
  --tag-education-text: #166534;
  --tag-community-bg: #fdf4ff;
  --tag-community-text: #6b21a8;
  --tag-research-bg: #fefce8;
  --tag-research-text: #854d0e;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.top-bar {
  background: var(--navy);
  color: white;
  font-size: 0.75rem;
  padding: 6px 0;
  letter-spacing: 0.02em;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: #94a3b8; text-decoration: none; }
.top-bar a:hover { color: white; }
.top-bar .date { color: #94a3b8; }
.top-bar-links { display: flex; gap: 16px; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  background: var(--white);
  border-bottom: 3px solid var(--accent);
  padding: 24px 0;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy);
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-text h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.logo-text .tagline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  font-weight: 500;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.search-box input {
  border: none;
  padding: 10px 14px;
  font-size: 0.875rem;
  background: transparent;
  width: 260px;
  outline: none;
  font-family: inherit;
}
.search-box button {
  background: var(--accent);
  border: none;
  color: white;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}
.search-box button:hover { background: var(--accent-hover); }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  background: var(--navy-light);
  padding: 0;
}
.nav .container {
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 12px 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover,
.nav a.active {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   BREAKING NEWS TICKER
   ========================================================================== */
.ticker {
  background: var(--accent);
  color: white;
  padding: 10px 0;
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
}
.ticker .container {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ticker-label {
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-track {
  overflow: hidden;
  flex: 1;
}
.ticker-text {
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  display: inline-block;
}
@keyframes ticker-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   AD BANNER PLACEHOLDER
   ========================================================================== */
#ad-banner {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  padding: 32px 0;
}
.main-layout.full-width {
  grid-template-columns: 1fr;
}

/* ==========================================================================
   HERO / FEATURED
   ========================================================================== */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.featured-main {
  grid-column: 1 / -1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2332 0%, #2d4059 100%);
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  text-decoration: none;
  color: white;
}
.featured-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 60%);
  z-index: 1;
}
.featured-main .featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-main .featured-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  opacity: 0.15;
}
.featured-img-placeholder.cat-legislation {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 30%, #1a3050 70%, #0f2440 100%);
}
.featured-img-placeholder.cat-safe-storage {
  background: linear-gradient(135deg, #4a1e1e 0%, #6f3030 30%, #502020 70%, #401515 100%);
}
.featured-img-placeholder.cat-education {
  background: linear-gradient(135deg, #1e4a2e 0%, #2d6f40 30%, #1a5030 70%, #0f4020 100%);
}
.featured-img-placeholder.cat-community {
  background: linear-gradient(135deg, #3a1e5f 0%, #4a2d6f 30%, #301a50 70%, #200f40 100%);
}
.featured-img-placeholder.cat-data-research {
  background: linear-gradient(135deg, #4a3a1e 0%, #6f5a2d 30%, #504a1a 70%, #403a0f 100%);
}
.featured-main .content {
  position: relative;
  z-index: 2;
  padding: 32px;
  color: white;
}
.featured-main .tag {
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 12px;
}
.featured-main h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  line-height: 1.25;
  margin-bottom: 10px;
  font-weight: 700;
}
.featured-main p {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
  max-width: 600px;
}
.featured-main .meta {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 12px;
}

/* ==========================================================================
   ARTICLE CARDS
   ========================================================================== */
.article-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.article-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.card-image {
  height: 180px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card image fallback colors per category */
.card-image-fallback.card-image-legislation {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}
.card-image-fallback.card-image-safe-storage {
  background: linear-gradient(135deg, #fecaca, #fca5a5);
}
.card-image-fallback.card-image-education {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}
.card-image-fallback.card-image-community {
  background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
}
.card-image-fallback.card-image-data-research {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.card-body { padding: 18px; }
.card-body .tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}
.tag-legislation { background: var(--tag-legislation-bg); color: var(--tag-legislation-text); }
.tag-safety { background: var(--tag-bg); color: var(--tag-text); }
.tag-education { background: var(--tag-education-bg); color: var(--tag-education-text); }
.tag-community { background: var(--tag-community-bg); color: var(--tag-community-text); }
.tag-research { background: var(--tag-research-bg); color: var(--tag-research-text); }

.card-body h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--navy);
}
.card-body p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 10px;
}
.card-body .meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta .dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ==========================================================================
   LATEST ARTICLES LIST
   ========================================================================== */
.section-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-title .see-all {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.section-title .see-all:hover { text-decoration: underline; }

.article-list-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.article-list-item:hover {
  background: var(--border-light);
  margin: 0 -8px;
  padding: 16px 8px;
  border-radius: 8px;
}
.article-list-item .thumb {
  width: 100px;
  min-width: 100px;
  height: 72px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  overflow: hidden;
}
.article-list-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-list-item h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--navy);
}
.article-list-item .meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-widget {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 20px;
}
.sidebar-widget h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  color: var(--navy);
}

/* Trending */
.trending-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover h4 { color: var(--accent); }
.trending-number {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
  min-width: 28px;
}
.trending-item h4 {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 3px;
  transition: color 0.15s;
}
.trending-item .meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.stat-box .number {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.stat-box .label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Newsletter */
.newsletter-widget {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  border-color: transparent;
}
.newsletter-widget h3 {
  color: white;
  border-bottom-color: var(--accent);
}
.newsletter-widget p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 14px;
  line-height: 1.5;
}
.newsletter-widget input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.85rem;
  margin-bottom: 10px;
  font-family: inherit;
  outline: none;
}
.newsletter-widget input::placeholder { color: #64748b; }
.newsletter-widget button {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.newsletter-widget button:hover { background: var(--accent-hover); }

/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-cloud a {
  font-size: 0.72rem;
  padding: 5px 10px;
  background: var(--bg);
  border-radius: 5px;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
}
.tags-cloud a:hover { background: var(--accent); color: white; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 48px 0 24px;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer p { font-size: 0.82rem; line-height: 1.6; }
.footer a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.82rem;
  display: block;
  padding: 3px 0;
}
.footer a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.footer-bottom .ai-badge {
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #64748b;
}

/* ==========================================================================
   ARTICLE PAGE
   ========================================================================== */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .separator { color: var(--text-muted); }

.article-header { margin-bottom: 32px; }
.article-header .tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 16px;
}
.article-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-meta .dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
}

/* Article OG image */
.article-og-image {
  margin-bottom: 32px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-og-image a { display: block; }
.article-og-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}
.article-og-image-fallback {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 3rem;
}
.article-og-image-fallback.cat-legislation {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
}
.article-og-image-fallback.cat-safe-storage {
  background: linear-gradient(135deg, #4a1e1e 0%, #6f3030 100%);
}
.article-og-image-fallback.cat-education {
  background: linear-gradient(135deg, #1e4a2e 0%, #2d6f40 100%);
}
.article-og-image-fallback.cat-community {
  background: linear-gradient(135deg, #3a1e5f 0%, #4a2d6f 100%);
}
.article-og-image-fallback.cat-data-research {
  background: linear-gradient(135deg, #4a3a1e 0%, #6f5a2d 100%);
}

/* Article body typography */
.article-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}
.article-body p {
  margin-bottom: 1.5em;
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 0.75em;
  color: var(--navy);
  line-height: 1.3;
}
.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  color: var(--navy);
  line-height: 1.35;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1.5em 1.5em;
}
.article-body li {
  margin-bottom: 0.5em;
}
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: var(--border-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-light);
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
}
.article-body a:hover { color: var(--accent-hover); }
.article-body strong { font-weight: 700; }

/* Sources section (rendered in body HTML) */
.article-body .sources,
.article-body .article-sources {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 2px solid var(--border);
}
.article-body .sources h2,
.article-body .sources h3,
.article-body .article-sources h2,
.article-body .article-sources h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.75em;
  color: var(--navy);
}
.article-body .sources ul,
.article-body .article-sources ul {
  list-style: none;
  margin-left: 0;
  padding: 0;
}
.article-body .sources li,
.article-body .article-sources li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}
.article-body .sources li:last-child,
.article-body .article-sources li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */
.category-header {
  margin-bottom: 32px;
}
.category-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* ==========================================================================
   SEARCH PAGE
   ========================================================================== */
.search-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}
.search-page-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 32px;
}
.search-page-input {
  display: flex;
  margin-bottom: 40px;
}
.search-page-input input {
  flex: 1;
  padding: 16px 20px;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 10px 0 0 10px;
  outline: none;
  font-family: inherit;
  background: var(--white);
  transition: border-color 0.2s;
}
.search-page-input input:focus { border-color: var(--accent); }
.search-page-input button {
  padding: 16px 32px;
  background: var(--accent);
  color: white;
  border: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.search-page-input button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.search-results-count {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.search-result-card .card-image { height: 140px; }

.search-loading {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.search-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.search-no-results {
  text-align: center;
  padding: 48px 0;
  color: var(--text-light);
}
.search-no-results h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.search-no-results p { font-size: 0.9rem; }

.search-error {
  text-align: center;
  padding: 32px;
  color: var(--accent);
  background: var(--tag-bg);
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ==========================================================================
   STATIC PAGES (About, Privacy)
   ========================================================================== */
.static-page {
  max-width: 800px;
}
.static-page h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
}
.static-page h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2em 0 0.75em;
}
.static-page p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25em;
  color: var(--text);
}
.static-page ul {
  margin: 0 0 1.5em 1.5em;
  color: var(--text);
  line-height: 1.7;
}
.static-page li { margin-bottom: 0.4em; }
.static-page a {
  color: var(--accent);
  text-decoration: underline;
}
.static-page a:hover { color: var(--accent-hover); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .main-layout { grid-template-columns: 1fr 280px; gap: 24px; }
  .category-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .search-box input { width: 160px; }
  .article-header h1 { font-size: 1.6rem; }
  .search-results-grid { grid-template-columns: 1fr; }
  .search-page-input { flex-direction: column; }
  .search-page-input input { border-radius: 10px 10px 0 0; }
  .search-page-input button { border-radius: 0 0 10px 10px; }
  .header .container { flex-direction: column; gap: 16px; }
  .category-grid { grid-template-columns: 1fr; }
  .featured-main { min-height: 280px; }
  .featured-main h2 { font-size: 1.35rem; }
}

/* ── SHARE BUTTONS ── */
.article-share {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.share-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 12px;
}
.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--white);
  transition: opacity 0.15s;
}
.share-btn:hover { opacity: 0.85; }
.share-twitter { background: #1d9bf0; }
.share-facebook { background: #1877f2; }
.share-reddit { background: #ff4500; }
.share-email { background: var(--navy-light); }

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav a { padding: 10px 14px; font-size: 0.72rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .top-bar .container { flex-direction: column; gap: 4px; text-align: center; }
  .share-btn { padding: 8px 14px; font-size: 0.78rem; }
}
