/* =========================================================
   Wohngemeinschaft am Giglberg – Stylesheet
   Keine externen Schriften (DSGVO-freundlich), keine Frameworks
   ========================================================= */

:root {
  --gruen: #3f6b3a;
  --gruen-dunkel: #2c4d28;
  --gruen-hell: #e8efe4;
  --sand: #f7f4ee;
  --text: #24302a;
  --text-leise: #56635a;
  --weiss: #ffffff;
  --radius: 12px;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--sand);
}

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

a {
  color: var(--gruen-dunkel);
}

a:hover,
a:focus-visible {
  color: var(--gruen);
}

:focus-visible {
  outline: 3px solid #d8a31a;
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--gruen-dunkel);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ---------- Skip-Link (Barrierefreiheit) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gruen-dunkel);
  color: var(--weiss);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--weiss);
  border-bottom: 1px solid #dde3d8;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gruen-dunkel);
  text-decoration: none;
  line-height: 1.2;
}

.logo span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-leise);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a:focus-visible {
  border-bottom-color: var(--gruen);
  color: var(--gruen-dunkel);
}

/* Mobiles Menü ohne JavaScript (details/summary) */
.nav-toggle {
  display: none;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-toggle summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border: 1px solid #c9d3c4;
    border-radius: 8px;
    color: var(--gruen-dunkel);
  }

  .nav-toggle summary::-webkit-details-marker {
    display: none;
  }

  .nav-toggle[open] .nav {
    display: block;
  }

  .nav-toggle .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--weiss);
    border-bottom: 1px solid #dde3d8;
    padding: 0.5rem 1.25rem 1rem;
  }

  .nav-toggle .nav ul {
    flex-direction: column;
    gap: 0;
  }

  .nav-toggle .nav a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eef1ec;
  }

  .nav-desktop {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(30, 50, 28, 0.55), rgba(30, 50, 28, 0.55)),
    url("../bilder/hof.jpg") center / cover no-repeat,
    var(--gruen);
  color: var(--weiss);
  padding: clamp(4rem, 12vw, 8rem) 0;
}

.hero h1 {
  color: var(--weiss);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 0.75rem;
}

.hero p {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  max-width: 40rem;
  margin: 0 0 1.75rem;
}

.button {
  display: inline-block;
  background: var(--weiss);
  color: var(--gruen-dunkel);
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  margin: 0 0.5rem 0.5rem 0;
}

.button:hover,
.button:focus-visible {
  background: var(--gruen-hell);
  color: var(--gruen-dunkel);
}

.button--outline {
  background: transparent;
  color: var(--weiss);
  border: 2px solid var(--weiss);
}

.button--outline:hover,
.button--outline:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: var(--weiss);
}

/* ---------- Abschnitte ---------- */
.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section--hell {
  background: var(--weiss);
}

.section--gruen {
  background: var(--gruen-hell);
}

.lead {
  font-size: 1.15rem;
  color: var(--text-leise);
  max-width: 46rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.section--hell .card {
  background: var(--sand);
  box-shadow: none;
}

.card p {
  margin: 0;
}

.zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.zahl {
  text-align: center;
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
}

.zahl strong {
  display: block;
  font-size: 2.2rem;
  color: var(--gruen);
  line-height: 1.1;
}

.zahl span {
  color: var(--text-leise);
  font-size: 0.95rem;
}

.zwei-spalten {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.liste {
  padding-left: 1.2rem;
}

.liste li {
  margin-bottom: 0.4rem;
}

/* ---------- Kontakt ---------- */
.kontakt-box {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.kontakt-box a {
  font-weight: 600;
}

.kontakt-gross {
  font-size: 1.3rem;
  margin: 0.25rem 0 1rem;
}

.zeiten {
  border-collapse: collapse;
  width: 100%;
}

.zeiten th,
.zeiten td {
  text-align: left;
  padding: 0.45rem 0.5rem 0.45rem 0;
  border-bottom: 1px solid #e3e8df;
  vertical-align: top;
}

.zeiten th {
  font-weight: 600;
  white-space: nowrap;
  padding-right: 1.5rem;
}

.hinweis {
  font-size: 0.95rem;
  color: var(--text-leise);
}

/* ---------- Galerie ---------- */
.galerie {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* Bilder in jeder Reihe mittig */
  gap: 0.75rem;
  margin-top: 2rem;
}

.galerie img {
  width: calc((100% - 3 * 0.75rem) / 4);  /* 4 Bilder pro Reihe */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #d6e0d1;
}

@media (max-width: 900px) {
  .galerie img {
    width: calc((100% - 0.75rem) / 2);
  }
}

@media (max-width: 500px) {
  .galerie img {
    width: 100%;
  }
}


/* ---------- Aufnahme-Listen ---------- */
.ja-nein h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ja-nein .ja h3::before {
  content: "✓";
  color: var(--gruen);
}

.ja-nein .nein h3::before {
  content: "✕";
  color: #a33a2b;
}

/* ---------- Termine ---------- */
.termin-bild {
  max-width: 640px;
  border-radius: var(--radius);
  background: #d6e0d1;
  margin-top: 1.5rem;
}

/* ---------- FQA-Ergebnisse ---------- */
.fakten {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.fakten th,
.fakten td {
  text-align: left;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid #e3e8df;
  vertical-align: top;
}

.fakten th {
  width: 40%;
  font-weight: 600;
}

.ergebnis {
  display: inline-block;
  background: var(--gruen-hell);
  color: var(--gruen-dunkel);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
}

.pruef-liste {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.pruef-liste li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #e3e8df;
}

.mitglied img {
  max-width: 220px;
  margin-top: 0.5rem;
  background: #d6e0d1;
  min-height: 60px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--gruen-dunkel);
  color: #dfe8db;
  padding: 2.5rem 0;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--weiss);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* ---------- Rechtstexte ---------- */
.rechtstext {
  max-width: 46rem;
}

.rechtstext h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
}

.logo-bild {
  width: auto;
  height: 64px;   
  flex-shrink: 0;
}
/* ---------- FQA: Tabelle der Qualitätsbereiche ---------- */
.tabelle-scroll {
  overflow-x: auto;
}

.pruef-tabelle {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.97rem;
}

.pruef-tabelle th,
.pruef-tabelle td {
  border-bottom: 1px solid #e3e8df;
  padding: 0.55rem 0.5rem;
  vertical-align: top;
}

.pruef-tabelle thead th {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-leise);
  text-align: center;
}

.pruef-tabelle thead th:first-child,
.pruef-tabelle tbody th {
  text-align: left;
  font-weight: 400;
}

.pruef-tabelle td {
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.2;
}

.rechtstext h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
/* ---------- Termine: Bild mittig ---------- */
.termine {
  text-align: center;
}

.termine .termin-bild {
  margin: 1.5rem auto 0;
}

/* ---------- Einladungs-Popup (handytauglich) ---------- */
.popup {
  border: none;
  border-radius: var(--radius);
  padding: 2.5rem 1rem 1rem;
  width: min(92vw, 520px);
  max-width: 92vw;
  max-height: 90dvh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.popup::backdrop {
  background: rgba(20, 35, 18, 0.6);
}

.popup h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
}

.popup h2:focus {
  outline: none;
}

.popup img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62dvh;
  margin: 0 auto 1rem;
  border-radius: 8px;
  object-fit: contain;
}

.popup-schliessen {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-leise);
}

.popup-ok {
  border: none;
  cursor: pointer;
  background: var(--gruen);
  color: var(--weiss);
  margin: 0;
}

.popup-ok:hover,
.popup-ok:focus-visible {
  background: var(--gruen-dunkel);
  color: var(--weiss);
}

/* Seite im Hintergrund nicht scrollen, solange das Popup offen ist */
body:has(.popup[open]) {
  overflow: hidden;
}
/* Fix Handy: geschlossenes Menü darf die Seite nicht verbreitern */
.site-header .header-inner {
  position: relative;
}

.nav-toggle:not([open]) .nav {
  display: none;
}

/* Einladungsbild darf nie breiter als der Bildschirm werden */
.termin-bild {
  width: 100%;
  max-width: min(100%, 640px);
  height: auto;
}