/* ============================================================
   NexTerraX — Production Stylesheet v2.0
   Technology News Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&family=JetBrains+Mono:wght@500&display=swap');

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --clr-bg:          #FFFFFF;
  --clr-surface:     #F8FAFC;
  --clr-border:      #E2E8F0;
  --clr-text:        #0F172A;
  --clr-muted:       #64748B;
  --clr-heading:     #0B1829;
  --clr-blue:        #1D4ED8;
  --clr-blue-light:  #3B82F6;
  --clr-blue-dark:   #1E3A8A;
  --clr-red:         #DC2626;
  --clr-red-light:   #EF4444;
  --clr-navy:        #0B1829;
  --clr-green:       #059669;
  --clr-purple:      #7C3AED;
  --clr-orange:      #D97706;
  --clr-cyan:        #0891B2;

  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:  'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-mono:   'JetBrains Mono', 'Courier New', monospace;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --shadow-xs:  0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-md:  0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 20px 25px rgba(0,0,0,.10), 0 10px 10px rgba(0,0,0,.04);
  --shadow-xl:  0 25px 50px rgba(0,0,0,.12);

  --transition: 0.18s ease;
  --transition-md: 0.28s ease;

  --header-h: 72px;
  --sidebar-w: 320px;
  --container-w: 1240px;
}

/* ── Dark mode ───────────────────────────────────────────────── */
[data-theme="dark"] {
  --clr-bg:      #0D1117;
  --clr-surface: #161B22;
  --clr-border:  #30363D;
  --clr-text:    #E6EDF3;
  --clr-muted:   #8B949E;
  --clr-heading: #F0F6FC;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-md), color var(--transition-md);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-blue-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── Container ───────────────────────────────────────────────── */
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── BREAKING NEWS TICKER ──────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.breaking-bar {
  background: var(--clr-red);
  color: #fff;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}
.breaking-label {
  background: #9B0000;
  padding: 0 18px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.breaking-label span { color: #FFD700; margin-right: 6px; font-size: 14px; }
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-block;
  padding: 0 48px 0 0;
  font-size: 13px;
  font-weight: 500;
}
.ticker-item a { color: #fff; }
.ticker-item a:hover { color: #FFE566; }
.ticker-item::after { content: '◆'; margin-left: 48px; opacity: .4; font-size: 8px; }
@keyframes ticker { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── HEADER ────────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-md), border-color var(--transition-md);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  width: 38px; height: 38px;
  background: var(--clr-navy);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--clr-blue);
}
.logo-mark .nx { color: var(--clr-blue-light); }
.logo-text-wrap { line-height: 1.1; }
.logo-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--clr-heading);
  letter-spacing: -0.5px;
}
.logo-name span { color: var(--clr-blue); }
.logo-tagline {
  font-size: 10px;
  font-weight: 500;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.main-nav { flex: 1; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-text);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active { background: var(--clr-surface); color: var(--clr-blue); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-search {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-muted);
  transition: all var(--transition);
}
.btn-search:hover { background: var(--clr-surface); color: var(--clr-text); }
.btn-theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-muted);
  font-size: 18px;
  transition: all var(--transition);
}
.btn-theme-toggle:hover { background: var(--clr-surface); color: var(--clr-text); }
.btn-subscribe {
  padding: 8px 18px;
  background: var(--clr-blue);
  color: #fff !important;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-subscribe:hover { background: var(--clr-blue-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-hamburger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.btn-hamburger span {
  width: 22px; height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.active { display: flex; }
.search-box {
  background: var(--clr-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 640px;
  margin: 0 16px;
  box-shadow: var(--shadow-xl);
}
.search-input-wrap { position: relative; }
.search-input-wrap input {
  width: 100%;
  padding: 14px 50px 14px 18px;
  font-size: 18px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-bg);
  color: var(--clr-text);
  outline: none;
  transition: border-color var(--transition);
}
.search-input-wrap input:focus { border-color: var(--clr-blue); }
.search-input-wrap button {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--clr-muted);
  font-size: 20px;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  padding: 16px;
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--clr-text);
  border-radius: var(--radius-sm);
}
.mobile-nav a:hover { background: var(--clr-surface); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── HERO / FEATURED ────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.hero-section { padding: 40px 0 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto auto;
  gap: 20px;
}
.hero-main {
  grid-row: 1 / 3;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-navy);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-lg);
}
.hero-main img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hero-main:hover img { transform: scale(1.03); }
.hero-main .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}
.hero-content {
  position: relative;
  padding: 32px;
  color: #fff;
}
.hero-content .cat-badge { margin-bottom: 12px; }
.hero-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 12px;
}
.hero-content h2 a { color: #fff; }
.hero-content h2 a:hover { color: rgba(255,255,255,.85); }
.hero-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; opacity: .8; }

.hero-secondary { display: flex; flex-direction: column; gap: 16px; }
.hero-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  display: flex;
  gap: 0;
  flex: 1;
  transition: all var(--transition);
}
.hero-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hero-card-img {
  width: 140px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--clr-border);
}
.hero-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-md); }
.hero-card:hover .hero-card-img img { transform: scale(1.05); }
.hero-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.hero-card-body h3 a { color: var(--clr-heading); }
.hero-card-body h3 a:hover { color: var(--clr-blue); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── SECTION HEADERS ────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--clr-border);
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--clr-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--clr-blue);
  border-radius: 2px;
}
.view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-blue);
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all:hover { text-decoration: underline; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── ARTICLE CARDS ──────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.article-grid.four-col { grid-template-columns: repeat(4, 1fr); }
.article-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-md);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: transparent;
}
.article-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--clr-surface);
  position: relative;
}
.article-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .article-card-img img { transform: scale(1.06); }
.article-card-img .sponsored-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--clr-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.article-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.article-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}
.article-card-body h3 a { color: var(--clr-heading); }
.article-card-body h3 a:hover { color: var(--clr-blue); }
.article-card-body p {
  font-size: 14px;
  color: var(--clr-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--clr-border);
}

/* List card style */
.article-list-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--clr-border);
}
.article-list-item:last-child { border-bottom: none; }
.article-list-img {
  width: 110px;
  height: 75px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--clr-surface);
}
.article-list-img img { width: 100%; height: 100%; object-fit: cover; }
.article-list-body { flex: 1; }
.article-list-body h3 { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.article-list-body h3 a { color: var(--clr-heading); }
.article-list-body h3 a:hover { color: var(--clr-blue); }
.article-list-body p { font-size: 13px; color: var(--clr-muted); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── CATEGORY BADGE ─────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #fff;
  background: var(--clr-blue);
  text-decoration: none;
  transition: opacity var(--transition);
}
.cat-badge:hover { opacity: .85; color: #fff; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── ARTICLE META ────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--clr-muted);
  flex-wrap: wrap;
}
.article-meta .separator { color: var(--clr-border); }
.article-meta .reading-time::before { content: '⏱ '; }
.article-meta .views::before { content: '👁 '; }
.author-avatar {
  width: 24px; height: 24px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--clr-blue);
}

/* ── ═══════════════════════════════════════════════════════════ */
/* ── LAYOUT WITH SIDEBAR ─────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 40px;
  padding: 48px 0;
}
.content-main { min-width: 0; }
.sidebar { min-width: 0; }

/* Sidebar widget */
.sidebar-widget {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
}
.sidebar-widget-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-heading);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--clr-blue);
  display: inline-block;
}
.trending-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--clr-border);
}
.trending-item:last-child { border-bottom: none; }
.trending-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--clr-border);
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
}
.trending-item:first-child .trending-num { color: var(--clr-blue); }
.trending-item:nth-child(2) .trending-num { color: var(--clr-muted); }
.trending-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.trending-title a { color: var(--clr-heading); }
.trending-title a:hover { color: var(--clr-blue); }

/* Newsletter widget */
.newsletter-widget { background: linear-gradient(135deg, var(--clr-navy) 0%, #1E3A5F 100%); border: none; }
.newsletter-widget .sidebar-widget-title { color: #fff; border-color: var(--clr-blue-light); }
.newsletter-widget p { color: rgba(255,255,255,.75); font-size: 13px; margin-bottom: 16px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 14px;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { border-color: var(--clr-blue-light); }
.btn-newsletter {
  padding: 11px;
  background: var(--clr-blue);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-newsletter:hover { background: var(--clr-blue-dark); }

/* Categories widget */
.cat-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: 14px;
}
.cat-list-item:last-child { border-bottom: none; }
.cat-list-item a { color: var(--clr-text); font-weight: 500; }
.cat-list-item a:hover { color: var(--clr-blue); }
.cat-count {
  background: var(--clr-surface);
  color: var(--clr-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ── ═══════════════════════════════════════════════════════════ */
/* ── SINGLE ARTICLE ─────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.article-header { padding: 48px 0 32px; }
.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--clr-heading);
  margin: 16px 0 20px;
}
.article-excerpt {
  font-size: 18px;
  color: var(--clr-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  font-weight: 400;
}
.article-featured-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  aspect-ratio: 16/9;
  background: var(--clr-surface);
}
.article-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--clr-text);
}
.article-body h2 { font-family: var(--font-serif); font-size: 28px; margin: 36px 0 16px; color: var(--clr-heading); }
.article-body h3 { font-size: 21px; font-weight: 700; margin: 28px 0 12px; color: var(--clr-heading); }
.article-body p { margin-bottom: 20px; }
.article-body a { color: var(--clr-blue); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: var(--radius); margin: 28px auto; box-shadow: var(--shadow-md); }
.article-body blockquote {
  border-left: 4px solid var(--clr-blue);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--clr-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 18px;
  color: var(--clr-muted);
}
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; }
.article-body code {
  font-family: var(--font-mono);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}
.article-body pre {
  background: var(--clr-navy);
  color: #E6EDF3;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
}
.article-body pre code { background: none; border: none; color: inherit; font-size: 14px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.article-body th { background: var(--clr-surface); padding: 12px 16px; font-weight: 600; border: 1px solid var(--clr-border); }
.article-body td { padding: 10px 16px; border: 1px solid var(--clr-border); }
.article-body tr:nth-child(even) td { background: var(--clr-surface); }

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--clr-blue);
  z-index: 9999;
  transition: width 0.1s;
  width: 0;
}

/* Share buttons */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin: 32px 0;
}
.share-bar span { font-size: 13px; font-weight: 600; color: var(--clr-muted); margin-right: 4px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  transition: opacity var(--transition);
}
.share-btn:hover { opacity: .88; color: #fff; }
.share-btn.twitter  { background: #000; }
.share-btn.facebook { background: #1877F2; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.copy     { background: var(--clr-surface); color: var(--clr-text); border: 1px solid var(--clr-border); }

/* Tags */
.article-tags { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--clr-muted);
  transition: all var(--transition);
}
.article-tags a:hover { border-color: var(--clr-blue); color: var(--clr-blue); background: rgba(29,78,216,.05); }

/* Author box */
.author-box {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  margin: 40px 0;
}
.author-box-avatar {
  width: 72px; height: 72px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--clr-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.author-box-role { font-size: 12px; color: var(--clr-blue); font-weight: 600; margin-bottom: 8px; }
.author-box p { font-size: 14px; color: var(--clr-muted); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── PAGINATION ──────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px 0;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-text);
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--clr-blue); color: var(--clr-blue); }
.pagination .current {
  background: var(--clr-blue);
  border-color: var(--clr-blue);
  color: #fff;
}
.pagination .dots { border: none; color: var(--clr-muted); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── BREADCRUMB ──────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--clr-muted);
  padding: 16px 0;
}
.breadcrumb a { color: var(--clr-muted); }
.breadcrumb a:hover { color: var(--clr-blue); }
.breadcrumb .sep { color: var(--clr-border); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── CATEGORY PAGE HEADER ────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.cat-page-header {
  padding: 40px 0;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 40px;
}
.cat-page-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--clr-heading);
  margin-bottom: 8px;
}
.cat-page-header p { font-size: 16px; color: var(--clr-muted); }
.cat-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

/* ── ═══════════════════════════════════════════════════════════ */
/* ── NEWSLETTER SECTION (full page) ─────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.newsletter-section {
  background: linear-gradient(135deg, var(--clr-navy) 0%, #0D2B4A 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231D4ED8' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.newsletter-section h2 {
  font-family: var(--font-serif);
  font-size: 38px;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}
.newsletter-section p {
  color: rgba(255,255,255,.7);
  font-size: 16px;
  margin-bottom: 32px;
  position: relative;
}
.newsletter-form-main {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 10px;
  position: relative;
}
.newsletter-form-main input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 15px;
  outline: none;
}
.newsletter-form-main input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form-main input:focus { border-color: var(--clr-blue-light); }
.newsletter-form-main button {
  padding: 14px 24px;
  background: var(--clr-blue);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition);
}
.newsletter-form-main button:hover { background: var(--clr-blue-dark); transform: translateY(-1px); }
.newsletter-privacy { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 12px; position: relative; }
.newsletter-privacy a { color: rgba(255,255,255,.6); text-decoration: underline; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── CONTACT PAGE ────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--clr-navy) 0%, #1E3A5F 100%);
  padding: 60px 0;
  color: #fff;
  text-align: center;
}
.page-hero h1 { font-family: var(--font-serif); font-size: 42px; font-weight: 400; margin-bottom: 12px; }
.page-hero p { font-size: 17px; color: rgba(255,255,255,.75); }
.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; padding: 60px 0; }
.contact-form-wrap { }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--clr-heading); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--clr-text);
  background: var(--clr-bg);
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--clr-blue); }
.form-control.error { border-color: var(--clr-red); }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-info-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-info-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info-icon {
  width: 44px; height: 44px;
  background: rgba(29,78,216,.1);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.contact-info-label { font-size: 12px; color: var(--clr-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.contact-info-value { font-size: 15px; font-weight: 500; color: var(--clr-heading); margin-top: 2px; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── BUTTONS ──────────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--clr-blue); color: #fff; }
.btn-primary:hover { background: var(--clr-blue-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--clr-surface); color: var(--clr-text); border: 1px solid var(--clr-border); }
.btn-secondary:hover { border-color: var(--clr-blue); color: var(--clr-blue); }
.btn-danger { background: var(--clr-red); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-loading { opacity: .7; pointer-events: none; }
.btn-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── ALERTS ───────────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── COOKIE CONSENT ──────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--clr-navy);
  color: #fff;
  padding: 20px 24px;
  z-index: 9998;
  display: none;
  box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}
.cookie-banner.show { display: block; }
.cookie-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; font-size: 14px; color: rgba(255,255,255,.85); min-width: 200px; }
.cookie-text a { color: var(--clr-blue-light); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-cookie-accept {
  padding: 9px 20px;
  background: var(--clr-blue);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-cookie-accept:hover { background: var(--clr-blue-dark); }
.btn-cookie-decline {
  padding: 9px 20px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
}
.btn-cookie-settings {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
}

/* ── ═══════════════════════════════════════════════════════════ */
/* ── ADS ──────────────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.ad-unit { text-align: center; margin: 24px 0; }
.ad-unit img { margin: 0 auto; border-radius: var(--radius); }
.ad-label {
  font-size: 10px;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
  display: block;
}

/* ── ═══════════════════════════════════════════════════════════ */
/* ── FOOTER ───────────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--clr-navy);
  color: rgba(255,255,255,.75);
  padding: 64px 0 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-tagline { color: rgba(255,255,255,.4); }
.footer-about {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,.6);
  margin: 16px 0 20px;
}
.footer-social { display: flex; gap: 10px; }
.social-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  text-decoration: none;
}
.social-icon:hover { background: var(--clr-blue); transform: translateY(-2px); }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #fff;
  margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom-links { display: flex; gap: 20px; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── PAGE SECTIONS ───────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.section { padding: 48px 0; }
.section + .section { padding-top: 0; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── SEARCH PAGE ─────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.search-page-header { padding: 48px 0 32px; }
.search-page-header h1 { font-size: 28px; font-weight: 700; color: var(--clr-heading); }
.search-result-count { font-size: 15px; color: var(--clr-muted); margin-top: 6px; }
.search-form-bar {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin-top: 20px;
}
.search-form-bar input {
  flex: 1;
  padding: 13px 18px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--clr-text);
  background: var(--clr-bg);
  outline: none;
}
.search-form-bar input:focus { border-color: var(--clr-blue); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── 404 / ERROR ─────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.error-page { padding: 120px 0; text-align: center; }
.error-code {
  font-size: 120px;
  font-weight: 800;
  color: var(--clr-border);
  line-height: 1;
  font-family: var(--font-mono);
}
.error-page h1 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.error-page p { color: var(--clr-muted); font-size: 17px; margin-bottom: 32px; }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── UTILITY ──────────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
.text-muted { color: var(--clr-muted) !important; }
.text-blue  { color: var(--clr-blue) !important; }
.text-red   { color: var(--clr-red) !important; }
.fw-bold    { font-weight: 700 !important; }
.text-center { text-align: center !important; }
.mt-auto { margin-top: auto !important; }
.gap-8  { gap: 8px !important; }
.d-flex { display: flex !important; }
.align-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── ═══════════════════════════════════════════════════════════ */
/* ── RESPONSIVE ───────────────────────────────────────────────── */
/* ── ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 280px; }
  .hero-grid { grid-template-columns: 1fr 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-grid.four-col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .main-nav, .btn-subscribe { display: none; }
  .btn-hamburger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { min-height: 340px; }
  .hero-secondary { flex-direction: column; }
  .content-layout { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .article-grid.two-col { grid-template-columns: 1fr; }
  .article-grid.four-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .newsletter-form-main { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .article-card-body { padding: 14px; }
  .hero-content { padding: 20px; }
  .hero-content h2 { font-size: 20px; }
  .share-bar { flex-wrap: wrap; }
  .ticker-item { font-size: 12px; }
}

/* ── Print ────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar, .cookie-banner,
  .breaking-bar, .newsletter-section, .share-bar,
  .reading-progress, .ad-unit { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .content-layout { grid-template-columns: 1fr; }
  a { color: #000; text-decoration: underline; }
}
