/* ============================================================
   index.css — Magazin-Startseite (NYT-Stil)
   Erbt Variablen, Fonts & Basis aus styles.css
   ============================================================ */

/* ---------- Masthead ---------- */
.masthead { background: var(--white); }
.mast-top {
  max-width: var(--wide); margin: 0 auto; padding: 9px 22px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ui); font-size: 11.5px; letter-spacing: .3px; color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}
.mast-top .mt-date { text-transform: capitalize; }
.mast-top .mt-right { display: flex; gap: 16px; }
.mast-top a { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .8px; font-size: 10.5px; }
.mast-top a:hover { color: var(--green); text-decoration: none; }

.mast-logo-wrap { text-align: center; padding: 22px 22px 16px; }
.mast-logo { height: 46px; width: auto; display: inline-block; }
.mast-tag {
  font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--muted);
  margin-top: 10px;
}

/* ---------- Navigation ---------- */
.nav {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.1) blur(8px);
}
.nav-inner { max-width: var(--wide); margin: 0 auto; padding: 0 14px; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: nowrap; gap: 2px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.nav ul::-webkit-scrollbar { display: none; }
.nav li { flex: 0 0 auto; }
.nav a {
  display: block; font-family: var(--ui); font-size: 13px; font-weight: 600;
  letter-spacing: .4px; color: var(--ink); padding: 13px 14px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--green); text-decoration: none; }
.nav a.active { color: var(--green); border-bottom-color: var(--green); }

/* ---------- Front page layout ---------- */
.front { max-width: var(--wide); margin: 0 auto; padding: 28px 22px 10px; }

.section-rule {
  font-family: var(--ui); font-size: 13px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--green-900);
  border-top: 2px solid var(--ink); padding-top: 9px; margin: 36px 0 18px;
}

/* Top grid: lead story + rail */
.top-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 312px; gap: 34px;
  padding-bottom: 30px; border-bottom: 1px solid var(--line);
}
.rail { border-left: 1px solid var(--line); padding-left: 28px; }

/* Solo lead (no rail yet) — keeps the lead readable instead of full 1080px wide.
   Remove the --solo modifier in index.html once the Meistgelesen rail is populated. */
.top-grid--solo { grid-template-columns: 1fr; }
.top-grid--solo .lead-story { max-width: 880px; }

/* Lead story */
.lead-fig { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 0 0 16px; }
.lead-fig .ph { aspect-ratio: 16 / 9; }
.kicker {
  font-family: var(--ui); font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--green); margin-bottom: 9px;
}
.lead-story h2 {
  font-family: var(--serif); font-size: clamp(30px, 4.4vw, 46px); font-weight: 700;
  line-height: 1.06; letter-spacing: -.6px; color: var(--ink); margin: 0 0 14px; text-wrap: balance;
}
.lead-story h2 a { color: inherit; }
.lead-story h2 a:hover { color: var(--green); text-decoration: none; }
.lead-dek {
  font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink-soft);
  margin: 0 0 16px; max-width: 54ch;
}
.byline-line { font-family: var(--ui); font-size: 12.5px; color: var(--muted); letter-spacing: .3px; }
.byline-line b { color: var(--ink); font-weight: 700; }

/* Rail — Meistgelesen */
.rail h3 {
  font-family: var(--ui); font-size: 13px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--green-900); margin: 0 0 6px;
  border-bottom: 2px solid var(--ink); padding-bottom: 8px;
}
.popular { list-style: none; margin: 0; padding: 0; counter-reset: pop; }
.popular li {
  counter-increment: pop; display: grid; grid-template-columns: 30px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.popular li::before {
  content: counter(pop); font-family: var(--ui); font-size: 24px; font-weight: 800;
  color: var(--gold); line-height: 1;
}
.popular a {
  font-family: var(--serif); font-size: 16.5px; font-weight: 600; line-height: 1.3;
  color: var(--ink);
}
.popular a:hover { color: var(--green); text-decoration: none; }

/* Card row */
.card-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding-top: 4px; }
.card { display: flex; flex-direction: column; }
.card-fig { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 0 0 12px; }
.card-fig .ph { aspect-ratio: 3 / 2; }
.card .kicker { margin-bottom: 7px; }
.card h3 {
  font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.2;
  letter-spacing: -.2px; color: var(--ink); margin: 0 0 8px;
}
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--green); text-decoration: none; }
.card p { font-family: var(--serif); font-size: 15px; line-height: 1.45; color: var(--ink-soft); margin: 0; }
.card + .card { position: relative; }

/* ---------- Footer (kompakt) ---------- */
.idx-footer { background: var(--green-900); color: #cdd6df; margin-top: 40px; padding: 34px 0 26px; font-family: var(--ui); font-size: 13px; }
.idx-footer .wide { display: flex; flex-direction: column; gap: 16px; }
.idx-foot-logo { font-family: var(--serif); font-size: 20px; font-weight: 700; color: #fff; }
.idx-foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.idx-foot-nav a { color: #d7dee6; font-weight: 600; }
.idx-foot-legal { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.idx-foot-legal a { color: rgba(231,239,231,.42); font-size: 11.5px; font-weight: 400; }
.idx-foot-legal a:hover { color: rgba(231,239,231,.78); text-decoration: none; }
.idx-foot-copy { color: #8e9bab; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .top-grid { grid-template-columns: 1fr; gap: 26px; }
  .rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .card-row { grid-template-columns: 1fr 1fr; gap: 22px 24px; }
}
@media (max-width: 560px) {
  .mast-top .mt-right { display: none; }
  .nav ul { justify-content: flex-start; }
  .card-row { grid-template-columns: 1fr; }
  .lead-dek { font-size: 17px; }
}
