/*
  FeedMeNews front end
  Clean public-interest news styling
*/

:root {
  --primary: #1f5f8b;
  --primary-dark: #14334d;
  --secondary: #2d7fa8;
  --accent: #4ca6a8;
  --background: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --border: #d9e2ec;
  --shadow: 0 12px 30px rgba(20, 47, 71, 0.08);
  --radius: 18px;
  --wrap: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lato', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.wrap {
  width: min(var(--wrap), calc(100% - 36px));
  margin: 0 auto;
}

/* Header */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand img {
  width: 120px;
  max-height: 58px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
  background: #e8f4f7;
  color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--text);
}

/* Hero */

.hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary-dark);
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  opacity: 0.92;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 34, 52, 0.72), rgba(12, 34, 52, 0.36), rgba(12, 34, 52, 0.08)),
    linear-gradient(180deg, rgba(12, 34, 52, 0.12), rgba(12, 34, 52, 0.42));
}

/* Important: overrides .wrap centering so the hero box sits left */
.hero .hero-content {
  position: relative;
  z-index: 2;
  width: min(500px, calc(100% - 48px));
  max-width: 500px;

  margin-left: max(-76px, calc((100vw - var(--wrap)) / 2) - 130px);
  margin-right: auto;

  padding: 52px 0 96px;
  color: #ffffff;
}

.hero-content-compact {
  max-width: 500px;
}

.hero-lead-box {
  max-width: 460px;
  background: rgba(7, 25, 39, 0.6);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.18);
  backdrop-filter: blur(6px);
}

.hero-lead-box p {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  font-weight: 700;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  padding: 10px 15px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 15px;
}

.hero-link:hover {
  background: #e8f4f7;
  color: var(--primary-dark);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.hero .eyebrow {
  color: #9ee5df;
}

h1,
h2,
h3,
h4 {
  line-height: 1.12;
  margin: 0 0 14px;
  font-weight: 900;
  color: var(--text);
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(34px, 4.4vw, 54px);
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 680px;
  font-size: 20px;
  margin: 0 0 24px;
  color: rgba(255,255,255,0.92);
}

/* Hero ticker */

.hero-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  overflow: hidden;
  background: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(255,255,255,0.38);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerMove 34s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 28px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

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

/* Sections */

.section {
  padding: 70px 0;
}

.section-soft {
  background: #eef5f8;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.03em;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(20, 47, 71, 0.12);
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dbe7ee;
}

.post-card-body {
  padding: 20px;
}

.category-pill {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f4f7;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.post-card h2,
.post-card h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.post-card h2 a,
.post-card h3 a {
  color: var(--text);
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.category-card {
  display: block;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
}

.category-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 900;
  color: var(--primary-dark);
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  background: #ffffff;
  border: 1px dashed var(--secondary);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 760px;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  background: linear-gradient(135deg, #e8f4f7, #ffffff);
  padding: 70px 0 58px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
}

/* Footer */

.site-footer {
  background: #14334d;
  color: rgba(255,255,255,0.82);
  padding: 54px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  width: 190px;
  max-width: 100%;
  margin-bottom: 16px;
  background: #ffffff;
  border-radius: 999px;
  padding: 14px;
  filter: none;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 7px;
}

.site-footer a {
  color: rgba(255,255,255,0.86);
}

.site-footer a:hover {
  color: #ffffff;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.14);
  margin-top: 34px;
  padding-top: 18px;
  font-size: 14px;
}

/* Responsive */

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-top: 10px;
  }

  .site-nav {
    align-items: flex-end;
    flex-direction: column;
  }

  .site-nav ul {
    display: none;
    width: min(320px, calc(100vw - 36px));
    margin-top: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav ul {
    display: block;
  }

  .site-nav li {
    margin-bottom: 4px;
  }

  .post-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .brand img {
    width: 96px;
  }

  .hero {
    min-height: 410px;
  }

  .hero .hero-content {
    width: min(100% - 36px, 500px);
    margin-left: 18px;
    padding: 44px 0 92px;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(12, 34, 52, 0.72), rgba(12, 34, 52, 0.58)),
      linear-gradient(90deg, rgba(12, 34, 52, 0.72), rgba(12, 34, 52, 0.3));
  }

  .hero-lead-box {
    padding: 20px;
  }

  .hero-lead-box p {
    font-size: 20px;
  }

  .ticker-track span {
    min-height: 46px;
    padding: 0 22px;
    font-size: 12px;
  }

  .section {
    padding: 48px 0;
  }

  .post-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* Article pages */

.post-wrap {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
}

.page-hero .post-wrap {
  padding: 70px 0 58px;
}

.category-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  font-size: 20px;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.story-page {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 44px 0 70px;
}

.story-page > img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.story-content {
  padding: 42px;
}

.story-content p {
  margin: 0 0 22px;
  font-size: 19px;
  line-height: 1.75;
  color: var(--text);
}

.story-content a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-posts {
  margin: 40px 0 80px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.related-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.related-card-body {
  padding: 20px;
}

.related-card h3 {
  font-size: 21px;
}

.related-card h3 a {
  color: var(--text);
}

@media (max-width: 760px) {
  .story-content {
    padding: 26px;
  }

  .story-content p {
    font-size: 17px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}