/* ==========================================================================
   Plane-Hopper – Design-System
   Farben und Typografie sind aus dem alten Elementor-Kit übernommen,
   damit das Erscheinungsbild der Seite erhalten bleibt.
   ========================================================================== */

:root {
  --c-primary:   #1D3D72;  /* Marineblau – Links, Buttons, Cluster */
  --c-secondary: #BAC8DF;  /* helles Blaugrau – Flächen, Ränder */
  --c-accent:    #F34616;  /* Orangerot – Hover-Akzente */
  --c-text:      #292929;
  --c-muted:     rgba(0, 0, 0, .39);
  --c-line:      #000;
  --c-surface:   #fff;
  --c-footer:    #e5e5e5;

  --maxw:        1280px;
  --header-h:    80px;
  --radius:      4px;
  --shadow:      0 0 10px rgba(121, 121, 121, .55);
  --shadow-card: 0 2px 14px rgba(0, 0, 0, .16);

  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--c-primary); }
a:hover { color: var(--c-accent); }

h1, h2, h3 {
  font-weight: 600;
  color: var(--c-primary);
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
h3 { font-size: 1.1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

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

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--c-primary); color: #fff; padding: 10px 16px;
  border-radius: var(--radius); transition: top .2s;
}
.skip-link:focus { top: 8px; color: #fff; }

:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- Header */

.site-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--c-surface);
  box-shadow: var(--shadow);
  transition: background-color .4s ease, backdrop-filter .4s ease;
}
/* Ab ~100px Scroll wird die Leiste halbtransparent – wie in der alten Seite */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(6px);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}

.brand { flex: 0 0 auto; display: flex; align-items: center; }
.brand img { width: 190px; max-width: 45vw; }

.main-nav { margin-left: auto; }
.main-nav ul {
  list-style: none; display: flex; align-items: center; gap: 9px;
  margin: 0; padding: 0;
}
.main-nav a {
  position: relative; display: block;
  padding: 10px 15px;
  color: var(--c-text); text-decoration: none;
  text-transform: capitalize;
}
.main-nav a::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 4px;
  height: 3px; background: var(--c-primary);
  opacity: 0; transition: opacity .25s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--c-primary); }
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { opacity: 1; }

.social { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.social a { color: var(--c-text); display: grid; place-items: center; padding: 4px; transition: transform .25s ease, color .25s ease; }
.social a:hover { color: var(--c-primary); transform: scale(1.15); }
.social svg { width: 26px; height: 26px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; padding: 8px; cursor: pointer; color: var(--c-text);
}
.nav-toggle svg { width: 26px; height: 26px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-surface); box-shadow: var(--shadow);
    margin: 0; display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid #eee; }
  .main-nav a::after { display: none; }
  .social { margin-left: 0; }
}

/* ----------------------------------------------------------------- Hero */

.hero { padding-block: 80px 0; text-align: center; }
.hero p { font-size: 1.1em; margin: 0; }
.hero strong { font-weight: 600; }
.hero .arrow { color: var(--c-primary); font-weight: 600; }

.rule { border: 0; border-top: 1px solid var(--c-line); margin: 15px 0; }

/* ------------------------------------------------------------------ Map */

.map-section { margin: 0 0 15px; }

.map-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

#map {
  height: 560px;
  border: 1px solid var(--c-secondary);
  border-radius: var(--radius);
  background: #eef1f5;
}
#map:focus-visible { outline: 3px solid var(--c-accent); }

/* Suchpanel – ersetzt den „Store Locator“ des alten Google-Maps-Plugins */
.locator {
  background: var(--c-surface);
  border: 1px solid var(--c-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  max-height: 560px;
}

.locator__field label {
  display: block; font-size: .8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--c-primary); margin-bottom: 5px;
}

.locator__input-row { display: flex; gap: 6px; }

.locator input[type="search"],
.locator select {
  width: 100%; font: inherit; font-size: .95rem;
  padding: 9px 10px;
  border: 1px solid var(--c-secondary); border-radius: var(--radius);
  background: #fff; color: var(--c-text);
}
.locator input[type="search"]:focus,
.locator select:focus { border-color: var(--c-primary); }

.btn {
  font: inherit; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; cursor: pointer;
  border: 1px solid var(--c-primary); border-radius: var(--radius);
  background: var(--c-primary); color: #fff;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { background: #16305c; border-color: #16305c; color: #fff; }
.btn--ghost { background: transparent; color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: #fff; }
.btn--icon { padding: 9px; flex: 0 0 auto; }
.btn svg { width: 18px; height: 18px; }

.locator__actions { display: flex; gap: 8px; }
.locator__actions .btn { flex: 1; }

.filters { border: 0; margin: 0; padding: 0; }
.filters legend {
  font-size: .8rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .04em; color: var(--c-primary); padding: 0; margin-bottom: 6px;
}
.filters label {
  display: flex; align-items: center; gap: 8px;
  font-size: .95rem; cursor: pointer; padding: 2px 0;
}
.filters input { accent-color: var(--c-primary); width: 16px; height: 16px; }
.filters .swatch {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

.locator__status { font-size: .9rem; color: var(--c-muted); margin: 0; }
.locator__status[data-state="error"] { color: var(--c-accent); }

.results { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.results:empty { display: none; }
.results li { border-top: 1px solid #eaeaea; }
.results button {
  width: 100%; text-align: left; font: inherit;
  background: none; border: 0; cursor: pointer;
  padding: 10px 4px; color: var(--c-text);
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
}
.results button:hover { background: #f4f6fa; }
.results .name { font-weight: 500; }
.results .meta { display: block; font-size: .82rem; color: var(--c-muted); font-weight: 400; }
.results .dist { font-size: .82rem; color: var(--c-primary); white-space: nowrap; }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .locator { max-height: none; }
  .results { max-height: 240px; }
  #map { height: 420px; }
}

/* Leaflet-Anpassungen */
.leaflet-container { font-family: var(--font); border-radius: var(--radius); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.55; }

.popup h3 { margin: 0 0 4px; font-size: 1rem; }
.popup .popup__type {
  display: inline-block; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; color: #fff; background: var(--c-primary);
  border-radius: 999px; padding: 2px 9px; margin-bottom: 8px;
}
.popup dl { margin: 0; font-size: .9rem; }
.popup dt { font-weight: 500; color: var(--c-muted); }
.popup dd { margin: 0 0 6px; }
.popup__links { margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap; font-size: .9rem; }

.ph-cluster {
  background: rgba(29, 61, 114, .82);
  color: #fff; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600; font-size: .85rem;
  box-shadow: 0 0 0 6px rgba(29, 61, 114, .25);
}
.ph-cluster--s { width: 34px; height: 34px; }
.ph-cluster--m { width: 42px; height: 42px; }
.ph-cluster--l { width: 50px; height: 50px; font-size: .8rem; }

/* ----------------------------------------------------------------- Über */

.about { padding-block: 10px 60px; }
.about__grid {
  display: grid; grid-template-columns: minmax(0, 24%) minmax(0, 1fr);
  gap: 32px; align-items: start;
}
.about img { border-radius: var(--radius); }
.about p { margin: 0 0 1em; }
.about p:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
  .about__grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ------------------------------------------------------- Inhaltsseiten */

.page { padding-block: 50px 70px; max-width: 860px; }
.page h2 { margin-top: 1.8em; }
.page h2:first-of-type { margin-top: 1em; }
.page address { font-style: normal; }
.page .placeholder {
  border-left: 4px solid var(--c-accent);
  background: #fdf3f0;
  padding: 14px 18px; margin: 0 0 30px;
  font-size: .95rem;
}

/* --------------------------------------------------------------- Footer */

.site-footer { background: var(--c-footer); padding: 50px 0; margin-top: auto; }
.site-footer__cols {
  display: flex; flex-wrap: wrap; gap: 10px 60px; justify-content: center;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a {
  display: flex; align-items: center; gap: 10px;
  color: var(--c-muted); text-decoration: none;
  padding: 3px 0; transition: color .3s ease;
}
.site-footer li a:hover { color: var(--c-primary); }
.site-footer svg { width: 14px; height: 14px; flex: 0 0 auto; }
.site-footer__copy {
  text-align: center; font-size: 12px; font-weight: 300;
  color: var(--c-muted); padding-top: 15px; margin: 0;
}

@media (max-width: 767px) {
  .site-footer { padding: 30px 0; }
  .site-footer__cols { flex-direction: column; align-items: center; gap: 4px; }
  .site-footer li a { justify-content: center; }
  .hero { padding-block-start: 40px; }
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
