/* Liberia Today – schlankes, mobile-first Stylesheet, kein Framework nötig. */

:root {
  --navy: #0e2a4d;
  --navy-dark: #081b33;
  --red: #d5202c;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1b2430;
  --muted: #6b7684;
  --border: #e3e7ec;
  --confirmed: #1c7c3f;
  --region: #0e2a4d;
  --max-width: 1500px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.muted { color: var(--muted); font-size: 0.875rem; }

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-logo img { height: 40px; width: auto; }

.nav-toggle-label {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle-label span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  display: block;
}

.site-nav {
  display: none;
  flex-direction: column;
  width: 100%;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.site-nav a {
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--navy);
}
.nav-toggle:checked ~ .site-nav { display: flex; }

@media (min-width: 780px) {
  .nav-toggle-label { display: none; }
  .site-nav {
    display: flex !important;
    flex-direction: row;
    width: auto;
    border-top: none;
    margin-top: 0;
    margin-left: auto;
    gap: 1.5rem;
  }
  .site-nav a { padding: 0; border-bottom: none; }
  .site-nav a:hover { color: var(--red); }
}

/* Layout */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

/* Page layout: main content + two ad sidebars. Mobile-first: everything
   stacks in one column (content first, then both sidebars); from 960px up
   the sidebars move to genuine left/right columns alongside the content. */
.page-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.page-layout__content {
  order: 1;
  min-width: 0;
  /* Lets .article-grid below size its columns off the ACTUAL space left
     after the sidebars, not the full viewport - see the container query
     on .article-grid. Without this, a 3-column grid keyed to viewport
     width would cram itself into a much narrower column and look
     cramped/too-narrow once the sidebars are showing. */
  container-type: inline-size;
}
.page-layout__sidebar { order: 2; }
.page-layout__sidebar--right { order: 3; }

@media (min-width: 960px) {
  .page-layout { flex-direction: row; align-items: flex-start; gap: 1.5rem; }
  .page-layout__sidebar {
    flex: 0 0 200px;
    position: sticky;
    top: 1rem;
  }
  .page-layout__sidebar--left { order: 1; }
  .page-layout__content { order: 2; flex: 1 1 auto; }
  .page-layout__sidebar--right { order: 3; }
}

/* Ad slots - placeholder banners used to test the layout before real
   advertisers exist. Always carries a small "Ad space" label so it never
   reads as a real, paid ad whatever creative happens to show. */
.ad-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 0.85rem 1rem;
  position: relative;
}
.ad-slot__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.ad-slot__headline { margin: 0 0 0.25rem; font-weight: 700; color: var(--navy); }
.ad-slot__text { margin: 0; font-size: 0.88rem; color: var(--text); }
.ad-slot__cta {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
}
.ad-slot__cta:hover { text-decoration: underline; }

.ad-slot--sidebar { margin-bottom: 1.25rem; }
.ad-slot--sidebar:last-child { margin-bottom: 0; }

.ad-slot--header { margin-bottom: 1.5rem; }
@media (min-width: 640px) {
  .ad-slot--header .ad-slot__body {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
  }
  .ad-slot--header .ad-slot__headline { margin: 0; }
  .ad-slot--header .ad-slot__cta { margin-top: 0; margin-left: auto; }
}

/* Badges */
.badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.badge--confirmed { background: rgba(28,124,63,0.12); color: var(--confirmed); }
/* Neutral, purely informational tag (e.g. World region) - never colored to imply
   judgment or urgency, just orientation ("where is this about"). */
.badge--region { background: rgba(14,42,77,0.08); color: var(--region); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  margin: 1rem 0 2rem;
  padding: 1.5rem;
}
.hero__link { color: #fff; display: block; }
.hero .badge--confirmed { background: rgba(255,255,255,0.18); color: #fff; }
.hero .badge--region { background: rgba(255,255,255,0.18); color: #fff; }
.hero__image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0.75rem 0;
  display: block;
}
.hero__title { font-size: 1.6rem; line-height: 1.25; margin: 0.25rem 0 0.5rem; }
.hero__excerpt { margin: 0 0 0.5rem; opacity: 0.92; }
.hero__meta { color: rgba(255,255,255,0.75); }

/* Sections */
.home-section { margin: 2rem 0; }
.home-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}
.home-section__head h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.home-section__more { font-size: 0.85rem; font-weight: 600; color: var(--red); }

.category-page__title { color: var(--navy); border-bottom: 2px solid var(--navy); padding-bottom: 0.5rem; }

/* Article cards - column count reacts to the width of .page-layout__content
   itself (a CSS container query), not the viewport. That matters now that
   the content column sits between two ad sidebars: a viewport-based
   breakpoint would force 3 columns into a much narrower space than the
   viewport width suggests, squeezing every card. */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@container (min-width: 480px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@container (min-width: 820px) {
  .article-grid { grid-template-columns: repeat(3, 1fr); }
}
.article-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}
.article-card__link { display: block; }
.article-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  margin: 0 0 0.6rem;
  display: block;
  background: var(--bg-alt);
}
.article-card__title { font-size: 1.05rem; margin: 0 0 0.4rem; color: var(--text); }
.article-card__excerpt { margin: 0 0 0.5rem; font-size: 0.92rem; color: var(--text); }

/* Most read */
.most-read-list { padding-left: 1.2rem; }
.most-read-list li { margin-bottom: 0.5rem; font-weight: 600; }
.most-read-list a:hover { color: var(--red); }

/* Article page */
.article-page { max-width: 760px; margin: 0 auto; }
.article-page__category a { color: var(--red); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }
.article-page__title { font-size: 1.75rem; line-height: 1.3; margin: 0.4rem 0; color: var(--navy); }
.article-page__image { border-radius: var(--radius); margin: 1rem 0; }
.article-page__image-credit { font-size: 0.75rem; margin: -0.6rem 0 1rem; text-align: right; }
.article-page__intro { font-size: 1.1rem; }
.article-page__body p { margin: 0 0 1rem; }
.article-page__sources, .article-page__related { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1rem; }
.article-page__share { display: flex; gap: 1rem; margin: 1.5rem 0; }
.article-page__share a {
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.85); margin-top: 2rem; }
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 780px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer__logo { height: 32px; filter: brightness(0) invert(1); margin-bottom: 0.5rem; }
.site-footer__nav, .site-footer__social { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }
.site-footer__legal { text-align: center; padding: 1rem; border-top: 1px solid rgba(255,255,255,0.12); }
.site-footer__legal .muted { color: rgba(255,255,255,0.55); }

/* Contact page */
.contact-page__intro { margin-bottom: 1.5rem; }
.contact-page__success {
  background: rgba(28,124,63,0.1);
  color: var(--confirmed);
  border: 1px solid rgba(28,124,63,0.3);
  border-radius: var(--radius);
  padding: 1rem;
  font-weight: 600;
}
.contact-page__errors {
  background: rgba(213,32,44,0.08);
  color: var(--red);
  border: 1px solid rgba(213,32,44,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.contact-page__errors ul { margin: 0; padding-left: 1.1rem; }

.contact-form { display: flex; flex-direction: column; max-width: 560px; }
.contact-form label { font-weight: 600; font-size: 0.9rem; margin-top: 0.9rem; margin-bottom: 0.3rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.contact-form textarea { resize: vertical; }
.contact-form__honeypot { position: absolute; left: -9999px; top: -9999px; }
.contact-form__submit {
  margin-top: 1.5rem;
  align-self: flex-start;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}
.contact-form__submit:hover { background: var(--navy-dark); }
.contact-form__note { margin-top: 0.75rem; font-size: 0.85rem; color: var(--muted, #6b7684); }

/* Stats page */
.stats-table { border-collapse: collapse; width: 100%; margin: 0.75rem 0 1.5rem; }
.stats-table th, .stats-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.stats-table th { color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.stats-page__note { max-width: 640px; }
