/* Bongo News — premium news theme, light/dark, gold accent */
:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface2: #eef1f8; --text: #101828;
  --muted: #667085; --border: #e4e7f0; --gold: #f59e0b; --gold2: #b45309;
  --gold-grad: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #d97706);
  --danger: #ef4444; --green: #16a34a; --blue: #2563eb;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 8px 24px -12px rgba(16,24,40,.15);
  --radius: 14px;
}
[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2c; --surface2: #182338; --text: #e8edf7;
  --muted: #94a3b8; --border: #24314a; --shadow: 0 1px 3px rgba(0,0,0,.5), 0 12px 28px -12px rgba(0,0,0,.6);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; transition: background .3s, color .3s; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.badge { display: inline-block; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; letter-spacing: .4px; text-transform: uppercase; }
.badge-sm { font-size: 10px; padding: 2px 8px; }
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; font-weight: 600; border-radius: 10px; padding: 10px 18px; font-size: 14px; transition: transform .15s, box-shadow .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold-grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(245,158,11,.55); }
.btn-ghost { background: transparent; color: var(--gold2); border: 1.5px solid var(--gold); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-green { background: var(--green); color: #fff; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 90; box-shadow: var(--shadow); }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-grad); color: #fff; font-size: 22px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(245,158,11,.6); }
.brand-text strong { font-size: 20px; font-weight: 900; letter-spacing: -.3px; display: block; }
.brand-text small { font-size: 11px; color: var(--muted); display: block; }
.header-right { display: flex; align-items: center; gap: 10px; }
.search-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.search-btn svg { width: 19px; height: 19px; }
.search-bar { display: none; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 0; }
.search-bar.open { display: block; }
.search-bar form { display: flex; gap: 10px; }
.search-bar input, .search-form-lg input { flex: 1; padding: 11px 15px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface2); color: var(--text); font-size: 15px; outline: none; }
.search-bar input:focus, .search-form-lg input:focus { border-color: var(--gold); }
.main-nav { border-top: 1px solid var(--border); background: var(--surface); }
.nav-inner { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link { padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; border-bottom: 2.5px solid transparent; transition: color .15s, border-color .15s; }
.nav-link:hover { color: var(--gold2); border-bottom-color: var(--gold); }
.breaking-bar { background: linear-gradient(90deg, #1c1917, #292524 60%, #1c1917); color: #fef3c7; font-size: 13px; overflow: hidden; }
.breaking-inner { display: flex; align-items: center; gap: 14px; }
.breaking-label { background: var(--danger); color: #fff; font-weight: 800; font-size: 11px; padding: 5px 12px; border-radius: 6px; flex-shrink: 0; letter-spacing: .5px; }
.breaking-track { display: flex; gap: 34px; white-space: nowrap; animation: ticker 32s linear infinite; padding: 7px 0; }
.breaking-track a { color: #fef3c7; }
.breaking-track a:hover { color: var(--gold); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Layout */
.main-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding-top: 26px; padding-bottom: 40px; }
.home-content { padding-top: 26px; padding-bottom: 40px; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.widget-title { font-size: 15px; font-weight: 800; margin-bottom: 13px; padding-bottom: 10px; border-bottom: 2px solid var(--gold-grad); display: inline-block; }
.trend-list { list-style: none; counter-reset: tr; display: flex; flex-direction: column; gap: 12px; }
.trend-list li { display: flex; gap: 10px; align-items: flex-start; }
.trend-num { font-size: 20px; font-weight: 900; color: var(--gold); line-height: 1.2; min-width: 24px; }
.trend-list a { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: block; }
.trend-list a:hover { color: var(--gold2); }
.trend-list small { color: var(--muted); font-size: 11px; }
.mini-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.mini-list a { font-size: 13px; font-weight: 600; line-height: 1.35; display: block; }
.mini-list a:hover { color: var(--gold2); }
.mini-list small { color: var(--muted); font-size: 11px; }
.widget-newsletter p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.nl-form { display: flex; flex-direction: column; gap: 9px; }
.nl-form input, .contact-form input, .contact-form textarea, .comment-form input, .comment-form textarea { width: 100%; padding: 10px 13px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface2); color: var(--text); font-size: 14px; outline: none; font-family: inherit; }
.nl-form input:focus, .contact-form input:focus, .contact-form textarea:focus, .comment-form input:focus, .comment-form textarea:focus { border-color: var(--gold); }

/* Newsletter popup */
.nl-popup-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(10, 15, 28, .72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: nlFade .3s ease; }
.nl-popup-overlay[hidden] { display: none; }
.nl-popup { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); max-width: 420px; width: 100%; padding: 34px 28px 26px; text-align: center; animation: nlPop .35s cubic-bezier(.2,.9,.3,1.2); }
.nl-popup-icon { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px; background: var(--gold-grad); display: grid; place-items: center; font-size: 30px; box-shadow: 0 10px 26px -8px rgba(245,158,11,.7); }
.nl-popup h3 { font-size: 22px; font-weight: 900; letter-spacing: -.3px; margin-bottom: 8px; }
.nl-popup p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.nl-popup-form { display: flex; flex-direction: column; gap: 10px; }
.nl-popup-form input { width: 100%; padding: 12px 15px; border-radius: 11px; border: 1.5px solid var(--border); background: var(--surface2); color: var(--text); font-size: 14.5px; outline: none; font-family: inherit; text-align: center; }
.nl-popup-form input:focus { border-color: var(--gold); }
.nl-popup-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface2); color: var(--muted); font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.nl-popup-close:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.nl-popup-msg { font-size: 14px; font-weight: 700; padding: 10px 14px; border-radius: 10px; background: #dcfce7; color: #166534; margin-bottom: 0; }
.nl-popup-msg.err { background: #fee2e2; color: #991b1b; }
.nl-popup-note { display: block; margin-top: 14px; font-size: 11.5px; color: var(--muted); }
@keyframes nlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nlPop { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* v8: newsletter popup hidden safety (same display:flex override guard) */
.nl-popup-overlay[hidden] { display: none !important; }

/* Hero */
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 26px; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px; display: block; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .6s ease; }
.hero-main:hover img { transform: scale(1.04); }
.hero-overlay { position: absolute; inset: auto 0 0 0; padding: 60px 26px 22px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.82)); color: #fff; }
.hero-overlay h1 { font-size: 26px; font-weight: 900; line-height: 1.25; margin: 9px 0 7px; letter-spacing: -.3px; }
.hero-overlay p { font-size: 14px; color: #e2e8f0; margin-bottom: 8px; }
.hero-overlay small { font-size: 12px; color: #cbd5e1; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-item { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.hero-item:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(16,24,40,.25); }
.hero-item img { width: 110px; height: 84px; object-fit: cover; border-radius: 9px; flex-shrink: 0; }
.hero-item h3 { font-size: 13.5px; font-weight: 700; line-height: 1.35; margin: 4px 0 3px; }
.hero-item small { font-size: 11px; color: var(--muted); }

/* Sections */
.cat-section { margin-bottom: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.section-head h2 { font-size: 20px; font-weight: 900; letter-spacing: -.3px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(16,24,40,.28); }
.post-thumb { aspect-ratio: 16/10; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-thumb img { transform: scale(1.06); }
.post-card .badge { align-self: flex-start; margin: 11px 12px 0; }
.post-card h3 { font-size: 14.5px; font-weight: 700; line-height: 1.4; padding: 8px 12px 0; }
.post-card small { font-size: 11.5px; color: var(--muted); padding: 6px 12px 13px; }

/* List layout (category/search) */
.list-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }
.archive-page { padding-top: 26px; padding-bottom: 40px; }
.archive-head { margin-bottom: 20px; }
.archive-head h1 { font-size: 26px; font-weight: 900; letter-spacing: -.4px; }
.archive-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-row { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.post-row:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(16,24,40,.25); }
.post-row img { width: 210px; height: 140px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.post-row-body h2 { font-size: 17px; font-weight: 800; line-height: 1.35; margin: 6px 0 5px; }
.post-row-body h2:hover { color: var(--gold2); }
.post-row-body p { font-size: 13.5px; color: var(--muted); }
.post-row-body small { font-size: 12px; color: var(--muted); display: block; margin-top: 6px; }
.result-count { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.empty-state { text-align: center; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* Article */
.article-page { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding-top: 26px; padding-bottom: 20px; }
.article-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 13px; }
.breadcrumb a:hover { color: var(--gold2); }
.article-title { font-size: 30px; font-weight: 900; line-height: 1.25; letter-spacing: -.5px; margin-bottom: 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.article-hero { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.article-body { font-size: 16.5px; line-height: 1.85; color: var(--text); }
.article-body p { margin-bottom: 17px; }
.article-body h2, .article-body h3 { margin: 22px 0 10px; }
.article-body img { border-radius: 10px; margin: 14px 0; }
.article-body figure { margin: 22px auto; text-align: center; }
.article-body figure img { display: block; width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.article-body figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; font-style: italic; line-height: 1.5; }
.article-body blockquote { border-left: 4px solid var(--gold); background: var(--surface2); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 18px 0; font-style: italic; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 17px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); font-size: 12px; padding: 5px 11px; border-radius: 99px; }
.tag:hover { color: var(--gold2); border-color: var(--gold); }
.share-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13px; }
.share-bar span { font-weight: 700; }
.share-bar a { background: var(--surface2); border: 1px solid var(--border); padding: 6px 13px; border-radius: 8px; font-weight: 600; }
.share-bar a:hover { border-color: var(--gold); color: var(--gold2); }
.share-bar a.share-wa { background: #25d366; border-color: #25d366; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.share-bar a.share-wa:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.wa-ico { width: 17px; height: 17px; flex-shrink: 0; }
.wa-float { position: fixed; right: 20px; bottom: 76px; z-index: 190; width: 52px; height: 52px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(37,211,102,.65); transition: transform .18s, box-shadow .18s; }
.wa-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 28px -6px rgba(37,211,102,.8); }
.wa-float .wa-ico { width: 27px; height: 27px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(37,211,102,.45); animation: waPulse 2.2s ease-out infinite; z-index: -1; }
@keyframes waPulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }
.comments { margin-top: 24px; }
.comments h3 { margin-bottom: 14px; }
.comment { background: var(--surface2); border-radius: 10px; padding: 12px 15px; margin-bottom: 10px; font-size: 14px; }
.comment small { color: var(--muted); }
.comment p { margin-top: 4px; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.related-section { padding-top: 8px; padding-bottom: 40px; }
.related-section .section-head { font-size: 20px; }

/* Ads */
.ad-slot { display: flex; justify-content: center; margin: 14px auto; background: var(--surface2); border: 1px dashed var(--border); border-radius: 8px; min-height: 0; align-items: center; overflow: hidden; }
.ad-header { min-height: 90px; }
.ad-sidebar { min-height: 250px; }
.ad-inarticle { margin: 22px 0; }
.ad-footer { min-height: 0; margin: 26px auto 0; }
.ad-sticky-bottom { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 120; display: flex; justify-content: center; align-items: center; padding: 6px; box-shadow: 0 -6px 20px rgba(0,0,0,.12); }
.ad-close { position: absolute; top: 4px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }

/* v8: extra placements */
.ad-home-top { margin: 20px auto; }
.ad-home-row { margin: 4px auto 18px; width: 100%; }
.ad-list-top { margin: 0 auto 18px; }
.ad-list-mid { margin: 8px auto 18px; }
.ad-list-bottom { margin: 20px auto 4px; }
.ad-related-ad { margin: 14px auto; }
.ad-inarticle-1, .ad-inarticle-2 { margin: 24px 0; }

/* v8: interstitial overlay (one-time per session, closable) */
.ad-interstitial-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(8,10,18,.72); display: flex; align-items: center; justify-content: center; padding: 18px; backdrop-filter: blur(3px); }
.ad-interstitial-overlay[hidden] { display: none !important; }
.ad-interstitial { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; max-width: 520px; width: 100%; padding: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.4); position: relative; }
.ad-interstitial-body { min-height: 120px; display: flex; align-items: center; justify-content: center; }
.ad-interstitial-close { position: absolute; top: -14px; right: -10px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; width: 34px; height: 34px; font-size: 13px; font-weight: 700; cursor: pointer; z-index: 2; box-shadow: var(--shadow); }

/* v8: search suggestions */
.search-suggest { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: 0 14px 34px rgba(0,0,0,.16); z-index: 60; overflow: hidden; }
.search-suggest a { display: flex; gap: 10px; padding: 10px 16px; align-items: center; border-bottom: 1px solid var(--border); font-size: 14px; }
.search-suggest a:last-child { border-bottom: 0; }
.search-suggest a:hover { background: var(--surface2); }
.search-suggest .sug-cat { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* v8: ad-blocker polite notice */
.adblock-notice { display: none; text-align: center; font-size: 13px; color: var(--muted); background: var(--surface2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 14px; margin: 10px auto; max-width: 720px; }
.adblock-notice.show { display: block; }
body.adblock-on .ad-slot { position: relative; }
body.adblock-on .ad-slot::after { content: 'Ad'; position: absolute; top: 6px; right: 8px; font-size: 10px; letter-spacing: 1px; color: var(--muted); opacity: .5; }

/* v8: mobile sticky bottom ad (show after scroll) */
.ad-sticky-bottom { transform: translateY(110%); transition: transform .35s ease; }
.ad-sticky-bottom.show { transform: translateY(0); }
@media (min-width: 769px) { .ad-sticky-bottom { display: none; } }

/* Static pages */
.static-page { max-width: 860px; margin: 0 auto; padding: 36px 20px 50px; }
.static-page h1 { font-size: 30px; font-weight: 900; margin-bottom: 18px; letter-spacing: -.5px; }
.static-page p { margin-bottom: 14px; font-size: 15.5px; }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.about-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.about-card h3 { font-size: 15px; margin-bottom: 7px; }
.about-card p { font-size: 13.5px; color: var(--muted); margin: 0; }
.contact-form { display: flex; flex-direction: column; gap: 13px; max-width: 560px; }
.contact-form label { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 30px; }
[data-theme="dark"] .site-footer { background: #0a0f1c; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 40px 20px 24px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col p { font-size: 13.5px; line-height: 1.7; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13.5px; color: #cbd5e1; }
.footer-col a:hover { color: var(--gold); }
.social-links { display: flex; gap: 9px; margin-bottom: 10px; }
.social-links a { width: 36px; height: 36px; border-radius: 9px; background: #1e293b; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.social-links a:hover { background: var(--gold); color: #111; }
.footer-contact { font-size: 13px; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 14px 0; font-size: 13px; color: #94a3b8; text-align: center; }
.footer-bottom a { color: #cbd5e1; }

/* Theme toggle */
.theme-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 200; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--gold); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.theme-toggle svg { width: 21px; height: 21px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ===== v4: Featured carousel ===== */
.featured-carousel { position: relative; margin: 18px 0 26px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 21/7; min-height: 260px; }
.featured-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; display: block; }
.featured-slide.active { opacity: 1; visibility: visible; position: relative; }
.featured-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-slide .featured-overlay { position: absolute; inset: auto 0 0 0; padding: 22px 26px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.82)); color: #fff; }
.featured-overlay .badge { display: inline-block; margin-bottom: 8px; }
.featured-overlay h2 { font-size: clamp(17px, 2.4vw, 28px); font-weight: 800; line-height: 1.25; margin-bottom: 4px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.featured-overlay small { opacity: .85; font-size: 12.5px; }
.carousel-dots { position: absolute; right: 18px; bottom: 16px; display: flex; gap: 7px; z-index: 5; }
.car-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.car-dot.active { background: #fbbf24; transform: scale(1.25); }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.car-arrow:hover { background: rgba(0,0,0,.7); }
.car-prev { left: 14px; }
.car-next { right: 14px; }
@media (max-width: 860px) {
  .featured-carousel { aspect-ratio: auto; min-height: 340px; }
}
@media (max-width: 560px) {
  .featured-carousel { min-height: 280px; }
  .featured-overlay { padding: 14px 16px; }
  .featured-overlay h2 { font-size: 17px; }
  .car-arrow { width: 30px; height: 30px; font-size: 17px; }
}

/* ===== v4: Pagination ===== */
.pagination { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 26px 0 10px; }
.page-info { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ===== v4: Ad slots ===== */
.ad-slot { margin: 14px 0; text-align: center; min-height: 0; overflow: hidden; }
.ad-header { margin: 10px 0 4px; }
.ad-sidebar { margin: 0 0 18px; }
.ad-test-placeholder { border-radius: 10px; }
.ad-footer { margin: 20px 0 0; }
.ad-home-top, .ad-home-row { margin: 18px 0; }
.ad-list-top { margin: 0 0 18px; }
.ad-list-mid { margin: 10px 0 18px; }
.ad-list-bottom { margin: 20px 0 6px; }

/* ===== v4: 404 page ===== */
.notfound-page .empty-state { border: 1.5px dashed var(--border); border-radius: 16px; }

/* ===== v4: Top Categories widget ===== */
.widget-links a { display: flex; justify-content: space-between; align-items: center; }

/* ===== v5: Most Read ranking ===== */
.most-read-row { display: flex; align-items: center; gap: 14px; }
.rank-num { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 10px; font-weight: 900; font-size: 15px; flex-shrink: 0; }
.rank-top { background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #d97706); color: #fff; box-shadow: 0 4px 12px rgba(245, 158, 11, .35); }
.rank-reg { background: var(--bg); color: var(--muted); border: 1.5px solid var(--border); }
.badge-trend { margin-left: 6px; vertical-align: middle; }

/* ===== v5: Top Categories page ===== */
.topcat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.topcat-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.topcat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px rgba(16, 24, 40, .2); }
.topcat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.topcat-head .rank-num { min-width: 30px; height: 30px; font-size: 13px; }
.topcat-body { display: flex; gap: 12px; margin-bottom: 14px; }
.topcat-stat { flex: 1; text-align: center; background: var(--bg); border-radius: 10px; padding: 10px 6px; }
.topcat-stat strong { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.4px; }
.topcat-stat small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.topcat-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.topcat-bar > div { height: 100%; background: linear-gradient(90deg, #fbbf24, #f59e0b 60%, #d97706); border-radius: 99px; }
.topcat-note { font-size: 11px; color: var(--muted); }

/* v5: Most Read share row */
.row-share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.share-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 8px; text-decoration: none; border: 0; cursor: pointer; transition: opacity .15s; }
.share-mini:hover { opacity: .85; }
.share-wa { background: #25d366; color: #fff; }
.share-fb { background: #1877f2; color: #fff; }
.share-x { background: #111; color: #fff; }
.share-copy { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }

/* v5: trending flame on card thumbnails */
.post-thumb { position: relative; }
.card-trend { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: 15px; z-index: 2; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { min-height: 340px; }
  .hero-side { flex-direction: row; flex-wrap: wrap; }
  .hero-item { flex: 1 1 46%; }
}
@media (max-width: 860px) {
  .main-layout, .list-layout, .article-page { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .post-row { flex-direction: column; }
  .post-row img { width: 100%; height: 180px; }
  .article-main { padding: 16px; }
  .article-title { font-size: 23px; }
  .brand-text small { display: none; }
  .hero-overlay h1 { font-size: 21px; }
  .about-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-item { flex: 1 1 100%; }
}

/* v6: Author pages & widgets */
.author-head{display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap;padding:22px 0 18px}
.author-avatar{width:86px;height:86px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,#fbbf24,#d97706);display:grid;place-items:center;flex-shrink:0;box-shadow:0 6px 18px -6px rgba(217,119,6,.45)}
.author-avatar img{width:100%;height:100%;object-fit:cover}
.author-avatar .avatar-initial{font-size:34px;font-weight:900;color:#fff}
.author-info{flex:1;min-width:220px}
.author-info h1{font-size:26px;font-weight:900;letter-spacing:-.5px;margin:0 0 2px}
.author-role{color:var(--gold2);font-weight:700;font-size:13.5px;margin:0 0 8px}
.author-bio{color:var(--muted);font-size:14.5px;line-height:1.65;margin:0 0 10px;max-width:720px}
.author-stats{color:var(--muted);font-size:12.5px;margin:0 0 10px}
.author-social{display:flex;gap:8px;flex-wrap:wrap}
.author-social a{background:var(--surface2);border:1px solid var(--border);padding:5px 13px;border-radius:99px;font-size:12.5px;font-weight:600;text-decoration:none}
.author-social a:hover{border-color:var(--gold);color:var(--gold2)}
.authors-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;margin-top:8px}
.author-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;gap:14px;align-items:flex-start;box-shadow:var(--shadow);transition:transform .16s,box-shadow .16s;text-decoration:none;color:var(--text)}
.author-card:hover{transform:translateY(-3px);box-shadow:0 16px 34px -12px rgba(16,24,40,.28);border-color:var(--gold)}
.author-card .author-avatar{width:58px;height:58px}
.author-card .author-avatar .avatar-initial{font-size:24px}
.author-card-body h2{font-size:16.5px;font-weight:800;margin:0 0 2px;letter-spacing:-.2px}
.author-card-bio{color:var(--muted);font-size:13px;line-height:1.55;margin:6px 0}
.author-card-body small{color:var(--muted);font-size:11.5px}
.author-more-link{float:right;font-size:12px;font-weight:600;color:var(--gold2);text-decoration:none}
.author-more-link:hover{text-decoration:underline}
.article-meta .author-link{color:var(--gold2);font-weight:600;text-decoration:none}
.article-meta .author-link:hover{text-decoration:underline}
@media(max-width:560px){.author-head{gap:14px}.author-avatar{width:64px;height:64px}.author-info h1{font-size:21px}}