/* MeineZeit Magazin - Editorial Theme v2
   Erweitert um Hero-Grid + Side-Story + Archiv (Mockup A)
   2026-05-29 */

:root {
  --bg: #FAFAF7;
  --bg-card: #FFFFFF;
  --bg-accent: #F2EEDF;
  --text-primary: #1A1A1A;
  --text-body: #2A2419;
  --text-muted: #6B6655;
  --text-faint: #8B8678;
  --border: #E8E5DD;
  --border-dark: #DCD4BD;
  --gold: #C9A227;
  --gold-bg: #F4EDD7;
  --gold-text: #6B5610;
  --serif: 'Georgia', 'Times New Roman', 'Cambria', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1100px;
  --article-width: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-dark);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }

/* ============ HEADER ============ */
.mz-header {
  background: rgba(250, 250, 247, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.mz-header .brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mz-header .brand-logo {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 6px;
}
.listing-logo {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
}
.mz-header nav { display: flex; gap: 24px; font-size: 14px; }
.mz-header nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.mz-header nav a:hover { color: var(--text-primary); }

/* ============ LISTING-HEADER ============ */
.magazin-listing-header {
  text-align: center;
  padding: 56px 24px 20px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}
.magazin-listing-header .kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}
.magazin-listing-header h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.magazin-listing-header .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============ TABS ============ */
.magazin-tabs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  gap: 28px;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  flex-wrap: wrap;
}
.magazin-tabs a {
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 14px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: all 0.15s;
}
.magazin-tabs a:hover { color: var(--text-primary); }
.magazin-tabs a.active {
  color: var(--text-primary);
  border-bottom-color: var(--gold);
}

/* ============ THEMEN-ROUTING (Crawler-Anker) ============ */
.magazin-themes {
  border-bottom: 1px solid var(--border);
  padding: 14px 0 18px;
}
.magazin-themes-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.themes-kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.themes-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.theme-anchor {
  font-family: var(--serif);
  font-size: 13.5px;
  padding: 6px 14px;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  color: var(--text-primary);
  text-decoration: none;
  background: transparent;
  transition: all 0.15s;
}
.theme-anchor:hover {
  background: var(--gold-bg);
  border-color: var(--gold);
  color: var(--gold-text);
}
.theme-anchor.active {
  background: var(--gold-bg);
  border-color: var(--gold);
  color: var(--gold-text);
  font-weight: 600;
}
.reset-filter {
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
}
.reset-filter:hover { text-decoration-thickness: 2px; }

/* ============ FRONT-VIEW (Magazin Mainpage zeigt vollen Artikel) ============ */
.magazin-listing-header.compact {
  padding: 36px 24px 18px;
}
.magazin-listing-header.compact .kicker {
  font-family: var(--serif);
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 6px;
}
.magazin-listing-header.compact .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.magazin-front-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* Float-Layout: Article-Head (Meta+H1+Cover) volle Breite, dann floatet Sidebar rechts und Article-Body umfließt */
.front-wrap {
  position: relative;
}
.front-clear {
  clear: both;
}
.front-article-head {
  /* Volle Container-Breite, kein Float — H1 + Cover bleiben breit. */
  margin-bottom: 24px;
}
.front-article-head h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 46px);
  line-height: 1.15;
  margin: 4px 0 18px;
  letter-spacing: -0.01em;
}
.front-article-head .article-cover {
  margin: 24px 0 0;
}
.front-article-head .article-cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.front-sidebar {
  float: right;
  width: 300px;
  margin: 8px 0 24px 32px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.front-sidebar .side-header {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.front-sidebar .side-scroll {
  /* Hart-Deckel damit Sidebar nie laenger wird als ~3-4 Items; Cover bleibt oben.
     Falls mehr Artikel da sind, kommt eine dezente Scrollbar. */
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) transparent;
}
/* Body soll nicht in eine zu schmale Spalte gedrueckt werden */
.front-article {
  min-width: 320px;
}
.front-sidebar .side-scroll::-webkit-scrollbar { width: 6px; }
.front-sidebar .side-scroll::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
.front-sidebar .side-scroll::-webkit-scrollbar-track { background: transparent; }

.front-sidebar .side-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.front-sidebar .side-item:last-child { border-bottom: none; }
.front-sidebar .thumb {
  flex-shrink: 0;
  width: 70px;
  height: 52px;
  background: var(--border-dark);
  border-radius: 3px;
  overflow: hidden;
}
.front-sidebar .info { flex: 1; min-width: 0; }
.front-sidebar h3 {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.front-sidebar .side-item:hover h3 {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.front-sidebar .date {
  font-size: 11px;
  color: var(--text-faint);
}
.side-empty {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
  margin: 8px 0;
}

/* Eingebetteter Artikel: padding/max-width vom <article> entfernen */
.front-article {
  min-width: 0;
}
.front-article article {
  padding: 0;
  max-width: none;
}
/* h1 funktioniert auch ohne <article>-Wrapper (extractArticleBody entfernt ihn) */
.front-article h1,
.front-article article h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 22px;
}
/* Lead + Body-Styles ohne article-Parent */
.front-article .article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}
.front-article .article-meta .read,
.front-article .article-meta time {
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-weight: 500;
}
.front-article .article-lead p:first-child {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
}
.front-article section h2,
.front-article > h2 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
  margin: 44px 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.front-article section h3,
.front-article > h3 {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 500;
  margin: 28px 0 10px;
}
/* Cover-Bild im eingebetteten Artikel etwas kleiner */
.front-article .article-cover {
  margin: 20px 0;
}

/* ============ HAUPT-GRID (alte Listing-View, fallback) ============ */
.magazin-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 24px 60px;
}
.magazin-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Hero-Grid: Hauptartikel + Side-Stories nebeneinander */
.magazin-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

/* ============ HAUPTARTIKEL (NEU) ============ */
.magazin-featured a { text-decoration: none; color: inherit; display: block; }
.magazin-featured .cover {
  background: var(--border-dark);
  aspect-ratio: 1200 / 630;
  border-radius: 4px;
  margin-bottom: 18px;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.magazin-featured:hover .cover { transform: scale(1.01); }
.magazin-featured .meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.magazin-featured h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.18;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}
.magazin-featured:hover h2 {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}
.magazin-featured .excerpt {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 14px;
}
.magazin-featured .date {
  font-size: 12px;
  color: var(--text-faint);
}

/* ============ SIDE-STORIES (ÄLTER) ============ */
.magazin-side .side-header {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.magazin-side .side-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.magazin-side .side-item:last-child { border-bottom: none; }
.magazin-side .thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  background: var(--border-dark);
  border-radius: 3px;
  overflow: hidden;
}
.magazin-side .info { flex: 1; min-width: 0; }
.magazin-side h3 {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.magazin-side .side-item:hover h3 {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.magazin-side .date {
  font-size: 11px;
  color: var(--text-faint);
}

/* ============ ARCHIV ============ */
.magazin-archive {
  max-width: var(--article-width);
  margin: 0 auto;
}
.archive-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.magazin-list-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.magazin-list-item:last-child { border-bottom: none; }
.magazin-list-item .thumb {
  flex-shrink: 0;
  width: 140px;
  height: 105px;
  background: var(--border-dark);
  border-radius: 3px;
  overflow: hidden;
}
.magazin-list-item .info { flex: 1; }
.magazin-list-item .meta {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.magazin-list-item h3 {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.magazin-list-item:hover h3 {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.magazin-list-item .date { font-size: 12px; color: var(--text-faint); }

/* ============ ARTIKEL (Detail-Seite) ============ */
article {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}
.article-meta .cat { color: var(--gold); }
.article-meta .dot { color: var(--text-faint); }
.article-meta .read, .article-meta time {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.1em;
}
article h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.18;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 24px;
  letter-spacing: -0.015em;
}
.article-cover { margin: 28px 0; }
.article-cover img {
  width: 100%;
  border-radius: 4px;
  background: var(--border-dark);
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.article-lead p:first-child {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-body);
  font-weight: 400;
  margin: 0 0 18px;
}
.article-lead p {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 18px;
  color: var(--text-body);
}
.article-body section { margin: 44px 0 0; }
.article-body h2 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.article-body h3 {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--text-primary);
  margin: 28px 0 10px;
  letter-spacing: -0.005em;
}
.article-body p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-body);
}
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; }
.article-body li { margin: 6px 0; font-size: 17px; line-height: 1.7; }
.article-body a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.article-body a:hover { background: var(--gold-bg); text-decoration-thickness: 2px; }
.article-body strong { font-weight: 600; color: var(--text-primary); }
.article-body em { font-style: italic; }

/* ============ FAQ ============ */
.article-faq {
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.article-faq h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 20px;
  color: var(--text-primary);
}
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 16.5px;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 8px;
  font-family: var(--serif);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 22px;
  color: var(--gold);
  margin-left: 16px;
  transition: transform 0.15s;
  font-weight: 300;
}
.faq-item[open] summary::after { content: "−"; }
.faq-a {
  margin-top: 12px;
  padding-right: 32px;
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.65;
}
.faq-a p { margin: 0 0 10px; }

/* ============ CTA-BOX ============ */
.cta-box {
  margin: 56px 0 0;
  padding: 28px;
  background: var(--gold-bg);
  border-left: 3px solid var(--gold);
  border-radius: 0;
}
.cta-box p {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--gold-text);
}
.cta-box p:last-child { margin-bottom: 0; }
.cta-box a {
  color: var(--gold-text);
  font-weight: 600;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

/* ============ KI-DISCLAIMER ============ */
.ai-disclaimer {
  margin: 48px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--border-dark);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-faint);
  font-style: italic;
  font-family: var(--sans);
}

/* ============ FOOTER ============ */
.mz-footer {
  margin-top: 80px;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.mz-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 4px;
}
.mz-footer a:hover { color: var(--text-primary); text-decoration: underline; }

/* ============ TABLET ============ */
@media (max-width: 900px) and (min-width: 601px) {
  /* Grid bleibt 2-spaltig aber enger */
  .magazin-hero-grid { grid-template-columns: 1.3fr 0.7fr; gap: 24px; }
  .magazin-side .thumb { width: 70px; height: 52px; }
  .magazin-side h3 { font-size: 14px; }
  .front-sidebar { width: 240px; margin-left: 24px; }
}

/* ============ MOBILE ============ */
@media (max-width: 600px) {
  .magazin-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .magazin-side .side-header { margin-top: 8px; }
  .magazin-side .thumb { width: 90px; height: 70px; }
  .magazin-listing-header { padding: 32px 18px 16px; }
  .magazin-listing-header h1 { font-size: 32px; }
  .magazin-tabs { gap: 18px; }
  article { padding: 24px 18px 40px; }
  article h1 { font-size: 26px; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 17px; }
  .article-lead p:first-child { font-size: 18px; }
  .mz-header { padding: 12px 18px; }
  .mz-header .brand { font-size: 18px; }
  .mz-header .brand-logo { width: 24px; height: 24px; }
  .mz-header nav { gap: 14px; font-size: 13px; }
  .magazin-list-item { flex-direction: column; }
  .magazin-list-item .thumb { width: 100%; height: 180px; }
  /* Front-View Mobile: Sidebar unter den Artikel */
  .front-sidebar {
    float: none;
    width: auto;
    margin: 0 0 32px 0;
  }
  .front-sidebar .side-scroll { max-height: none; overflow: visible; }
}
