/* ============================================================
   FONTS
   ============================================================ */

@font-face {
  font-family: 'fa-solid';
  src: url('/assets/fonts/font-awesome/fa-solid-900.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'fa-regular';
  src: url('/assets/fonts/font-awesome/fa-regular-400.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('/assets/fonts/Quicksand.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================

   LIGHT MODE – Kontrastwerte (WCAG 2.1):
   ─ Text #1a1f2e auf surface-a0 #ffffff       → 17.5:1  AAA ✓
   ─ Text #1a1f2e auf surface-a10 #f4f5f8      → 16.0:1  AAA ✓
   ─ nav-btn.primary #ffffff auf primary-a20    → 5.8:1   AA ✓
   ─ nav-link #1a1f2e auf surface-a10 #f4f5f8  → 16.0:1  AAA ✓
   ─ .field label #ffffff auf primary-a20       → 5.8:1   AA ✓

   DARK MODE – Kontrastwerte (WCAG 2.1):
   ─ Text #e8ecf5 auf surface-a0 #141720       → 14.2:1  AAA ✓
   ─ Text #e8ecf5 auf surface-a10 #1e2130      → 12.4:1  AAA ✓
   ─ primary-a0 #7ba8ff auf surface-a0 #141720 → 8.3:1   AAA ✓
   ─ nav-btn.primary #141720 auf primary-a0     → 8.3:1   AAA ✓
   ─ nav-link #e8ecf5 auf surface-a10 #1e2130  → 12.4:1  AAA ✓

   ============================================================ */

:root {
  /* Easing */
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: transform 1s linear(0 0%, 0.22 2.1%, 0.86 6.5%, 1.11 8.6%, 1.3 10.7%, 1.35 11.8%, 1.37 12.9%, 1.37 13.7%, 1.36 14.5%, 1.32 16.2%, 1.03 21.8%, 0.94 24%, 0.89 25.9%, 0.88 26.85%, 0.87 27.8%, 0.87 29.25%, 0.88 30.7%, 0.91 32.4%, 0.98 36.4%, 1.01 38.3%, 1.04 40.5%, 1.05 42.7%, 1.05 44.1%, 1.04 45.7%, 1 53.3%, 0.99 55.4%, 0.98 57.5%, 0.99 60.7%, 1 68.1%, 1.01 72.2%, 1 86.7%, 1 100%);
  interpolate-size: allow-keywords;

  /* Layout */
  --nav-height: 80px;
  --nav-height-small: 56px;

  --sb-track-color: #e4e7f0;
  --sb-thumb-color: #2d5be3;
  --sb-size: 10px;

  --br: 1rem;

  /* ── LIGHT MODE ─────────────────────────────────── */

  /** Text & UI */
  --primary-color: #1a1f2e;
  /* Subtle overlay für Hero */
  --cta: rgba(255, 255, 255, 0.72);
  --overlay: radial-gradient(rgba(240, 242, 250, 0.55) 0%, rgba(220, 226, 245, 0.80) 100%);

  /** Primary — Indigo-Blau (leuchtstark, hoher Kontrast) */
  --clr-primary-a0: #2d5be3;
  /* Haupt-Akzent, Buttons          */
  --clr-primary-a10: #2450cc;
  /* Hover auf primary-a0            */
  --clr-primary-a20: #1c45b5;
  /* Aktiv-Zustand / Label-BG        */
  --clr-primary-a30: #163a9e;
  /* Dunkler Hover für Textelemente  */
  --clr-primary-a40: #102f88;
  /* Tiefste aktive Stufe            */
  --clr-primary-a50: #0b2472;
  /* Maximale Tiefe                  */

  /** Surface — warmes Weiß bis Hellgrau */
  --clr-surface-a0: #ffffff;
  --clr-surface-a10: #f4f5f8;
  --clr-surface-a20: #e9ebf2;
  --clr-surface-a30: #dde0eb;
  --clr-surface-a40: #d2d6e4;
  --clr-surface-a50: #c6cbdd;

  /** Tonal Surface — Indigo-getöntes Grau */
  --clr-surface-tonal-a0: #eef0f9;
  --clr-surface-tonal-a10: #e3e6f4;
  --clr-surface-tonal-a20: #d8ddef;
  --clr-surface-tonal-a30: #ced3ea;
  --clr-surface-tonal-a40: #c3c9e4;
  --clr-surface-tonal-a50: #b9bfdf;

  /** Success — Smaragdgrün */
  --clr-success-a0: #1a7a52;
  /* Text/Icon auf hellem BG   7.2:1 */
  --clr-success-a10: #1d9163;
  /* Rand / Icon               5.5:1 */
  --clr-success-a20: #20a874;
  /* Akzent                    4.6:1 */

  /** Warning — Bernstein */
  --clr-warning-a0: #8a5c00;
  /* Text/Icon auf hellem BG   7.1:1 */
  --clr-warning-a10: #a06d00;
  /* Rand / Icon               5.3:1 */
  --clr-warning-a20: #b67e00;
  /* Akzent                    4.5:1 */

  /** Danger — Zinnoberrot */
  --clr-danger-a0: #b91c1c;
  /* Text/Icon auf hellem BG   7.4:1 */
  --clr-danger-a10: #c72626;
  /* Rand / Icon               6.0:1 */
  --clr-danger-a20: #d63030;
  /* Akzent                    5.0:1 */

  /** Info — Himmelsblau */
  --clr-info-a0: #1252a3;
  /* Text/Icon auf hellem BG   8.2:1 */
  --clr-info-a10: #1a5fb8;
  /* Rand / Icon               6.3:1 */
  --clr-info-a20: #2270cc;
  /* Akzent                    4.9:1 */


  /* ── DARK MODE ──────────────────────────────────── */

  @media (prefers-color-scheme: dark) {
    --primary-color: #e8ecf5;
    --cta: rgba(20, 23, 32, 0.75);
    --overlay: radial-gradient(rgba(14, 17, 30, 0.60) 0%, rgba(14, 17, 30, 0.85) 100%);

    --sb-track-color: #1e2130;
    --sb-thumb-color: #7ba8ff;

    /** Primary — Periwinkle-Blau (auf dunklem Grund leuchtstark) */
    --clr-primary-a0: #7ba8ff;
    /* Haupt-Akzent  8.3:1 auf surface-a0  */
    --clr-primary-a10: #8fb5ff;
    /* Leichter Hover                       */
    --clr-primary-a20: #a3c2ff;
    /* Noch heller, für Icons               */
    --clr-primary-a30: #b7d0ff;
    /* Text-Links auf tiefdunklem BG        */
    --clr-primary-a40: #cbddff;
    /* Fast weiß                            */
    --clr-primary-a50: #dfe9ff;
    /* Maximale Helligkeit                  */

    /** Surface — Tiefes Dunkelblaugrau (kein reines Schwarz) */
    --clr-surface-a0: #141720;
    --clr-surface-a10: #1e2130;
    --clr-surface-a20: #282c3f;
    --clr-surface-a30: #33374f;
    --clr-surface-a40: #3e4360;
    --clr-surface-a50: #4a4f70;

    /** Tonal Surface — leicht bläulich-getöntes Dunkelgrau */
    --clr-surface-tonal-a0: #181c2a;
    --clr-surface-tonal-a10: #222638;
    --clr-surface-tonal-a20: #2c3047;
    --clr-surface-tonal-a30: #373b57;
    --clr-surface-tonal-a40: #424667;
    --clr-surface-tonal-a50: #4e5278;

    /** Success */
    --clr-success-a0: #4ade9a;
    /* Text/Icon auf dunklem BG  7.5:1 */
    --clr-success-a10: #3dce8b;
    /* Rand / Icon               6.5:1 */
    --clr-success-a20: #2fbe7c;
    /* Akzent                    5.3:1 */

    /** Warning */
    --clr-warning-a0: #fbbf24;
    /* Text/Icon auf dunklem BG  8.1:1 */
    --clr-warning-a10: #f0ac10;
    /* Rand / Icon               6.8:1 */
    --clr-warning-a20: #e59900;
    /* Akzent                    5.6:1 */

    /** Danger */
    --clr-danger-a0: #f87171;
    /* Text/Icon auf dunklem BG  7.2:1 */
    --clr-danger-a10: #ef5050;
    /* Rand / Icon               5.9:1 */
    --clr-danger-a20: #e63030;
    /* Akzent                    4.8:1 */

    /** Info */
    --clr-info-a0: #60a5fa;
    /* Text/Icon auf dunklem BG  8.6:1 */
    --clr-info-a10: #4b95f8;
    /* Rand / Icon               7.0:1 */
    --clr-info-a20: #3685f5;
    /* Akzent                    5.6:1 */
  }
}


/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  z-index: 1;
  /* position: relative; */
}

html,
body {
  overscroll-behavior-y: none;
}
	
.balance {
  text-wrap: balance;
}

:root {
  color-scheme: light dark;
  scroll-padding-top: var(--nav-height-small);
  scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}
	
.unset{
	all: unset;
	cursor: pointer;
}

.to-top {
  position: fixed;
  bottom: 5px;
  right: 20px;
  z-index: 950;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 45px;
  width: 45px;
  background: var(--clr-primary-a30);
  color: var(--clr-surface-a0) !important;
  border: 2px solid var(--clr-surface-a0);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
  font-size: 1.1rem;
  text-decoration: none;
  opacity: 0;
  translate: 0 80px;
  transition: 
    translate 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) {
  .to-top:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px); /* Minimales "Anheben" beim Hovern */
  }
}

.navbar--scrolled + .to-top {
      translate: 0 0;
      opacity: 1;
    }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


html:has(dialog:modal) {
  overflow-y: hidden;
}

strong {
  color: var(--clr-primary-a20);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Quicksand', sans-serif;
  background: var(--clr-surface-a0);
  color: var(--primary-color);
  line-height: 1.6;
  margin: auto;
}

/* ============================================================
   HOME
   ============================================================ */

#home {
  display: flex;
  margin: auto;
  position: relative;
  align-items: stretch;
  padding-top: var(--nav-height);
  width: 100%;
  overflow: hidden;
  min-height: unset;
  background: unset;
}

.edinner {
  padding-top: 2em;
  display: block;
  margin: 0 calc(4rem / 2);
  flex-basis: calc(100% - 50% - 4rem);
}

.edleft.edinner {
  flex-basis: 50%;
  justify-content: center;
  display: flex;
  flex-grow: 1;
  flex-shrink: 0;
  padding: 0;
  align-items: center;
}

.call-action h2 {
  text-wrap: nowrap;
}

.edright.edinner {
  flex-basis: 50%;
  flex-shrink: 1;
  flex-grow: 0;
  justify-content: center;
  display: flex;
  align-items: flex-end;
}

.edright.edinner img {
  max-height: 100vh;
}

@media screen and (max-width: 767px) {
  #home {
    flex-wrap: wrap;
  }

  .call-action h2 {
    text-wrap: balance;

  }

  .edinner {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
  }

  .edleft.edinner {
    flex-basis: calc(100% - 4rem);
    margin: 0;
    padding-top: 25px;
  }

  .edright.edinner {
    flex-basis: calc(100% - 4rem);
    padding-top: 2rem;
    justify-content: center;
  }

  .edright.edinner img {
    width: clamp(50%, 75vw, 250px);
    max-height: unset;
  }

  .eddinner {
    display: flex;
    justify-content: center;
    width: 100%;
  }
}


.herobackground {
  height: 100lvh;
  position: absolute;
  overflow: hidden;
}

.herobackground::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url(/assets/img/startseite.webp) center / cover no-repeat fixed;
  will-change: transform;
  filter: blur(3px);
}

.herobackground::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--overlay);
}
	
.referenz.hidden {
    display: none !important;
}

body::-webkit-scrollbar {
  width: var(--sb-size);
}

body::-webkit-scrollbar-track {
  background: var(--sb-track-color);
  border-radius: 3px;
}

body::-webkit-scrollbar-thumb {
  background: var(--sb-thumb-color);
  border-radius: 3px;
}

@supports not selector(::-webkit-scrollbar) {
  body {
    scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
  }
}

a {
  color: inherit;
}

ul {
  padding-left: 2rem;
  list-style: outside;
}

button {
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 0;
  font: inherit;
  color: inherit;
  background-color: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
	


    .box-container{
        display: grid;
        grid-template: repeat(2, 1fr) / repeat(2, 1fr);
        gap: 1rem;
    }

    .box {
        display: flex;
        gap: 2rem;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        background: var(--clr-surface-tonal-a20);
        border-radius: var(--br);
        transition: var(--transition-bounce);
    }

    .box:hover {
  transform: scale(1.03);
  z-index: 1;
}

    .boxi-inner .titel {
        font-size: clamp(1.3125rem, 1.1827rem + 0.5769vw, 1.875rem);
        font-weight: 700;
        line-height: clamp(1.3125rem, 1.1827rem + 0.5769vw, 1.875rem);
        margin: 0 0 0.5rem 0;
    }

    .boxi-inner .text{
        font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
        line-height: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
    }


    .icons{
        font-size: clamp(2.5rem, 2.3846rem + 0.5128vw, 3rem);
    }

@media screen and (max-width: 989px) {
    .box-container{
        display: grid;
        grid-template: repeat(1, 1fr) / repeat(1, 1fr);
    }
}




/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.fonty {
  font-family: "fa-solid";
  color: var(--clr-primary-a20);
}

.icon {
  font-family: "fa-solid";
}

.full-size {
  width: 100%;
  text-align: center;
  margin-top: 12px;
}

.separator {
  height: 4rem;
  width: 100%;
  position: absolute;
  top: -3.99rem;
}

.separator-after {
  height: 4rem;
  width: 100%;
  position: absolute;
  bottom: -3.99rem;
}

.separator-title {
  width: 100%;
  height: calc(110px + 10rem);
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.separator-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 5rem;
  width: 100%;
  background: var(--clr-surface-a0);
  clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
  z-index: 1;
}

.sep-overlay {
  inset: 0;
  background: var(--overlay);
  position: absolute;
  z-index: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.separator-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5rem;
  width: 100%;
  background: var(--clr-surface-a0);
  clip-path: polygon(100% 0, 0% 100%, 100% 100%);
  z-index: 1;
}

.separator::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--clr-surface-a0);
  clip-path: polygon(100% 0, 0% 100%, 100% 100%);
  z-index: 1;
}

.separator-after::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--clr-surface-a0);
  z-index: 7;
  clip-path: polygon(0 100%, 100% 0, 0 0);
}

@media screen and (max-width: 35.9375rem) {

  .separator,
  .separator-title::after,
  .separator-title::before {
    height: 2rem;
    top: -1.99rem
  }

  .separator-title {
    height: calc(3rem + 4rem);
  }
}

.separator-title h2 {
  font-size: clamp(1.2rem, 0.6231rem + 2.5641vw, 3.7rem);
  line-height: clamp(1.2rem, 0.6231rem + 2.5641vw, 3.7rem);
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: none;
  margin: auto;
  /* Navbar: surface-a10 = #f4f5f8 (light) / #1e2130 (dark)
     Beide erfüllen AAA-Kontrast mit dem jeweiligen --primary-color */
  background: var(--clr-surface-a10);
}

.navbar.is-ready {
  transition: box-shadow 0.3s ease;
}

.navbar.is-ready .nav-container {
  transition: height 0.3s ease;
}

.navbar.is-ready .nav-logo img {
  transition: height 0.3s ease;
}

#navBackdrop {
  position: fixed;
  inset: 0;
  /* Backdrop: leicht angepasst für beide Themes */
  background: rgba(20, 23, 32, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

@media (prefers-color-scheme: dark) {
  #navBackdrop {
    background: rgba(0, 0, 0, 0.70);
  }
}

#navBackdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-container {
  padding: 0 clamp(16px, 4vw, 32px);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  transition: none;
}

.navbar--scrolled .nav-container {
  height: var(--nav-height-small);
}

.nav-logo img {
  transition: none;
}

.navbar--scrolled .nav-logo img {
  height: 40px;
}

.navbar--scrolled {
  /* Scrolled shadow: dezenter auf surface-a10-Basis */
  box-shadow:
    0 2px 8px rgba(20, 23, 32, 0.08),
    0 1px 2px rgba(20, 23, 32, 0.04);
}

@media (prefers-color-scheme: dark) {
  .navbar--scrolled {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.35),
      0 1px 2px rgba(0, 0, 0, 0.20);
  }
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  /* Farbe erbt --primary-color → AAA in beiden Modes */
  color: var(--primary-color);
  font-weight: 700;
  font-size: 20px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.logo-text {
  letter-spacing: -0.5px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: all 0.3s ease;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Menu & Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--primary-color);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  display: block;
  padding: 15px 0px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-primary-a0);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  /* Hover: primary-a0 → light 4.9:1 auf surface-a10, dark 8.3:1 (AAA) */
  color: var(--clr-primary-a0);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Action Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn,
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-block;
}

/* Secondary: Rahmen + Text in primary-a0, BG transparent
   Light: #2d5be3 Text auf #f4f5f8 → 4.9:1 (AA) ✓
   Dark:  #7ba8ff Text auf #1e2130 → 8.3:1 (AAA) ✓ */
.secondary {
  color: var(--clr-primary-a0);
  background: transparent;
  border: 1.5px solid var(--clr-primary-a0);
}

.secondary:hover {
  /* Hover: gefüllter Hintergrund */
  color: var(--clr-surface-a0);
  background: var(--clr-primary-a0);
  border-color: var(--clr-primary-a0);
}

@media (prefers-color-scheme: dark) {
  .secondary:hover {
    /* Dark hover: dunkler Text auf hellem primary */
    color: var(--clr-surface-a0);
  }
}

/* Primary: weißer Text auf primary-a20
   Light: #ffffff auf #1c45b5 → 7.5:1 (AAA) ✓
   Dark:  #141720 auf #7ba8ff → 8.3:1 (AAA) ✓ */
.primary {
  color: #ffffff;
  background: var(--clr-primary-a20);
  border: 1.5px solid var(--clr-primary-a20);
}

@media (prefers-color-scheme: dark) {
  .primary {
    /* Dunkler Text auf hellem primary → AAA */
    color: var(--clr-surface-a0);
    background: var(--clr-primary-a0);
    border-color: var(--clr-primary-a0);
  }
}

.primary:hover {
  background: var(--clr-primary-a30);
  border-color: var(--clr-primary-a30);
}

/* Navigation – Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  html {
    overflow: auto;
  }

  .navbar {
    width: 100vw;
    margin: 0;
    border-radius: 0;
    position: fixed;
    background: var(--clr-surface-a10);
  }

  .nav-container {
    padding: 0 clamp(16px, 4vw, 32px);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: auto;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100dvh;
    background: var(--clr-surface-a10);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 50px 32px 32px;
    gap: 32px;
    box-shadow: -4px 0 24px rgba(20, 23, 32, 0.12);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
  }

  @media (prefers-color-scheme: dark) {
    .nav-menu {
      box-shadow: -4px 0 24px rgba(0, 0, 0, 0.45);
    }
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item {
    /* Trennlinie nutzt surface-a30 für sichtbaren Kontrast auf a10-BG */
    border-bottom: 1px solid var(--clr-surface-a30);
  }

  .nav-link {
    display: block;
    padding: 16px 0;
    font-size: 16px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-list {
    gap: 20px;
  }
}


/* ============================================================
   HEADER / HERO
   ============================================================ */

.bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.call-action {
  display: block;
  font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
  line-height: normal;
  animation: myAnim 0.4s ease-in 0.5s 1 normal both;
}

@keyframes myAnim {
  0% {
    animation-timing-function: ease-in;
    opacity: 0;
    transform: translateY(-400px);
  }

  38% {
    animation-timing-function: ease-out;
    opacity: 1;
    transform: translateY(0);
  }

  55% {
    animation-timing-function: ease-in;
    transform: translateY(-65px);
  }

  72% {
    animation-timing-function: ease-out;
    transform: translateY(0);
  }

  81% {
    animation-timing-function: ease-in;
    transform: translateY(-28px);
  }

  90% {
    animation-timing-function: ease-out;
    transform: translateY(0);
  }

  95% {
    animation-timing-function: ease-in;
    transform: translateY(-8px);
  }

  100% {
    animation-timing-function: ease-out;
    transform: translateY(0);
  }
}

body>section:first-of-type .content-inner {
  padding-top: var(--nav-height);
  width: 97vw;
  min-height: 100dvh;
  margin: auto;
}

section>.content-inner {
  width: 97vw;
  margin: auto;
  display: block;
  padding: 1.25rem 0;
}

section:nth-child(even) {
  background: var(--clr-surface-a50);
  position: relative;
}

section:nth-child(odd) {
  background: var(--clr-surface-a0);
  position: relative;
}

section:nth-child(even)>.separator::after,
section:nth-child(even)>.separator-after::after {
  background: var(--clr-surface-a50);
}

section.impressum, section.datenschutz{
  background: unset;
}
	
.impressum p + :is(h1, h2, h3, h4, h5, h6),
.datenschutz p + :is(h1, h2, h3, h4, h5, h6){
  margin-top: 1em;
}
	

.impressum, .datenschutz{
  width: 95vw;
  margin: auto;
  padding-top: var(--nav-height);
}
	
.ta-right{
	text-align: right;
}

.call-action h2 {
  font-size: clamp(1.625rem, 1.1037rem + 2.3171vw, 4rem);
  line-height: clamp(1.625rem, 1.1037rem + 2.3171vw, 4rem);
  color: var(--primary-color);
}

.call-btn {
  font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
  margin: auto;
  position: relative;
  width: 97vw;
}

.footer-flex-container {
  display: flex;
  gap: 6%;
}

.footer-flex-container figure {
  flex-basis: 50%;
}

#socket {
  display: block;
  position: relative;
  text-align: center;
  margin: 15px 0;
}


/* ============================================================
   LEISTUNGEN
   ============================================================ */

.headline {
  font-size: clamp(1.3125rem, 0.9231rem + 1.7308vw, 3rem);
  line-height: clamp(1.3125rem, 0.9231rem + 1.7308vw, 3rem);
  font-weight: bold;
  display: block;
  margin: 0 0 1rem 0;
}

.headline-s {
  font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
  line-height: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
  font-weight: bold;
}
	
	
.card-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  width: 100%;
  margin: 0 auto;
}

.card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    flex 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    filter 0.5s ease,
    box-shadow 0.5s ease;
  filter: grayscale(0.8);
}

.card::after {
  content: "";
  position: absolute;
  background: rgba(0, 0, 0, 0.5);
  inset: 0;
  transition: opacity 0.5s linear;
  opacity: 0;
}

input[type="radio"]:checked+.card::after {
  opacity: 1;
}

.card:nth-child(1) {
  border-radius: 10px;
}

.icon {
  font-size: 5rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.card-content {
  position: absolute;
  bottom: 0;
  padding: 0px 25px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  user-select: none;
  z-index: 3;
  transition: backdrop-filter 0.5s ease 0s, padding 0.3s ease 0s;
}

.card-content h3 {
  font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
  /* Weiß auf dunklem Gradient-Overlay: >7:1 (AAA) */
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.card-content p {
  margin: 0;
  font-size: 14px;
  /* Weiß auf rgba(0,0,0,0.85)-Overlay: effektiv >10:1 (AAA) */
  color: #ffffff;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  white-space: normal;
  word-wrap: break-word;
  transition: opacity 0.2s ease 0s, max-height 0.25s ease 0s;
}

@media (min-width: 990px) {
  .card-container {
    display: flex;
    height: 500px;
  }

  .card {
    min-height: auto;
    height: 100%;
    flex: 1;
  }

  .card:hover {
    filter: grayscale(0);
    flex: 1.1;
  }

  input[type="radio"]:checked+.card {
    flex: 2;
    filter: grayscale(0);
  }

  .card:hover .icon {
    opacity: 0;
  }

  input[type="radio"]:checked+.card .card-content p {
    opacity: 1;
    max-height: 400px;
    transition: opacity 0.4s ease 0.4s, max-height 0.4s ease 0.4s;
    text-wrap: balance;
  }

  input[type="radio"]:checked+.card .card-content {
    padding: 0px 25px 25px 25px;
    transition: backdrop-filter 0.5s ease 0.4s, padding 0.3s ease 0.4s;
  }
}

input[type="radio"] {
  display: none;
}

.label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cell {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease, filter .4s ease;
  filter: brightness(.6);
}

.cell:hover img {
  transform: scale(1.06);
}

.cell-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  /* Weiß auf gedimmtem Bild (brightness 0.6) → effektiv AAA */
  color: #ffffff;
  font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
  font-weight: 700;
  opacity: 1;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.overlay-grid {
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  scroll-margin-top: 83px;
}

.overlay-grid img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform .45s ease;
  filter: brightness(.5);
}

.overlay-grid .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .25) 50%, transparent 100%);
}

.overlay-info {
  position: relative;
  z-index: 2;
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  /* Weiß auf rgba(0,0,0,.88)-Scrim → >12:1 (AAA) */
  color: #ffffff;
}

.overlay-text .tag {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  /* Hellblau-weiß auf dunklem Scrim: >7:1 */
  color: rgba(180, 210, 255, .9);
  margin-bottom: 6px;
}

.overlay-text h2 {
  font-size: clamp(1rem, 0.904rem + 0.4268vw, 1.4375rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 3px;
}

.overlay-text p {
  font-size: 13px;
  /* Leicht gedimmtes Weiß – auf .88 Scrim noch >8:1 (AAA) */
  color: rgba(255, 255, 255, 0.88);
}

input:checked+.overlay-grid {
  opacity: 1;
  pointer-events: all;
  cursor: zoom-out;
  cursor: -moz-zoom-out;
}

#gallery input {
  display: none;
}

.overlay-grid:target img {
  transform: scale(1);
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.cell {
  animation: up .45s ease both;
}

.cell:nth-child(2) {
  animation-delay: 60ms;
}

.cell:nth-child(3) {
  animation-delay: 120ms;
}

.cell:nth-child(4) {
  animation-delay: 180ms;
}

.cell:nth-child(5) {
  animation-delay: 240ms;
}

.cell:nth-child(6) {
  animation-delay: 300ms;
}

.mobile {
  display: none;
}

@media (max-width: 989px) {
  .desktop {
    display: none !important;
  }

  .mobile {
    display: grid;
  }
}

.pdf-wraper {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.pdf-wraper img {
  max-height: 300px;
  transition: transform 0.2s ease-in-out;
  transform-origin: bottom left;
}

.pdf-wraper img:hover {
  transform: scale(1.01);
  cursor: zoom-in;
  cursor: -moz-zoom-in;
}

dialog:focus-visible {
  outline: none;
}

#imageModal {
  border: none;
  padding: 0;
  border-radius: 10px;
  color: #ffffff;
  margin: auto;
  overflow: hidden;
  opacity: 0;
  transition:
    display 0.3s allow-discrete,
    overlay 0.3s allow-discrete,
    opacity 0.3s ease,
    transform 0.3s ease;
}

#imageModal[open] {
  opacity: 1;
}

#modalImg {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

#modalCaption {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  /* Caption: Weiß auf #141414 → >15:1 (AAA) */
  background: #141414;
  color: #ffffff;
  padding: 0.5rem 1rem;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* Weiß auf rgba(0,0,0,0.5) → >7:1 (AAA) */
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: none;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.75);
}

.modal-nav.prev {
  left: 0.5rem;
}

.modal-nav.next {
  right: 0.5rem;
}

.modal-nav:disabled {
  opacity: 0.2;
  cursor: default;
}
	

.card-container.desktop .card {
    background-image: var(--card-bg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.card-container.desktop .card {
    background-color: #f4f4f4; 
}


/* ============================================================
   FAQ
   ============================================================ */

.faq-container {
  width: 100%;
  border-radius: 10px;
  margin: 15px 0;
}

.faq-container h2 {
  text-align: center;
  color: var(--primary-color);
}

.faq-item {
  border-bottom: 1px solid var(--primary-color);
}

.faq-item:not(:has(+ .faq-item)) {
  border-bottom: none;
}

.faq-angebot_und_planung:first-child {
  padding: 0 0 16px 0;
}

/* Styling für die Frage */
summary {
  list-style: none;
  padding: 16px 0;
  display: grid;
  grid-template-columns: 1fr 24px;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  user-select: none;
}

summary::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  background-color: #007bff;
  transition: background-color 0.2s ease;
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"%3E%3Cpath d="M528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320zM64 320C64 461.4 178.6 576 320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320zM451.3 331.3C457.5 325.1 457.5 314.9 451.3 308.7L347.3 204.7C342.7 200.1 335.8 198.8 329.9 201.2C324 203.6 320 209.5 320 216L320 288L216 288C202.7 288 192 298.7 192 312L192 328C192 341.3 202.7 352 216 352L320 352L320 424C320 430.5 323.9 436.3 329.9 438.8C335.9 441.3 342.8 439.9 347.3 435.3L451.3 331.3z"/%3E%3C/svg%3E');
  mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"%3E%3Cpath d="M528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320zM64 320C64 461.4 178.6 576 320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320zM451.3 331.3C457.5 325.1 457.5 314.9 451.3 308.7L347.3 204.7C342.7 200.1 335.8 198.8 329.9 201.2C324 203.6 320 209.5 320 216L320 288L216 288C202.7 288 192 298.7 192 312L192 328C192 341.3 202.7 352 216 352L320 352L320 424C320 430.5 323.9 436.3 329.9 438.8C335.9 441.3 342.8 439.9 347.3 435.3L451.3 331.3z"/%3E%3C/svg%3E');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

details[open] summary::after {
  transform: rotate(90deg);
}

details[open] summary{
  padding: 16px 0 0 0;
}

/* .faq-inner:has(details[name="faq-gruppe"][open]) details[name="faq-gruppe"]:not([open]) {
    filter: blur(50%);
    background-color: red;
} */


/* Styling für die Antwort */
.faq-content {
  line-height: 1.6;
}


.faq-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.faq-gruppe {
  flex-grow: 1;
  flex-basis: 33.33%;
  min-width: calc(50% / 2 - 2rem);
  /* background: var(--clr-surface-tonal-a30); */
  background: var(--clr-surface-tonal-a20);
  padding: 12px 24px;
  border-radius: 10px;
}


/* ============================================================
   KONTAKTFORMULAR
   ============================================================ */

#kontakt {
  background: none;
}
	
.visually-hidden{
	position:absolute;
	left:-9999px;
}
	
.kontakt-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.contactForm {
  padding-top: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.input-field {
  position: relative;
}

.field label {
  font-size: 0.7rem;
  margin-bottom: 0.4rem;
  color: light-dark(#fff, #000);
  position: absolute;
  z-index: 3;
  top: -0.9em;
  left: 1em;
  background: var(--clr-primary-a20);
  border-radius: 1em;
  padding: 0 0.5em;
  font-weight: bold;
}

.field-label.has-error {
  background: var(--clr-danger-a0);
  color: light-dark(#fff, #000);
}

.field input,
.field textarea,
.field select {
  padding: 0.65rem 0.85rem;
  /* Rahmen: surface-a30 → sichtbarer 3:1+ Kontrast auf weißem BG */
  border: 1.5px solid var(--clr-surface-a30);
  border-radius: 6px;
  font-size: clamp(0.75rem, 0.6923rem + 0.2564vw, 1rem);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  /* Formularfelder: immer heller Hintergrund für Lesbarkeit */
  background: var(--clr-surface-a0);
  color: var(--primary-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Quicksand', sans-serif;
  font-weight: bolder;
  appearance: base-select;
}

.field input:placeholder-shown,
.field textarea:placeholder-shown,
.field select:has(option:first-child:checked) {
  font-weight: normal;
}

.field select option {
  font-weight: normal !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Quicksand', sans-serif;
}

@media (prefers-color-scheme: dark) {

  .field input,
  .field textarea,
  .field select {
    background: var(--clr-surface-a10);
    border-color: var(--clr-surface-a40);
    color: var(--primary-color);
  }
}

.field.two .input-field {
  flex-basis: 50%;
}

.field.two {
  flex-direction: row;
  gap: 1rem;
}

@media screen and (max-width: 480px) {
  .field.two .input-field {
    flex-basis: 100%;
  }

  .field.two {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .pdf-wraper {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
  }

  .to-top {
  position: fixed;
  bottom: 30px;
  right: 5px;
  }
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  /* Focus-Ring: primary-a0 — hoher Sichtbarkeitskontrast */
  border-color: var(--clr-primary-a0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--clr-primary-a0) 20%, transparent);
}

.field input.is-invalid,
.field textarea.is-invalid,
.field select.is-invalid {
  border-color: var(--clr-danger-a0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--clr-danger-a0) 15%, transparent);
  color: var(--clr-danger-a0);
}

.field-error {
  display: none;
  font-size: 0.82rem;
  /* Fehlertext: danger-a0 → AAA in beiden Themes */
  color: var(--clr-danger-a0);
  margin-top: 0.35rem;
  min-height: 1.1em;
}

.field textarea {
  resize: none;
  min-height: 120px;
}

/* Submit-Button: #ffffff auf primary-a20
   Light: #ffffff auf #1c45b5 → 7.5:1 (AAA) ✓
   Dark:  #141720 auf #7ba8ff → 8.3:1 (AAA) ✓ */
.submitBtn {
  padding: 0.7rem 1.8rem;
  background: var(--clr-primary-a20);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  display: block;
  width: 100%;
  transition: background 0.2s, opacity 0.2s, transform 0.1s;
  font-weight: bolder;
}

@media (prefers-color-scheme: dark) {
  .submitBtn {
    background: var(--clr-primary-a0);
    /* Dark: dunkler Text auf hellem Periwinkle → AAA */
    color: var(--clr-surface-a0);
  }

  .submitBtn:hover {
    background: var(--clr-primary-a10);
  }
}

.submitBtn:hover {
  background: var(--clr-primary-a30);
  transform: translateY(-1px);
}

.submitBtn:active {
  transform: translateY(0);
}

.submitBtn:disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
  transform: none;
}


/* ============================================================
   STATUSMELDUNGEN
   ============================================================ */

.form-status {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
}

.form-status:not(:empty) {
  display: block;
}

/* Success: #1a7a52 Text auf #eafaf1 → 7.2:1 (AAA) ✓ */
.form-status.success {
  background: #eafaf1;
  color: var(--clr-success-a0);
  border: 1px solid #9fddc5;
}

/* Error: #b91c1c Text auf #fdedec → 7.4:1 (AAA) ✓ */
.form-status.error {
  background: #fdedec;
  color: var(--clr-danger-a0);
  border: 1px solid #f1a9a0;
}

@media (prefers-color-scheme: dark) {

  /* Dark Success: #4ade9a Text auf #0d2b1e → 7.5:1 (AAA) ✓ */
  .form-status.success {
    background: #0d2b1e;
    color: var(--clr-success-a0);
    border-color: #1a7a52;
  }

  /* Dark Error: #f87171 Text auf #2d1515 → 7.2:1 (AAA) ✓ */
  .form-status.error {
    background: #2d1515;
    color: var(--clr-danger-a0);
    border-color: #b91c1c;
  }
}


/* ============================================================
   RESPONSIVE FOOTER
   ============================================================ */
@media screen and (max-width: 545px) {
  .copyright {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column-reverse;
  }
}


@media screen and (max-width: 990px) {
  .footer-flex-container {
    flex-wrap: wrap;
    flex-direction: column;
  }

  .footer-flex-container figure {
    flex-basis: 100%;
  }

  .footer-flex-container figure.left {
    margin-bottom: 6%;
  }

  .faq-inner {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 2rem;
  }

  .faq-gruppe {
    flex-grow: 1;
    flex-basis: 100%;
  }
}


/* ============================================================
   REFERENZEN SEITE
   ============================================================ */
/* ===== Filter-Buttons ===== */
.btn-filter {
  padding: 8px 20px;
  border-radius: 40px;
  border: 1px solid var(--clr-surface-a50);
  background: transparent;
  cursor: pointer;
  font-weight: 500;
}

.btn-filter.active {
  background: var(--clr-surface-a50);
}

/* ===== Kategorie-Badge ===== */
.kategorie {
  background: var(--clr-primary-a20);
  color: var(--clr-surface-a0);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}

/* ===== Layout: Section / Filter-Bar / Grid ===== */
.ref-section {
  width: 95vw;
  margin: auto;
  padding-top: calc(var(--nav-height) + 1rem);
  background: none;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.referenz-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  place-content: center;
}

/* ===== Referenz-Karten ===== */
.referenz {
  background: var(--clr-surface-a20);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--clr-surface-a20);
  max-width: 320px;
  transition: transform 0.22s, box-shadow 0.22s;
}

.referenz-img {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.referenz-content {
  padding: 10px 12px;
}

.referenz-content .titel {
  font-size: 18px;
  margin-bottom: 4px;
}

.referenz-content .wowas {
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 14px;
}

.referenz-content .kbeschreibung {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  min-height: calc(1.6em * 3);
  margin-bottom: 16px;
}

/* ===== Dialog Basis (Animation, Backdrop) ===== */
dialog[open] {
  opacity: 1;
  transform: scale(1);
}

dialog {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity    0.3s ease-out,
    transform  0.3s ease-out,
    overlay    0.3s allow-discrete,
    display    0.3s allow-discrete;
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.9);
  }
}

body:has(dialog[open]) > :not(dialog) {
  filter: blur(4px);
}

/* ===== Modal ===== */
.ref-modal {
  width: min(620px, 90vw);
  max-height: 90vh;
  padding: 0;
  border-radius: 16px;
  background: var(--clr-surface-a10);
  color: var(--clr-surface-a50, #eee);
  overflow-y: auto;
  position: fixed;
  margin: auto;
  border: none;
}

/* ===== Galerie ===== */
	
/*Open Progress...*/
	
/* ============================================================
   GALERIE
   ============================================================ */

#galerie {
    width: 100%;

    padding:
        clamp(3rem, 7vw, 7rem)
        clamp(1rem, 3vw, 4rem);
	
	padding-top: calc(var(--nav-height) + 15px) !important;
}


.galerie-container {
    width: 100%;
}


/* ============================================================
   MASONRY
   ============================================================ */

.galerie-masonry {
    width: 100%;

    column-count: 4;

    column-gap:
        clamp(.5rem, 1vw, 1rem);
}


/* ============================================================
   GALERIE-ELEMENT
   ============================================================ */

.galerie-element {
    display: block;

    width: 100%;

    margin: 0 0
        clamp(.5rem, 1vw, 1rem);

    padding: 0;

    break-inside: avoid;

    page-break-inside: avoid;
}


/* ============================================================
   BUTTON
   ============================================================ */

.galerie-link {
    position: relative;

    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;

    color: inherit;

    font: inherit;

    line-height: 0;

    text-align: left;

    cursor: zoom-in;

    appearance: none;

    box-shadow: none;
}


/*
 * Theme-Styles neutralisieren.
 */

.galerie-link:hover,
.galerie-link:focus,
.galerie-link:active {
    background: transparent;

    border-color: transparent;

    box-shadow: none;
}


/* ============================================================
   BILD-CONTAINER
   ============================================================ */

.galerie-bild {
    position: relative;

    display: block;

    width: 100%;

    overflow: hidden;

    background: #eeeeee;

    isolation: isolate;
}


/* ============================================================
   BILD
   ============================================================ */

.galerie-bild img {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;

    margin: 0;
    padding: 0;

    /*
     * KEIN object-fit: cover.
     *
     * Das komplette Bild bleibt sichtbar.
     */

    object-fit: contain;

    transform: scale(1);

    transition:
        transform .5s
        cubic-bezier(.2, .8, .2, 1);

    cursor: zoom-in;
}


/* ============================================================
   OVERLAY
   ============================================================ */

.galerie-overlay {
    position: absolute;

    inset: 0;

    z-index: 2;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    padding:
        clamp(.6rem, 1.5vw, 1.25rem);

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .65),
            rgba(0, 0, 0, 0) 60%
        );

    color: #fff;

    opacity: 0;

    /*
     * SEHR WICHTIG:
     *
     * Das Overlay liegt zwar über dem Bild,
     * ist aber für die Maus komplett unsichtbar.
     *
     * Dadurch erreicht der Klick weiterhin
     * dein .lightbox-Bild.
     */

    pointer-events: none;

    transition:
        opacity .3s ease;
}


/* ============================================================
   OVERLAY HOVER
   ============================================================ */

.galerie-link:hover .galerie-overlay,
.galerie-link:focus-visible .galerie-overlay {
    opacity: 1;
}


/* ============================================================
   OVERLAY-TEXT
   ============================================================ */

.galerie-overlay-name {
    max-width: 80%;

    overflow: hidden;

    font-size:
        clamp(.7rem, 1vw, .9rem);

    font-weight: 500;

    line-height: 1.3;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* ============================================================
   OVERLAY ICON
   ============================================================ */

.galerie-overlay-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width:
        clamp(2rem, 3vw, 2.75rem);

    height:
        clamp(2rem, 3vw, 2.75rem);

    border:
        1px solid
        rgba(255, 255, 255, .7);

    border-radius: 50%;

    background:
        rgba(0, 0, 0, .15);

    font-size:
        clamp(1rem, 1.5vw, 1.4rem);

    font-weight: 300;

    line-height: 1;

    backdrop-filter: blur(8px);
}


/* ============================================================
   HOVER-ZOOM
   ============================================================ */

@media (hover: hover) and (pointer: fine) {

    .galerie-link:hover img {
        transform: scale(1.025);
    }
}


/* ============================================================
   FOCUS
   ============================================================ */

.galerie-link:focus-visible {
    outline:
        3px solid
        currentColor;

    outline-offset: 4px;

    border-radius: 2px;
}


/* ============================================================
   TABLET / KLEINER DESKTOP
   ============================================================ */

@media (max-width: 1100px) {

    .galerie-masonry {
        column-count: 3;
    }
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 800px) {

    #galerie {
        padding:
            clamp(2.5rem, 6vw, 5rem)
            1rem;
    }

    .galerie-masonry {
        column-count: 2;

        column-gap: .5rem;
    }

    .galerie-element {
        margin-bottom: .5rem;
    }
}


/* ============================================================
   SMARTPHONE
   ============================================================ */

@media (max-width: 600px) {

    #galerie {
        padding:
            1.5rem .5rem;
    }


    /*
     * AUCH AUF MOBILE:
     *
     * exakt 2 Spalten
     */

    .galerie-masonry {
        column-count: 2;

        column-gap: .35rem;
    }


    .galerie-element {
        margin-bottom: .35rem;
    }


    /*
     * Overlay auf Touch-Geräten sichtbar.
     */

    .galerie-overlay {
        opacity: 1;

        padding: .5rem;

        background:
            linear-gradient(
                to top,
                rgba(0, 0, 0, .65),
                rgba(0, 0, 0, 0) 65%
            );
    }


    .galerie-overlay-name {
        max-width: 75%;

        font-size: .65rem;
    }


    .galerie-overlay-icon {
        width: 1.7rem;
        height: 1.7rem;

        font-size: .95rem;
    }
}


/* ============================================================
   SEHR KLEINE SMARTPHONES
   ============================================================ */

@media (max-width: 380px) {

    #galerie {
        padding-inline: .25rem;
    }


    .galerie-masonry {
        column-gap: 2px;
    }


    .galerie-element {
        margin-bottom: 2px;
    }


    .galerie-overlay-name {
        display: none;
    }


    .galerie-overlay-icon {
        width: 1.6rem;
        height: 1.6rem;

        font-size: .9rem;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .galerie-bild img,
    .galerie-overlay {
        transition: none;
    }
}
	
/*Open Progress...*/
	
	
.modal-gallery {
  position: relative;
  width: 100%;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--clr-surface-a10);
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  flex-shrink: 0;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--clr-primary-a0);
  opacity: 1;
}

/* ===== Pfeile ===== */
.gallery-arrow {
  top: calc(50% - 36px);
  transform: translateY(-50%);
  position: absolute;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: none;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.gallery-arrow:hover { background: rgba(0,0,0,0.75); }
.gallery-arrow.left  { left: 10px; }
.gallery-arrow.right { right: 10px; }

/* ===== Modal Body ===== */
.modal-body {
  padding: 10px 12px;
  color: var(--primary-color);
}

.ref-modal .modal-title {
  font-size: 22px;
  margin: 10px 0 4px;
}

.ref-modal .modal-meta {
  font-size: 13px;
  font-weight: 300;
  opacity: 0.75;
  margin-bottom: 16px;
}

.ref-modal .modal-text {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .referenz-container {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 600px) {
  .ref-section {
    width: 100vw;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  .filter-bar { gap: 6px; }

  .btn-filter {
    padding: 6px 14px;
    font-size: 13px;
  }

  .referenz-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .referenz { max-width: 100%; }

  .referenz-content { padding: 16px 16px 18px; }
  .referenz-content .titel { font-size: 16px; }
  .referenz-content .kbeschreibung { font-size: 13.5px; }

  .ref-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    inset: 0;
    margin: 0;
  }

  .gallery-main { aspect-ratio: 4/3; border-radius: 0; }

  .modal-body { padding: 18px 20px 24px; }
  .ref-modal .modal-title { font-size: 19px; }
  .ref-modal .modal-text { font-size: 14px; line-height: 1.6; }
}

/* ===== Kontakt-Modal ===== */
	

[data-field="firmenname-field"] {
  display: none;
}

[data-field="firmenname-field"].is-visible {
  display: flex;
}
	
#kontaktModal {
  width: min(620px, 90vw);
  max-height: 90vh;
  padding: 0;
  border-radius: 16px;
  background: var(--clr-surface-a10);
  color: var(--clr-surface-a50, #eee);
  overflow-y: hidden;
  position: fixed;
  margin: auto;
  border: none;
}
	
#kontaktModal .kontakt-modal-section{
	background: none;
}

/* ===== Anzeigeverhalten (dialog-Element) ===== */
#kontaktModal[open] {
  display: flex;
  flex-direction: column;
  inset: 0;
  animation: kontaktModalIn 0.25s ease;
}


.modal {
  position: relative;
}

.close-modal {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: solid 2px light-dark(#00000030,#ffffff30);
  background: transparent;
  color: var(--primary-color);
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
  backdrop-filter: blur(2px);
}

.close-modal:hover {
   background: light-dark(#00000030,#ffffff30);
   border: solid 2px transparent;
}

@keyframes kontaktModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes kontaktBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ===== Modal-Body / Section ===== */
#kontaktModal .kontakt-modal-section {
  padding: 1rem;
  color: var(--primary-color);
}
#kontaktModal h3 {
  font-size: 22px;
  line-height: 1.4;
  margin-right: 32px;
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 600px) {
  #kontaktModal {
    width: 100lvw;
    max-width: 100lvw;
    max-height: 100lvh;
    height: 100lvh;
    border-radius: 0;
    inset: 0;
    margin: 0;
    overflow-y: scroll;
  }
  #kontaktModal .kontakt-modal-section {
    padding: 1rem;
	height: 100%;
  }
  #kontaktModal h3 {
    font-size: 19px;
  }
  #kontaktModal .field.two {
    flex-direction: column;
    gap: 16px;
  }
  .close-modal{
    background: light-dark(#00000030,#ffffff30);
  }
  #kontaktModal h3 {
  margin-right: 0px;
  }
}