:root {
  --color-primary:        #03a9f4;
  --color-primary-dark:   #026e9f;
  --color-secondary:      #f79007;
  --color-tertiary:       #00bf87;
  --color-text:           #1f2a37;
  --color-muted:          #5b6675;
  --color-bg:             #ffffff;
  --color-bg-alt:         #f5f8fb;
  --color-border:         #e3e8ee;

  --font-body: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --header-h: 80px;
  --container-w: 1140px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 var(--space-2); }
a { color: var(--color-primary); text-decoration: none; }
a:hover, a:focus { color: var(--color-primary-dark); text-decoration: underline; }

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

.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--color-primary); color: #fff; padding: var(--space-1) var(--space-2);
  z-index: 1000;
}
.skip-link:focus { top: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ===== Header / Nav ===== */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Solid state: when scrolled away from the top, or when mobile menu is open */
.site-header.is-scrolled,
.site-header:has(.nav-toggle:checked) {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--color-border);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 12px rgba(15, 23, 42, 0.05);
}

.site-header__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.site-header__logo img {
  height: 52px;
  width: auto;
}

.site-nav__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: var(--space-3);
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.25rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.site-header.is-scrolled .site-nav__link,
.site-header:has(.nav-toggle:checked) .site-nav__link {
  color: var(--color-text);
  text-shadow: none;
}
.site-nav__link:hover { color: var(--color-primary); text-decoration: none; }

.site-nav__submenu {
  list-style: none;
  margin: 0; padding: var(--space-1) 0;
  position: absolute;
  top: calc(100% - 4px);
  left: -1rem;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.site-nav__item:hover > .site-nav__submenu,
.site-nav__item:focus-within > .site-nav__submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav__submenu li a {
  display: block;
  padding: var(--space-1) var(--space-2);
  color: var(--color-text);
}
.site-nav__submenu li a:hover,
.site-nav__submenu li a[aria-current="page"] {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  text-decoration: none;
}

.caret { font-size: 0.75rem; color: var(--color-muted); }

/* mobile hamburger (checkbox hack) */
.nav-toggle, .nav-toggle__label { display: none; }

@media (max-width: 900px) {
  .nav-toggle__label {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px; height: 24px;
    cursor: pointer;
  }
  .nav-toggle__label span {
    display: block; height: 3px; background: #fff; border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.35);
    transition: background 0.25s ease, box-shadow 0.25s ease;
  }
  .site-header.is-scrolled .nav-toggle__label span,
  .site-header:has(.nav-toggle:checked) .nav-toggle__label span {
    background: var(--color-text);
    box-shadow: none;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-toggle:checked ~ .site-nav { max-height: 100vh; overflow-y: auto; }

  .site-nav__list { flex-direction: column; gap: 0; padding: var(--space-2); }
  .site-nav__item { width: 100%; }
  .site-nav__submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; padding-left: var(--space-3);
  }
}

/* ===== Hero ===== */

.hero {
  position: relative;
  height: clamp(420px, 70vh, 720px);
  overflow: hidden;
  color: #fff;
}

.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero__slide.is-active { opacity: 1; }

.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--container-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero__title { color: #fff; margin: 0 0 var(--space-2); text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.hero__sub  { color: #fff; max-width: 38rem; font-size: 1.15rem; margin: 0 auto var(--space-3); }
.hero__buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }

.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn--ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }

.hero__dots {
  position: absolute;
  bottom: var(--space-3);
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem;
  z-index: 3;
}
.hero__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero__dot.is-active { background: #fff; }

.hero__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s;
}
.hero__nav:hover { background: rgba(0,0,0,0.5); }
.hero__nav--prev { left: var(--space-2); }
.hero__nav--next { right: var(--space-2); }

/* ===== Page wrapper for non-home pages ===== */

.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: calc(var(--header-h) + var(--space-5)) 0 var(--space-5);
  text-align: center;
}
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p  { color: rgba(255,255,255,0.92); max-width: 36rem; margin: var(--space-2) auto 0; }

.page {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
}
.page .lead {
  font-size: 1.2rem;
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}

/* ===== Content blocks (text+image, text+card) =====
   Both share the same two-column layout. No alternating section background. */

.ti-block,
.tc-block {
  padding: var(--space-5) 0;
}

.ti-block__inner,
.tc-block__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.ti-block--image-left  .ti-block__media { order: 1; }
.ti-block--image-left  .ti-block__text  { order: 2; }
.ti-block--image-right .ti-block__media { order: 2; }
.ti-block--image-right .ti-block__text  { order: 1; }

.tc-block--card-left   .tc-block__card  { order: 1; }
.tc-block--card-left   .tc-block__text  { order: 2; }
.tc-block--card-right  .tc-block__card  { order: 2; }
.tc-block--card-right  .tc-block__text  { order: 1; }

.ti-block__eyebrow,
.tc-block__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-1);
}
.ti-block__heading,
.tc-block__heading { margin-top: 0; }

.ti-block__body p:last-child,
.tc-block__body p:last-child { margin-bottom: 0; }

.ti-block__media img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.ti-block__media--empty {
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(45deg, var(--color-border) 0 8px, transparent 8px 16px);
  aspect-ratio: 4 / 3;
}

/* Card sits in the image slot: same rounded-rectangle silhouette,
   light tinted background, soft shadow. Always contrasts with whichever
   section background it sits on (white card on alt rows, tinted on default rows). */
.tc-block__card {
  background: linear-gradient(180deg, rgba(3, 169, 244, 0.05), rgba(3, 169, 244, 0.10));
  border: 1px solid rgba(3, 169, 244, 0.18);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tc-block__card-title {
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  font-size: 1.25rem;
}
.tc-block__card-body p:last-child { margin-bottom: 0; }

@media (max-width: 800px) {
  .ti-block__inner,
  .tc-block__inner { grid-template-columns: 1fr; gap: var(--space-3); }

  .ti-block--image-left  .ti-block__media,
  .ti-block--image-right .ti-block__media,
  .tc-block--card-left   .tc-block__card,
  .tc-block--card-right  .tc-block__card  { order: 0; }

  .ti-block--image-left  .ti-block__text,
  .ti-block--image-right .ti-block__text,
  .tc-block--card-left   .tc-block__text,
  .tc-block--card-right  .tc-block__text  { order: 1; }
}

/* ===== Intro / contact-teaser on home ===== */

.intro {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3) var(--space-4);
  text-align: center;
}
.intro h2 { margin-bottom: var(--space-3); }
.intro p { max-width: 42rem; margin-left: auto; margin-right: auto; color: var(--color-muted); }

.instagram-feed {
  padding: var(--space-6) 0 var(--space-4);
  text-align: center;
}
.instagram-feed__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.instagram-feed h2 { margin-bottom: var(--space-1); }
.instagram-feed > .instagram-feed__inner > p { margin-bottom: var(--space-3); color: var(--color-muted); }

#sb_instagram {
  margin: 0 auto;
  min-height: 80px;
}
.sb_instagram__frame {
  width: 100%;
  border: 0;
  overflow: hidden;
  display: block;
}
.sb_instagram__fallback {
  padding: var(--space-4) var(--space-3);
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-muted);
}
.sb_instagram__fallback p:last-child { margin-bottom: 0; }

.contact-teaser {
  background: var(--color-bg-alt);
  padding: var(--space-6) 0;
  text-align: center;
}
.contact-teaser__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.contact-teaser__inner--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
  text-align: left;
}
.contact-teaser__col h2 { margin-top: 0; }
@media (max-width: 800px) {
  .contact-teaser__inner--split {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ===== Calendar / appointments list ===== */

.cal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cal-list__heading {
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  font-size: 1.25rem;
}
.cal-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}
.cal-list__item:last-child { border-bottom: 0; }
.cal-item__date {
  font-weight: 600;
  color: var(--color-primary-dark);
}
.cal-item__time { color: var(--color-muted); }
.cal-item__title { flex-basis: 100%; }
.cal-list__empty {
  color: var(--color-muted);
  margin: 0;
}

/* Appointments appended to the bottom of an "Auf einen Blick" card */
.cal-card-termine {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(3, 169, 244, 0.18);
}
.cal-card-termine h4 {
  margin: 0 0 var(--space-1);
  color: var(--color-primary);
  font-size: 1rem;
}
.cal-card-termine .cal-list__item { padding: 0.35rem 0; }

/* ===== Forms ===== */

.form {
  max-width: 38rem;
  margin: 0 auto;
}
.form__row { margin-bottom: var(--space-2); }
.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.form input[type=text],
.form input[type=email],
.form input[type=tel],
.form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--color-text);
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: transparent;
}

/* honeypot — keep visually hidden but accessible to bots */
.form__hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.alert {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}
.alert--success { background: #e6f9f1; color: #00754c; border: 1px solid #b8ecd5; }
.alert--error   { background: #fdecec; color: #a02828; border: 1px solid #f4c4c4; }

/* ===== Footer ===== */

.site-footer {
  background: #1c2532;
  color: #c7d0dc;
  margin-top: var(--space-6);
}
.site-footer__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
  text-align: center;
}
.site-footer a { color: #fff; }

/* ===== Map embed for /anfahrt ===== */
.map-wrap {
  max-width: var(--container-w);
  margin: var(--space-4) auto;
  padding: 0 var(--space-3);
}
.map-wrap iframe {
  width: 100%;
  height: 480px;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ===== Utility: prose lists on subpages ===== */
.page article ul {
  padding-left: 1.25rem;
}
.page article ul li {
  margin-bottom: var(--space-1);
}
