/* =========================================================
   IG Schulcampus Leematten – Stylesheet
   Statische Website, mobil-zuerst, responsive.
   Farben abgeleitet vom Campus-Foto:
   - Petrol/Türkis (Fassade)  -> Hauptfarbe
   - Sandgelb (Sonnensegel)   -> Akzent
   - Papierweiss / Anthrazit  -> Hintergrund / Text
   ========================================================= */

:root {
  --petrol:        #1f6b73;   /* Hauptfarbe */
  --petrol-dunkel: #164e54;   /* Hover / dunkler */
  --petrol-hell:   #e8f2f2;   /* dezente Box-Tönung */
  --sand:          #e0b970;   /* Akzent (Sonnensegel) */
  --sand-dunkel:   #c79a49;
  --papier:        #fbfaf7;   /* Seitenhintergrund */
  --weiss:         #ffffff;
  --anthrazit:     #23292b;   /* Fliesstext */
  --grau:          #5c6a6d;   /* Sekundärtext */
  --linie:         #dfe3e2;   /* Trennlinien / Box-Rand */

  --radius:        14px;
  --breite:        1080px;    /* max. Inhaltsbreite */
  --schatten:      0 1px 3px rgba(20, 60, 64, .08),
                   0 6px 18px rgba(20, 60, 64, .06);
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--anthrazit);
  background: var(--papier);
}

img { max-width: 100%; display: block; }

a { color: var(--petrol); }
a:hover { color: var(--petrol-dunkel); }

.container {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 20px;
}

/* Sichtbarer Fokus für Tastaturbedienung (Barrierefreiheit) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--weiss);
  border-bottom: 1px solid var(--linie);
}

/* Panorama-Foto mit Titel darüber */
.hero {
  position: relative;
  background: var(--petrol-dunkel);
}
.hero img {
  width: 100%;
  height: clamp(140px, 26vw, 300px);
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
/* Verlauf, damit der Titel gut lesbar bleibt */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
              rgba(22, 78, 84, .78) 0%,
              rgba(22, 78, 84, .35) 45%,
              rgba(22, 78, 84, .05) 100%);
}
.hero-title {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.hero-title h1 {
  color: var(--weiss);
  margin: 0;
  max-width: var(--breite);
  margin-inline: auto;
  width: 100%;
  font-size: clamp(1.35rem, 4.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .2px;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

/* ---------- Navigation ---------- */
.site-nav {
  background: var(--petrol);
}
.site-nav .container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 52px;
}
.site-nav a {
  color: var(--weiss);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  line-height: 1;
}
.site-nav a:hover { background: var(--petrol-dunkel); color: var(--weiss); }
.site-nav a[aria-current="page"] {
  background: var(--weiss);
  color: var(--petrol);
}

/* Zurück-Bereich (Icon / Button) rechts in der Navigation */
.nav-spacer { flex: 1 1 auto; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--weiss);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.45);
}
.back-link:hover { background: var(--petrol-dunkel); color: var(--weiss); }
.back-link svg { width: 18px; height: 18px; flex: none; }

/* ============================================================
   INHALT
   ============================================================ */
main { padding: 34px 0 60px; }

.page-title {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  margin: 0 0 6px;
  color: var(--anthrazit);
}
.page-intro {
  color: var(--grau);
  margin: 0 0 28px;
  max-width: 100%;
}

/* ---------- Aktuelles: Publikations-Boxen ---------- */
.news-list {
  display: grid;
  gap: 18px;
}
.news-card {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-left: 5px solid var(--petrol);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--schatten);
}
.news-card .date {
  display: inline-block;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--weiss);
  background: var(--petrol);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.news-card h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
  color: var(--anthrazit);
}
.news-card p { margin: 0 0 14px; color: var(--anthrazit); }
.news-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}
.news-card .card-link:hover { text-decoration: underline; }

/* Ganze Karte klickbar, wenn sie einen Link enthält ("stretched link").
   Bewährtes Muster: Karte = position:relative, der Link spannt sein
   ::after absolut über die ganze Karte. Keine z-index-/Geschwister-Tricks. */
.news-card:has(.card-link) {
  position: relative;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}
.news-card:has(.card-link):hover {
  box-shadow: 0 2px 6px rgba(20, 60, 64, .12),
              0 10px 24px rgba(20, 60, 64, .10);
  transform: translateY(-2px);
}
.news-card .card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ---------- Über die IG: Textabschnitte ---------- */
.prose { max-width: 100%; }
.prose h2 {
  font-size: 1.5rem;
  margin: 34px 0 10px;
  color: var(--petrol-dunkel);
}
.prose h3 {
  font-size: 1.15rem;
  margin: 22px 0 6px;
}
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

.callout {
  background: var(--petrol-hell);
  border: 1px solid #cfe2e2;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 8px 0 22px;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sand);
  color: #3a2c0c;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { background: var(--sand-dunkel); color: #3a2c0c; }

.btn-petrol {
  background: var(--petrol);
  color: var(--weiss);
}
.btn-petrol:hover { background: var(--petrol-dunkel); color: var(--weiss); }

/* ---------- Zurück-Schaltfläche unten im Inhalt ---------- */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  color: var(--petrol);
  text-decoration: none;
  font-weight: 600;
  padding: 11px 18px;
  border: 1px solid var(--petrol);
  border-radius: 10px;
}
.back-button:hover { background: var(--petrol); color: var(--weiss); }
.back-button svg { width: 18px; height: 18px; }

.prose .motto {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--petrol-dunkel);
  margin-top: 4px;
}
/* Etwas mehr Luft vor bestimmten Untertiteln */
.prose .mt-extra { margin-top: 46px; }

/* QR-Code (WhatsApp-Gruppe) */
.qr-code {
  width: 180px;
  height: 180px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 8px;
  background: var(--weiss);
  margin-top: 6px;
}

/* Datenschutzseite: interner Hinweis + Stand */
.hinweis-box {
  background: #fff6e6;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .95rem;
  color: #5a4415;
}
.prose .stand {
  color: var(--grau);
  font-style: italic;
  margin-top: 26px;
}

/* ---------- Artikel-Seite ---------- */
.article { max-width: 100%; }
.article-meta {
  color: var(--petrol);
  font-weight: 700;
  font-size: .9rem;
  margin: 0 0 6px;
}
.article .lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--petrol-dunkel);
  border-left: 4px solid var(--sand);
  padding-left: 16px;
  margin: 18px 0 24px;
}
.article .pull {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--anthrazit);
  background: var(--petrol-hell);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}
.article .signature {
  font-style: italic;
  color: var(--grau);
  margin-top: 24px;
}

/* ---------- Kernteam: Mitglieder-Karten mit Foto-Platzhalter ---------- */
.member-grid {
  display: grid;
  gap: 18px;
  margin: 12px 0 8px;
}
@media (min-width: 620px) {
  .member-grid { grid-template-columns: repeat(3, 1fr); }
}
.member-card {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--schatten);
  text-align: center;
}
/* Foto-Platzhalter: Foto später als <img> einsetzen (siehe Anleitung) */
.member-photo {
  width: 110px;
  height: 110px;
  margin: 4px auto 12px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--petrol-hell);
  border: 2px solid var(--linie);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--petrol);
  overflow: hidden;
}
.member-photo svg { width: 46px; height: 46px; opacity: .55; }
.member-card .name {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 2px;
  color: var(--anthrazit);
}
.member-card .addr {
  color: var(--grau);
  font-size: .92rem;
  margin: 0;
  line-height: 1.4;
}

/* ============================================================
   FUSSZEILE
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--linie);
  background: var(--weiss);
  color: var(--grau);
  font-size: .9rem;
  padding: 22px 0;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
}

/* ============================================================
   RESPONSIVE FEINSCHLIFF
   ============================================================ */
/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
