/* ============================================================
   GLOBALPRESS NEWS — Main Stylesheet
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary: #0a1628;
  --primary-light: #122040;
  --accent: #e63329;
  --accent-dark: #b8271e;
  --accent-gold: #f5a623;
  --text-dark: #1a1a2e;
  --text-body: #2d3748;
  --text-muted: #718096;
  --text-light: #a0aec0;
  --bg-white: #ffffff;
  --bg-light: #f7f8fc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #edf2f7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 10px 32px rgba(0,0,0,.14);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', monospace;
  --max-width: 1280px;
  --header-h: 64px;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --primary: #0d1f3c;
  --primary-light: #1a3a6b;
  --text-dark: #f0f4f8;
  --text-body: #cbd5e0;
  --text-muted: #90a4ae;
  --bg-white: #0f172a;
  --bg-light: #1e293b;
  --bg-card: #1e293b;
  --border: #2d3748;
  --border-light: #2d3748;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.35);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

main { padding-bottom: 2rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--accent);
  margin-bottom: 1.25rem;
}

.section-title .icon { font-size: 1.1rem; }

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.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.25rem; }
.grid-main { display: grid; grid-template-columns: 1fr 340px; gap: 1.75rem; padding-bottom: 3rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Breaking News Ticker ---------- */
.ticker-bar {
  background: var(--accent);
  color: #fff;
  padding: .4rem 0;
  font-size: .85rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  z-index: 200;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.ticker-label {
  background: var(--accent-dark);
  padding: .2rem .9rem;
  margin-right: 1rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-scroll {
  display: inline-flex;
  animation: ticker-scroll 50s linear infinite;
  gap: 3.5rem;
}

.ticker-scroll:hover { animation-play-state: paused; }

.ticker-item { white-space: nowrap; }
.ticker-item a { color: #fff; opacity: .93; }
.ticker-item a:hover { opacity: 1; text-decoration: underline; }

@keyframes ticker-scroll {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ---------- Top Bar (Utility Bar) ---------- */
.top-bar {
  background: var(--primary);
  color: var(--text-light);
  font-size: .78rem;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.top-bar-inner { display: flex; align-items: center; justify-content: space-between; }

.top-bar-date { color: var(--text-light); }

.top-bar-links { display: flex; gap: 1.2rem; align-items: center; }
.top-bar-links a { color: var(--text-light); transition: color var(--transition); }
.top-bar-links a:hover { color: #fff; }

.top-bar-social { display: flex; gap: .75rem; }
.top-bar-social a {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .75rem;
  transition: background var(--transition);
}
.top-bar-social a:hover { background: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.05em;
}

.logo-text { color: #fff; }
.logo-text .name { font-size: 1.25rem; font-weight: 800; font-family: var(--font-heading); display: block; line-height: 1.1; }
.logo-text .tagline { font-size: .68rem; color: var(--text-light); letter-spacing: .12em; text-transform: uppercase; }

/* Search */
.header-search { display: flex; align-items: center; flex: 1; max-width: 400px; }
.search-form { display: flex; align-items: center; background: rgba(255,255,255,.1); border-radius: 40px; padding: .3rem .5rem .3rem 1rem; width: 100%; transition: background var(--transition); }
.search-form:focus-within { background: rgba(255,255,255,.18); }
.search-input { background: none; border: none; outline: none; color: #fff; font-size: .9rem; flex: 1; }
.search-input::placeholder { color: rgba(255,255,255,.5); }
.search-btn { background: var(--accent); border: none; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; cursor: pointer; flex-shrink: 0; transition: background var(--transition); }
.search-btn:hover { background: var(--accent-dark); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: .75rem; }

.btn-subscribe {
  background: var(--accent);
  color: #fff;
  padding: .45rem 1.1rem;
  border-radius: 40px;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-subscribe:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-theme {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}
.btn-theme:hover { background: rgba(255,255,255,.2); }

.btn-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
  color: #fff;
}
.btn-hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

/* ---------- Main Navigation ---------- */
.main-nav { background: var(--primary-light); border-top: 1px solid rgba(255,255,255,.07); }
/* Wrap so every topic stays visible instead of being cut off on the right.
   A small column separator sets the three dropdown menus apart from the
   quick-access topic links. */
.nav-inner { display: flex; align-items: stretch; flex-wrap: wrap; row-gap: .1rem; }

.nav-item {
  position: relative;
}

/* Visual divider after the third dropdown (Topics), before the topic quick-links */
.nav-item.nav-sep {
  border-left: 1px solid rgba(255,255,255,.14);
  margin-left: .35rem;
  padding-left: .35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .7rem .85rem;
  color: rgba(255,255,255,.85);
  font-size: .86rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-bottom-color: var(--accent);
}

.nav-link .chevron { font-size: .7rem; transition: transform var(--transition); }
.nav-item:hover .chevron { transform: rotate(180deg); }

/* Mega Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 800;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-wide {
  min-width: 600px;
  max-width: calc(100vw - 1.5rem);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
/* A four-column variant for the Countries mega-menu (15 countries) */
.dropdown-wide.dropdown-4col { grid-template-columns: repeat(4, 1fr); min-width: 720px; }

.dropdown-col-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .6rem;
  color: var(--text-body);
  font-size: .88rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.dropdown-link:hover { background: var(--bg-light); color: var(--accent); }

.dropdown-simple { padding: .5rem 0; }
.dropdown-simple .dropdown-link { padding: .45rem 1rem; }

.flag-emoji { font-size: 1rem; }

/* ---------- Hero Section ---------- */
.hero-section { padding: 1.75rem 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero-main {
  grid-column: 1;
  grid-row: 1 / 3;
}

.hero-secondary { grid-column: 2; grid-row: 1; }
.hero-tertiary { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Article Cards ---------- */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--border);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.article-card:hover .card-img-wrap img { transform: scale(1.04); }

.hero-main .card-img-wrap { height: 380px; }
.hero-secondary .card-img-wrap { height: 200px; }
.hero-tertiary .article-card .card-img-wrap { height: 140px; }

/* Grid cards — consistent image height across desktop, tablet, mobile */
.grid-3 .card-img-wrap,
.grid-2 .card-img-wrap { height: 210px; }

.card-category {
  position: absolute;
  top: .75rem;
  left: .75rem;
  padding: .2rem .65rem;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
}

.cat-politics   { background: #2563eb; }
.cat-economics  { background: #16a34a; }
.cat-trading    { background: #7c3aed; }
.cat-fraud      { background: #dc2626; }
.cat-housing    { background: #d97706; }
.cat-health     { background: #0891b2; }
.cat-sport      { background: #ea580c; }
.cat-travel     { background: #0d9488; }
.cat-jobs       { background: #7c2d92; }
.cat-breaking   { background: var(--accent); }
.cat-world      { background: #1e40af; }
.cat-technology { background: #475569; }

.card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-light); }
.card-meta .source { font-weight: 600; color: var(--accent); }
.card-meta .region { font-weight: 500; }

.card-title {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .5rem;
  transition: color var(--transition);
}

.article-card:hover .card-title { color: var(--accent); }

.hero-main .card-title { font-size: 1.55rem; }
.hero-secondary .card-title { font-size: 1.1rem; }
.hero-tertiary .card-title { font-size: .95rem; }

.card-excerpt {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Effects Interpreter block (generated by effectsBlock() in main.js) ── */
.ei-block {
  margin-top: .6rem;
  padding: .5rem .65rem;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.ei-header {
  font-size: .68rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: .3rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ei-row {
  display: flex;
  gap: .35rem;
  align-items: flex-start;
  padding: .15rem 0;
}
.ei-icon {
  font-size: .85rem;
  flex-shrink: 0;
  line-height: 1.4;
}
.ei-text {
  font-size: .78rem;
  color: var(--text-body);
  line-height: 1.4;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border-light);
}

.read-more {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: gap var(--transition);
}
.read-more:hover { gap: .5rem; }

.card-share-btn {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: color var(--transition);
}
.card-share-btn:hover { color: var(--accent); }

/* ---------- News List Item (compact) ---------- */
.news-list-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}
.news-list-item:last-child { border-bottom: none; }

.news-list-img {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--border);
  flex-shrink: 0;
}

.news-list-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: .3rem;
  transition: color var(--transition);
}
.news-list-item:hover .news-list-title { color: var(--accent); }

.news-list-meta { font-size: .75rem; color: var(--text-muted); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Trending numbers */
.trending-list { display: flex; flex-direction: column; gap: 0; }
.trending-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border-light);
}
.trending-item:last-child { border-bottom: none; }
.trending-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  min-width: 28px;
  font-family: var(--font-heading);
}
.trending-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
  transition: color var(--transition);
}
.trending-item:hover .trending-title { color: var(--accent); }
.trending-meta { font-size: .73rem; color: var(--text-muted); margin-top: .2rem; }

/* Newsletter Widget */
.newsletter-widget { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; }
.newsletter-widget .section-title { color: #fff; border-bottom-color: var(--accent); }
.newsletter-sub { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 1rem; }
.newsletter-form { display: flex; flex-direction: column; gap: .6rem; }
.newsletter-form input {
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .88rem;
  transition: border var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.45); }
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.btn-newsletter {
  background: var(--accent);
  color: #fff;
  padding: .65rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .88rem;
  transition: background var(--transition);
  text-align: center;
}
.btn-newsletter:hover { background: var(--accent-dark); }

/* ── Full-width Newsletter Band (injected before the footer sitewide) ── */
.newsletter-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 3rem 0;
  margin-top: 2.5rem;
  border-top: 4px solid var(--accent);
}
.newsletter-band .container { max-width: 900px; }
.newsletter-band-inner { text-align: center; }
.newsletter-band .nb-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-gold); margin-bottom: .6rem;
}
.newsletter-band h2 {
  font-family: var(--font-heading); font-size: clamp(1.4rem, 3.2vw, 2rem);
  color: #fff; margin: 0 0 .6rem; line-height: 1.2;
}
.newsletter-band p.nb-sub { color: rgba(255,255,255,.78); font-size: 1rem; margin: 0 auto 1.6rem; max-width: 620px; line-height: 1.6; }
.newsletter-band-form {
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
  max-width: 640px; margin: 0 auto;
}
.newsletter-band-form input {
  flex: 1 1 200px; min-width: 0;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12);
  color: #fff; border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .95rem;
  transition: border var(--transition);
}
.newsletter-band-form input::placeholder { color: rgba(255,255,255,.55); }
.newsletter-band-form input:focus { outline: none; border-color: var(--accent-gold); background: rgba(255,255,255,.18); }
.newsletter-band-form .btn-newsletter { flex: 0 0 auto; padding: .8rem 1.6rem; font-size: .95rem; cursor: pointer; border: none; }
.newsletter-band .nb-topics {
  display: flex; flex-wrap: wrap; gap: .45rem .55rem; justify-content: center;
  margin: 1.2rem auto 0; max-width: 700px;
}
.newsletter-band .nb-topic {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; color: rgba(255,255,255,.85); cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px; padding: .3rem .7rem; user-select: none; transition: background var(--transition), border var(--transition);
}
.newsletter-band .nb-topic input { accent-color: var(--accent); margin: 0; }
.newsletter-band .nb-topic:hover { background: rgba(255,255,255,.16); }
.newsletter-band .nb-topic.checked { background: rgba(230,51,41,.25); border-color: var(--accent); }
.newsletter-band .nb-fineprint { font-size: .74rem; color: rgba(255,255,255,.5); margin-top: 1rem; }
.newsletter-band .nb-success { color: #4ade80; font-weight: 700; font-size: 1.05rem; padding: .5rem 0; }
.newsletter-band .nb-error { color: #fca5a5; font-weight: 600; font-size: .9rem; margin-top: .6rem; }

/* Markets Widget */
.market-ticker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .85rem;
}
.market-ticker-item:last-child { border-bottom: none; }
.market-name { font-weight: 600; color: var(--text-dark); }
.market-value { color: var(--text-muted); }
.market-change { font-weight: 700; }
.market-change.up { color: #16a34a; }
.market-change.down { color: var(--accent); }

/* ---------- Section Panels ---------- */
.news-section { padding: 1.75rem 0; }
.news-section + .news-section { padding-top: 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: .7rem;
  border-bottom: 3px solid var(--accent);
}

.see-all-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}

/* ---------- Country / Continent Grid ---------- */
.continent-section { padding: 1.75rem 0; }

.continent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.continent-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.continent-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.continent-banner {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.cb-africa    { background: linear-gradient(135deg,#c0392b,#e67e22); }
.cb-asia      { background: linear-gradient(135deg,#2980b9,#8e44ad); }
.cb-europe    { background: linear-gradient(135deg,#2c3e50,#3498db); }
.cb-namerica  { background: linear-gradient(135deg,#1a5276,#2e86c1); }
.cb-samerica  { background: linear-gradient(135deg,#145a32,#1e8449); }
.cb-oceania   { background: linear-gradient(135deg,#0e6655,#148f77); }

.continent-card-body { padding: 1rem; }
.continent-name { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); margin-bottom: .3rem; }
.continent-desc { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.continent-countries { display: flex; flex-wrap: wrap; gap: .35rem; }
.country-tag {
  padding: .2rem .55rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .75rem;
  color: var(--text-body);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.country-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Topics Bar ---------- */
.topics-bar { background: var(--bg-card); border-radius: var(--radius-md); padding: 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.75rem; }
.topics-bar-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .75rem; }
.topics-grid { display: flex; flex-wrap: wrap; gap: .6rem; }

.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: 40px;
  font-size: .85rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
  color: #fff;
}
.topic-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.tp-politics   { background: #2563eb; }
.tp-economics  { background: #16a34a; }
.tp-trading    { background: #7c3aed; }
.tp-fraud      { background: #dc2626; }
.tp-housing    { background: #d97706; }
.tp-health     { background: #0891b2; }
.tp-sport      { background: #ea580c; }
.tp-travel     { background: #0d9488; }
.tp-jobs       { background: #7c2d92; }

/* ---------- Page Banner ---------- */
.page-banner {
  padding: 2.5rem 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  margin-bottom: 1.75rem;
}

.page-banner-inner { display: flex; align-items: center; gap: 1.5rem; }
.page-banner-icon { font-size: 3rem; }
.page-banner h1 { font-size: 2rem; margin-bottom: .35rem; color: #fff; }
.page-banner p { color: rgba(255,255,255,.75); font-size: .95rem; max-width: 600px; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .75rem;
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { color: rgba(255,255,255,.4); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2rem 0;
}

.page-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--text-body);
  background: var(--bg-card);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: .73rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Ad Placeholder ---------- */
.ad-placeholder {
  background: var(--border-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: .78rem;
  font-family: var(--font-mono);
  text-align: center;
}

.ad-leaderboard { height: 90px; width: 100%; margin: 1rem 0; }
.ad-rectangle { height: 250px; width: 100%; margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 0;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo-text .name { color: #fff; font-size: 1.35rem; }
.footer-brand .logo-text .tagline { color: rgba(255,255,255,.45); }
.footer-desc { font-size: .85rem; color: rgba(255,255,255,.55); margin: 1rem 0 1.25rem; line-height: 1.6; }

.footer-social { display: flex; gap: .6rem; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--accent); color: #fff; }

.footer-col h4 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.5);
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: .45rem; }
.footer-col ul li a {
  font-size: .87rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { color: rgba(255,255,255,.4); transition: color var(--transition); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px; height: 42px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 500;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--accent-dark); transform: translateY(-3px); }

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary);
  color: rgba(255,255,255,.85);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 9999;
  font-size: .88rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.2);
  transform: translateY(100%);
  transition: transform var(--transition);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner a { color: var(--accent-gold); text-decoration: underline; }
.btn-accept-cookie {
  background: var(--accent);
  color: #fff;
  padding: .45rem 1.1rem;
  border-radius: 40px;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition);
}
.btn-accept-cookie:hover { background: var(--accent-dark); }

/* ---------- Loading Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-light) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Mobile Nav Overlay ---------- */
.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--primary);
  z-index: 999;
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--transition);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.mobile-nav-close { color: #fff; font-size: 1.4rem; }
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-link { padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.85); font-size: 1rem; font-weight: 500; }
.mobile-nav-link:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main, .hero-secondary { grid-column: 1; grid-row: auto; }
  .hero-tertiary { grid-column: 1; }
  .hero-main .card-img-wrap { height: 260px; }
  .continent-grid { grid-template-columns: 1fr 1fr; }
  .dropdown-wide { min-width: 100vw; left: -50vw; }
  .nav-inner { overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .card-body { padding: 1rem; }
  /* Effects Interpreter on tablet — slightly more breathing room */
  .ei-block { padding: .55rem .7rem; }
  .ei-text { font-size: .8rem; }
}

@media (max-width: 700px) {
  :root { --header-h: 56px; }
  .top-bar { display: none; }
  .header-search { display: none; }
  .btn-hamburger { display: flex; }
  .main-nav { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .continent-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .75rem; text-align: center; }
  .hero-tertiary { grid-template-columns: 1fr; }
  .page-banner h1 { font-size: 1.5rem; }
  .btn-subscribe { display: none; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  .card-body { padding: .875rem; }
  .mobile-nav-link { padding: 1rem 0; min-height: 44px; display: flex; align-items: center; }
  /* Section titles — smaller on mobile so badge/timestamp don't overflow */
  .section-title { font-size: 1.05rem; margin-bottom: 1rem; }
  /* Effects Interpreter on mobile — larger, finger-friendly text */
  .ei-block { padding: .65rem .8rem; margin-top: .5rem; }
  .ei-header { font-size: .72rem; margin-bottom: .35rem; }
  .ei-row { padding: .2rem 0; gap: .4rem; }
  .ei-icon { font-size: .9rem; }
  .ei-text { font-size: .84rem; line-height: 1.45; }
  /* Larger grid images on full-width mobile cards */
  .grid-3 .card-img-wrap,
  .grid-2 .card-img-wrap { height: 220px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .main-nav, .ticker-bar, .sidebar, .site-footer, .scroll-top, .cookie-banner { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ============================================================
   Live Markets Board (Trading & Markets — real-time data board)
   Free sources: Binance (crypto), frankfurter.dev (forex),
   CoinGecko (gold). Indices/Commodities/Bonds shown as indicative.
   ============================================================ */
.market-board {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}
.mb-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
  padding: 1rem 1.15rem .85rem;
  background: var(--primary);
  color: #fff;
}
.mb-head .mb-title { display: flex; align-items: center; gap: .5rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.mb-head .mb-title .mb-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: mbPulse 1.8s infinite; }
@keyframes mbPulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.7);} 70%{box-shadow:0 0 0 7px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }
.mb-updated { font-size: .74rem; color: rgba(255,255,255,.72); }
.mb-tabs {
  display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin;
  padding: .6rem .8rem; background: var(--primary-light);
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.mb-tabs::-webkit-scrollbar { height: 5px; }
.mb-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }
.mb-tab {
  flex: 0 0 auto; cursor: pointer; white-space: nowrap;
  padding: .42rem .95rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  color: rgba(255,255,255,.8); background: rgba(255,255,255,.08);
  border: 1px solid transparent; transition: all var(--transition);
}
.mb-tab:hover { background: rgba(255,255,255,.16); color: #fff; }
.mb-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mb-note { padding: .5rem 1.15rem 0; font-size: .72rem; color: var(--text-muted); }
.mb-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0; padding: .35rem .5rem 1rem;
}
@media (max-width: 600px){ .mb-grid { grid-template-columns: 1fr; } }
.mb-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  gap: .6rem; padding: .6rem .65rem; border-bottom: 1px solid var(--border-light);
  min-height: 46px;
}
.mb-name { font-weight: 600; color: var(--text-dark); font-size: .88rem; }
.mb-name .mb-sub { display: block; font-weight: 500; color: var(--text-muted); font-size: .72rem; }
.mb-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-body); font-size: .9rem; text-align: right; }
.mb-chg { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .82rem; text-align: right; min-width: 66px; border-radius: 6px; padding: .15rem .35rem; }
.mb-chg.up   { color: #16a34a; background: rgba(22,163,74,.10); }
.mb-chg.down { color: var(--accent); background: rgba(230,51,41,.10); }
.mb-chg.flat { color: var(--text-muted); background: transparent; }
.mb-row.mb-flash { animation: mbFlash .9s ease; }
@keyframes mbFlash { 0%{ background: rgba(245,166,35,.16);} 100%{ background: transparent;} }
.mb-foot { padding: .7rem 1.15rem 1rem; font-size: .72rem; color: var(--text-muted); border-top: 1px solid var(--border-light); }
.mb-foot a { color: var(--accent); font-weight: 600; }
.mb-skel { color: var(--text-light); font-size: .82rem; padding: 1.2rem; text-align: center; grid-column: 1 / -1; }

/* ============================================================
   Cross-promo ad cards (links to the network's other sites)
   ============================================================ */
.promo-ad {
  display: block; text-decoration: none; color: #fff;
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.06);
  margin-bottom: 1.5rem; transition: transform var(--transition), box-shadow var(--transition);
}
.promo-ad:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.promo-ad .pa-inner { padding: 1.1rem 1.15rem; position: relative; }
.promo-ad .pa-spon { position: absolute; top: .55rem; right: .7rem; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.promo-ad .pa-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-heading); font-weight: 800; font-size: 1.08rem; margin-bottom: .3rem; }
.promo-ad .pa-brand .pa-logo { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; background: rgba(255,255,255,.18); font-size: 1rem; }
.promo-ad .pa-tag { font-size: .86rem; line-height: 1.4; color: rgba(255,255,255,.92); margin-bottom: .7rem; }
.promo-ad .pa-cta { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; background: rgba(255,255,255,.95); color: #111; padding: .4rem .8rem; border-radius: 999px; }
.promo-ad.pa-fx     { background: linear-gradient(135deg, #0b3d91 0%, #1565c0 100%); }
.promo-ad.pa-hh     { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%); }
.promo-ad.pa-marhaba{ background: linear-gradient(135deg, #7c2d12 0%, #c2410c 100%); }
.promo-ad.pa-foody  { background: linear-gradient(135deg, #b91c1c 0%, #f59e0b 100%); }
.promo-ad.pa-pet    { background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%); }
/* QuietSaving's own brand: black background, yellow accent — matches
   quietsaving.com rather than the shared white-pill CTA used elsewhere. */
.promo-ad.pa-qs     { background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%); border: 1px solid rgba(250,204,21,.25); }
.promo-ad.pa-qs .pa-brand { color: #fff; }
.promo-ad.pa-qs .pa-brand .pa-logo { background: rgba(250,204,21,.18); }
.promo-ad.pa-qs .pa-cta { background: #facc15; color: #111; }
.promo-ad.pa-wide .pa-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.promo-ad.pa-wide .pa-tag { margin-bottom: 0; flex: 1 1 240px; }
.promo-ad.pa-wide .pa-cta { margin-left: auto; }

/* UAE regional block on the Middle East page */
.uae-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; margin: 1.5rem 0 2rem; box-shadow: var(--shadow-sm); }
.uae-block .uae-head { display: flex; align-items: center; gap: .6rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--text-dark); margin-bottom: .35rem; }
.uae-block .uae-sub { font-size: .9rem; color: var(--text-muted); margin-bottom: 1rem; }
.uae-ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.uae-ads .promo-ad { margin-bottom: 0; }
