/*
Theme Name:   BetterBulletins Pro
Theme URI:    https://betterbulletins.com
Description:  Clean, fast, Google-policy compliant news & blog theme. Mobile-first, lightweight, SEO-optimized. Built for AdSense approval and quick Google indexing.
Author:       BetterBulletins
Version:      3.0.0
License:      GNU General Public License v2
Text Domain:  betterbulletins-pro
Tags:         blog, news, magazine, responsive, lightweight, seo, adsense
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand */
  --primary:     #1a56db;   /* Bold blue — trust, authority */
  --primary-dk:  #1e429f;   /* Darker blue */
  --primary-lt:  #e8f0fe;   /* Light blue bg */
  --accent:      #0ea5e9;   /* Sky blue accent */
  --dark:        #111827;   /* Near black */
  --dark-2:      #1f2937;   /* Footer dark */
  --text:        #374151;   /* Body text */
  --text-muted:  #6b7280;   /* Muted grey */
  --text-light:  #9ca3af;   /* Light grey */
  --border:      #e5e7eb;   /* Borders */
  --bg:          #ffffff;   /* White background */
  --bg-2:        #f9fafb;   /* Off white */
  --bg-3:        #f3f4f6;   /* Light grey bg */

  /* Category Colors */
  --cat-tech:      #1a56db;
  --cat-health:    #059669;
  --cat-celebrity: #dc2626;
  --cat-business:  #7c3aed;
  --cat-news:      #ea580c;
  --cat-travel:    #0891b2;

  /* Typography */
  --font-head:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Layout */
  --max-w:        1200px;
  --content-w:    720px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-full:  9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.06);

  /* Transition */
  --t: .2s ease;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary-dk); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }

/* Article content typography */
.entry-content { font-size: 1.0625rem; line-height: 1.8; color: var(--text); }
.entry-content h2 { margin: 2.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); font-size: 1.5rem; }
.entry-content h3 { margin: 2rem 0 .75rem; font-size: 1.25rem; }
.entry-content p  { margin-bottom: 1.5rem; }
.entry-content ul, .entry-content ol { padding-left: 1.75rem; margin-bottom: 1.5rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .5rem; }
.entry-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--primary-lt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.125rem;
  color: var(--dark-2);
}
.entry-content blockquote p { margin: 0; }
.entry-content strong { color: var(--dark); }
.entry-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: .9375rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.entry-content th { background: var(--dark); color: #fff; padding: .75rem 1rem; text-align: left; }
.entry-content td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.entry-content tr:last-child td { border: none; }
.entry-content tr:nth-child(even) td { background: var(--bg-2); }
.entry-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.entry-content code {
  background: var(--bg-3);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .875rem;
  font-family: 'Courier New', monospace;
}
.entry-content pre {
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 2rem 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-5); }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: var(--space-12) 0; }
.section-alt { background: var(--bg-2); }

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-6); }
.grid-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-10); align-items: start; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-6);
}
/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}
.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--dark); letter-spacing: -.02em; }
.logo-tagline { font-size: .7rem; color: var(--text-muted); display: block; }

/* Nav */
.site-nav { display: flex; align-items: center; gap: var(--space-1); }
.site-nav a {
  padding: var(--space-2) var(--space-3);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--t);
}
.site-nav a:hover, .site-nav .current-menu-item a { color: var(--primary); background: var(--primary-lt); }
.nav-categories-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: var(--space-2) var(--space-3);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--t);
}
.nav-categories-btn:hover { color: var(--primary); background: var(--primary-lt); }
.nav-categories-btn svg { width: 14px; height: 14px; transition: transform var(--t); }
.nav-categories-btn.open svg { transform: rotate(180deg); }

/* Nav right */
.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.search-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  transition: all var(--t);
}
.search-btn:hover { border-color: var(--primary); color: var(--primary); }
.dark-toggle {
  width: 44px; height: 24px;
  background: var(--bg-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--t);
}
.dark-toggle.on { background: var(--primary); border-color: var(--primary); }
.dark-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--t);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.dark-toggle.on::after { transform: translateX(20px); }

/* Mobile toggle */
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font-size: 1.2rem;
}

/* Search overlay */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  width: 100%;
  max-width: 580px;
  margin: 0 var(--space-5);
  box-shadow: var(--shadow-lg);
}
.search-box form { display: flex; gap: var(--space-3); }
.search-box input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t);
}
.search-box input:focus { border-color: var(--primary); }
.search-box button {
  padding: var(--space-3) var(--space-5);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9375rem;
}

/* ============================================================
   CATEGORY BADGE
   ============================================================ */
.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-lt);
}
.cat-badge.technology  { color: var(--cat-tech);      background: #eff6ff; }
.cat-badge.health      { color: var(--cat-health);    background: #ecfdf5; }
.cat-badge.celebrity-entertainment { color: var(--cat-celebrity); background: #fef2f2; }
.cat-badge.business-finance { color: var(--cat-business); background: #f5f3ff; }
.cat-badge.news-trending { color: var(--cat-news);    background: #fff7ed; }
.cat-badge.travel-lifestyle { color: var(--cat-travel); background: #ecfeff; }

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.bb-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
  padding: var(--space-16) 0;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.bb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.bb-hero-img {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 50%;
  object-fit: cover;
  opacity: .25;
}
.bb-hero-content { position: relative; z-index: 1; max-width: 560px; }
.bb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,.1);
  color: #93c5fd;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.bb-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: var(--space-5);
  font-weight: 800;
}
.bb-hero h1 span { color: #60a5fa; }
.bb-hero p { color: #cbd5e1; font-size: 1.125rem; margin-bottom: var(--space-6); max-width: 480px; }
.bb-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--t);
}
.bb-hero-btn:hover { background: var(--primary-dk); color: #fff; }

/* ============================================================
   ARTICLE CARD
   ============================================================ */
.article-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-3);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.article-card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.card-date { font-size: .8125rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.card-read { font-size: .8125rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: var(--space-3);
  flex: 1;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); }
.card-excerpt {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: .8125rem;
}
.read-more {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.read-more:hover { gap: 8px; }

/* Horizontal card */
.article-card.horizontal { flex-direction: row; }
.article-card.horizontal .card-img { width: 110px; flex-shrink: 0; aspect-ratio: auto; border-radius: 0; }
.article-card.horizontal .card-body { padding: var(--space-4); }
.article-card.horizontal .card-title { font-size: .9375rem; }
.article-card.horizontal .card-excerpt { -webkit-line-clamp: 2; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.section-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--dark);
}
.section-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { gap: 8px; }

/* ============================================================
   CATEGORIES GRID (Homepage)
   ============================================================ */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
}
.cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  transition: all var(--t);
  cursor: pointer;
}
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card a { color: inherit; display: block; }
.cat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto var(--space-3);
}
.cat-card h3 { font-size: .9375rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.cat-card p { font-size: .8rem; color: var(--text-muted); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.bb-newsletter {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-10);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  align-items: center;
}
.newsletter-icon {
  width: 64px; height: 64px;
  background: var(--primary-lt);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.newsletter-body h3 { font-size: 1.25rem; margin-bottom: 4px; }
.newsletter-body p { color: var(--text-muted); font-size: .9375rem; margin-bottom: var(--space-4); }
.newsletter-form { display: flex; gap: var(--space-3); }
.newsletter-form input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t);
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button {
  padding: var(--space-3) var(--space-6);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9375rem;
  white-space: nowrap;
  transition: background var(--t);
}
.newsletter-form button:hover { background: var(--primary-dk); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.widget-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border);
}
.sidebar-search input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t);
}
.sidebar-search input:focus { border-color: var(--primary); }
.sidebar-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: .9375rem;
  color: var(--text);
  font-weight: 500;
}
.sidebar-cats a:last-child { border: none; }
.sidebar-cats a:hover { color: var(--primary); }
.sidebar-cats span { color: var(--text-muted); font-size: .8125rem; }
.sidebar-posts .sidebar-post { display: flex; gap: var(--space-3); margin-bottom: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.sidebar-posts .sidebar-post:last-child { border: none; margin: 0; padding: 0; }
.sidebar-post-img { width: 68px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-3); }
.sidebar-post-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-post-title { font-size: .875rem; font-weight: 600; color: var(--dark); line-height: 1.4; margin-bottom: 4px; }
.sidebar-post-title a { color: inherit; }
.sidebar-post-title a:hover { color: var(--primary); }
.sidebar-post-date { font-size: .75rem; color: var(--text-muted); }
.bb-ad-slot {
  background: var(--bg-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  color: var(--text-light);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header { padding: var(--space-10) 0 var(--space-6); background: var(--bg); border-bottom: 1px solid var(--border); }
.post-header .container-sm { max-width: 780px; }
.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.post-breadcrumbs a { color: var(--text-muted); }
.post-breadcrumbs a:hover { color: var(--primary); }
.post-breadcrumbs span { color: var(--text-light); }
.post-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: var(--space-4) 0 var(--space-5); line-height: 1.2; }
.post-header .post-excerpt { font-size: 1.125rem; color: var(--text-muted); line-height: 1.6; margin-bottom: var(--space-5); }
.post-meta { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.post-author { display: flex; align-items: center; gap: var(--space-3); }
.author-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .875rem; overflow: hidden; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: .9375rem; font-weight: 600; color: var(--dark); }
.post-meta-item { display: flex; align-items: center; gap: 5px; font-size: .875rem; color: var(--text-muted); }
.post-featured-img { margin-bottom: var(--space-8); border-radius: var(--radius-lg); overflow: hidden; max-height: 480px; }
.post-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* Author box */
.author-box {
  display: flex;
  gap: var(--space-5);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-10);
}
.author-box-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; font-weight: 700; }
.author-box-info h4 { font-size: 1rem; margin-bottom: 4px; }
.author-box-info .author-label { font-size: .75rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-2); display: block; }
.author-box-info p { font-size: .9375rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.author-socials { display: flex; gap: var(--space-2); }
.author-socials a { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .8rem; transition: all var(--t); }
.author-socials a:hover { border-color: var(--primary); color: var(--primary); }

/* Share buttons */
.share-buttons { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-8) 0; }
.share-label { font-size: .9375rem; font-weight: 600; color: var(--text); }
.share-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  transition: opacity var(--t);
  color: #fff;
}
.share-btn:hover { opacity: .85; color: #fff; }
.share-btn.twitter  { background: #000; }
.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy     { background: var(--bg-3); color: var(--text); }

/* Tags */
.post-tags { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-6) 0; }
.post-tags .tag-label { font-size: .875rem; font-weight: 600; color: var(--text-muted); }
.post-tags a { padding: 4px 12px; background: var(--bg-3); border-radius: var(--radius-full); font-size: .8125rem; color: var(--text); border: 1px solid var(--border); transition: all var(--t); }
.post-tags a:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   READING PROGRESS
   ============================================================ */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--primary);
  width: 0%;
  z-index: 9999;
  transition: width .1s linear;
}

/* ============================================================
   TOC
   ============================================================ */
.bb-toc {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
}
.bb-toc-title { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: var(--space-3); }
.bb-toc ol { list-style: decimal; padding-left: 1.2rem; }
.bb-toc li { margin-bottom: var(--space-2); font-size: .9375rem; }
.bb-toc a { color: var(--primary); }
.bb-toc a:hover { text-decoration: underline; }

/* ============================================================
   STATIC PAGES
   ============================================================ */
.page-hero { background: linear-gradient(135deg, #0f172a, #1e3a5f); padding: var(--space-16) 0; text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: var(--space-4); }
.page-hero p { color: #cbd5e1; font-size: 1.125rem; max-width: 540px; margin: 0 auto; }
.page-body { padding: var(--space-12) 0; }
.page-content-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-12);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
#bb-cookie {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark);
  color: #fff;
  z-index: 9990;
  padding: var(--space-4) var(--space-6);
  display: none;
}
#bb-cookie.show { display: block; }
.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: space-between;
}
.cookie-text { font-size: .9375rem; color: #cbd5e1; }
.cookie-text a { color: #60a5fa; }
.cookie-btns { display: flex; gap: var(--space-3); flex-shrink: 0; }
.cookie-accept {
  padding: var(--space-2) var(--space-5);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
}
.cookie-decline {
  padding: var(--space-2) var(--space-5);
  background: none;
  color: #9ca3af;
  border: 1px solid #374151;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  cursor: pointer;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 { text-align: center; padding: var(--space-16) var(--space-5); min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.page-404 .error-code { font-size: 7rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: var(--space-4); }
.page-404 h1 { margin-bottom: var(--space-4); }
.page-404 p { color: var(--text-muted); margin-bottom: var(--space-6); }
.btn-primary { display: inline-flex; align-items: center; gap: var(--space-2); background: var(--primary); color: #fff; padding: var(--space-3) var(--space-6); border-radius: var(--radius-sm); font-weight: 700; transition: background var(--t); }
.btn-primary:hover { background: var(--primary-dk); color: #fff; }

/* ============================================================
   PAGINATION
   ============================================================ */
.bb-pagination { display: flex; justify-content: center; gap: var(--space-2); margin: var(--space-12) 0; flex-wrap: wrap; }
.bb-pagination a, .bb-pagination span {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--t);
}
.bb-pagination a:hover, .bb-pagination .current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--dark-2); color: #9ca3af; padding: var(--space-16) 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: var(--space-8); margin-bottom: var(--space-10); }
.footer-brand .site-logo { margin-bottom: var(--space-4); }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: .9375rem; line-height: 1.7; }
.footer-socials { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer-socials a {
  width: 36px; height: 36px;
  border: 1px solid #374151;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af;
  font-size: .875rem;
  transition: all var(--t);
}
.footer-socials a:hover { border-color: var(--primary); color: var(--primary); }
.footer-col h4 { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #e5e7eb; margin-bottom: var(--space-5); }
.footer-col ul li { margin-bottom: var(--space-3); }
.footer-col ul a { color: #9ca3af; font-size: .9375rem; transition: color var(--t); }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #374151;
  padding: var(--space-5) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: .875rem;
}
.footer-bottom-links { display: flex; gap: var(--space-5); }
.footer-bottom-links a { color: #9ca3af; }
.footer-bottom-links a:hover { color: #fff; }
.made-with { display: flex; align-items: center; gap: 5px; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
  box-shadow: var(--shadow);
  z-index: 50;
}
#back-top.show { opacity: 1; pointer-events: all; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.skip-link { position: absolute; top: -100%; left: var(--space-4); background: var(--primary); color: #fff; padding: var(--space-3) var(--space-5); border-radius: var(--radius); font-weight: 600; z-index: 10000; }
.skip-link:focus { top: var(--space-3); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   DARK MODE
   ============================================================ */
body.dark-mode {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --bg-3: #334155;
  --text: #cbd5e1;
  --text-muted: #94a3b8;
  --dark: #f1f5f9;
  --border: #334155;
}
body.dark-mode .site-header { background: #0f172a; }
body.dark-mode .article-card { background: #1e293b; }
body.dark-mode .sidebar-widget { background: #1e293b; }
body.dark-mode .entry-content blockquote { background: #1e293b; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav, .header-actions .dark-toggle { display: none; }
  .menu-toggle { display: flex; }
  .bb-hero h1 { font-size: 1.875rem; }
  .bb-newsletter { grid-template-columns: 1fr; padding: var(--space-6); }
  .newsletter-icon { display: none; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-card.horizontal { flex-direction: column; }
  .article-card.horizontal .card-img { width: 100%; }
  .page-content-box { padding: var(--space-6) var(--space-5); }
  .post-meta { gap: var(--space-3); }
  .share-buttons { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .sidebar, #bb-cookie, #reading-progress, #back-top, .share-buttons, .bb-newsletter { display: none !important; }
  body { color: #000; font-size: 12pt; }
  .entry-content { max-width: 100%; }
}
