/* Yogaschule Emsdetten – gemeinsames Stylesheet für alle Seiten */

:root {
  --bg-top: #fcdcab;
  --bg-bottom: #f5a850;
  --box: #754f2c;
  --text: #ffffff;
  --gold: #ffc61a;
  --link: #f0b48a;
  --red: #b00000;
  --nav-active: #b8960f;
  --aside: #9c928a;
  --aside-text: #2b2b2b;
  --aside-link: #5e3500;
  --radius: 0;
  --font: Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(var(--bg-top), var(--bg-bottom)) fixed;
}

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

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: #fff; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* ---------- Kopfbereich ---------- */
.site-header {
  background: linear-gradient(#7a6a2b, #7d705a);
  padding: 12px 0 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.brand {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.brand a { display: block; }
.brand img { box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.brand .logo { width: min(100%, 270px); }
.brand .haus { width: min(100%, 265px); }

.site-nav ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 0;
  color: #f1ece3;
  font-size: .85rem;
  font-weight: bold;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.site-nav a:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.site-nav a[aria-current="page"] {
  background: var(--nav-active);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

/* ---------- Inhaltsbox ---------- */
main { flex: 1; }

.box {
  margin-block: clamp(16px, 4vw, 36px);
  padding: clamp(16px, 4vw, 40px);
  background: rgba(117, 79, 44, .96);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

h1, h2, h3 { color: var(--gold); line-height: 1.3; }
h1 { font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); margin: 0 0 1.2rem; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }

/* ---------- Startseite ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.intro {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  gap: 0 24px;
  align-items: start;
}

.intro p { margin-top: 0; }
.portrait { margin: 0 0 1.2rem; width: 195px; }
.portrait figcaption { font-size: .75rem; line-height: 1.4; font-weight: bold; margin-top: 4px; }
.portrait .rot { color: #ff1a1a; }

.kurs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0 24px;
  align-items: start;
  margin-bottom: 1rem;
}

.kurs p { margin-top: 0; }
.kurs .raum-bild { width: 100%; }

.clear { clear: both; }

/* ---------- Aktuelles (Seitenleiste) ---------- */
.aktuelles {
  background: var(--aside);
  color: var(--aside-text);
  padding: 18px 16px;
  text-align: center;
  font-size: .9rem;
  line-height: 1.5;
}

.aktuelles h2 {
  margin: 0 0 10px;
  color: #333;
  font-size: 1rem;
  letter-spacing: .3em;
}

.aktuelles h3 { color: var(--red); font-size: .95rem; margin: 10px 0 6px; }
.aktuelles hr { border: 0; border-top: 2px solid #5f5852; margin: 12px 0; }
.aktuelles p { margin: 0 0 .7em; }
.aktuelles a { color: var(--aside-link); font-weight: bold; }
.aktuelles a:hover { color: #000; }
.aktuelles .klein { font-size: .78rem; }
.aktuelles .zahl { font-size: 1.05rem; font-weight: bold; margin: 0 0 .3em; }
.aktuelles .stand { font-size: .78rem; font-weight: bold; }
.aktuelles .lang { overflow-wrap: anywhere; }

/* ---------- Fußzeile ---------- */
.site-footer {
  background: linear-gradient(#5a5a5a, #3f3f3f);
  padding: 14px 0;
  text-align: center;
  font-size: .9rem;
}

.site-footer .zeile {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
}

.site-footer p { margin: 0; }
.site-footer .social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
  margin-top: 8px;
}

.site-footer .social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer .social svg { width: 1.3em; height: 1.3em; fill: currentColor; flex: none; }
.site-footer .impressum { margin-top: 8px; }

/* ---------- Tablet & Smartphone ---------- */
@media (max-width: 1000px) {
  .intro, .kurs { grid-template-columns: 1fr; }
  .kurs .raum-bild { width: 240px; max-width: 100%; margin-top: 4px; }
  .intro .portrait { order: 2; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .site-nav ul { justify-content: center; }
  .brand { flex-direction: column; align-items: center; }
  .brand img { margin-inline: auto; }
}

@media (max-width: 480px) {
  .site-nav a { padding: 8px 10px; }
  .site-footer .zeile { flex-direction: column; gap: 2px; }
}

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

/* ---------- Unterseiten: Listen, Galerie, Vorstellung ---------- */
.liste { margin: 0 0 1.5rem; padding-left: 1.4em; }
.liste li { margin-bottom: .3em; }

.fussnote { font-size: .85rem; line-height: 1.5; margin-left: 1.2rem; }

.galerie {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 1.8rem 0 .5rem;
}

.galerie figure { margin: 0; max-width: 100%; }
.galerie img { height: 135px; width: auto; max-width: 100%; }
.galerie figcaption { font-size: .8rem; font-style: italic; margin-top: 4px; }

.bio {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 0 32px;
  align-items: start;
  margin-top: 2.5rem;
}

.bio .portrait { width: 225px; }
.bio p { margin-top: 0; }

@media (max-width: 700px) {
  .bio { grid-template-columns: 1fr; }
}

/* ---------- Ausbildung ---------- */
.modul-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.modul-kopf h2, .modul-kopf h3, .modul-kopf p { margin: 0; }
.modul-kopf .std { flex: none; font-size: .9rem; text-align: right; }
.titelzeile { margin: 2rem 0 1.4rem; }

.modul { margin-bottom: 2rem; }
.modul h3 { color: #fff; font-size: 1.1rem; }
.modul .liste { margin: .8rem 0 0; }

/* ---------- Kontakt ---------- */
.kontakt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 0 40px;
  align-items: start;
}

.kontakt-grid p { margin-top: 0; overflow-wrap: anywhere; }

.social-zeilen .sz { display: flex; align-items: center; gap: 8px; }
.social-zeilen svg { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

.bogen { margin: 0; width: 180px; }
.bogen figcaption { font-size: .9rem; font-style: italic; margin-top: 4px; }

.anfahrt {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0 24px;
  align-items: start;
  margin-bottom: 1.5rem;
}

.anfahrt p { margin-top: 0; }
.anfahrt img { width: 200px; }
.karte { width: 100%; max-width: 400px; }

@media (max-width: 700px) {
  .kontakt-grid, .anfahrt { grid-template-columns: 1fr; }
  .anfahrt img { margin-bottom: 1rem; }
}

/* ---------- Impressum / Datenschutz ---------- */
.rechtstext { max-width: 85ch; font-size: .95rem; }
.rechtstext h2 { font-size: 1.15rem; }
.rechtstext h2.abschnitt { margin-top: 3rem; font-size: 1.3rem; }
.rechtstext h3 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }
.rechtstext p { margin: 0 0 .9em; overflow-wrap: anywhere; }

/* ---------- Kursangebot ---------- */
.nur-lesehilfe {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.quartal { margin-bottom: 3.5rem; }

.quartal-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, .28);
  border-bottom: 3px solid var(--gold);
}

.quartal-kopf h2 { margin: 0; font-size: 1.1rem; }
.quartal-kopf p { margin: 0; font-size: .9rem; }

.untertitel { margin: 1rem 0 .6rem; font-weight: bold; font-size: .95rem; }

.legende {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 1rem;
  padding: 0;
  font-size: .85rem;
}

.ampel {
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-right: .5em;
  border: 1px solid rgba(255, 255, 255, .7);
  vertical-align: -.05em;
}

.a-g { background: #3fbf3f; }
.a-o { background: #f2c200; }
.a-r { background: #c0322b; }
.a-l { background: #9aa0a6; }

table.kurse {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  line-height: 1.4;
}

table.kurse th {
  text-align: left;
  padding: 8px 10px;
  background: rgba(0, 0, 0, .28);
  color: var(--gold);
  font-size: .8rem;
}

table.kurse td { padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, .15); vertical-align: top; }
table.kurse tbody tr:nth-child(even) { background: rgba(255, 255, 255, .06); }
table.kurse td[data-label="Kurs"] { font-weight: bold; }
table.kurse td[data-label="Zeit"], table.kurse td[data-label="Datum"], table.kurse td[data-label="Preis"], table.kurse td[data-label="ID"] { white-space: nowrap; }

.ampel-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.st { font-weight: bold; }
.st1 { color: #7de05a; }
.st2 { color: #ffd23a; }

.zoom-titel { margin: 1.6rem 0 .5rem; padding: 6px 10px; background: rgba(0, 0, 0, .28); font-style: italic; font-weight: bold; font-size: .9rem; }
.klein { font-size: .85rem; margin: .6rem 0 1rem; }
.fuss { font-size: .85rem; line-height: 1.5; margin: .3rem 0; }

.termine {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-start;
  margin: 1rem 0 2.5rem;
}

.termine a { display: block; width: 130px; font-size: .8rem; font-style: italic; }
.termine a span { display: block; margin-top: 4px; }
.termine p { margin: 0 0 .7em; }

/* Smartphone und kleine Tablets: jeder Kurs als eigenes Kästchen */
@media (max-width: 900px) {
  table.kurse, table.kurse tbody { display: block; }
  table.kurse thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  }

  table.kurse tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, .22) !important;
  }

  table.kurse td { display: block; padding: 0; border: 0; white-space: normal !important; }

  table.kurse td::before {
    content: attr(data-label);
    display: block;
    font-size: .7rem;
    font-weight: normal;
    color: #e8cfa8;
  }

  table.kurse td:nth-child(5) { grid-column: 1 / -1; order: -1; font-size: 1rem; }
  table.kurse td:nth-child(5)::before { display: none; }
  table.kurse td:nth-child(1) { order: 1; }
  table.kurse td:nth-child(2) { order: 2; }
  table.kurse td:nth-child(3) { order: 3; }
  table.kurse td:nth-child(4) { order: 4; }
  table.kurse td:nth-child(7) { order: 5; }
  table.kurse td:nth-child(8) { order: 6; }
  table.kurse td:nth-child(6) { order: 7; }
  table.kurse td:nth-child(9) { order: 8; }
  .ampel-text { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
}

/* Plätze-Anzeige: Kästchen-Bild plus Text, Hinweis beim Darüberfahren über title */
.status { display: inline-block; white-space: nowrap; cursor: help; }
.status img { display: inline-block; width: 16px; height: 16px; margin-right: .5em; vertical-align: -.15em; }

td .status .t {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 900px) {
  .status { cursor: default; }
  td .status .t { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* ---------- Bilder vergrößern ---------- */
img.zoom { cursor: zoom-in; }

dialog.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: rgba(0, 0, 0, .88);
  color: #fff;
  cursor: zoom-out;
}

dialog.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

dialog.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; object-fit: contain; }
dialog.lightbox p { margin: 0; font-size: .9rem; text-align: center; }

dialog.lightbox button {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
