/* ==========================================================================
   Zahnärzte Dr. Buchenroth-Schramm & Dr. Buchenroth – OnePager
   Corporate Design: M PLUS Rounded 1c, Blau #5590c7, Textgrau #686868
   ========================================================================== */

/* ----- Fonts (lokal eingebunden, latin-Subset) ----- */
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('../assets/fonts/mplus-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('../assets/fonts/mplus-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('../assets/fonts/mplus-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('../assets/fonts/mplus-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('../assets/fonts/mplus-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ----- Variablen / Basis ----- */
:root {
  --blue: #5590c7;
  --blue-dark: #467eb2;
  --blue-deep: #2f5f8c;
  --blue-tint: #eef4fa;
  --blue-tint-2: #dceaf5;
  --gray: #686868;
  --gray-dark: #3e4a55;
  --white: #ffffff;
  --radius: 22px;
  --radius-small: 14px;
  --shadow: 0 18px 45px -18px rgba(47, 95, 140, 0.35);
  --shadow-hover: 0 26px 55px -18px rgba(47, 95, 140, 0.45);
  --header-height: 84px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--gray-dark);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

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

.icon { width: 1.15em; height: 1.15em; fill: currentColor; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.5em;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid rgba(77, 101, 255, 0.7);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 12px 28px -12px rgba(85, 144, 199, 0.8);
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
  box-shadow: 0 16px 32px -12px rgba(85, 144, 199, 0.9);
}

.btn-outline {
  border-color: currentColor;
  color: var(--blue);
  background: transparent;
}
.btn-outline:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }

.btn-light {
  background: var(--white);
  color: var(--blue-deep);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.45);
}
.btn-light:hover { color: var(--blue); }

.btn-large { padding: 0.9em 1.9em; font-size: 1.02rem; }
.btn-small { padding: 0.5em 1.1em; font-size: 0.85rem; }

/* ----- Header ----- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -12px rgba(47, 95, 140, 0.3);
}
.header-inner {
  width: min(1300px, 94%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-height);
}
.brand { flex-shrink: 0; }
.brand-logo {
  height: 52px;
  width: auto;
  transition: height 0.3s ease, filter 0.3s ease;
  /* Einfarbiges blaues Logo über dem blauen Hero: weiß einfärben */
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.site-header.is-scrolled .brand-logo {
  height: 42px;
  /* Originalfarbe wiederherstellen */
  filter: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0 auto 0 auto;
  padding: 0;
}
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  position: relative;
  padding: 0.3em 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transition: right 0.25s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after { right: 0; }
.site-header.is-scrolled .nav-link {
  color: var(--gray);
  text-shadow: none;
}
.nav-link.is-active { color: var(--blue); }

.header-cta { flex-shrink: 0; }
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 120;
}
.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled .nav-toggle span,
.site-header.menu-open .nav-toggle span { background: var(--gray); }
.site-header.menu-open .brand-logo { filter: none; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 3rem) 0 5rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -18% 0;
  z-index: -2;
  background: url('../assets/img/DSC00121-HDR.jpg') center / cover no-repeat;
  will-change: transform;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(85, 144, 199, 0.88) 0%, rgba(85, 144, 199, 0.72) 45%, rgba(47, 95, 140, 0.82) 100%);
}

.hero-content { text-align: center; color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 1.2rem;
}
.eyebrow-blue { color: var(--blue); }
.eyebrow-light { color: var(--blue-tint-2); }

.hero-title {
  color: var(--white);
  font-size: clamp(1.9rem, 4.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 1rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}
.hero-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.hero-title .word > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}
.hero-title.is-animated .word > span {
  transform: translateY(0);
  opacity: 1;
}

.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  max-width: 34em;
  margin: 0 auto 2.2rem;
  color: rgba(255, 255, 255, 0.95);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 2.6rem;
}
.hero .btn-outline { color: var(--white); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.14); border-color: var(--white); color: var(--white); }

.hero-info {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2.2rem;
  margin: 0;
  padding: 1.1rem 1.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.hero-info li {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.95rem;
  font-weight: 500;
}
.hero-info a { color: var(--white); }
.hero-info a:hover { color: var(--blue-tint-2); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  opacity: 0.85;
  animation: hint-bounce 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 30px; height: 30px; fill: currentColor; }
@keyframes hint-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 9px); }
}

/* Hero-Einzel-Reveal (ohne Scroll-Trigger) */
.reveal-hero {
  opacity: 0;
  transform: translateY(26px);
  animation: hero-fade 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes hero-fade {
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Sektionen allgemein ----- */
.section { padding: clamp(4.2rem, 9vw, 6.5rem) 0; }
.section-tinted { background: var(--blue-tint); }
.section-blue {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
}
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2.4rem, 5vw, 3.6rem);
}
.section-lead { font-size: 1.05rem; margin: 0; }
.on-dark, .section-blue h2 { color: var(--white); }
.section-blue .section-lead { color: rgba(255, 255, 255, 0.92); }

/* Scroll-Reveal */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ----- Über uns ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.team-media {
  position: relative;
  overflow: hidden;
  background: var(--blue-tint-2);
  /* Hochformat-Porträts (Kopf + Oberkörper) passend einrahmen */
  aspect-ratio: 3 / 4;
}
.team-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.team-card:hover .team-media img { transform: scale(1.045); }
.team-body {
  flex: 1 1 auto;
  padding: 1.8rem 1.9rem 2.1rem;
}
.team-body h3 { margin-bottom: 1rem; }
.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.93rem;
}
.cv-list li {
  position: relative;
  padding-left: 1.15rem;
}
.cv-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.cv-list strong { color: var(--blue-deep); font-weight: 700; }

/* ----- Galerie ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.gallery-item {
  padding: 0;
  border: 0;
  background: var(--blue-tint-2);
  border-radius: var(--radius-small);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
}
.gallery-item { position: relative; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:nth-child(1) { grid-column: span 2; aspect-ratio: 8 / 3; }

/* ----- Leistungen ----- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}
.service-card {
  padding: 1.9rem 1.7rem;
  background: var(--white);
  border: 1px solid var(--blue-tint-2);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px -16px rgba(47, 95, 140, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
}
.service-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--blue-tint);
  color: var(--blue);
  margin-bottom: 1.2rem;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.service-card:hover .service-icon {
  background: var(--blue);
  color: var(--white);
  transform: rotate(-6deg) scale(1.05);
}
.service-icon svg { width: 30px; height: 30px; fill: currentColor; }
.service-card h3 { font-size: 1.12rem; }
.service-card p { font-size: 0.92rem; margin-bottom: 0; }
.service-list {
  margin: 0.8em 0 0;
  padding-left: 1.1em;
  font-size: 0.92rem;
}
.service-list li { margin-bottom: 0.25em; }
.service-card.wide { grid-column: span 2; }

/* ----- Sprechzeiten ----- */
.hours-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: stretch;
}
.hours-table {
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hours-table table {
  width: 100%;
  border-collapse: collapse;
  color: var(--white);
  font-size: 1rem;
}
.hours-table th, .hours-table td {
  padding: 1rem 1.4rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table th { font-weight: 700; width: 34%; }
.hours-table tr { transition: background-color 0.2s ease; }
.hours-table tbody tr:hover { background: rgba(255, 255, 255, 0.08); }

.hours-card {
  border-radius: var(--radius);
  background: var(--white);
  padding: 2.1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  box-shadow: var(--shadow);
}
.hours-card h3 { color: var(--gray-dark); margin-bottom: 0.2rem; }
.hours-card p { font-size: 0.97rem; }
.hours-card .btn { margin: 0.7rem 0 0.4rem; color: var(--blue); }
.link-light { font-weight: 500; }

/* ----- Kontakt ----- */
.contact-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: start;
}
.contact-form {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--blue-tint-2);
  box-shadow: var(--shadow);
  padding: 2.2rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.3rem;
  margin-bottom: 1.4rem;
}
.form-field-full { grid-column: 1 / -1; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gray-dark);
  margin-bottom: 0.35rem;
}
.form-field input, .form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--gray-dark);
  padding: 0.75em 1em;
  border: 2px solid var(--blue-tint-2);
  border-radius: var(--radius-small);
  background: var(--blue-tint);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #9db1c2; }
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(85, 144, 199, 0.18);
}
.form-field input.is-invalid, .form-field textarea.is-invalid { border-color: #d64545; }

.form-status {
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 1.3em;
}
.form-status.is-error { color: #c23c3c; }
.form-status.is-success { color: #2e8b57; }

.contact-info {
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  padding: 2.1rem;
  box-shadow: var(--shadow);
}
.contact-info h3 { color: var(--white); margin-bottom: 0.4rem; }
.contact-info address { font-style: normal; }
.contact-lines {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.contact-lines li { display: grid; gap: 0.1rem; }
.contact-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-tint-2);
}
.contact-lines a { color: var(--white); font-weight: 500; }
.contact-lines a:hover { color: var(--blue-tint-2); }
.contact-hint {
  margin: 1.5rem 0 0;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 1rem;
}

/* ----- Anfahrt ----- */
.route-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  align-items: stretch;
}
.route-cards { display: grid; gap: 1.2rem; align-content: start; }
.route-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: 0 10px 30px -18px rgba(47, 95, 140, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.route-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.route-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: var(--white);
}
.route-icon svg { width: 27px; height: 27px; fill: currentColor; }
.route-card h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.route-card p { font-size: 0.94rem; margin-bottom: 0.7rem; }
.route-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow);
  background: var(--blue-tint-2);
}
.route-map iframe { width: 100%; height: 100%; min-height: 320px; }

/* ----- Footer ----- */
.site-footer {
  background: linear-gradient(160deg, var(--blue-deep) 0%, #244a6e 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.6rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2.4rem;
  padding-bottom: 2.6rem;
}
.footer-logo {
  height: 46px;
  width: auto;
  margin-bottom: 1.1rem;
  filter: brightness(0) invert(1);
}
.footer-brand address { font-style: normal; font-size: 0.95rem; line-height: 1.8; }
.site-footer h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-nav ul, .footer-contact ul, .footer-hours ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}
.footer-nav a, .footer-contact a { color: rgba(255, 255, 255, 0.85); }
.footer-nav a:hover, .footer-contact a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1.3rem 0 1.5rem;
  font-size: 0.88rem;
}
.footer-legal {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-legal a { color: rgba(255, 255, 255, 0.85); }
.footer-legal a:hover { color: var(--white); }

/* ----- Lightbox ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(24, 38, 51, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: min(1100px, 90vw); }
.lightbox-figure img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: var(--radius-small);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.lightbox button {
  position: absolute;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.06); }
.lightbox button svg { width: 26px; height: 26px; fill: currentColor; }
.lightbox-close { top: 1.4rem; right: 1.4rem; }
.lightbox-prev { left: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

/* ----- Rechtsseiten (Impressum / Datenschutz) ----- */
.subpage .site-header {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -12px rgba(47, 95, 140, 0.3);
}
.subpage .brand-logo { height: 46px; filter: none; }
.subpage .nav-link { color: var(--gray); text-shadow: none; }
.subpage .nav-toggle span { background: var(--gray); }

.legal-section { padding: calc(var(--header-height) + 3rem) 0 4.5rem; }
.legal-body { max-width: 800px; }
.legal-body h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  margin-bottom: 1.4rem;
}
.legal-body h2 {
  font-size: 1.4rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--blue-tint-2);
}
.legal-body h2:first-of-type { border-top: 0; padding-top: 0; }
.legal-body h3 { font-size: 1.12rem; margin-top: 1.9rem; }
.legal-body h4 { font-size: 1rem; margin-top: 1.6rem; }
.legal-body p { font-size: 0.97rem; }
.legal-body ul, .legal-body ol { padding-left: 1.3rem; margin-bottom: 1em; }
.legal-body li { font-size: 0.97rem; margin-bottom: 0.35rem; }
.legal-body a { word-break: break-word; }
.legal-back { margin-top: 3rem; }

/* ----- Breakpoints ----- */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card.wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 940px) {
  /* backdrop-filter am Header macht ihn zum Containing-Block für das
     fixierte Menü-Overlay (.site-nav), das dann nicht mehr den Viewport,
     sondern nur noch die Header-Leiste abdeckt. Im Mobile-Breakpoint
     daher ohne backdrop-filter arbeiten. */
  .site-header.is-scrolled {
    background: var(--white);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav-cta-mobile { display: block; margin-top: 1rem; }

  .site-nav {
    position: fixed;
    inset: 0;
    /* Deckendes Weiß statt halbtransparent + backdrop-filter:
       iOS Safari rendert backdrop-filter in fixierten Layern
       innerhalb eines fixierten Headers sonst teils transparent. */
    background: var(--white);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .nav-list {
    flex-direction: column;
    gap: 1.4rem;
    text-align: center;
  }
  .nav-link {
    color: var(--gray) !important;
    text-shadow: none !important;
    font-size: 1.3rem;
  }
  .nav-link::after { background: var(--blue); }

  .team-grid { grid-template-columns: 1fr; }
  .hours-layout, .contact-layout, .route-layout { grid-template-columns: 1fr; }
  .route-map { min-height: 280px; }
  .route-map iframe { min-height: 280px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item:nth-child(1), .gallery-item:nth-child(6) { grid-column: span 2; aspect-ratio: 16 / 9; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card.wide { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-info { flex-direction: column; gap: 0.55rem; align-items: flex-start; }
  .contact-form { padding: 1.6rem; }
}

/* ----- Reduzierte Bewegung ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-hero { opacity: 1; transform: none; }
  .hero-title .word > span { transform: none; opacity: 1; }
}
