﻿/* ============================================================
   NewsTreats.com — Redesigned Stylesheet v2
   Modern editorial news portal — clean, premium, readable
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --brand:        #e63946;
  --brand-dark:   #c1121f;
  --brand-light:  #fff0f1;
  --accent:       #457b9d;
  --accent-dark:  #1d3557;
  --text:         #0d1117;
  --text-2:       #3d4451;
  --muted:        #6e7891;
  --border:       #e8ecf0;
  --bg:           #ffffff;
  --card:         #ffffff;
  --header-bg:    #0d1117;
  --nav-bg:       #161b22;
  --shadow:       0 1px 6px rgba(0,0,0,.07), 0 2px 12px rgba(0,0,0,.05);
  --shadow-md:    0 4px 24px rgba(0,0,0,.12);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.15);
  --radius:       10px;
  --radius-sm:    6px;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --max-w:        1240px;
  --transition:   .2s cubic-bezier(.4,0,.2,1);
  --navy:       #0d1117;
  /* category colours */
  --c-ai:       #7c3aed;
  --c-tech:     #0ea5e9;
  --c-business: #10b981;
  --c-finance:  #f59e0b;
  --c-world:    #e63946;
  --c-health:   #06b6d4;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Utility ────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-truncate-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: #fff;
}
.badge-ai       { background: var(--c-ai); }
.badge-tech     { background: var(--c-tech); }
.badge-business { background: var(--c-business); }
.badge-finance  { background: var(--c-finance); }
.badge-world    { background: var(--c-world); }
.badge-health   { background: var(--c-health); }
.badge-default  { background: var(--brand); }

.section-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 2px solid var(--border);
  position: relative;
}
.section-head::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 48px; height: 2px; background: var(--brand);
}
.section-head h2 {
  font-family: var(--font-head); font-size: 19px; color: var(--text);
  font-weight: 700; letter-spacing: -.3px;
}
.section-head .section-link { margin-left: auto; font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.section-head .section-link:hover { text-decoration: underline; }

/* ── Main Header ────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg); color: #fff;
  padding: 0; position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.site-header .container {
  display: flex; align-items: center; gap: 20px; height: 60px;
}
.logo { flex-shrink: 0; }
.logo a { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--font-head); font-size: 26px; font-weight: 800;
  color: #fff; letter-spacing: -1px;
}
.logo-name span { color: var(--brand); }
.logo-tagline { font-size: 9px; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: 2px; margin-top: 2px; }

/* Search bar */
.header-search { flex: 1; min-width: 180px; max-width: 340px; margin-left: auto; }
.search-form {
  display: flex; background: rgba(255,255,255,.08); border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  transition: border-color var(--transition);
}
.search-form:focus-within { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.13); }
.search-form input {
  flex: 1; padding: 8px 14px; background: transparent; border: none; outline: none;
  color: #fff; font-size: 14px;
}
.search-form input::placeholder { color: rgba(255,255,255,.4); }
.search-form button {
  padding: 8px 14px; background: transparent; border: none; color: rgba(255,255,255,.7);
  font-size: 15px; transition: color var(--transition);
}
.search-form button:hover { color: #fff; }

/* Mobile hamburger */
.nav-toggle {
  display: none; background: none; border: none; color: rgba(255,255,255,.8); font-size: 22px; padding: 4px 8px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-nav .container { display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.site-nav .container::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block; padding: 11px 15px; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .6px;
  white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.site-nav a:first-child { color: rgba(255,255,255,.85); }
.site-nav a:hover { color: #fff; }
.site-nav a.active { color: #fff; border-bottom-color: var(--brand); }
.site-nav a.cat-ai:hover     { color: #a78bfa; border-bottom-color: #a78bfa; }
.site-nav a.cat-tech:hover   { color: #38bdf8; border-bottom-color: #38bdf8; }
.site-nav a.cat-business:hover { color: #34d399; border-bottom-color: #34d399; }
.site-nav a.cat-finance:hover  { color: #fbbf24; border-bottom-color: #fbbf24; }
.site-nav a.cat-world:hover    { color: var(--brand); border-bottom-color: var(--brand); }
.site-nav a.cat-health:hover   { color: #22d3ee; border-bottom-color: #22d3ee; }

/* ── Breaking News Ticker ───────────────────────────────────── */
.breaking-bar {
  background: var(--brand); color: #fff;
  display: flex; align-items: stretch; font-size: 12.5px; overflow: hidden;
}
.breaking-label {
  background: var(--brand-dark); padding: 8px 16px; font-weight: 800;
  white-space: nowrap; display: flex; align-items: center; gap: 7px;
  text-transform: uppercase; letter-spacing: .8px; font-size: 10px; flex-shrink: 0;
}
.breaking-label::before { content: '●'; animation: blink 1s step-end infinite; font-size: 8px; }
@keyframes blink { 50% { opacity: 0; } }
.ticker-wrap { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ticker {
  display: flex; gap: 0;
  animation: ticker-scroll 35s linear infinite;
  white-space: nowrap;
}
.ticker:hover { animation-play-state: paused; }
.ticker a { padding: 8px 36px 8px 0; color: rgba(255,255,255,.95); font-weight: 500; }
.ticker a:hover { text-decoration: underline; }
.ticker a::after { content: ' ▶'; color: rgba(255,255,255,.5); margin-left: 6px; font-size: 9px; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Ad Slots ───────────────────────────────────────────────── */
.ad-slot { text-align: center; }
.ad-slot--header  { padding: 14px 0; background: #fff; border-bottom: 1px solid var(--border); }
.ad-slot--sidebar { margin-bottom: 24px; }
.ad-slot--in-article { margin: 32px auto; max-width: 500px; }
.ad-placeholder {
  background: linear-gradient(135deg, #f8f9fa, #f0f2f5);
  border: 1px dashed #d1d5db; color: #9ca3af;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.ad-placeholder--leaderboard { height: 90px; max-width: 728px; margin: 0 auto; }
.ad-placeholder--rectangle { width: 300px; height: 250px; margin: 0 auto; }

/* ── Layout Grid ────────────────────────────────────────────── */
.page-wrap { padding: 28px 0 48px; }
.main-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) {
  .main-grid { grid-template-columns: 1fr 300px; }
}
.content-area { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 24px; }

/* ── Hero / Featured Article ────────────────────────────────── */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--accent-dark); margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}
.hero-img { width: 100%; height: 420px; object-fit: cover; opacity: .8; transition: opacity var(--transition); }
.hero:hover .hero-img { opacity: .85; }
.hero-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px; background: linear-gradient(transparent, rgba(0,0,0,.9) 55%);
}
.hero-body .badge { margin-bottom: 12px; }
.hero-title {
  font-family: var(--font-head); font-size: 26px; font-weight: 800;
  color: #fff; line-height: 1.25; margin-bottom: 12px; letter-spacing: -.3px;
}
.hero-title:hover { text-decoration: underline; }
.hero-meta {
  font-size: 12px; color: rgba(255,255,255,.65);
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}

/* ── Article Card ───────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.card-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #e8ecf0; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img { transform: scale(1.06); }
.card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8ecf0, #d1d8e0); font-size: 36px; color: #a0aec0;
}
.card-badge { position: absolute; top: 10px; left: 10px; }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-title {
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  color: var(--text); line-height: 1.4; transition: color var(--transition);
}
.card:hover .card-title { color: var(--brand); }
.card-excerpt { font-size: 13px; color: var(--text-2); line-height: 1.55; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted);
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.card-meta .author-name { font-weight: 600; color: var(--text-2); }
.card-meta .dot::before { content: '·'; }
.card-meta .breaking-tag {
  background: var(--brand); color: #fff; padding: 1px 7px;
  border-radius: 3px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
}

/* Article card grids */
.articles-grid { display: grid; gap: 20px; }
.articles-grid--2 { grid-template-columns: 1fr; }
.articles-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .articles-grid--2 { grid-template-columns: 1fr 1fr; }
  .articles-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .articles-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Horizontal card */
.card-h {
  display: flex; gap: 12px; background: var(--card); padding: 14px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); transition: box-shadow var(--transition), transform var(--transition);
}
.card-h:hover { box-shadow: var(--shadow-md); transform: translateX(3px); }
.card-h:hover .card-h-title { color: var(--brand); }
.card-h-img { width: 82px; height: 62px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.card-h-img-placeholder { width: 82px; height: 62px; border-radius: var(--radius-sm); flex-shrink: 0; background: #e8ecf0; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #a0aec0; }
.card-h-body { flex: 1; min-width: 0; }
.card-h-title { font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--text); margin-bottom: 5px; transition: color var(--transition); }
.card-h-meta  { font-size: 11px; color: var(--muted); }

/* ── Trending Sidebar ───────────────────────────────────────── */
.trending-list { display: flex; flex-direction: column; }
.trending-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.trending-item:last-child { border-bottom: none; }
.trending-num {
  font-size: 22px; font-weight: 900; color: #e2e8f0; line-height: 1;
  flex-shrink: 0; width: 28px; font-family: var(--font-head);
}
.trending-item:nth-child(1) .trending-num { color: var(--brand); }
.trending-item:nth-child(2) .trending-num { color: #f97316; }
.trending-item:nth-child(3) .trending-num { color: #eab308; }
.trending-title { font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--text); transition: color var(--transition); }
.trending-title:hover { color: var(--brand); }
.trending-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Sidebar Widgets ────────────────────────────────────────── */
.widget {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border);
}
.widget-head {
  background: var(--header-bg); color: #fff; padding: 12px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.widget-body { padding: 16px; }

/* Categories widget */
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.category-pill {
  padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 700;
  border: 2px solid; background: transparent; transition: all var(--transition);
  letter-spacing: .2px;
}
.category-pill:hover { color: #fff; transform: scale(1.04); }
.category-pill.ai       { border-color: var(--c-ai);       color: var(--c-ai); }
.category-pill.ai:hover { background: var(--c-ai); }
.category-pill.tech       { border-color: var(--c-tech);       color: var(--c-tech); }
.category-pill.tech:hover { background: var(--c-tech); }
.category-pill.business       { border-color: var(--c-business);       color: var(--c-business); }
.category-pill.business:hover { background: var(--c-business); }
.category-pill.finance       { border-color: var(--c-finance);       color: var(--c-finance); }
.category-pill.finance:hover { background: var(--c-finance); }
.category-pill.world       { border-color: var(--c-world);       color: var(--c-world); }
.category-pill.world:hover { background: var(--c-world); }
.category-pill.health       { border-color: var(--c-health);       color: var(--c-health); }
.category-pill.health:hover { background: var(--c-health); }

/* ── Category Section (homepage) ────────────────────────────── */
.category-section { margin-bottom: 40px; }
.category-section-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .category-section-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .category-section-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.category-section-grid .card:first-child .card-title { font-size: 17px; }
@media (min-width: 900px) {
  .category-section-grid .card:first-child { grid-row: span 2; }
  .category-section-grid .card:first-child .card-img-wrap { aspect-ratio: 3/4; }
}

/* ── Article Page ───────────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: 1fr 300px; }
}
.article-main {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border);
}

.article-header { padding: 28px 32px 22px; border-bottom: 1px solid var(--border); }
.article-category-link {
  display: inline-block; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 14px;
  padding: 3px 10px; border-radius: 4px; color: #fff;
}
.article-title {
  font-family: var(--font-head); font-size: 30px; font-weight: 800;
  color: var(--text); line-height: 1.25; margin-bottom: 16px; letter-spacing: -.5px;
}
.article-excerpt {
  font-size: 17px; color: var(--text-2); line-height: 1.65;
  border-left: 4px solid var(--brand); padding-left: 18px;
  margin-bottom: 18px; font-style: italic;
}
.article-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.article-meta-author { display: flex; align-items: center; gap: 9px; }
.article-meta-author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.article-meta-author .name { font-weight: 700; color: var(--text-2); }

.article-featured-img-wrap { position: relative; }
.article-featured-img { width: 100%; max-height: 500px; object-fit: cover; }
.article-img-caption { font-size: 12px; color: var(--muted); text-align: center; padding: 10px 32px; background: #fafbfc; border-bottom: 1px solid var(--border); }

.article-content { padding: 32px; }
.article-content h2 { font-family: var(--font-head); font-size: 22px; margin: 32px 0 14px; color: var(--text); letter-spacing: -.3px; }
.article-content h3 { font-family: var(--font-head); font-size: 18px; margin: 26px 0 10px; color: var(--text); }
.article-content p  { margin-bottom: 20px; font-size: 17px; line-height: 1.82; color: var(--text-2); }
.article-content a  { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article-content ul, .article-content ol { margin: 0 0 20px 24px; }
.article-content li { margin-bottom: 9px; font-size: 17px; line-height: 1.75; color: var(--text-2); }
.article-content blockquote {
  margin: 28px 0; padding: 18px 22px;
  border-left: 4px solid var(--brand); background: var(--brand-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-2); font-size: 16px; line-height: 1.7;
}
.article-content strong { font-weight: 700; color: var(--text); }
.article-content em { font-style: italic; }
.article-content pre {
  background: #0d1117; color: #e6edf3; padding: 22px;
  border-radius: var(--radius); overflow-x: auto; margin: 0 0 20px;
  font-size: 14px; line-height: 1.6; border: 1px solid #30363d;
}
.article-content code { background: #f0f2f5; padding: 2px 7px; border-radius: 4px; font-size: 13.5px; color: var(--brand); }
.article-content pre code { background: none; padding: 0; color: inherit; }

.article-tags { padding: 18px 32px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.tag-link {
  padding: 5px 13px; background: var(--bg); border-radius: 99px;
  font-size: 12px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border);
  transition: all var(--transition);
}
.tag-link:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.article-nav { display: flex; justify-content: space-between; gap: 16px; padding: 20px 32px; border-top: 1px solid var(--border); }
.article-nav a { font-size: 13px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 6px; }
.article-nav a:hover { text-decoration: underline; }

.share-bar { padding: 18px 32px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: #fafbfc; }
.share-bar span { font-size: 13px; font-weight: 700; color: var(--text); }
.share-btn {
  padding: 8px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; color: #fff; transition: opacity var(--transition), transform var(--transition);
}
.share-btn:hover { opacity: .88; transform: translateY(-1px); }
.share-btn.twitter  { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy     { background: var(--header-bg); }

/* ── Related Articles ───────────────────────────────────────── */
.related-section { margin-top: 32px; }

/* ── Category / Search Page ─────────────────────────────────── */
.page-header-banner {
  padding: 28px 0; margin-bottom: 28px;
  border-bottom: 2px solid var(--border); position: relative;
}
.page-header-banner::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 56px; height: 2px; background: var(--brand);
}
.page-header-banner h1 {
  font-family: var(--font-head); font-size: 28px; margin-bottom: 5px;
  display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.5px;
}
.page-header-banner .count { font-size: 14px; color: var(--muted); margin-top: 4px; font-family: var(--font-body); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; border: 1px solid var(--border);
  background: var(--card); color: var(--text-2); transition: all var(--transition);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { opacity: .35; pointer-events: none; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--header-bg); color: rgba(255,255,255,.75); margin-top: 48px;
  border-top: 3px solid var(--brand);
}
.footer-top { padding: 48px 0 36px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .logo-name { font-size: 24px; color: #fff; }
.footer-brand p { font-size: 13px; margin-top: 12px; line-height: 1.7; color: rgba(255,255,255,.55); max-width: 280px; }
.footer-col h4 {
  color: rgba(255,255,255,.9); font-size: 11px; text-transform: uppercase;
  letter-spacing: 1.2px; margin-bottom: 16px; font-weight: 700;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,.4); flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,.55); transition: color var(--transition); }
.footer-bottom a:hover { color: #fff; }

/* ── Search Box (page) ──────────────────────────────────────── */
.search-box-large {
  display: flex; gap: 0; max-width: 600px; margin: 0 auto 32px;
  box-shadow: var(--shadow-md); border-radius: var(--radius); overflow: hidden;
}
.search-box-large input {
  flex: 1; padding: 15px 20px; border: 1px solid var(--border); border-right: none;
  font-size: 16px; outline: none; border-radius: var(--radius) 0 0 var(--radius);
  transition: border-color var(--transition);
}
.search-box-large input:focus { border-color: var(--accent); }
.search-box-large button {
  padding: 15px 26px; background: var(--brand); color: #fff; border: none;
  font-size: 15px; font-weight: 700; border-radius: 0 var(--radius) var(--radius) 0;
  transition: background var(--transition);
}
.search-box-large button:hover { background: var(--brand-dark); }

/* ── 404 Page ───────────────────────────────────────────────── */
.error-page {
  min-height: 60vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px 20px;
}
.error-page .error-code { font-size: 90px; font-weight: 900; color: var(--brand); line-height: 1; font-family: var(--font-head); }
.error-page h2 { font-family: var(--font-head); font-size: 26px; margin: 14px 0 8px; color: var(--text); }
.error-page p { color: var(--muted); margin-bottom: 28px; font-size: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 700; border: none; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* ── Mobile nav overlay ─────────────────────────────────────── */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.6); align-items: flex-start; backdrop-filter: blur(3px);
}
.mobile-nav.open { display: flex; }
.mobile-nav-panel {
  width: 290px; height: 100%; background: var(--header-bg); overflow-y: auto;
  box-shadow: 6px 0 30px rgba(0,0,0,.4); display: flex; flex-direction: column;
}
.mobile-nav-header {
  background: rgba(255,255,255,.04); color: #fff; padding: 18px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-nav-header .logo-name { font-size: 20px; color: #fff; }
.mobile-nav-close { background: none; border: none; color: rgba(255,255,255,.7); font-size: 22px; }
.mobile-nav-close:hover { color: #fff; }
.mobile-nav-links { padding: 12px 0; }
.mobile-nav-links a {
  display: flex; align-items: center; padding: 13px 20px;
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,.7);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background var(--transition), color var(--transition);
  gap: 10px;
}
.mobile-nav-links a:hover { background: rgba(255,255,255,.06); color: #fff; }
.mobile-search { padding: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-search input {
  width: 100%; padding: 11px 14px; border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); font-size: 15px; outline: none;
  background: rgba(255,255,255,.08); color: #fff;
}
.mobile-search input::placeholder { color: rgba(255,255,255,.4); }

/* ── Nav date ───────────────────────────────────────────────── */
.nav-date {
  margin-left: auto; font-size: 11px; color: rgba(255,255,255,.35);
  padding: 11px 0; white-space: nowrap; font-weight: 500; letter-spacing: .3px;
}

/* ── Newsletter Section ─────────────────────────────────────── */
.nl-section {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 60%, #1a1a2e 100%);
  padding: 56px 0; position: relative; overflow: hidden;
}
.nl-section::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(230,57,70,.07); pointer-events: none;
}
.nl-section-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; position: relative;
}
.nl-section-badge {
  display: inline-block; background: rgba(230,57,70,.15); color: var(--brand);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
  border: 1px solid rgba(230,57,70,.25);
}
.nl-section-title {
  font-family: var(--font-head); font-size: 26px; color: #fff;
  margin: 0 0 12px; line-height: 1.25; font-weight: 800;
}
.nl-section-desc {
  color: rgba(255,255,255,.6); font-size: 15px; line-height: 1.7; margin: 0 0 20px;
}
.nl-section-features {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.nl-section-features span {
  color: rgba(255,255,255,.8); font-size: 13px; font-weight: 500;
}
.nl-quick-form { width: 100%; }
.nl-quick-row {
  display: flex; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); margin-bottom: 12px;
}
.nl-quick-input {
  flex: 1; padding: 16px 20px; border: none; font-size: 15px; outline: none;
  color: var(--text); font-family: inherit; min-width: 0;
}
.nl-quick-btn {
  padding: 16px 24px; background: var(--brand); color: #fff; border: none;
  font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background var(--transition); font-family: inherit;
}
.nl-quick-btn:hover { background: var(--brand-dark); }
.nl-quick-privacy {
  color: rgba(255,255,255,.4); font-size: 12px; line-height: 1.6; margin: 0 0 16px;
}
.nl-quick-privacy a { color: rgba(255,255,255,.6); text-decoration: underline; }
.nl-trust-row { display: flex; gap: 12px; flex-wrap: wrap; }
.nl-trust-badge {
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.6);
  font-size: 11px; padding: 5px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,.1);
}

/* ── Newsletter Modal Overlay ───────────────────────────────── */
.nl-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.7); align-items: center; justify-content: center;
  padding: 16px; backdrop-filter: blur(4px);
}
.nl-overlay.open { display: flex; }
.nl-dialog {
  background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.35);
  width: 100%; max-width: 500px; max-height: 92vh; overflow-y: auto;
  position: relative; padding: 0;
}
.nl-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  font-size: 18px; color: var(--muted); cursor: pointer;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background var(--transition); z-index: 1;
}
.nl-close:hover { background: var(--bg); color: var(--text); }

.nl-dialog-header {
  background: var(--header-bg); padding: 28px 32px 24px; text-align: center;
  border-radius: 16px 16px 0 0;
}
.nl-dialog-logo {
  font-family: var(--font-head); font-size: 24px; font-weight: 800;
  color: #fff; margin-bottom: 8px; letter-spacing: -0.3px;
}
.nl-dialog-logo span { color: var(--brand); }
.nl-dialog-title {
  font-family: var(--font-head); font-size: 18px; color: rgba(255,255,255,.9);
  margin: 0 0 6px; font-weight: 700;
}
.nl-dialog-email { color: rgba(255,255,255,.6); font-size: 13px; margin: 0; }
.nl-dialog-email strong { color: rgba(255,255,255,.9); }

#nl-modal-form { padding: 24px 32px 28px; }
.nl-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.nl-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.nl-label { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; }
.nl-optional { font-weight: 400; text-transform: none; color: var(--muted); letter-spacing: 0; }
.nl-input {
  padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; outline: none; transition: border-color var(--transition);
  font-family: inherit; color: var(--text); width: 100%; box-sizing: border-box;
}
.nl-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230,57,70,.08); }

.nl-radio-group { display: flex; flex-direction: column; gap: 8px; }
.nl-radio-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.nl-radio-option:has(input:checked) {
  border-color: var(--brand); background: var(--brand-light);
}
.nl-radio-option input[type="radio"] { margin-top: 2px; accent-color: var(--brand); }
.nl-radio-label { display: flex; flex-direction: column; }
.nl-radio-label strong { font-size: 13px; color: var(--text); }
.nl-radio-label span { font-size: 12px; color: var(--muted); }

.nl-consent-field { margin-bottom: 16px; }
.nl-checkbox-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.nl-checkbox { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.nl-consent-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.nl-consent-text a { color: var(--brand); }
.nl-consent-error { color: var(--brand); font-size: 12px; margin: 6px 0 0; }

.nl-submit-btn {
  display: block; width: 100%; padding: 15px; background: var(--brand); color: #fff;
  border: none; border-radius: var(--radius); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background var(--transition), transform var(--transition);
  font-family: inherit; margin-bottom: 12px;
}
.nl-submit-btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.nl-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.nl-can-spam {
  font-size: 11px; color: var(--muted); text-align: center; line-height: 1.6; margin: 0;
}

.nl-success-state {
  padding: 48px 32px; text-align: center;
}
.nl-success-icon { font-size: 52px; margin-bottom: 16px; }
.nl-success-state h3 {
  font-family: var(--font-head); font-size: 22px; color: var(--text); margin: 0 0 10px;
}
.nl-success-state p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 8px; }
.nl-success-note { font-size: 13px; color: var(--muted); font-style: italic; }

/* ── Responsive adjustments ─────────────────────────────────── */
@media (max-width: 767px) {
  .header-search { display: none; }
  .nav-date { display: none; }
  .nav-toggle { display: block; }
  .site-nav { display: none; }
  .hero-img { height: 260px; }
  .hero-title { font-size: 19px; }
  .article-title { font-size: 23px; }
  .article-content { padding: 18px 16px; }
  .article-header { padding: 18px 16px; }
  .article-tags { padding: 14px 16px; }
  .article-nav { padding: 14px 16px; flex-direction: column; }
  .share-bar { padding: 14px 16px; }
}

@media (max-width: 767px) {
  .nl-section-inner { grid-template-columns: 1fr; gap: 32px; }
  .nl-section { padding: 40px 0; }
  .nl-section-title { font-size: 22px; }
}

@media (max-width: 540px) {
  .nl-quick-row { flex-direction: column; border-radius: var(--radius); }
  .nl-quick-input { border-radius: var(--radius) var(--radius) 0 0; }
  .nl-quick-btn { border-radius: 0 0 var(--radius) var(--radius); }
  .nl-form-row { grid-template-columns: 1fr; }
  #nl-modal-form { padding: 20px 20px 24px; }
  .nl-dialog-header { padding: 24px 20px 20px; }
  .nl-section-features { gap: 12px; }
  .nl-trust-row { gap: 8px; }
}

@media (min-width: 768px) {
  .logo-name { font-size: 30px; }
  .hero-title { font-size: 30px; }
  .hero-img { height: 480px; }
}

/* ── Print styles ───────────────────────────────────────────── */
@media print {
  .site-header, .site-nav, .breaking-bar, .sidebar, .site-footer, .ad-slot { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .article-content p { font-size: 12pt; line-height: 1.65; }
}
