/* Themenwelt archive (category.php) and Magazin (home.php).
   Sources: docs/design/referenz/03-themenwelt.html, 08-magazin.html (identical shared rules).
   Mobile first; the Themenwelt colour --c/--h is set on .page by header.php (archive) or per card. */

.nowrap { white-space: nowrap; }
.date { font-size: 11px; color: var(--ink-3); }

/* ---------- Themenwelt head (archive/kategorie_header) ---------- */
.cat-hero { background: var(--h); padding-block: 20px 64px; }
.cat-hero .crumbs { color: var(--ink); }
.cat-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.cat-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .55); display: grid; place-items: center; flex: none; color: var(--ink); }
.cat-icon svg { width: 30px; height: 30px; }
.cat-txt .eyebrow { color: var(--ink); }
.cat-hero h1 { font-size: 38px; font-weight: 900; letter-spacing: -.025em; margin-top: 2px; }
.cat-desc { font-size: 16px; margin-top: 14px; max-width: 38em; }
.cat-count { font-size: 12px; margin-top: 10px; }
.cat-count b { font-weight: 700; }

/* ---------- „Start hier“ article (archive/featured_article) ---------- */
.featured { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: -40px; position: relative; z-index: 2; text-decoration: none; box-shadow: 0 8px 24px rgba(38, 33, 27, .08); }
.f-img { aspect-ratio: 16 / 10; max-width: 100%; }
.f-img img { width: 100%; height: 100%; object-fit: cover; }
.f-txt { padding: 16px; display: grid; gap: 10px; justify-items: start; }
.f-txt h2 { font-size: 22px; font-weight: 800; }
.f-txt p { font-size: 15px; color: var(--ink-2); }
.featured:hover h2 { text-decoration: underline; text-decoration-color: var(--c, var(--brand)); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.featured:hover .link-arrow { border-bottom-color: var(--ink); }

/* The ad note follows the featured card (which overlaps the head), so it gets air and a top line. */
.wrap:has(> .featured) + .adnote { margin-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Recommendations (archive/bestenliste_teaser) ---------- */
.picks-band { padding-block: 36px 8px; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.band-head h2 { font-size: 20px; font-weight: 800; }
.mini-rail { --w: 78%; }

/* ---------- List, grid (archive/artikel_grid, magazin/liste); filter chips in components.css ---------- */
.list { padding-block: 32px 40px; }
.list-head { display: grid; gap: 12px; margin-bottom: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.list-head h2 { font-size: 22px; font-weight: 800; }
.empty { font-size: 14px; color: var(--ink-2); background: var(--sunk); border-radius: var(--r); padding: 14px; }
/* Sidebar with the Themenwelt bundle: after the articles on small screens, to their right from 900 px. */
.list-side { margin-top: 32px; }

/* ---------- Pagination (archive/pagination) ---------- */

/* ---------- Other Themenwelten (archive/andere_themenwelten) ---------- */
.other { background: var(--sunk); padding-block: 32px; }
.other h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.other-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.o { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 10px 14px 10px 10px; text-decoration: none; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--surface)); }
.o:hover { border-color: var(--ink); }
.o-ic { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, var(--surface)); display: grid; place-items: center; color: var(--c); }
.o-ic svg { width: 20px; height: 20px; }
.o-n { font-weight: 600; font-size: 15px; }
.o-c { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Magazin ---------- */
.mg-hero { background: var(--sunk); padding-block: 18px 28px; border-bottom: 1px solid var(--line); }
.mg-hero h1 { font-size: 44px; font-weight: 900; letter-spacing: -.025em; margin-top: 10px; }
.mg-lede { font-size: 16px; margin-top: 6px; max-width: 36em; }
.mg-count { font-size: 12px; margin-top: 10px; color: var(--ink-2); }
.mg-count b { color: var(--ink); }
.mg-top { padding-block: 24px 8px; }
.mg-top-grid { display: grid; gap: 18px; }
.mg-lead { text-decoration: none; display: grid; gap: 8px; justify-items: start; }
.mg-lead .im { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; max-width: 100%; background: var(--line); }
.mg-lead .im img { width: 100%; height: 100%; object-fit: cover; }
.mg-lead h2 { font-size: 24px; font-weight: 800; }
.mg-lead p { font-size: 15px; color: var(--ink-2); }
.mg-side { display: grid; gap: 12px; }
.mg-s { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; text-decoration: none; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.mg-s .im { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--line); }
.mg-s .im img { width: 100%; height: 100%; object-fit: cover; }
.mg-s > div:last-child { display: grid; gap: 4px; justify-items: start; }
.mg-s h3 { font-size: 16px; font-weight: 700; }
.mg-lead:hover h2, .mg-s:hover h3 { text-decoration: underline; text-decoration-color: var(--c, var(--brand)); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.mg-filters { display: grid; gap: 10px; margin-bottom: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.mg-filters .chip { gap: 6px; }
.mg-filters .chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.fmt-form { display: flex; align-items: center; gap: 8px; }
.fmt { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fmt select { font: 600 14px var(--f-body); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.fmt-go { font: 600 13px var(--f-body); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 8px 12px; cursor: pointer; }
.js-auto .fmt-go { display: none; }
.month { font-size: 13px; font-family: var(--f-body); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 22px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.mg-hint { padding-block: 14px; border-top: 1px solid var(--line); }

/* ---------- Tablet ---------- */
@container page (min-width: 640px) {
  .other-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-hint { align-self: start; border-top: 0; padding: 0; }
}

/* ---------- Desktop ---------- */
@container page (min-width: 900px) {
  .cat-hero { padding-block: 32px 104px; }
  .cat-row { margin-top: 24px; gap: 20px; }
  .cat-icon { width: 80px; height: 80px; }
  .cat-icon svg { width: 42px; height: 42px; }
  .cat-hero h1 { font-size: 72px; }
  .cat-desc { font-size: 20px; margin-top: 18px; }
  .featured { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin-top: -72px; }
  .f-img { aspect-ratio: auto; min-height: 340px; }
  .f-txt { padding: 36px 40px; align-content: center; gap: 16px; }
  .f-txt h2 { font-size: 32px; }
  .f-txt p { font-size: 17px; }
  .picks-band { padding-block: 56px 8px; }
  .band-head h2 { font-size: 26px; }
  .mini-rail { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; gap: 16px; }
  .list { padding-block: 48px 64px; }
  .list-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding-top: 40px; margin-bottom: 28px; }
  .list-head h2 { font-size: 30px; }
  .list-body.has-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .has-side .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-side .list-side { margin-top: 0; }
  /* The bundle stays in view while the articles scroll, only where the whole box fits under the header. */
  @media (min-height: 860px) {
    .has-side .list-side { position: sticky; top: calc(96px + var(--wp-admin--admin-bar--height, 0px)); }
  }
  .other { padding-block: 48px; }
  .other h2 { font-size: 26px; }
  .other-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .o { grid-template-columns: 1fr; gap: 10px; padding: 16px; align-content: start; }
  .o-ic { width: 44px; height: 44px; }
  .o-ic svg { width: 24px; height: 24px; }

  .mg-hero { padding-block: 32px 40px; }
  .mg-hero h1 { font-size: 72px; }
  .mg-lede { font-size: 20px; }
  .mg-top { padding-block: 40px 16px; }
  .mg-top-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; }
  .mg-lead h2 { font-size: 34px; }
  .mg-lead p { font-size: 17px; }
  .mg-side { gap: 20px; align-content: start; }
  .mg-s { grid-template-columns: 140px minmax(0, 1fr); padding-top: 20px; }
  .mg-s:first-child { border-top: 0; padding-top: 0; }
  .mg-s h3 { font-size: 19px; }
  .mg-filters { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding-top: 32px; }
  .month { margin-top: 36px; margin-bottom: 20px; }
}
