/* =========================================================================
   STYLES  ·  Layout & Komponenten
   Nutzt ausschließlich die Variablen aus theme.css.
   ========================================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-weight: var(--weight-normal);
  background: var(--brand-primary-strong);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- App-Hülle (feste Höhe; nur der Inhalt scrollt) ------------------- */
.app {
  max-width: var(--shell-max);
  margin: 0 auto;
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- Kopfleiste ------------------------------------------------------- */
.appbar {
  background: var(--bg-app);
  color: var(--on-primary);
  padding: calc(env(safe-area-inset-top) + 14px) 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  z-index: 20;
  border-bottom: 1px solid var(--border);
}
.appbar .logo { height: 34px; width: auto; max-width: 116px; object-fit: contain; display: block; }
.appbar-back {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.08); color: var(--on-primary);
  display: grid; place-items: center; cursor: pointer; font-size: 21px; margin-right: 2px;
}
.appbar-back[hidden] { display: none; }
.appbar-back:active { background: rgba(255,255,255,0.16); }
.appbar .titles h1 {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: 1.1rem; line-height: 1.05; color: var(--on-primary);
}
.appbar .titles { min-width: 0; }
.appbar .sub { font-size: 0.72rem; color: var(--on-primary-mut); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-cta {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  background: var(--brand-accent); color: var(--on-accent);
  text-decoration: none; font-size: 0.76rem; font-weight: var(--weight-bold);
}
.appbar-cta i { font-size: 16px; }
.appbar-cta:active { filter: brightness(1.1); }

/* ---- Scroll-Bereich --------------------------------------------------- */
.screens { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.screen { display: none; padding: 20px; animation: rise 0.32s ease both; }
.screen.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

/* ---- Typo ------------------------------------------------------------- */
.screen-title {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: 1.5rem; color: var(--text-strong); letter-spacing: -0.01em; margin-bottom: 4px;
}
.screen-lead { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 18px; }
.section-label {
  font-size: 0.78rem; font-weight: var(--weight-bold); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted); margin: 22px 2px 12px;
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
  background: linear-gradient(150deg, rgba(46,163,242,0.18), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 22px; position: relative; overflow: hidden; text-align: center;
}
.hero::after {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 170px; height: 170px; border-radius: 50%;
  background: var(--brand-accent); opacity: 0.18; filter: blur(6px);
}
.hero .eyebrow {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-accent); font-weight: var(--weight-bold);
}
.hero h2 {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: 1.5rem; line-height: 1.16; margin: 8px 0; color: var(--text-strong); letter-spacing: -0.01em;
}
.hero p { font-size: 0.84rem; color: var(--on-primary-mut); margin: 0 auto 18px; max-width: 90%; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: var(--weight-bold);
  border: none; border-radius: var(--radius-sm); padding: 13px 18px;
  cursor: pointer; width: 100%; text-decoration: none;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.98); }
/* Primärer Button: Hintergrund + Vordergrund laut Theme-Vorgabe */
.btn-accent { background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--brand-accent); }
.btn-accent:active { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--brand-accent); border: 1px solid var(--border); }

/* ---- Kachelgitter (zentriert) ---------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 11px; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.tile:active { transform: scale(0.98); }
.tile .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--tag-bg); color: var(--brand-accent);
  display: grid; place-items: center; font-size: 22px;
}
.tile span { font-size: 0.84rem; font-weight: var(--weight-bold); color: var(--text-strong); }
button.tile { font-family: var(--font-body); }

/* ---- Zeilen-Karten (Termine-Übersicht & Datumslisten) ----------------- */
.row-card {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 15px; margin-bottom: 10px; cursor: pointer; text-decoration: none;
  font-family: var(--font-body); transition: transform 0.08s ease;
}
.row-card:active { transform: scale(0.99); }
div.row-card { cursor: default; }
.rc-ico { width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--tag-bg); color: var(--brand-accent); display: grid; place-items: center; font-size: 21px; }
.rc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rc-title { font-size: 0.92rem; font-weight: var(--weight-bold); color: var(--text-strong); }
.rc-sub { font-size: 0.78rem; color: var(--text-muted); }
.rc-chev { color: var(--text-muted); font-size: 18px; flex: none; }

/* ---- Karten ----------------------------------------------------------- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 12px;
  display: block; text-decoration: none; color: inherit;
}
a.card { transition: transform 0.08s ease; }
a.card:active { transform: scale(0.99); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-title { font-size: 0.98rem; font-weight: var(--weight-bold); color: var(--text-strong); }
.card-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 5px; }
.card-price {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: var(--weight-bold);
  color: var(--brand-accent); margin-top: 12px;
}
.tag {
  flex: none; font-size: 0.66rem; font-weight: var(--weight-bold); letter-spacing: 0.03em;
  background: var(--tag-bg); color: var(--tag-text); padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}

/* ---- Info-Box --------------------------------------------------------- */
.note {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-left: 3px solid var(--brand-accent);
  border-radius: var(--radius-md); padding: 14px 16px; margin-top: 16px;
}
.note .t { font-size: 0.86rem; font-weight: var(--weight-bold); color: var(--text-strong); display: flex; align-items: center; gap: 7px; }
.note .t i { color: var(--brand-accent); }
.note p { font-size: 0.82rem; color: var(--text-muted); margin-top: 5px; }

/* ---- FAQ Akkordeon ---------------------------------------------------- */
.faq-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; }
.faq-q span { font-size: 0.9rem; font-weight: var(--weight-bold); color: var(--text-strong); }
.faq-q i { color: var(--text-muted); font-size: 18px; transition: transform 0.25s ease; flex: none; }
.faq-item.open .faq-q i { transform: rotate(180deg); color: var(--brand-accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.faq-a p { padding: 0 16px 15px; font-size: 0.84rem; color: var(--text-muted); }

/* ---- Kursfinder ------------------------------------------------------- */
.finder-q { font-size: 1.02rem; font-weight: var(--weight-bold); color: var(--text-strong); margin-bottom: 14px; font-family: var(--font-display); }
.finder-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 15px 16px; margin-bottom: 10px; cursor: pointer;
  font-family: var(--font-body); font-weight: var(--weight-normal); font-size: 0.9rem; color: var(--text-strong);
  transition: transform 0.08s ease;
}
.finder-opt:active { transform: scale(0.99); }
.finder-opt i { color: var(--brand-accent); font-size: 17px; flex: none; }
.finder-back { background: none; border: none; color: var(--text-muted); font-size: 0.82rem; cursor: pointer; margin-top: 8px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); }
.pill { display: inline-block; font-size: 0.74rem; font-weight: var(--weight-bold); background: var(--tag-bg); color: var(--tag-text); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }

/* ---- Eingebetteter Video-Player (16:9) -------------------------------- */
.player { position: relative; padding-top: 56.25%; background: var(--brand-primary-strong); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 10px; }
.player iframe, .player #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-open { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--brand-accent); text-decoration: none; margin-bottom: 18px; }
button.card.knot { width: 100%; text-align: left; font-family: var(--font-body); cursor: pointer; }

/* ---- Kontaktzeilen ---------------------------------------------------- */
.contact { display: flex; align-items: center; gap: 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px; text-decoration: none; }
.contact i { font-size: 21px; color: var(--brand-accent); width: 24px; text-align: center; flex: none; }
.contact .ct { font-size: 0.9rem; font-weight: var(--weight-bold); color: var(--text-strong); }
.contact .cs { font-size: 0.76rem; color: var(--text-muted); margin-top: 1px; }

/* ---- Karten / Standorte ----------------------------------------------- */
.map-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 12px; }
.map-card .head { display: flex; align-items: center; gap: 8px; padding: 13px 16px 11px; }
.map-card .head i { color: var(--brand-accent); font-size: 19px; }
.map-card .head .mt { font-size: 0.9rem; font-weight: var(--weight-bold); color: var(--text-strong); }
.map-card .head .ms { font-size: 0.74rem; color: var(--text-muted); }
.map-card iframe { width: 100%; height: 170px; border: 0; display: block; filter: grayscale(0.1); }
.map-card .open { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; font-size: 0.8rem; color: var(--brand-accent); text-decoration: none; border-top: 1px solid var(--border); }

/* ---- Untere Navigation ------------------------------------------------ */
.tabbar {
  display: flex; background: var(--brand-primary-strong);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  flex: none; z-index: 20;
}
.tab {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 9px 0 11px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-family: var(--font-body); transition: color 0.15s ease;
}
.tab i { font-size: 22px; }
.tab span { font-size: 0.66rem; }
.tab.active { color: var(--brand-accent); }

.list-title { font-size: 0.9rem; font-weight: var(--weight-bold); color: var(--text-strong); margin-bottom: 10px; }
.times { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.times > div { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; padding-top: 7px; border-top: 1px solid var(--border); }
.times > div:first-child { border-top: 0; padding-top: 0; }
.times span:first-child { color: var(--text-muted); }
.times span:last-child { color: var(--text-strong); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
