/* =========================================================================
   NewsReliance — stylesheet
   ========================================================================= */

:root {
  --navy: #0f1b2d;
  --navy-2: #16243a;
  --red: #e11d2e;
  --red-dark: #b91424;
  --gold: #f2b705;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow: 0 8px 28px rgba(15, 27, 45, .10);
  --radius: 12px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Top utility bar ===== */
.topbar {
  background: var(--navy);
  color: #c9d3e0;
  font-size: 12.5px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.topbar__clock {
  letter-spacing: .3px;
  color: #eaf0f6;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.topbar__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar__links a {
  color: #b8c4d4;
  transition: color .15s;
}
.topbar__links a:hover { color: #fff; }

/* ===== Header ===== */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.5px;
  color: var(--navy);
}
.brand__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 800;
}
.brand__text span { color: var(--red); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px;
  font-weight: 600;
  font-size: 15px;
  color: #334155;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: #f1f5f9; color: var(--red); }
.nav a.active { background: var(--navy); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .2s;
}

/* ===== Breaking ticker ===== */
.ticker {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.ticker__inner { display: flex; align-items: stretch; height: 44px; }
.ticker__label {
  display: inline-flex; align-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 0 16px;
  white-space: nowrap;
  position: relative;
}
.ticker__viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.ticker__track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 24px;
  animation: ticker 40s linear infinite;
  font-size: 14px;
  color: #334155;
}
.ticker__track a { margin-right: 48px; }
.ticker__track a:hover { color: var(--red); }
.ticker__track b { color: var(--red); margin-right: 6px; }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Main ===== */
.main { padding: 28px 20px 60px; min-height: 60vh; }

/* ===== Section headers ===== */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
}
.section-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.4px;
}
.section-head h2 small {
  font-weight: 500;
  color: var(--muted);
  font-size: .6em;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-head::after {
  content: "";
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--red), transparent);
  border-radius: 2px;
}

/* ===== Category / page header banner ===== */
.page-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(225,29,46,.55), transparent 70%);
}
.page-banner .kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
}
.page-banner h1 { font-size: 32px; font-weight: 800; margin: 4px 0 6px; }
.page-banner p { color: #c9d3e0; max-width: 640px; }

/* ===== Hero (featured) ===== */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  margin-bottom: 34px;
}
.hero__main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 380px;
  display: flex;
}
.hero__main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__main .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(9,15,26,.92));
}
.hero__main .content {
  position: relative;
  margin-top: auto;
  padding: 26px;
  color: #fff;
  width: 100%;
}
.hero__main .content .tag { margin-bottom: 10px; }
.hero__main .content h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 10px;
}
.hero__main .content p { color: #dbe3ee; max-width: 560px; }

.hero__side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero__side .item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.hero__side .item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hero__side .item img { height: 100%; object-fit: cover; min-height: 92px; }
.hero__side .item .body { padding: 12px 14px 12px 0; display: flex; flex-direction: column; }
.hero__side .item h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.hero__side .item h3:hover { color: var(--red); }

/* ===== Tags & meta ===== */
.tag {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 3px 9px;
  border-radius: 4px;
}
.tag--outline {
  background: transparent;
  border: 1px solid currentColor;
  color: var(--red);
}
.meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.meta .dot { color: #cbd5e1; }

/* ===== Card grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  cursor: pointer;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #e8ebf0; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.06); }
.card__media .tag { position: absolute; top: 12px; left: 12px; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card__body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.2px;
}
.card__body h3:hover { color: var(--red); }
.card__body p { font-size: 14px; color: #4b5563; flex: 1; }
.card__more {
  font-weight: 700;
  font-size: 13px;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ===== Category strip (used on home) ===== */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}
.cat-strip .cat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid transparent;
  transition: .18s;
  cursor: pointer;
}
.cat-strip .cat:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-strip .cat .icon { font-size: 28px; margin-bottom: 8px; }
.cat-strip .cat .name { font-weight: 700; font-size: 15px; }

/* ===== Article detail ===== */
.article { max-width: 820px; margin: 0 auto; }
.article__crumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.article__crumb a { color: var(--red); font-weight: 600; }
.article h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.8px;
  font-weight: 800;
  margin: 10px 0 16px;
}
.article__meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.article__hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: #e8ebf0;
}
.article__hero img { width: 100%; height: 100%; object-fit: cover; }
.article__body { font-size: 17px; color: #26303d; }
.article__body p { margin-bottom: 18px; }
.article__body p:first-of-type::first-letter {
  font-size: 3.2em;
  font-weight: 800;
  float: left;
  line-height: .85;
  padding: 4px 10px 0 0;
  color: var(--red);
}

/* ===== Static page ===== */
.static { max-width: 720px; margin: 0 auto; }
.static h1 { font-size: 34px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 18px; }
.static p { font-size: 17px; color: #334155; margin-bottom: 16px; }

/* ===== Empty state ===== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty h3 { font-size: 22px; color: var(--ink); margin-bottom: 8px; }

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: #aebacb;
  margin-top: 20px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding: 48px 20px 36px;
}
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .3px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: #aebacb; transition: color .15s; }
.footer a:hover { color: #fff; }
.brand--footer { color: #fff; margin-bottom: 14px; }
.footer__about p { font-size: 14px; max-width: 320px; }
.footer__company-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.7;
}
.footer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.footer__icon svg { width: 16px; height: 16px; }
.footer__company-list a:hover { color: var(--gold); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  font-size: 13px;
  color: #8290a4;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero__side { display: grid; grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-strip { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 12px 20px 18px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr; }
  .hero__side { grid-template-columns: 1fr; }
  .cat-strip { grid-template-columns: repeat(2, 1fr); }
  .topbar__inner { justify-content: center; text-align: center; }
  .footer__grid { grid-template-columns: 1fr; }
}
