/* ==========================================================================
   TechFinNews — style.css  |  Production-Ready  |  Pure CSS3  |  No Framework
   ========================================================================== */

/* ── 1. Variables & Reset ────────────────────────────────────────────────── */
:root {
  /* Palette */
  --c-bg:          #f2f4f7;
  --c-surface:     #ffffff;
  --c-surface-2:   #f8f9fb;
  --c-accent:      #0d2137;
  --c-accent-2:    #1a3a5c;
  --c-accent-3:    #24517e;
  --c-red:         #c0392b;
  --c-red-hover:   #a93226;
  --c-blue-light:  #6ea8fe;
  --c-gold:        #e67e22;
  --c-green:       #27ae60;
  --c-text:        #111827;
  --c-text-2:      #374151;
  --c-muted:       #6b7280;
  --c-border:      #e5e7eb;
  --c-border-2:    #d1d5db;
  --c-tag-bg:      #eef2f7;
  --c-tag-text:    #0d2137;

  /* Typography */
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:    'Georgia', 'Times New Roman', serif;

  /* Spacing & Radius */
  --r:             8px;
  --r-lg:          14px;
  --max-w:         1220px;

  /* Shadows */
  --sh-xs:         0 1px 2px rgba(0,0,0,.06);
  --sh-sm:         0 1px 6px rgba(0,0,0,.08);
  --sh-md:         0 4px 20px rgba(0,0,0,.10);
  --sh-lg:         0 10px 40px rgba(0,0,0,.14);

  /* Transitions */
  --t:             .2s ease;
  --t-med:         .35s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body { font-family: var(--font); background: var(--c-bg); color: var(--c-text); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
:focus-visible { outline: 2px solid var(--c-accent-3); outline-offset: 3px; border-radius: 4px; }

/* ── 2. Typography ───────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { line-height: 1.25; font-weight: 700; color: var(--c-text); }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: .9rem; }
p  { color: var(--c-text-2); }

/* ── 3. Layout Helpers ───────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }

/* ── 4. Reading Progress Bar ─────────────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--c-red), var(--c-gold));
  z-index: 9999;
  transition: width .1s linear;
}

/* ── 5. Top Alert Banner ─────────────────────────────────────────────────── */
.top-alert {
  background: var(--c-red);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  padding: .45rem 1rem;
  letter-spacing: .3px;
}
.top-alert a { color: #fff; text-decoration: underline; }

/* ── 6. Header ───────────────────────────────────────────────────────────── */
.site-header {
  background: var(--c-accent);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sh-lg);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}

/* Logo */
.site-logo {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.site-logo .logo-icon { font-size: 1.1rem; line-height: 1; }
.site-logo .logo-accent { color: var(--c-blue-light); }

/* Search bar */
.header-search { flex: 1; max-width: 380px; position: relative; }
.header-search input {
  width: 100%;
  padding: .55rem 2.6rem .55rem 1rem;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .88rem;
  transition: all var(--t);
}
.header-search input::placeholder { color: rgba(255,255,255,.55); }
.header-search input:focus { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); outline: none; }
.header-search button {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.btn-subscribe {
  font-size: .8rem;
  font-weight: 700;
  padding: .5rem 1rem;
  background: var(--c-red);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--t);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.btn-subscribe:hover { background: var(--c-red-hover); }

/* Navigation */
.main-nav-wrap { background: var(--c-accent-2); border-top: 1px solid rgba(255,255,255,.08); }
.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.78);
  padding: .7rem 1rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color var(--t), border-color var(--t);
  display: block;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--c-blue-light); }
.main-nav .nav-hot { color: var(--c-red) !important; }
.main-nav .nav-hot:hover { color: #e55b4d !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0 7px;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 7. Breaking News Ticker ─────────────────────────────────────────────── */
.ticker-bar { background: var(--c-red); color: #fff; font-size: .8rem; font-weight: 600; overflow: hidden; }
.ticker-inner { display: flex; align-items: center; }
.ticker-label {
  background: rgba(0,0,0,.3);
  padding: .42rem .9rem;
  flex-shrink: 0;
  letter-spacing: .8px;
  font-size: .7rem;
  text-transform: uppercase;
}
.ticker-track { overflow: hidden; flex: 1; padding-block: .42rem; }
.ticker-scroll { display: inline-flex; gap: 3rem; animation: tickerMove 30s linear infinite; white-space: nowrap; }
.ticker-scroll a { color: #fff; }
.ticker-scroll a:hover { text-decoration: underline; }
.ticker-bar:hover .ticker-scroll { animation-play-state: paused; }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── 8. Date / Time Bar ──────────────────────────────────────────────────── */
.date-bar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  font-size: .78rem;
  color: var(--c-muted);
  padding-block: .4rem;
}
.date-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.date-bar a { color: var(--c-muted); transition: color var(--t); }
.date-bar a:hover { color: var(--c-accent); }
.weather-widget { display: flex; align-items: center; gap: .5rem; }

/* ── 9. Tags / Labels ────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: .2rem .55rem;
  border-radius: 3px;
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  transition: background var(--t);
}
.tag:hover { background: var(--c-border-2); }
.tag-accent { background: var(--c-accent); color: #fff; }
.tag-red    { background: var(--c-red); color: #fff; }
.tag-gold   { background: var(--c-gold); color: #fff; }
.tag-green  { background: var(--c-green); color: #fff; }
.tag-blue   { background: #2980b9; color: #fff; }
.tag-outline{ background: transparent; border: 1.5px solid var(--c-border-2); color: var(--c-muted); }

/* ── 10. Section Heading ─────────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--c-border);
  position: relative;
}
.section-head::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--c-red);
}
.section-head h2 { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.section-head a.see-all {
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-accent);
  white-space: nowrap;
  transition: color var(--t);
}
.section-head a.see-all:hover { color: var(--c-red); }

/* ── 11. Hero / Featured ─────────────────────────────────────────────────── */
.hero { margin-block: 1.5rem; }
.hero-wrap { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .hero-wrap { grid-template-columns: 2fr 1fr; } }

.hero-main {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 450px;
  display: flex;
  align-items: flex-end;
  background: var(--c-accent);
}
.hero-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  transition: transform .6s ease, opacity .4s ease;
}
.hero-main:hover img { transform: scale(1.03); opacity: .45; }

.hero-overlay {
  position: relative;
  padding: 2rem;
  background: linear-gradient(to top, rgba(5,15,30,.98) 0%, rgba(5,15,30,.6) 60%, transparent 100%);
  width: 100%;
}
.hero-overlay .tag { margin-bottom: .75rem; }
.hero-title {
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  color: #fff;
  margin-bottom: .6rem;
  line-height: 1.3;
}
.hero-title a { color: inherit; }
.hero-title a:hover { text-decoration: underline; }
.hero-excerpt { font-size: .92rem; color: rgba(255,255,255,.72); margin-bottom: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-size: .78rem; color: rgba(255,255,255,.6); display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.hero-meta .author-avatar { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); object-fit: cover; }

/* Hero secondary stack */
.hero-stack { display: flex; flex-direction: column; gap: 1rem; }
.hero-side-card {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--c-accent);
  position: relative;
  flex: 1;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
}
.hero-side-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero-side-overlay {
  position: relative;
  padding: 1rem;
  background: linear-gradient(to top, rgba(5,15,30,.97) 0%, transparent 100%);
  width: 100%;
}
.hero-side-overlay .tag { margin-bottom: .4rem; }
.hero-side-title { font-size: .9rem; color: #fff; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-side-title a { color: inherit; }
.hero-side-title a:hover { text-decoration: underline; }
.hero-side-meta { font-size: .72rem; color: rgba(255,255,255,.55); margin-top: .3rem; }

/* ── 12. Cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }

.card-thumb-wrap { position: relative; overflow: hidden; }
.card-thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; transition: transform .45s ease; }
.card:hover .card-thumb { transform: scale(1.04); }
.card-thumb-label {
  position: absolute;
  top: .65rem;
  left: .65rem;
}

.card-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; }
.card-meta { font-size: .74rem; color: var(--c-muted); margin-block: .35rem .5rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--c-border-2); display: inline-block; }

.card-title {
  font-size: .98rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  flex: 1;
}
.card-title a { transition: color var(--t); }
.card-title a:hover { color: var(--c-accent-3); }
.card-excerpt { font-size: .83rem; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0; }

/* Card Horizontal */
.card-h {
  background: var(--c-surface);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-xs);
  display: flex;
  gap: 0;
  transition: box-shadow var(--t);
}
.card-h:hover { box-shadow: var(--sh-sm); }
.card-h .card-h-img { width: 110px; min-height: 90px; object-fit: cover; flex-shrink: 0; }
.card-h .card-h-body { padding: .8rem; flex: 1; }
.card-h .card-title { font-size: .88rem; -webkit-line-clamp: 2; }
.card-h .card-meta { margin-block: .25rem; }

/* Card Large (category leaders) */
.card-lg .card-thumb { aspect-ratio: 16/10; }
.card-lg .card-title { font-size: 1.1rem; }

/* ── 13. Card Grid Layouts ───────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.stack  { display: flex; flex-direction: column; gap: .85rem; }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-3, .grid-2 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr; } }

/* ── 14. Main Content Wrap (Article layout 70/30) ────────────────────────── */
.content-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-block: 1.5rem 3rem;
  align-items: start;
}
@media (min-width: 960px) {
  .content-wrap { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* ── 15. Article Styles ──────────────────────────────────────────────────── */
.article-main { background: var(--c-surface); border-radius: var(--r-lg); padding: 2.25rem; box-shadow: var(--sh-sm); }
.article-cat  { margin-bottom: 1rem; }
.article-title { margin-bottom: .85rem; line-height: 1.28; }
.article-subtitle { font-size: 1.1rem; color: var(--c-muted); font-weight: 400; margin-bottom: 1.25rem; line-height: 1.5; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.5rem;
  font-size: .82rem;
  color: var(--c-muted);
  padding-block: 1.1rem;
  border-block: 1px solid var(--c-border);
  margin-bottom: 1.5rem;
  align-items: center;
}
.article-meta strong { color: var(--c-text); }
.meta-author { display: flex; align-items: center; gap: .5rem; }
.meta-author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.meta-stat { display: flex; align-items: center; gap: .3rem; }

.article-hero-img { width: 100%; border-radius: var(--r); margin-bottom: .6rem; aspect-ratio: 16/8; object-fit: cover; }
.article-img-caption { font-size: .78rem; color: var(--c-muted); text-align: center; margin-bottom: 1.75rem; font-style: italic; }

/* Table of Contents */
.toc {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--r);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.toc-title { font-size: .85rem; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: .75rem; }
.toc ol { list-style: decimal; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.toc ol li a { font-size: .88rem; color: var(--c-accent-3); transition: color var(--t); }
.toc ol li a:hover { color: var(--c-red); text-decoration: underline; }

/* Article body */
.article-body { font-size: 1.05rem; line-height: 1.9; }
.article-body p { color: var(--c-text-2); margin-bottom: 1.3rem; }
.article-body h2 { font-size: 1.45rem; margin-block: 2rem 1rem; color: var(--c-text); padding-bottom: .5rem; border-bottom: 1px solid var(--c-border); }
.article-body h3 { font-size: 1.15rem; margin-block: 1.5rem .75rem; color: var(--c-text); }
.article-body a { color: var(--c-accent-3); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.article-body a:hover { color: var(--c-red); }
.article-body blockquote {
  border-left: 4px solid var(--c-red);
  padding: 1rem 1.5rem;
  margin-block: 1.5rem;
  background: var(--c-surface-2);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 1.08rem;
  font-style: italic;
  color: var(--c-text);
  line-height: 1.7;
}
.article-body blockquote cite { display: block; font-size: .82rem; color: var(--c-muted); font-style: normal; margin-top: .5rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.3rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { color: var(--c-text-2); margin-bottom: .4rem; }
.article-body strong { color: var(--c-text); }
.article-body em { font-style: italic; }

/* Data highlight box */
.data-box {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-3) 100%);
  color: #fff;
  border-radius: var(--r);
  padding: 1.5rem;
  margin-block: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  text-align: center;
}
.data-box .stat-item .stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.data-box .stat-item .stat-label { font-size: .75rem; opacity: .8; margin-top: .35rem; text-transform: uppercase; letter-spacing: .5px; }

/* Info box */
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  margin-block: 1.25rem;
  font-size: .92rem;
  color: #1e40af;
}
.info-box-title { font-weight: 700; margin-bottom: .35rem; }

/* Article tags */
.article-tags { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--c-border); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.article-tags-label { font-size: .8rem; font-weight: 700; color: var(--c-muted); margin-right: .25rem; }

/* Share bar */
.share-bar { margin-block: 1.5rem; display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding-block: 1rem; border-block: 1px solid var(--c-border); }
.share-bar-label { font-size: .8rem; font-weight: 700; color: var(--c-muted); }
.share-btn {
  font-size: .78rem;
  font-weight: 700;
  padding: .45rem .9rem;
  border-radius: 4px;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity var(--t), transform var(--t);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.share-btn:hover { opacity: .88; transform: translateY(-1px); }
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #111; }
.share-btn.wa { background: #25d366; }
.share-btn.tg { background: #0088cc; }
.share-btn.cp { background: var(--c-muted); }

/* Author card */
.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--c-surface-2);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-block: 2rem;
  border: 1px solid var(--c-border);
}
.author-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--c-border-2); }
.author-card-body { flex: 1; }
.author-card-name { font-weight: 700; font-size: 1rem; color: var(--c-text); }
.author-card-role { font-size: .78rem; color: var(--c-red); font-weight: 600; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .4px; }
.author-card-bio { font-size: .86rem; color: var(--c-muted); margin-bottom: 0; }

/* Related articles */
.related-wrap { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--c-border); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }

/* Comments placeholder */
.comments-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--c-border); }
.comment-form { margin-top: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--c-text); }
.form-group input, .form-group textarea {
  padding: .6rem .9rem;
  border: 1.5px solid var(--c-border);
  border-radius: 6px;
  font-size: .9rem;
  transition: border-color var(--t);
  background: var(--c-surface);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--c-accent-3); outline: none; }
.form-group textarea { resize: vertical; min-height: 100px; }
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t);
}
.btn-primary:hover { background: var(--c-accent-2); }

/* ── 16. Sidebar ─────────────────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

/* Sticky sidebar on desktop */
@media (min-width: 960px) {
  .sidebar { position: sticky; top: 120px; }
}

.widget { background: var(--c-surface); border-radius: var(--r); padding: 1.35rem; box-shadow: var(--sh-xs); }
.widget-title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-muted);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--c-border);
  position: relative;
}
.widget-title::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--c-red);
}

/* Popular list */
.pop-list { display: flex; flex-direction: column; gap: .9rem; }
.pop-item { display: flex; gap: .75rem; align-items: flex-start; }
.pop-num { font-size: 1.5rem; font-weight: 800; color: var(--c-border); line-height: 1; flex-shrink: 0; width: 26px; padding-top: .1rem; }
.pop-item:nth-child(1) .pop-num { color: var(--c-red); }
.pop-item:nth-child(2) .pop-num { color: var(--c-gold); }
.pop-item:nth-child(3) .pop-num { color: var(--c-accent-3); }
.pop-info { flex: 1; }
.pop-title { font-size: .86rem; font-weight: 600; color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--t); }
.pop-title:hover { color: var(--c-accent); }
.pop-meta { font-size: .73rem; color: var(--c-muted); margin-top: .25rem; display: flex; gap: .4rem; }

/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: .45rem; }

/* Newsletter widget */
.newsletter-widget .nl-desc { font-size: .85rem; color: var(--c-muted); margin-bottom: .9rem; }
.nl-form { display: flex; flex-direction: column; gap: .5rem; }
.nl-input {
  padding: .6rem .9rem;
  border: 1.5px solid var(--c-border);
  border-radius: 6px;
  font-size: .88rem;
  transition: border-color var(--t);
}
.nl-input:focus { border-color: var(--c-accent-3); outline: none; }
.nl-btn {
  background: var(--c-red);
  color: #fff;
  border: none;
  padding: .65rem 1rem;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t);
}
.nl-btn:hover { background: var(--c-red-hover); }
.nl-note { font-size: .72rem; color: var(--c-muted); }

/* Ad box */
.ad-box {
  background: var(--c-surface-2);
  border: 1px dashed var(--c-border-2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--c-muted);
  font-size: .8rem;
  min-height: 120px;
}

/* ── 17. Category Page Specific ──────────────────────────────────────────── */
.cat-hero {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-3) 100%);
  color: #fff;
  padding-block: 2.5rem;
  margin-bottom: 2rem;
}
.cat-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cat-hero h1 { color: #fff; font-size: 2rem; }
.cat-hero p { color: rgba(255,255,255,.75); font-size: .92rem; margin-top: .4rem; }
.cat-icon { font-size: 3.5rem; opacity: .25; }

/* Filter bar */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn {
  font-size: .8rem;
  font-weight: 700;
  padding: .4rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  cursor: pointer;
  transition: all var(--t);
}
.filter-btn.active, .filter-btn:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

/* ── 18. Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: .78rem;
  color: var(--c-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  padding-block: .9rem;
}
.breadcrumb a { color: var(--c-accent-3); transition: color var(--t); }
.breadcrumb a:hover { text-decoration: underline; color: var(--c-red); }
.breadcrumb .sep { color: var(--c-border-2); }

/* ── 19. Pagination ──────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .45rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-btn {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: .85rem;
  font-weight: 700;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  cursor: pointer;
  padding-inline: .5rem;
  transition: all var(--t);
}
.page-btn.active, .page-btn:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.page-btn:disabled { opacity: .38; cursor: not-allowed; }

/* ── 20. Stats Bar ───────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--c-accent);
  color: #fff;
  padding-block: 1.5rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--c-blue-light); }
.stat-lbl { font-size: .78rem; color: rgba(255,255,255,.65); margin-top: .25rem; text-transform: uppercase; letter-spacing: .5px; }

/* ── 21. About / Contact Pages ───────────────────────────────────────────── */
.page-hero { background: var(--c-accent); color: #fff; padding-block: 3rem; text-align: center; margin-bottom: 2.5rem; }
.page-hero h1 { color: #fff; margin-bottom: .75rem; }
.page-hero p { color: rgba(255,255,255,.75); max-width: 560px; margin-inline: auto; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.team-card { background: var(--c-surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); text-align: center; padding-bottom: 1.5rem; }
.team-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.team-card-body { padding: 1.1rem 1rem .5rem; }
.team-card-name { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.team-card-role { font-size: .78rem; color: var(--c-red); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.team-card-bio { font-size: .83rem; color: var(--c-muted); margin-top: .5rem; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; margin-top: 1.5rem; }
.timeline::before { content:''; position:absolute; left:7px; top:0; bottom:0; width:2px; background: var(--c-border); }
.timeline-item { position: relative; margin-bottom: 1.75rem; }
.timeline-item::before { content:''; position:absolute; left:-1.6rem; top:.4rem; width:12px; height:12px; border-radius:50%; background: var(--c-red); border:2px solid var(--c-surface); box-shadow:0 0 0 2px var(--c-red); }
.timeline-year { font-size: .75rem; font-weight: 700; color: var(--c-red); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .3rem; }
.timeline-title { font-weight: 700; font-size: .95rem; margin-bottom: .35rem; }
.timeline-desc { font-size: .85rem; color: var(--c-muted); }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h3 { margin-bottom: 1rem; }
.contact-item { display: flex; gap: .85rem; margin-bottom: 1.25rem; }
.contact-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.contact-detail strong { display: block; font-size: .85rem; color: var(--c-text); }
.contact-detail span { font-size: .85rem; color: var(--c-muted); }

/* ── 22. Search Page ─────────────────────────────────────────────────────── */
.search-hero { background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding-block: 2rem; }
.search-form-wrap { max-width: 640px; margin-inline: auto; }
.search-form { display: flex; }
.search-input-main {
  flex: 1;
  padding: .85rem 1.25rem;
  border: 2px solid var(--c-border);
  border-right: none;
  border-radius: var(--r) 0 0 var(--r);
  font-size: 1rem;
  transition: border-color var(--t);
}
.search-input-main:focus { border-color: var(--c-accent-3); outline: none; }
.search-submit {
  background: var(--c-accent);
  color: #fff;
  border: none;
  padding-inline: 1.5rem;
  border-radius: 0 var(--r) var(--r) 0;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t);
}
.search-submit:hover { background: var(--c-accent-2); }
.search-meta { font-size: .85rem; color: var(--c-muted); margin-top: .75rem; text-align: center; }

/* ── 23. 404 Page ────────────────────────────────────────────────────────── */
.not-found {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}
.not-found-code { font-size: clamp(5rem, 15vw, 10rem); font-weight: 800; color: var(--c-red); line-height: 1; }
.not-found h1 { font-size: 1.75rem; margin-block: .5rem 1rem; }
.not-found p { color: var(--c-muted); max-width: 420px; margin-inline: auto; margin-bottom: 1.75rem; }

/* ── 24. Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--c-accent);
  color: rgba(255,255,255,.7);
}

.footer-main { padding-block: 3rem 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .site-logo { font-size: 1.3rem; margin-bottom: .75rem; }
.footer-brand p { font-size: .84rem; color: rgba(255,255,255,.58); line-height: 1.7; margin-bottom: 1rem; }
.footer-social { display: flex; gap: .6rem; }
.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  transition: background var(--t), color var(--t);
}
.social-btn:hover { background: var(--c-red); color: #fff; }

.footer-col h4 { color: #fff; font-size: .88rem; font-weight: 700; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .5px; }
.footer-links { display: flex; flex-direction: column; gap: .6rem; }
.footer-links a { font-size: .84rem; color: rgba(255,255,255,.6); transition: color var(--t); display: flex; align-items: center; gap: .4rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom p { font-size: .78rem; }
.footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-legal a { font-size: .78rem; color: rgba(255,255,255,.5); transition: color var(--t); }
.footer-legal a:hover { color: #fff; }

/* ── 25. Privacy Policy / Static Pages ──────────────────────────────────── */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.35rem; margin-block: 2rem 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--c-border); }
.prose h3 { font-size: 1.05rem; margin-block: 1.25rem .6rem; }
.prose p  { font-size: .97rem; margin-bottom: 1rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ul li { font-size: .97rem; color: var(--c-text-2); margin-bottom: .4rem; }

/* ── 26. Scroll-to-top button ────────────────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--sh-md);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t-med), transform var(--t-med), background var(--t);
  z-index: 500;
}
#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: var(--c-red); }

/* ── 27. Utility Sections ────────────────────────────────────────────────── */
.section-gap { margin-bottom: 3rem; }
.card-surface { background: var(--c-surface); border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--sh-sm); }
.divider { border: none; border-top: 1px solid var(--c-border); margin-block: 2rem; }
.text-muted { color: var(--c-muted); }
.text-red   { color: var(--c-red); }
.fw-700     { font-weight: 700; }

/* ── 28. Print Styles ────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar, .share-bar, #scroll-top, #progress-bar,
  .ticker-bar, .related-wrap, .comments-section, .nav-toggle, .ad-box { display: none !important; }
  .content-wrap { display: block; }
  .article-main { box-shadow: none; padding: 0; }
  .article-body a { text-decoration: underline; color: #000; }
}

/* ── 29. Mobile Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav-wrap {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-accent-2);
    z-index: 199;
    box-shadow: var(--sh-md);
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .main-nav-wrap.is-open { display: flex; }
  .main-nav { flex-direction: column; align-items: stretch; overflow: visible; }
  .main-nav a { border-bottom: 1px solid rgba(255,255,255,.07); border-left: none; padding: .9rem 1.25rem; }

  .header-search { display: none; }
  .btn-subscribe { display: none; }

  .form-row { grid-template-columns: 1fr; }
  .article-main { padding: 1.25rem; }
  .article-body { font-size: 1rem; }
  .data-box { grid-template-columns: repeat(2, 1fr); }

  .hero-main { min-height: 300px; }
  .hero-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-overlay { padding: 1.1rem; }
  .hero-title { font-size: 1.25rem; }
  .date-bar .container { flex-direction: column; align-items: flex-start; gap: .3rem; }
}
