/* tobar.at redesign — site.css */

/* ---------- Fonts ---------- */
/* Dessau Regular und Dessau Bold sind zwei EIGENE Schriften (eigene Font-Families),
   NIEMALS über font-weight ansprechen! */
@font-face {
  font-family: 'Dessau';
  src: url('../fonts/dessau-regular.woff2') format('woff2'),
       url('../fonts/dessau-regular.woff')  format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Dessau Bold';
  src: url('../fonts/dessau-bold.woff2') format('woff2'),
       url('../fonts/dessau-bold.woff')  format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #333;
  background: #fff;
}
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; margin-top: 0; }
img, svg { max-width: 100%; height: auto; display: block; }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 {
  font-family: 'Dessau', Verdana, Arial, Helvetica, sans-serif;
  color: #669933;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
h1 { font-family: 'Dessau', Verdana, Arial, Helvetica, sans-serif; font-size: 3.5em; }
h2, h3 { font-family: 'Dessau Bold', Verdana, Arial, Helvetica, sans-serif; }
h2 { margin-top: 1.4em; margin-bottom: 0.3em; }

a { color: #669933; text-decoration: none; font-family: 'Dessau Bold', Verdana, Arial, Helvetica, sans-serif; }
a:hover, a:focus-visible { text-decoration: underline; }

p, li, td, div { font-family: Verdana, Arial, Helvetica, sans-serif; }
li { margin-bottom: 5px; }

.green { color: #669933; }

/* ---------- Layout ---------- */
.page { max-width: 820px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ---------- Startseite: Logo als Navigation ---------- */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  text-align: center;
}

/* Stage: Logo mittig mit inset, Overlay deckungsgleich, Labels außen */
.home-stage {
  position: relative;
  width: min(420px, 60vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  --label-r: 41%;
}

/* Zwei deckungsgleiche SVGs:
   - Basis (Original-Logo, unverändert, zeigt die 3 Ring-Paare in Standard-Grün)
   - Overlay (Balken-Segmente, bereits in Hover-Grün #b2cb3a, initial opacity:0)
   Bei Hover leuchtet das jeweilige Segment auf. */
.home-svg {
  position: absolute;
  left: 14%;
  top: 14%;
  width: 72%;
  height: 72%;
  overflow: visible;
  display: block;
}
.home-svg--base { pointer-events: none; }

.home-svg--overlay [data-seg] {
  opacity: 0;
  transition: opacity .2s ease-out;
}
.home-svg--overlay [data-seg].is-active { opacity: 1; }
/* Unsichtbarer Keil pro Segment — stabile Hoverzone inkl. Zwischenräume */
.home-svg--overlay .seg-hit {
  fill: none;
  pointer-events: all;
  opacity: 1 !important;     /* Hit-Zone bleibt immer aktiv (unsichtbar, weil fill:none) */
}
.home-svg--overlay [data-seg="dekorativ"] .seg-hit { pointer-events: none; }

/* Labels — Dessau Bold, eng am Kreis */
.home-label {
  position: absolute;
  left: calc(50% + var(--label-r) * var(--sx));
  top:  calc(50% - var(--label-r) * var(--sy));
  transform: translate(var(--tx), var(--ty));
  font-family: 'Dessau Bold', Verdana, sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  color: #67a336;
  text-transform: lowercase;
  text-decoration: none;
  letter-spacing: 0.015em;
  white-space: nowrap;
  transition: color .2s ease-out;
  padding: 0.15rem 0.3rem;
  line-height: 1;
}
.home-label:hover,
.home-label:focus-visible {
  color: #b2cb3a;
  text-decoration: none;
  outline: none;
}

.home-label.is-active { color: #b2cb3a; }

/* Feintuning einzelner Labels (Desktop) */
.home-label[data-seg="muskeltest"] { margin-top: 0.25rem; margin-left: 0.3rem; }
.home-label[data-seg="kurse"]      { margin-top: calc(-0.35rem - 10px); margin-left: -3px; }
.home-label[data-seg="paedagogik"] {
  margin-top: calc(-0.55rem - 20px);
  margin-left: calc(0.35rem - 8px);
  white-space: pre-line;
  text-align: left;
  line-height: 1.1;
}

.home-wordmark {
  font-family: 'Dessau', Verdana, sans-serif;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  color: #7ca538;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0.4rem 0 1.6rem;
}

.home-signature {
  align-self: center;
  text-align: center;
  margin: 0 0 1rem;
  font-family: 'Dessau', Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.35;
}
.home-signature div:first-child { color: #333; font-family: 'Dessau Bold', Verdana, sans-serif; }
.home-signature div:last-child  { color: #7ca538; font-size: 0.82rem; }

.home-psy {
  margin: 2.2rem 0 0;
  width: 100%;
  text-align: center;
  font-family: 'Dessau Bold', Verdana, sans-serif;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}
.home-psy a { color: #669933; font-family: 'Dessau Bold', Verdana, sans-serif; }
.home-psy a:hover { color: #b2cb3a; text-decoration: none; }

/* ---------- Unterseiten: Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid #e6ead7;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
.site-header .brand img { width: 64px; height: 64px; }
.site-header .brand .wordmark {
  font-family: 'Dessau Bold', Verdana, sans-serif;
  font-size: 1.15rem;
  color: #669933;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.site-header .brand .wordmark small {
  display: block;
  font-family: 'Dessau', Verdana, sans-serif;
  font-size: 0.7rem;
  color: #777;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
}
.site-nav a {
  font-family: 'Dessau', Verdana, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #669933;
  padding: 0.35rem 0;
  display: inline-block;
}
.site-nav a[aria-current="page"] {
  color: #333;
  border-bottom: 2px solid #669933;
}

/* ---------- Content ---------- */
.page p {
  margin: 0 0 0.9em;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 8 3 3;
}
.page img { margin: 0.5rem 0; border-radius: 2px; }
/* Zentrale Listendefinition: grünes Quadrat via ::before, linksbündig, hängender Einzug */
.page ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9em;
  text-align: left;
}
.page ul li {
  position: relative;
  padding-left: 1.3em;
  margin: 0 0 0.4em;
  text-align: left;
  line-height: 1.55;
}
.page ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5em;
  height: 0.5em;
  background: #669933;
}
.page > header { margin-bottom: 0.4rem; }
.page section { margin: 0 0 1.8em; }
.page section:last-child { margin-bottom: 0; }

.page dl.faqs { margin: 0; }
.page dl.faqs dt { margin: 1em 0 0.1em; font-weight: normal; }
.page dl.faqs dt:first-child { margin-top: 0; }
.page dl.faqs dd { margin: 0 0 0.6em; text-align: justify; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1.2rem;
  align-items: start;
  margin: 1rem 0 1.4rem;
}
.content-grid img { margin: 0; }

/* Anfahrts-Karte — MapLibre GL JS + OpenFreeMap.
   Initial sichtbar, aber nicht interaktiv (Seite scrollt durch). Klick aktiviert. */
.map-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e8edf1;
  overflow: hidden;
  margin: 0.6rem 0 0.3rem;
  border: 1px solid #e6ead7;
  cursor: pointer;
}
.map-wrap > [id^="map-"] { position: absolute; inset: 0; }
.map-wrap.map-active { cursor: grab; }
.map-wrap.map-active:active { cursor: grabbing; }

.map-address {
  margin: 0.2rem 0 2rem;
  font-size: 0.9rem;
  color: #555;
}
.map-address a { color: #669933; }
@media (max-width: 520px) {
  .map-address__sep { display: none; }
  .map-address__link { display: block; margin-top: 0.25em; }
}

/* ---------- Kontakt ---------- */
.hcard {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 1.2rem;
  margin: 0.5rem 0 1.6rem;
}
.hcard .photo { width: 100%; height: auto; border-radius: 2px; }
.hcard .name { font-family: 'Dessau Bold', Verdana, sans-serif; font-size: 1.25rem; color: #333; display: block; }
.hcard .org  { color: #669933; margin: 2px 0 10px; font-family: 'Dessau Bold', Verdana, sans-serif; }
.hcard .adr, .hcard .tel, .hcard .email { margin: 4px 0; }
.hcard .country-name { display: none; }
.hcard-addresses {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin: 10px 0 6px;
}
.hcard-addresses .adr { margin: 0; }
.hcard-addresses .adr + .adr { border-left: 1px solid #ddd; padding-left: 16px; }
.hcard-maplink { margin: 2px 0 10px; }
.hcard a { color: #669933; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #e6ead7;
  margin-top: 3rem;
  padding: 1.2rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}
.site-footer a { color: #669933; font-family: inherit; }
@media (max-width: 520px) {
  .site-footer .footer-sep { display: none; }
  .site-footer .footer-contact-sep { display: none; }
  .site-footer .footer-contact { display: block; margin-top: 0.2em; }
  .site-footer .footer-links { display: block; margin-top: 0.6em; }
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .home { padding: 1rem 0 3rem; }
  .home-stage { width: min(80vw, 360px); --label-r: 38%; }
  .home-label {
    font-size: clamp(0.78rem, 2.3vw, 0.95rem);
    padding: 0.1rem 0.25rem;
    white-space: normal;
    max-width: 28vw;
    line-height: 1.15;
  }
  /* Mobile-Override: Paedagogik nach oben und rechts */
  .home-label[data-seg="paedagogik"] { margin-top: -0.6rem; margin-left: 0.3rem; }
  .home-label[data-seg="kinesiologie"],
  .home-label[data-seg="faqs"] { text-align: center; }
  .home-label[data-seg="muskeltest"],
  .home-label[data-seg="balancen"],
  .home-label[data-seg="paedagogik"] { text-align: left; }
  .home-label[data-seg="kurse"],
  .home-label[data-seg="kontakt"] { text-align: right; }
  .home-wordmark { font-size: 1.9rem; margin: 0.4rem 0 1rem; }
  .home-signature { align-self: center; text-align: center; }
  .home-psy { margin: 1.4rem 0 0; }
  .site-header { justify-content: center; text-align: center; }
  .site-header .brand { flex-direction: column; gap: 0.3rem; }
  .site-nav ul { justify-content: center; }
  .content-grid { grid-template-columns: 1fr; }
  .hcard { grid-template-columns: 1fr; }
  .hcard .photo { max-width: 180px; }
  .content p { text-align: left; }
}

@media (max-width: 420px) {
  .home-stage { width: 76vw; }
  .home-label { font-size: 0.8rem; max-width: 26vw; }
}
