/* =====================================================
   style.css – Design der News-App
   Farben und Schriften kannst du hier zentral anpassen.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
  --papier: #FAFAF7;      /* Hintergrund */
  --tinte: #21242B;       /* Textfarbe */
  --grau: #6C7078;        /* Nebentext */
  --linie: #E3E2DC;       /* feine Linien */
  --akzent: #2545D3;      /* Hauptfarbe (Kobaltblau) */
  --akzent-dunkel: #1B34A6;
  --rot: #B3122F;         /* nur für Löschen/Fehler */
  --gruen: #1E7A46;       /* Erfolgsmeldungen */
  --karte: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

h1, h2, h3, .marke, .knopf, .meta, .backend-nav, .tabelle, label, .status {
  font-family: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
}

.innen { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
.innen.schmal { max-width: 680px; }

a { color: var(--akzent); }
a:hover { color: var(--akzent-dunkel); }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* ---------- Kopfbereich ---------- */
.kopf { border-bottom: 1px solid var(--linie); background: var(--karte); }
.kopf-zeile {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap;
}
.marke {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em;
  color: var(--tinte); text-decoration: none;
}
.marke-punkt {
  width: .7em; height: .7em; background: var(--akzent);
  display: inline-block; border-radius: 2px;
}
.marke-zusatz { color: var(--grau); font-weight: 400; font-size: .85em; }
.leise { color: var(--grau); text-decoration: none; }
.leise:hover { color: var(--tinte); }

.backend-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.backend-nav a { text-decoration: none; }
.wer { color: var(--grau); }

/* ---------- News-Liste ---------- */
.news-liste { list-style: none; margin: 2.5rem 0 4rem; padding: 0; }
.news-eintrag { padding: 2rem 0; border-bottom: 1px solid var(--linie); }
.news-eintrag h2 { margin: .35rem 0 .5rem; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; }
.news-eintrag h2 a { color: var(--tinte); text-decoration: none; }
.news-eintrag h2 a:hover { color: var(--akzent); }
.news-eintrag.hervorgehoben { border-left: 4px solid var(--akzent); padding-left: 1.25rem; }
.news-eintrag.hervorgehoben h2 { font-size: 2rem; }

.meta { margin: 0; font-size: .85rem; color: var(--grau); display: flex; gap: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.datum { color: var(--akzent); font-weight: 600; }
.teaser { margin: 0 0 .6rem; color: var(--grau); }
.weiter { font-family: 'Familjen Grotesk', sans-serif; font-weight: 600; font-size: .95rem; text-decoration: none; }

/* ---------- Artikelansicht ---------- */
.artikel { margin: 2.5rem 0 4rem; }
.artikel h1 { font-size: 2.3rem; line-height: 1.15; letter-spacing: -0.015em; margin: .4rem 0 1rem; }
.einleitung { font-size: 1.2rem; color: var(--grau); font-style: italic; margin-bottom: 1.5rem; }
.inhalt { font-size: 1.1rem; }
.zurueck { margin-top: 2.5rem; }
.zurueck a { text-decoration: none; font-family: 'Familjen Grotesk', sans-serif; font-weight: 600; }

/* ---------- Bilder ---------- */
.news-bild {
  width: 100%; max-height: 300px; object-fit: cover;
  border-radius: 10px; display: block; margin-bottom: .9rem;
}
.artikel-bild {
  width: 100%; max-height: 460px; object-fit: cover;
  border-radius: 10px; display: block; margin: 0 0 1.25rem;
}
.bild-vorschau { margin: .4rem 0; }
.bild-vorschau img {
  max-width: 320px; width: 100%; border-radius: 8px;
  border: 1px solid var(--linie); display: block;
}

/* ---------- Leere Zustände ---------- */
.leer { margin: 3.5rem 0; padding: 2.5rem; background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; text-align: center; }
.leer h1 { margin-top: 0; }

/* ---------- Fusszeile ---------- */
.fuss { border-top: 1px solid var(--linie); color: var(--grau); font-size: .9rem; }
.fuss .innen { padding-top: 1rem; padding-bottom: 1rem; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-block; background: var(--akzent); color: #fff;
  border: none; border-radius: 8px; padding: .55rem 1.1rem;
  font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.knopf:hover { background: var(--akzent-dunkel); color: #fff; }
.knopf.klein { padding: .3rem .7rem; font-size: .85rem; }
.knopf.grau { background: #EBEAE4; color: var(--tinte); }
.knopf.grau:hover { background: #DDDCD4; }
.knopf.rot { background: var(--rot); }
.knopf.rot:hover { background: #8C0E24; }
.knopf.voll { width: 100%; padding: .75rem; font-size: 1rem; }

/* ---------- Meldungen ---------- */
.meldung { padding: .75rem 1rem; border-radius: 8px; font-family: 'Familjen Grotesk', sans-serif; }
.meldung.fehler { background: #FBE9EC; color: var(--rot); border: 1px solid #F0C3CB; }
.meldung.erfolg { background: #E8F4EC; color: var(--gruen); border: 1px solid #C4E0CE; }

/* ---------- Login ---------- */
.login-seite { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 1.5rem; }
.login-karte {
  width: 100%; max-width: 400px; background: var(--karte);
  border: 1px solid var(--linie); border-radius: 12px; padding: 2rem;
}
.login-karte h1 { margin: 1.2rem 0 .3rem; font-size: 1.6rem; }
.hinweis { color: var(--grau); margin-top: 0; }

/* ---------- Formulare ---------- */
label { display: block; margin: 1.1rem 0 .3rem; font-weight: 600; font-size: .95rem; }
.optional { color: var(--grau); font-weight: 400; }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: .6rem .75rem; font-size: 1rem;
  font-family: inherit; color: var(--tinte);
  border: 1px solid #CFCEC7; border-radius: 8px; background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--akzent); }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin-top: 1.2rem; }
.checkbox input { width: auto; }
.feld-hinweis { font-size: .85rem; color: var(--grau); margin: .3rem 0 0; }
.formular-aktionen { margin-top: 1.5rem; display: flex; align-items: center; gap: 1.2rem; }
.artikel-formular { margin-bottom: 4rem; }

/* ---------- Backend-Tabelle ---------- */
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.titelzeile h1 { margin: 0; }
.tabelle {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0 3rem;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 10px;
  overflow: hidden; font-size: .95rem;
}
.tabelle th, .tabelle td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--linie); }
.tabelle th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); }
.tabelle tr:last-child td { border-bottom: none; }
.titel-zelle { font-weight: 600; }
.rechts { text-align: right; }
.aktionen { white-space: nowrap; }
.inline { display: inline; }
.du { color: var(--grau); font-weight: 400; }

.status { font-size: .8rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; }
.status.sichtbar { background: #E8F4EC; color: var(--gruen); }
.status.entwurf { background: #F0EFE9; color: var(--grau); }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .news-eintrag.hervorgehoben h2 { font-size: 1.5rem; }
  .artikel h1 { font-size: 1.7rem; }
  .tabelle { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
