/* TRANSIT Transport GmbH – Website. Mobile-first; Breakpoints 600 / 900 / 1200 px. */

:root {
  --color-primary: #1a1e21; /* Logo-Schwarz: Titel, Footer */
  --color-accent: #0064bd; /* Logo-Blau: Buttons, Links */
  --color-accent-dark: #004b93; /* Hover */
  --color-accent-soft: #e6f0fa;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7fb;
  --color-border: #d3dbe4;
  --color-text: #2b3036;
  --color-muted: #5b6570;
  --color-success: #14532d;
  --color-success-bg: #e7f6ec;
  --color-error: #9b1c1c;
  --color-error-bg: #fdecec;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 10px 24px rgb(16 24 40 / 0.1);
  --shadow-sm: 0 2px 8px rgb(16 24 40 / 0.08);
  --header-h: 64px;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --space: clamp(1rem, 2vw + 0.5rem, 2rem);
  --section-space: clamp(3rem, 6vw, 5rem);
  --color-surface: #ffffff; /* Karten, Header, Formulare */
  --color-header-border: #e3e8ee;
  --color-divider: #eef1f5;
  --color-placeholder: #dde3ea;
  --color-star-off: #cfd6de;
  --color-cta-bg: rgb(255 255 255 / 0.96);
  --color-dark-panel: #1a1e21; /* Footer und Kontakt-Infobox (immer dunkel) */
  --color-on-accent: #ffffff; /* Text auf blauen Buttons */
  color-scheme: light;
}

/* ---------- Dark Mode (aktiviert durch /js/theme.js über data-theme) ---------- */
:root[data-theme='dark'] {
  --color-primary: #f1f4f7;
  --color-accent: #4da3ff;
  --color-accent-dark: #7dbbff;
  --color-accent-soft: #163552;
  --color-bg: #111418;
  --color-bg-alt: #161a1f;
  --color-border: #39424c;
  --color-text: #dde3e9;
  --color-muted: #a6b0bb;
  --color-success: #a6e9bd;
  --color-success-bg: #123223;
  --color-error: #ffb7b7;
  --color-error-bg: #3b1818;
  --shadow: 0 10px 24px rgb(0 0 0 / 0.45);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.35);
  --color-surface: #1c2126;
  --color-header-border: #262d34;
  --color-divider: #262d34;
  --color-placeholder: #2a3139;
  --color-star-off: #4a535d;
  --color-cta-bg: rgb(17 20 24 / 0.96);
  --color-dark-panel: #0b0d10;
  --color-on-accent: #07111c;
  color-scheme: dark;
}

.logo-dark,
:root[data-theme='dark'] .logo-light {
  display: none;
}

:root[data-theme='dark'] .logo-dark {
  display: block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
}

h1,
h2,
h3 {
  color: var(--color-primary);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--color-dark-panel);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-narrow {
  max-width: 820px;
}

.is-hidden,
[hidden] {
  display: none !important;
}

.pre-line {
  white-space: pre-line;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-light {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-lg {
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-header-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
}

.logo {
  margin-right: auto;
  line-height: 0;
}

.logo img {
  height: 48px;
  width: auto;
}

.header-phone,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  cursor: pointer;
}

.nav-toggle .nav-toggle-close,
.nav-toggle[aria-expanded='true'] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-close {
  display: inline-flex;
}

.site-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--color-surface);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  flex-direction: column;
  gap: 1.5rem;
  border-top: 1px solid var(--color-header-border);
}

.site-nav.is-open {
  display: flex;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li a {
  display: block;
  padding: 0.875rem 0.25rem;
  font-size: 1.15rem;
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
}

.site-nav li a:hover {
  color: var(--color-accent);
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 900px) {
  :root {
    --header-h: 96px;
  }

  .logo img {
    height: 72px;
  }

  .header-phone,
  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border: 0;
    overflow: visible;
    gap: 1.75rem;
  }

  .site-nav ul {
    display: flex;
    gap: 1.75rem;
  }

  .site-nav li a {
    padding: 0.5rem 0;
    font-size: 1rem;
    border: 0;
  }
}

/* ---------- Hero / Vorher-Nachher ---------- */
.hero {
  padding: 1.5rem 0 var(--section-space);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
}

.hero-inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem);
  letter-spacing: -0.01em;
}

.hero-subline {
  font-size: clamp(1.05rem, 1vw + 0.8rem, 1.25rem);
  color: var(--color-muted);
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 3rem;
  }

  .hero-inner {
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
  }
}

.ba-slide {
  margin: 0;
}

.ba-frame {
  --pos: 50%;
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--color-placeholder);
  cursor: ew-resize;
  touch-action: pan-y; /* vertikal scrollen bleibt möglich */
  user-select: none;
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba-label {
  position: absolute;
  top: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgb(26 30 33 / 0.75);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.ba-label-before {
  left: 0.75rem;
}

.ba-label-after {
  right: 0.75rem;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 44px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}

.ba-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 6px rgb(0 0 0 / 0.35);
}

.ba-knob {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #1a1e21;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
}

.ba-knob .icon {
  width: 1rem;
  height: 1rem;
}

.ba-handle:focus-visible .ba-knob {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.ba-frame.is-hinting .ba-before,
.ba-frame.is-hinting .ba-handle {
  transition:
    clip-path 0.6s ease,
    left 0.6s ease;
}

.ba-slide figcaption {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
}

.ba-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ba-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: transparent;
  cursor: pointer;
}

.ba-dot.is-active {
  background: var(--color-accent);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-space) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: clamp(1.75rem, 2.5vw + 1rem, 2.25rem);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.2rem);
  color: var(--color-muted);
  max-width: 60ch;
  margin: 0 auto 2.5rem;
}

.section .section-title + .grid-2col,
.section .section-title + .steps,
.section .section-title + .ref-scroller,
.section .section-title + .faq-list {
  margin-top: 2rem;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

.grid-2col {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .grid-2col.grid-single {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
  }
}

.about-text {
  font-size: 1.1rem;
}

.about-text h3 {
  font-size: 1.35rem;
}

.about-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Dienstleistungen */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--color-accent);
}

.service-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.service-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  padding: 1.5rem;
}

.service-body h3 {
  font-size: 1.25rem;
  margin: 0;
}

.service-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* So funktioniert's */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

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

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 700;
  font-size: 1.15rem;
}

.step h3 {
  font-size: 1.15rem;
}

.step p {
  margin: 0;
  color: var(--color-muted);
}

/* Referenzen: mobil horizontal wischbar */
.ref-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 85%);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem 1rem;
}

@media (min-width: 900px) {
  .ref-scroller {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
}

.ref-card {
  scroll-snap-align: start;
  margin: 0;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ref-card > .icon {
  color: var(--color-accent);
  opacity: 0.35;
  width: 2rem;
  height: 2rem;
}

.ref-card blockquote {
  margin: 0;
  flex: 1;
  font-size: 1.05rem;
}

.ref-card figcaption {
  display: flex;
  flex-direction: column;
  color: var(--color-primary);
}

.ref-card figcaption span {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.stars {
  margin: 0;
  color: #e3a008;
  letter-spacing: 0.1em;
}

.stars span {
  color: var(--color-star-off);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  color: var(--color-accent);
  font-size: 1.4rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item .prose {
  padding: 0 1.25rem 1rem;
}

/* ---------- Kontakt ---------- */
.contact-wrapper {
  display: grid;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
  }
}

.contact-info {
  background: var(--color-dark-panel);
  color: #e6ebf0;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border-top: 4px solid var(--color-accent);
}

.contact-info h3 {
  color: #fff;
  font-size: 1.4rem;
}

.contact-details {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-details li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.contact-details .icon {
  color: #7fb6ea;
  margin-top: 0.15rem;
}

.contact-details a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-form-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row-plz {
    grid-template-columns: 1fr 2fr;
  }
}

.field {
  margin-bottom: 0.5rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
}

.req {
  color: var(--color-error);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px; /* verhindert Auto-Zoom in iOS */
  color: var(--color-text);
  background: var(--color-surface);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.field [aria-invalid='true'] {
  border-color: var(--color-error);
}

.field-error {
  min-height: 1.25rem;
  margin: 0.2rem 0 0;
  color: var(--color-error);
  font-size: 0.875rem;
}

.form-note {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.form-error {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid #f5c2c2;
}

.form-success {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid #b7e4c7;
  font-size: 1.05rem;
}

.form-success p {
  margin: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgb(255 255 255 / 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark-panel);
  border-top: 4px solid var(--color-accent);
  color: #ccd3da;
  padding: 3rem 0 6rem;
}

@media (min-width: 900px) {
  .site-footer {
    padding-bottom: 2rem;
  }
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr 1fr;
  }
}

.footer-title {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-col a {
  color: #ccd3da;
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-contact li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .footer-brand {
    justify-content: flex-end;
  }
}

.footer-logo-card {
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  line-height: 0;
}

.footer-logo-card img {
  width: 160px;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid #3a4046;
  font-size: 0.875rem;
  color: #8d96a0;
  text-align: center;
}

/* ---------- Mobile Aktionsleiste ---------- */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  background: var(--color-cta-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgb(0 0 0 / 0.06);
  transition: transform 0.25s;
}

.mobile-cta .btn {
  flex: 1;
}

.mobile-cta.is-hidden-by-scroll {
  transform: translateY(110%);
}

@media (min-width: 900px) {
  .mobile-cta {
    display: none;
  }
}

/* ---------- Rechtsseiten & Fehlerseite ---------- */
.legal .section-title {
  text-align: left;
  margin-bottom: 1.5rem;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--color-bg-alt);
  padding: 1rem;
}

.error-box {
  max-width: 480px;
  text-align: center;
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.error-box img {
  width: 180px;
  margin: 0 auto 1rem;
}

.error-code {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .mobile-cta,
  .site-footer,
  .hero-actions {
    display: none;
  }
}

/* ---------- Header-Werkzeuge: Dark Mode + Sprache (gleiche Höhe, gleicher Rahmen, gleicher Abstand) ---------- */
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle,
.lang-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.theme-toggle {
  width: 44px;
  padding: 0;
}

.theme-toggle:hover,
.lang-menu-button:hover,
.lang-menu[open] .lang-menu-button {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.theme-toggle .icon-sun,
:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: inline;
}

/* Sprachwahl als Dropdown (<details>) */
.lang-menu {
  position: relative;
}

.lang-menu-button {
  gap: 0.25rem;
  min-width: 64px;
  padding: 0 0.5rem 0 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  list-style: none;
  user-select: none;
}

.lang-menu-button::-webkit-details-marker {
  display: none;
}

.lang-menu-button::marker {
  content: '';
}

.lang-menu-button .icon-chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.lang-menu[open] .icon-chevron {
  transform: rotate(180deg);
}

.lang-menu-list {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 120;
  min-width: 200px;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.lang-menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
}

.lang-menu-list a:hover,
.lang-menu-list a:focus-visible {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.lang-menu-list a[aria-current='true'] {
  color: var(--color-accent);
  font-weight: 700;
}

.lang-menu-tag {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.lang-menu-list a[aria-current='true'] .lang-menu-tag {
  color: var(--color-accent);
}

.lang-menu-tag .icon {
  width: 1rem;
  height: 1rem;
}

/* Handy: alle Knöpfe 44 px hoch mit gleichem Abstand; Menü-Knopf ganz rechts */
@media (max-width: 899px) {
  .header-inner {
    gap: 0.5rem;
  }
}

/* Sehr schmale Handys (z. B. 320 px) */
@media (max-width: 359px) {
  .logo img {
    height: 40px;
  }

  .lang-menu-button {
    min-width: 56px;
    padding: 0 0.35rem 0 0.5rem;
  }
}

/* Desktop: Werkzeuge rechts neben dem Menü, durch eine feine Linie abgetrennt */
@media (min-width: 900px) {
  .header-tools {
    order: 10;
    margin-left: 0.25rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--color-header-border);
  }
}

/* ---------- Feinschliff Dark Mode ---------- */
:root[data-theme='dark'] .form-error {
  border-color: #6b2a2a;
}

:root[data-theme='dark'] .form-success {
  border-color: #245a3b;
}

:root[data-theme='dark'] .spinner {
  border-color: rgb(7 17 28 / 0.4);
  border-top-color: var(--color-on-accent);
}

:root[data-theme='dark'] .about-image img,
:root[data-theme='dark'] .service-image img,
:root[data-theme='dark'] .ba-img {
  filter: brightness(0.92);
}

/* Header zwischen 900 und 1200 px etwas kompakter (mehr Menüpunkte + Sprachen) */
.site-nav li a {
  white-space: nowrap;
}

@media (min-width: 900px) and (max-width: 1199px) {
  .site-nav,
  .site-nav ul {
    gap: 1rem;
  }

  .logo img {
    height: 56px;
  }

  .header-tools {
    padding-left: 0.75rem;
  }
}
