/* Shared by the preview and PHP export. The dialog uses the browser top layer. */
.site-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 68px;
}

.site-header-brand { min-width: 0; }
.site-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.site-desktop-nav, .site-service-row, .site-header-inquiry { display: none; }
.site-menu-toggle, .site-menu-close, .site-header-phone {
  width: 46px;
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
  padding: 0;
}
.site-menu-toggle svg, .site-menu-close svg { width: 22px; height: 22px; }

.site-mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  overflow: hidden;
}
.site-mobile-menu:not([open]) { display: none; }
.site-mobile-menu[open] { display: flex; flex-direction: column; }
.site-mobile-menu::backdrop { background: var(--color-background); }
.site-menu-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  flex-shrink: 0;
  padding: max(0.5rem, env(safe-area-inset-top)) 1.25rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
}
.site-menu-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}
.site-menu-links { list-style: none; margin: 0; padding: 0; }
.site-menu-links a {
  display: block;
  min-height: 48px;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.site-menu-links a:hover, .site-menu-links a.active {
  color: var(--color-primary);
}
.site-menu-contact { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.site-menu-contact .btn { width: 100%; }

/* Do not let long German words expand grid columns or contact buttons. */
main .container-hp { overflow-wrap: anywhere; }
main .container-hp .grid > * { min-width: 0; }
.btn { max-width: 100%; white-space: normal; text-align: center; }
.btn svg { flex-shrink: 0; }

@media (min-width: 768px) {
  .site-header-inquiry { display: inline-flex; }
}
@media (min-width: 1200px) {
  .site-header-row { display: flex; justify-content: space-between; gap: 1rem; min-height: 78px; }
  .site-desktop-nav, .site-service-row { display: block; }
  .site-mobile-only { display: none; }
}
@media (max-width: 639px) {
  main .h1 { font-size: 2.125rem; }
  main .h2 { font-size: 1.75rem; }
  main .h3 { font-size: 1.25rem; }
  main .card-hp:not(.contact-map) { padding: 1.25rem; }
  .a11y-panel { max-height: calc(100dvh - 10.25rem); overflow-y: auto; }
  .a11y-panel > div:last-child { max-height: none; }
}
@media (max-height: 500px) {
  .a11y-panel { top: 1rem; bottom: 1rem; max-height: none; overflow-y: auto; }
  .a11y-panel > div:last-child { max-height: none; }
}
/* Aktiver Menüpunkt – gemeinsam für Vorschau und PHP-Version */
.site-desktop-nav a.active,
.site-desktop-nav a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.site-menu-links a.active,
.site-menu-links a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Umschalter PKW / Nutzfahrzeug */
.vehicle-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vehicle-filter button { padding: 0.55rem 1.1rem; border: 1px solid color-mix(in oklab, var(--primary) 30%, transparent); border-radius: 999px; background: var(--primary-soft); font-weight: 600; font-size: 0.9rem; color: var(--ink); cursor: pointer; }
.vehicle-filter button:hover { border-color: var(--primary); }
.vehicle-filter button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.vehicle-filter-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; margin-top: 1.25rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--card); box-shadow: var(--shadow-soft, none); }
.vehicle-filter-fields label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.vehicle-filter-fields select, .vehicle-filter-fields input { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 0.6rem; background-color: var(--background); color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 400; letter-spacing: normal; text-transform: none; }
.vehicle-filter-fields select { appearance: none; padding-right: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c00018' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; }
.vehicle-filter-fields select:focus, .vehicle-filter-fields input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.vehicle-filter-count { margin-top: 0.5rem; font-size: 0.85rem; color: var(--ink-soft); min-height: 1.2em; }
.vehicle-card-footer { margin-top: auto; padding-top: 1rem; align-items: center; }
.vehicle-card-footer::before { content: none; }
.vehicle-card-footer > p { margin: 0; }
