/**
 * XBot CMS — Public Blog Stylesheet (Foxiz Magazine Style)
 * Themes: light (default), dark, magazine
 */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,700;0,900;1,700&display=swap');

/* ── CSS Variables — Light Theme (default) ────────────────────────────────── */
:root {
  --bb: #ffffff;
  --bb2: #f8f8f8;
  --bb3: #f0f0f0;
  --bt: #0d0d0d;
  --bt2: #3d3d3d;
  --bt3: #888888;
  --border: #e8e8e8;
  --accent: #e91e8c;
  --accent2: #7c3aed;
  --success-c: #16a34a;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --cat-business: #1d4ed8;
  --cat-tech: #0891b2;
  --cat-marketing: #e91e8c;
  --cat-entrepreneur: #d97706;
  --cat-finance: #16a34a;
}

/* Dark theme */
body.theme-dark {
  --bb: #0f1117;
  --bb2: #161b22;
  --bb3: #21262d;
  --bt: #f0f6fc;
  --bt2: #8b949e;
  --bt3: #6e7681;
  --border: #30363d;
  --shadow: 0 2px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.6);
}

/* Magazine theme */
body.theme-magazine {
  --bb: #fafaf8;
  --bb2: #f5f0e8;
  --bb3: #ede8de;
  --bt: #1c1007;
  --bt2: #4a3728;
  --bt3: #8a7060;
  --border: #d8cfc0;
  --accent: #c0392b;
  --accent2: #2c3e50;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bb);
  color: var(--bt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

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

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--bb);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--bt);
  flex-shrink: 0;
}
.site-logo i {
  color: var(--accent);
  font-size: 22px;
}
.site-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
}
.site-nav a {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--bt2);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
  background: var(--bb2);
  color: var(--bt);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.social-icons { display: flex; gap: 14px; }
.social-icons a {
  color: var(--bt3);
  font-size: 15px;
  transition: color .2s;
}
.social-icons a:hover { color: var(--bt); }
.search-btn {
  background: var(--bb2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--bt3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s;
}
.search-btn:hover { background: var(--bb3); color: var(--bt); }

/* ── Hamburger (mobile) ────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--bt);
  cursor: pointer;
  padding: 4px 8px;
}

/* ── Breaking News Ticker ──────────────────────────────────────────────────── */
.news-ticker {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
}
.ticker-label {
  background: rgba(0,0,0,.2);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-items {
  display: flex;
  gap: 60px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.ticker-items a { color: #fff; opacity: .9; }
.ticker-items a:hover { opacity: 1; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Hero / Featured Post ─────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 60%, #0d1a1a 100%);
  color: #fff;
  padding: 60px 20px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.18;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-title a { color: #fff; }
.hero-title a:hover { color: rgba(255,255,255,.85); }
.hero-excerpt {
  font-size: 15px;
  color: rgba(255,255,255,.72);
  margin-bottom: 24px;
  line-height: 1.65;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.hero-meta i { margin-right: 4px; }
.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.btn-read:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233,30,140,.4); color: #fff; }
.hero-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-cat-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

/* ── Category Filter Bar ──────────────────────────────────────────────────── */
.cat-filter-bar {
  background: var(--bb);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-filter-bar::-webkit-scrollbar { display: none; }
.cat-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 12px 0;
}
.cat-pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid var(--border);
  color: var(--bt2);
  transition: all .2s;
  background: var(--bb);
}
.cat-pill:hover, .cat-pill.active {
  background: var(--bt);
  border-color: var(--bt);
  color: var(--bb);
}

/* ── Section Headers ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bt);
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--bt);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}
.section-title .bar {
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}
.view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--bt3);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all .2s;
}
.view-all:hover { border-color: var(--bt); color: var(--bt); }

/* ── Top Stories ──────────────────────────────────────────────────────────── */
.top-stories { padding: 50px 20px; background: var(--bb2); }
.top-stories-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.story-list { display: flex; flex-direction: column; gap: 20px; }
.story-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.story-item:last-child { border-bottom: none; padding-bottom: 0; }
.story-arrow {
  color: var(--accent);
  font-size: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}
.story-item-text {}
.story-item-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--bt);
}
.story-item-title a:hover { color: var(--accent); }
.story-item-meta {
  font-size: 11px;
  color: var(--bt3);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Article Card ─────────────────────────────────────────────────────────── */
.article-card {
  background: var(--bb);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bb3);
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.article-card:hover .card-image img { transform: scale(1.04); }
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--bt3);
}
.card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  color: #fff;
}
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--bt);
}
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  font-size: 13px;
  color: var(--bt2);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--bt3);
  margin-top: auto;
  flex-wrap: wrap;
}
.card-meta i { margin-right: 3px; }
.card-author-name { font-weight: 600; color: var(--bt2); }

/* ── Main Content Grid ────────────────────────────────────────────────────── */
.main-section { padding: 50px 20px; }
.articles-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Category Section ─────────────────────────────────────────────────────── */
.cat-section { padding: 50px 20px; background: var(--bb2); }
.cat-section:nth-child(even) { background: var(--bb); }
.cat-section-inner { max-width: 1200px; margin: 0 auto; }
.cat-featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.cat-featured-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bb3);
}
.cat-featured-main img { width: 100%; height: 100%; object-fit: cover; }
.cat-featured-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 40px 20px 20px;
  color: #fff;
}
.cat-featured-overlay .cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.cat-featured-overlay h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.cat-featured-overlay h3 a { color: #fff; }
.cat-featured-overlay h3 a:hover { color: rgba(255,255,255,.8); }
.cat-featured-overlay .meta { font-size: 11px; color: rgba(255,255,255,.65); }
.cat-side-list { display: flex; flex-direction: column; gap: 16px; }
.cat-side-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cat-side-item:last-child { border-bottom: none; padding-bottom: 0; }
.cat-side-thumb {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--bb3);
}
.cat-side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-side-text {}
.cat-side-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
  color: var(--bt);
}
.cat-side-title a:hover { color: var(--accent); }
.cat-side-meta { font-size: 11px; color: var(--bt3); }

/* ── Newsletter ───────────────────────────────────────────────────────────── */
.newsletter-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 100%);
  color: #fff;
  text-align: center;
}
.newsletter-inner { max-width: 560px; margin: 0 auto; }
.newsletter-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 16px;
}
.newsletter-title { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.newsletter-sub { color: rgba(255,255,255,.65); font-size: 14px; margin-bottom: 28px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  background: rgba(255,255,255,.1);
  color: #fff;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { background: rgba(255,255,255,.15); }
.btn-subscribe {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s;
}
.btn-subscribe:hover { transform: translateY(-1px); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: #0d0d1a;
  color: rgba(255,255,255,.75);
  padding: 50px 20px 30px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}
.footer-logo i { color: var(--accent); }
.footer-about { font-size: 13px; line-height: 1.7; opacity: .65; margin-bottom: 20px; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255,255,255,.7);
  transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #fff;
  margin-bottom: 16px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13px; opacity: .6; transition: opacity .2s; }
.footer-links a:hover { opacity: 1; }
.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: .45;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Category Colors ──────────────────────────────────────────────────────── */
.cat-business-strategy   { background: var(--cat-business); }
.cat-business-technology { background: var(--cat-tech); }
.cat-digital-marketing   { background: var(--cat-marketing); }
.cat-entrepreneurship    { background: var(--cat-entrepreneur); }
.cat-finance-investment  { background: var(--cat-finance); }
.cat-default             { background: var(--accent); }

/* ── Single Post / Article ────────────────────────────────────────────────── */
.post-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
}
.post-main {}
.post-sidebar {}
.post-hero-img {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/7;
  margin-bottom: 32px;
  background: var(--bb3);
}
.post-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--bt3);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--bt3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb i { font-size: 10px; }
.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 5px 12px;
  border-radius: 4px;
  color: #fff;
  margin-bottom: 16px;
}
.post-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--bt);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--bt3);
  margin-bottom: 28px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.post-meta-row i { margin-right: 4px; color: var(--accent); }
.post-author-link { font-weight: 600; color: var(--bt2); }
.post-author-link:hover { color: var(--accent); }
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--bt2);
}
.post-content h2 { font-size: 24px; font-weight: 800; color: var(--bt); margin: 32px 0 12px; }
.post-content h3 { font-size: 20px; font-weight: 700; color: var(--bt); margin: 24px 0 10px; }
.post-content p { margin-bottom: 18px; }
.post-content img { border-radius: 8px; margin: 24px 0; }
.post-content ul, .post-content ol { margin: 16px 0 16px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  background: var(--bb2);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--bt2);
  margin: 24px 0;
}
.post-content a { color: var(--accent); }
.post-content strong { color: var(--bt); font-weight: 700; }
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.tag-chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--bt2);
  transition: all .2s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ── Post Reactions ───────────────────────────────────────────────────────── */
.reactions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 28px 0;
  padding: 20px;
  background: var(--bb2);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.reactions-label { font-size: 13px; font-weight: 600; color: var(--bt2); margin-right: 6px; }
.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: var(--bb);
  cursor: pointer;
  font-size: 13px;
  color: var(--bt2);
  transition: all .2s;
}
.reaction-btn:hover { border-color: var(--accent); color: var(--accent); }
.reaction-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.reaction-btn i { font-size: 14px; }

/* ── Author Bio ───────────────────────────────────────────────────────────── */
.author-bio {
  background: var(--bb2);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.author-name { font-size: 16px; font-weight: 700; color: var(--bt); margin-bottom: 2px; }
.author-role { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.author-desc { font-size: 13px; color: var(--bt2); line-height: 1.6; }
.author-socials { display: flex; gap: 10px; margin-top: 10px; }
.author-socials a { color: var(--bt3); font-size: 14px; }
.author-socials a:hover { color: var(--accent); }

/* ── Related Posts ────────────────────────────────────────────────────────── */
.related-posts { padding: 40px 20px; background: var(--bb2); }
.related-inner { max-width: 1200px; margin: 0 auto; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar-widget {
  background: var(--bb2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--bt);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title i { color: var(--accent); }
.widget-post {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.widget-post:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.widget-post-thumb {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bb3);
}
.widget-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-post-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--bt); }
.widget-post-title a:hover { color: var(--accent); }
.widget-post-date { font-size: 11px; color: var(--bt3); margin-top: 4px; }
.cat-list { list-style: none; }
.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cat-list li:last-child { border-bottom: none; }
.cat-list a { font-weight: 500; color: var(--bt2); }
.cat-list a:hover { color: var(--accent); }
.cat-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--bb3);
  color: var(--bt3);
}

/* ── Comments ─────────────────────────────────────────────────────────────── */
.comments-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 40px;
}
.comments-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--bt);
  margin-bottom: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.comment-form { background: var(--bb2); border-radius: var(--radius); padding: 24px; }
.comment-form h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--bt); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.comment-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bb);
  color: var(--bt);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
}
.comment-input:focus { outline: none; border-color: var(--accent); }
.comment-input::placeholder { color: var(--bt3); }
textarea.comment-input { min-height: 110px; resize: vertical; }
.btn-comment {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity .2s;
}
.btn-comment:hover { opacity: .9; }

/* ── Search Overlay ───────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-box {
  background: var(--bb);
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.search-input-wrap:focus-within { border-color: var(--accent); }
.search-input-wrap i { color: var(--bt3); font-size: 16px; }
.search-input-wrap input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--bt);
  outline: none;
}
.search-input-wrap input::placeholder { color: var(--bt3); }
.search-close { font-size: 12px; color: var(--bt3); cursor: pointer; }
#search-results { max-height: 400px; overflow-y: auto; }
.search-result {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.search-result:last-child { border-bottom: none; }
.search-result-thumb {
  width: 52px; height: 40px;
  border-radius: 5px;
  background: var(--bb3);
  overflow: hidden;
  flex-shrink: 0;
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-result-title { font-size: 14px; font-weight: 600; color: var(--bt); }
.search-result-meta { font-size: 11px; color: var(--bt3); margin-top: 3px; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
  flex-wrap: wrap;
}
.page-link {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bt2);
  transition: all .2s;
}
.page-link:hover, .page-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Scroll to Top ────────────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--bt);
  color: var(--bb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s;
  border: none;
  font-size: 16px;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .top-stories-grid { grid-template-columns: 1fr 1fr; }
  .top-stories-grid .story-list { grid-column: span 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { display: none; }
  .articles-grid { grid-template-columns: 1fr; }
  .top-stories-grid { grid-template-columns: 1fr; }
  .cat-featured-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .newsletter-form { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-section { padding: 40px 16px; }
  .hero-title { font-size: 26px; }
  .header-inner { padding: 12px 16px; gap: 12px; }
  .footer-inner { display: none; }
}
