/* =============================================
   DailyFunTrivia — Premium Design System
   Light + Dark Mode
   ============================================= */

/* ---- THEME VARIABLES ---- */
:root {
  --bg:          #ffffff;
  --surface:     #f8fafc;
  --surface-2:   #f1f5f9;
  --text-1:      #0f172a;
  --text-2:      #334155;
  --muted:       #64748b;
  --border:      #e2e8f0;
  --brand:       #f59e0b;
  --brand-dark:  #d97706;
  --brand-light: #fef9ec;
  --brand-glow:  rgba(245,158,11,.18);
  --navy:        #1e293b;
  --navy-deep:   #0f172a;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.06), 0 2px 10px rgba(0,0,0,.04);
  --shadow:      0 4px 20px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-brand:0 8px 24px rgba(245,158,11,.25);
  --transition:  .22s cubic-bezier(.4,0,.2,1);
  --nav-h:       68px;
}

[data-theme="dark"] {
  --bg:          #0f172a;
  --surface:     #1e293b;
  --surface-2:   #253348;
  --text-1:      #f1f5f9;
  --text-2:      #cbd5e1;
  --muted:       #94a3b8;
  --border:      #2d3f55;
  --brand-light: rgba(245,158,11,.10);
  --brand-glow:  rgba(245,158,11,.22);
  --navy:        #0c1829;
  --navy-deep:   #060d1a;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.25), 0 2px 10px rgba(0,0,0,.2);
  --shadow:      0 4px 20px rgba(0,0,0,.35), 0 1px 4px rgba(0,0,0,.2);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
  --shadow-brand:0 8px 24px rgba(245,158,11,.20);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- CONTAINER ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .nav {
  background: rgba(15,23,42,.88);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img {
  width: 38px;
  height: 38px;
  transition: transform var(--transition);
}
.logo:hover .logo-img { transform: rotate(-8deg) scale(1.08); }
.logo-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -.4px;
  line-height: 1;
  transition: color var(--transition);
}
.logo-text span { color: var(--brand); }

.nav-search {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.nav-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.nav-search input {
  flex: 1;
  padding: 9px 14px;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-1);
}
.nav-search input::placeholder { color: var(--muted); }
.nav-search button {
  background: var(--brand);
  border: none;
  color: #fff;
  padding: 9px 15px;
  font-size: 15px;
  transition: background var(--transition);
}
.nav-search button:hover { background: var(--brand-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover { background: var(--surface); color: var(--text-1); }

.btn-subscribe {
  background: var(--brand) !important;
  color: #fff !important;
  border-radius: 50px !important;
  padding: 7px 18px !important;
  box-shadow: var(--shadow-brand);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition) !important;
}
.btn-subscribe:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 30px rgba(245,158,11,.35) !important;
  background: var(--brand-dark) !important;
}

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  transform: rotate(20deg) scale(1.1);
}

/* ---- CATEGORY BAR ---- */
.cat-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  transition: background var(--transition);
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  max-width: 1180px;
  margin: 0 auto;
  white-space: nowrap;
}
.cat-pill {
  padding: 5px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
}

/* ---- HERO ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 64px;
  background: #ffffff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,158,11,.14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 70%, rgba(245,158,11,.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(59,130,246,.04) 0%, transparent 55%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(245,158,11,.12) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .5;
}
.hero .container { position: relative; z-index: 1; text-align: center; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.28);
  border-radius: 50px;
  padding: 5px 16px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(30px, 5.5vw, 58px);
  font-weight: 900;
  color: var(--text-1);
  line-height: 1.12;
  letter-spacing: -.5px;
  margin-bottom: 18px;
}
.hero h1 span {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-stats {
  display: inline-flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 6px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 30px;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.hero-stat strong {
  font-size: 24px;
  font-weight: 900;
  color: var(--brand-dark);
  line-height: 1;
}
.hero-stat span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Dark mode hero */
[data-theme="dark"] .hero { background: var(--navy-deep); }
[data-theme="dark"] .hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,158,11,.28) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 70%, rgba(245,158,11,.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(59,130,246,.08) 0%, transparent 55%);
}
[data-theme="dark"] .hero-eyebrow { color: var(--brand); }
[data-theme="dark"] .hero h1 { color: #fff; }
[data-theme="dark"] .hero h1 span {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .hero p { color: rgba(255,255,255,.62); }
[data-theme="dark"] .hero-stats {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .hero-stat { border-right-color: rgba(255,255,255,.1); }
[data-theme="dark"] .hero-stat strong { color: var(--brand); }
[data-theme="dark"] .hero-stat span { color: rgba(255,255,255,.48); }

/* ---- SECTIONS ---- */
.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 900;
  letter-spacing: -.3px;
  color: var(--text-1);
}
.section-head a {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  transition: opacity var(--transition);
}
.section-head a:hover { opacity: .75; }

/* ---- CATEGORY CARDS ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.cat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 14px 18px;
  text-align: center;
  border-bottom-width: 4px;
  transition: all var(--transition);
  display: block;
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
  background: var(--bg);
}
.cat-card-icon { font-size: 36px; margin-bottom: 10px; line-height: 1; }
.cat-card h3 { font-size: 13px; font-weight: 800; color: var(--text-1); margin-bottom: 4px; transition: color var(--transition); }
.cat-card p { font-size: 11px; color: var(--muted); font-weight: 600; }
.cat-card:hover h3 { color: var(--brand); }

/* ---- FACT CARDS ---- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.fact-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.fact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245,158,11,.35);
}
.fact-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}
.fact-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
}
.fact-card:hover .fact-card-img::after { opacity: 1; }
.fact-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.fact-card:hover .fact-card-img img { transform: scale(1.06); }
.fact-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.fact-card-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.fact-card-title a { color: inherit; }
.fact-card-title a:hover { color: var(--brand); }
.fact-card:hover .fact-card-title { color: var(--brand); }
.fact-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.fact-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* ---- TRENDING LABEL ---- */
.trending-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: .3px;
  border: 1px solid #fcd34d;
}
[data-theme="dark"] .trending-tag {
  background: rgba(245,158,11,.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,.3);
}

/* ---- CAT BADGE ---- */
.cat-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .2px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
  border-color: var(--brand);
}
.btn-brand:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245,158,11,.35);
}
.btn-outline {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

/* ---- FACT PAGE ---- */
.fact-page { padding: 40px 0 60px; }
.page-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 32px;
  align-items: start;
}
.fact-content-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: background var(--transition), border-color var(--transition);
}
.fact-top-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.fact-title {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.4px;
  color: var(--text-1);
  margin-bottom: 20px;
}
.fact-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.fact-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.fact-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-2);
}
.fact-body p { margin-bottom: 16px; }
.fact-body h2, .fact-body h3 { color: var(--text-1); margin: 24px 0 10px; font-weight: 800; }
.fact-body ul, .fact-body ol { padding-left: 22px; margin-bottom: 16px; }
.fact-body li { margin-bottom: 6px; }
.fact-body strong { color: var(--text-1); font-weight: 700; }
.fact-body blockquote {
  border-left: 4px solid var(--brand);
  padding: 14px 18px;
  background: var(--brand-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  color: var(--text-2);
  font-style: italic;
}
.fact-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.fun-rating { display: flex; align-items: center; gap: 2px; }
.fun-rating span { font-size: 17px; }

/* ---- SIDEBAR ---- */
aside { position: sticky; top: calc(var(--nav-h) + 16px); }
.sidebar-widget {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  transition: background var(--transition), border-color var(--transition);
}
.widget-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}

/* ---- RELATED GRID ---- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.related-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
  display: block;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(245,158,11,.3);
}
.related-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.related-card:hover .related-card-img img { transform: scale(1.07); }
.related-card-body { padding: 10px; }
.related-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.related-card:hover .related-card-title { color: var(--brand); }

/* ---- SUBSCRIBE SECTION ---- */
.subscribe-outer {
  background: linear-gradient(135deg, #fef9ec 0%, #fffbf0 50%, #fef3c7 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
  border-top: 1.5px solid #fde68a;
}
.subscribe-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 90% at 50% 50%, rgba(245,158,11,.1) 0%, transparent 70%);
}
.subscribe-inner {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.subscribe-inner h3 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  color: var(--navy-deep);
  margin-bottom: 10px;
}
.subscribe-inner > p {
  color: #78716c;
  font-size: 15px;
  margin-bottom: 28px;
}
.subscribe-form {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border: 1.5px solid #fcd34d;
  border-radius: 50px;
  overflow: hidden;
  padding: 5px 5px 5px 20px;
  box-shadow: 0 4px 16px rgba(245,158,11,.15);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.subscribe-form:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245,158,11,.2);
}
.subscribe-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  min-width: 0;
}
.subscribe-form input::placeholder { color: #a8a29e; }
.subscribe-form button {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--transition);
}
.subscribe-form button:hover { background: var(--brand-dark); }

/* Dark mode subscribe */
[data-theme="dark"] .subscribe-outer {
  background: var(--navy-deep);
  border-top-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .subscribe-outer::before {
  background: radial-gradient(ellipse 70% 90% at 50% 50%, rgba(245,158,11,.14) 0%, transparent 70%);
}
[data-theme="dark"] .subscribe-inner h3 { color: #fff; }
[data-theme="dark"] .subscribe-inner > p { color: rgba(255,255,255,.58); }
[data-theme="dark"] .subscribe-form {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  box-shadow: none;
}
[data-theme="dark"] .subscribe-form input { color: #fff; }
[data-theme="dark"] .subscribe-form input::placeholder { color: rgba(255,255,255,.4); }

/* ---- FOOTER ---- */
.footer {
  background: var(--surface-2);
  color: var(--text-2);
  padding: 48px 0 0;
  border-top: 1.5px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-1);
  margin-bottom: 12px;
}
.footer-brand span { color: var(--brand); }
.footer-desc { font-size: 13px; line-height: 1.7; max-width: 280px; color: var(--muted); }
.footer-col h4 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 9px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1.5px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  gap: 12px;
  flex-wrap: wrap;
}

/* Dark mode footer */
[data-theme="dark"] .footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.55);
  border-top-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .footer-brand { color: #fff; }
[data-theme="dark"] .footer-desc { color: rgba(255,255,255,.45); }
[data-theme="dark"] .footer-col h4 { color: rgba(255,255,255,.4); }
[data-theme="dark"] .footer-col a { color: rgba(255,255,255,.5); }
[data-theme="dark"] .footer-col a:hover { color: var(--brand); }
[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(255,255,255,.07);
  color: rgba(255,255,255,.3);
}

/* ---- EMPTY STATE ---- */
.empty { text-align: center; padding: 64px 20px; }
.empty-icon { font-size: 52px; margin-bottom: 16px; }
.empty p { font-size: 16px; font-weight: 600; color: var(--muted); }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: all var(--transition);
  padding: 0 12px;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.pagination span.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .page-layout { grid-template-columns: 1fr; }
  aside { position: static; }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .hero { padding: 56px 0 44px; }
  .hero-stats { flex-wrap: wrap; gap: 0; }
  .hero-stat { padding: 10px 18px; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .fact-content-wrap { padding: 22px; }
  .nav-links a:not(.btn-subscribe) { display: none; }
}
@media (max-width: 520px) {
  .fact-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .nav-search { display: none; }
  .subscribe-form { flex-direction: column; border-radius: 14px; padding: 12px; gap: 8px; }
  .subscribe-form button { border-radius: 8px; text-align: center; }
}

/* ---- CATEGORY / SEARCH PAGE HERO ---- */
.cat-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 52px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1.5px solid var(--border);
  transition: background var(--transition);
}
.cat-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 0% 60%, rgba(245,158,11,.1) 0%, transparent 60%);
}
.cat-hero .container { position: relative; }

[data-theme="dark"] .cat-hero {
  background: var(--navy-deep);
  border-bottom-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .cat-hero::before {
  background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(245,158,11,.18) 0%, transparent 60%);
}

/* search hero banner */
.search-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 48px 0 40px;
  border-bottom: 1.5px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .search-hero {
  background: var(--navy-deep);
  border-bottom-color: rgba(255,255,255,.06);
}

/* ---- SIDEBAR DARK WIDGET FIX ---- */
.sidebar-dark-widget {
  background: var(--navy);
  border-color: rgba(255,255,255,.08) !important;
}
[data-theme="light"] .sidebar-dark-widget {
  background: var(--navy);
}
