/* ──────────────────────────────────────────────────────────────
   DolarNews — shared styles
   News-portal theme: dollar-green + dark navy, finance accents
   ────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #0E5B38;
  --green-d:     #094a2e;
  --green-l:     #e6f2ec;
  --navy:        #0b1220;
  --navy-2:      #131c2e;
  --gold:        #c9a227;
  --red:         #d63b3b;
  --green-up:    #16a34a;
  --dark:        #1a1a22;
  --mid:         #555;
  --muted:       #8b94a3;
  --line:        #e4e7ec;
  --light:       #f6f7f9;
  --white:       #ffffff;
  --radius:      6px;
  --radius-lg:   10px;
  --shadow:      0 4px 18px rgba(0,0,0,.06);
  --shadow-lg:   0 12px 36px rgba(0,0,0,.10);
  --max:         1240px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--dark); background: var(--white);
  padding-top: 104px; /* ticker (34) + nav (70) */
}
h1, h2, h3, h4, h5 {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-weight: 700; line-height: 1.2; color: var(--navy);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── TICKER ─────────────────────────────────────────── */
#ticker {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  background: var(--navy); color: #e6ebf3;
  font-size: 13px; height: 34px; display: flex; align-items: center;
  overflow: hidden;
  border-bottom: 1px solid #1c2638;
}
.ticker-track {
  display: flex; gap: 28px; align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 24px;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item { display: inline-flex; align-items: center; gap: 8px; }
.ticker-pair { font-weight: 700; color: #fff; letter-spacing: .3px; }
.ticker-val  { font-variant-numeric: tabular-nums; }
.ticker-up   { color: var(--green-up); }
.ticker-down { color: #f87171; }
.ticker-loading { opacity: .6; font-style: italic; }

/* ── NAV ────────────────────────────────────────────── */
#nav {
  position: fixed; top: 34px; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
#nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: 22px; color: var(--navy); letter-spacing: -.5px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, var(--green), var(--green-d));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
}
.brand-dolar { color: var(--green); }
.brand-news  { color: var(--navy); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  display: inline-block; padding: 8px 12px; border-radius: 6px;
  font-size: 14.5px; font-weight: 600; color: var(--mid);
  transition: background .15s, color .15s;
}
.nav-links a:hover, .nav-links a.active { background: var(--green-l); color: var(--green-d); }

.nav-right { display: flex; align-items: center; gap: 12px; }

/* search box */
.nav-search {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--light); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px;
}
.nav-search input {
  border: 0; background: transparent; outline: none; font-size: 14px;
  width: 160px; color: var(--dark);
}
.nav-search svg { width: 14px; height: 14px; color: var(--muted); }

/* language toggle */
.lang-toggle {
  display: inline-flex; align-items: center;
  background: var(--light); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--mid);
  transition: background .15s, color .15s;
}
.lang-btn.active { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lang-btn svg { width: 18px; height: 13px; border-radius: 2px; display: block; flex-shrink: 0; }

/* mobile hamburger */
.nav-toggle { display: none; }

/* mobile menu — hidden everywhere by default; only opens on small screens */
#mobile-menu { display: none; }

/* ── HERO (homepage featured) ───────────────────────── */
.hero {
  padding: 36px 0 28px;
  background: linear-gradient(180deg, var(--light) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: stretch;
}
.hero-featured {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--navy);
  min-height: 460px; box-shadow: var(--shadow-lg);
}
.hero-featured img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .85; transition: transform .6s, opacity .3s;
}
.hero-featured:hover img { transform: scale(1.04); opacity: .75; }
.hero-featured::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.85) 100%);
}
.hero-featured-body {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 28px 26px;
  z-index: 2; color: #fff;
}
.hero-featured-body .chip { background: rgba(255,255,255,.18); color: #fff; }
.hero-featured-body h1 {
  font-size: 32px; color: #fff; margin: 12px 0 10px; line-height: 1.15;
}
.hero-featured-body p { font-size: 15px; color: #e2e8f0; max-width: 620px; }
.hero-featured-body .meta { font-size: 12.5px; color: #cbd5e1; margin-top: 14px; }

.hero-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-side-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.hero-side-card:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-side-card .thumb {
  width: 96px; height: 80px; border-radius: var(--radius);
  overflow: hidden; background: var(--light);
}
.hero-side-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-card h3 {
  font-size: 16px; line-height: 1.3; margin-bottom: 6px;
  transition: color .15s;
}
.hero-side-card:hover h3 { color: var(--green); }
.hero-side-card .meta { font-size: 12px; color: var(--muted); }

/* ── CATEGORY CHIP ──────────────────────────────────── */
.chip {
  display: inline-block;
  background: var(--green-l); color: var(--green-d);
  font-size: 11px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
}
.chip-fed     { background: #fef3c7; color: #92400e; }
.chip-usd     { background: var(--green-l); color: var(--green-d); }
.chip-economy { background: #dbeafe; color: #1e40af; }
.chip-markets { background: #fce7f3; color: #9d174d; }

/* ── LATEST NEWS GRID ───────────────────────────────── */
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px; gap: 12px;
  border-bottom: 2px solid var(--navy); padding-bottom: 10px;
}
.section-head h2 {
  font-size: 22px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--navy);
}
.section-head a { font-size: 13px; color: var(--green); font-weight: 700; }

.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.news-card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card .thumb {
  aspect-ratio: 16 / 9; background: var(--light); overflow: hidden;
}
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.news-card .chip { align-self: flex-start; margin-bottom: 10px; }
.news-card h3 {
  font-size: 18px; line-height: 1.3; margin-bottom: 10px;
  transition: color .15s;
}
.news-card:hover h3 { color: var(--green); }
.news-card p { font-size: 14px; color: var(--mid); margin-bottom: 14px; flex: 1; }
.news-card .meta { font-size: 12px; color: var(--muted); margin-top: auto; }

/* ── ARTICLE PAGE ───────────────────────────────────── */
.article-wrap {
  display: grid; grid-template-columns: 60px 1fr 280px;
  gap: 40px; max-width: var(--max); margin: 0 auto; padding: 0 24px;
}
.article-share-rail {
  position: sticky; top: 130px; align-self: start;
  display: flex; flex-direction: column; gap: 8px;
}
.article-main { min-width: 0; padding: 36px 0 56px; }
.article-aside { padding-top: 36px; min-width: 0; }
.article-aside-card {
  background: var(--light); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 20px;
}
.article-aside-card h4 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--navy); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--green);
}
.aside-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.aside-item:last-child { border-bottom: 0; }
.aside-item .thumb { width: 64px; height: 56px; border-radius: 4px; overflow: hidden; background: #fff; }
.aside-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.aside-item h5 { font-size: 13.5px; line-height: 1.3; transition: color .15s; }
.aside-item:hover h5 { color: var(--green); }

.breadcrumb {
  font-size: 13px; color: var(--muted); margin-bottom: 14px;
}
.breadcrumb a { color: var(--mid); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { margin: 0 6px; color: var(--line); }

.article-header { margin-bottom: 28px; }
.article-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin: 12px 0 18px;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.article-h1 { font-size: 38px; line-height: 1.15; margin: 12px 0; }
.article-lead { font-size: 18px; color: var(--mid); line-height: 1.5; }

.article-hero {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  overflow: hidden; margin: 22px 0 28px;
  background: var(--light);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

/* article body content */
.article-body { font-size: 17px; line-height: 1.75; color: var(--dark); }
.article-body p { margin: 0 0 1.1em; }
.article-body h2 { font-size: 24px; margin: 1.6em 0 .6em; color: var(--navy); }
.article-body h3 { font-size: 19px; margin: 1.4em 0 .5em; color: var(--navy); }
.article-body ul, .article-body ol { margin: 0 0 1.1em 1.4em; }
.article-body li { margin-bottom: .4em; }
.article-body blockquote {
  border-left: 4px solid var(--green);
  padding: 8px 0 8px 18px; margin: 1.2em 0;
  font-style: italic; color: var(--mid);
}
.article-body a { color: var(--green); text-decoration: underline; }
.article-body strong { color: var(--navy); }

/* article audio player */
.article-audio {
  margin: 20px 0; padding: 18px; border-radius: var(--radius-lg);
  background: var(--light); border: 1px solid var(--line);
}
.audio-unavailable {
  color: var(--muted); font-size: 14px; font-style: italic; text-align: center;
  padding: 12px;
}
.audio-player {
  display: flex; align-items: center; gap: 12px;
}
.audio-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.audio-btn:hover { background: var(--green-d); transform: scale(1.05); }
.audio-btn svg { width: 18px; height: 18px; }

.audio-controls {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.audio-progress {
  flex: 1; height: 4px; background: var(--line); border-radius: 2px;
  cursor: pointer; position: relative;
}
.audio-progress-bar {
  height: 100%; background: var(--green); border-radius: 2px;
  width: 0%; transition: width .1s linear;
}
.audio-progress:hover .audio-progress-bar { background: var(--green-d); }

.audio-time {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap; min-width: 50px; text-align: right;
}

.audio-volume {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.audio-volume-slider {
  width: 60px; height: 3px; background: var(--line); border-radius: 2px;
  cursor: pointer; appearance: none; -webkit-appearance: none;
}
.audio-volume-slider::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); cursor: pointer;
}
.audio-volume-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); cursor: pointer; border: none;
}
.audio-volume svg { width: 16px; height: 16px; color: var(--muted); }

/* article sources */
.article-sources {
  margin-top: 2.4em; padding: 1.2em 0;
  border-top: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
}
.article-sources h3 { font-size: 16px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.8em; }
.article-sources ul { list-style: none; margin: 0; }
.article-sources li { margin-bottom: 0.6em; font-size: 15px; }
.article-sources a { color: var(--green); text-decoration: underline; }
.article-sources a:hover { text-decoration: none; }

/* hide non-active language sections */
.lang-section[data-lang]:not(.active) { display: none; }

/* ── SHARE BUTTONS ──────────────────────────────────── */
.share-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 28px 0;
}
.share-row .share-label {
  font-size: 13px; font-weight: 700; color: var(--mid);
  align-self: center; margin-right: 6px;
  text-transform: uppercase; letter-spacing: 1px;
}
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--light); color: var(--mid);
  transition: transform .15s, background .15s, color .15s;
  border: 1px solid var(--line);
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn svg { width: 16px; height: 16px; }
.share-btn.x:hover        { background: #000; color: #fff; border-color: #000; }
.share-btn.facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-btn.telegram:hover { background: #229ED9; color: #fff; border-color: #229ED9; }
.share-btn.email:hover    { background: var(--mid); color: #fff; border-color: var(--mid); }
.share-btn.copy:hover     { background: var(--green); color: #fff; border-color: var(--green); }
.share-btn.copied         { background: var(--green); color: #fff; border-color: var(--green); }

.share-rail .share-btn { width: 44px; height: 44px; }

/* toast for copy */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(40px);
  background: var(--navy); color: #fff; padding: 12px 22px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FOOTER ─────────────────────────────────────────── */
footer {
  background: var(--navy); color: #c9d1e0; padding: 56px 0 28px;
  margin-top: 56px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px;
  margin-bottom: 36px;
}
.footer-brand { color: #fff; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; margin-bottom: 10px; }
.footer-tagline { font-size: 14px; color: #94a3b8; max-width: 340px; }
footer h5 {
  color: #fff; font-size: 13px; text-transform: uppercase;
  letter-spacing: 1.2px; margin-bottom: 14px;
}
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 8px; }
.footer-list a { font-size: 14px; color: #c9d1e0; transition: color .15s; }
.footer-list a:hover { color: var(--green-up); }
.footer-social { display: flex; gap: 10px; margin-top: 8px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #1c2638; color: #c9d1e0;
  transition: background .15s, color .15s;
}
.footer-social a:hover { background: var(--green); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  border-top: 1px solid #1c2638; padding-top: 24px;
  font-size: 13px; color: #6b7891; text-align: center;
}

/* ── 404 / EMPTY STATE ──────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-featured { min-height: 320px; }
  .hero-featured-body h1 { font-size: 26px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { grid-template-columns: 1fr; }
  .article-share-rail { display: none; }
  .article-aside { padding-top: 0; }
  .article-h1 { font-size: 30px; }
  .nav-search { display: none; }
}

@media (max-width: 720px) {
  body { padding-top: 96px; }
  #ticker { font-size: 12px; }
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 6px;
    background: var(--light); color: var(--navy);
  }
  .nav-toggle svg { width: 20px; height: 20px; }
  #mobile-menu {
    position: fixed; top: 104px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px; z-index: 99;
    box-shadow: var(--shadow);
  }
  #mobile-menu.open { display: block; }
  #mobile-menu a {
    display: block; padding: 12px 0; font-weight: 600; color: var(--mid);
    border-bottom: 1px solid var(--line);
  }
  #mobile-menu a:last-child { border-bottom: 0; }

  .news-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-featured-body { padding: 20px; }
  .hero-featured-body h1 { font-size: 22px; }
  .article-h1 { font-size: 26px; }
  .article-body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section { padding: 40px 0; }
  .container { padding: 0 18px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand { font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; font-size: 15px; }
}
