/* =============================
   Variablen & Themes
   ============================= */
:root {
  /* Oberfläche (Light) */
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --surface: #f8fafc;
  --primary: #2563eb;
  --ring: rgba(37, 99, 235, .35);
  --border: #e2e8f0;

  /* Header (Light) – dunkel, damit weiße Navi gut lesbar ist */
  --header-bg: #0f172a;
  --header-border: rgba(255,255,255,.08);
  --header-shadow: rgba(0,0,0,.18);
}

html[data-theme="dark"] {
  /* Oberfläche (Dark) */
  --bg: #0b1020;
  --text: #e5e7eb;
  --muted: #a3b2c7;
  --surface: #111827;
  --primary: #60a5fa;
  --ring: rgba(96, 165, 250, .45);
  --border: #1f2a44;

  /* Header (Dark) */
  --header-bg: #0b1020;
  --header-border: #1f2a44;
  --header-shadow: rgba(0,0,0,.5);
}

/* =============================
   Grundlayout
   ============================= */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(37, 99, 235, .06), transparent 60%),
    radial-gradient(900px 500px at -20% 100%, rgba(96, 165, 250, .06), transparent 60%),
    var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1100px, 92vw); margin: 0 auto; }
section { padding: 26px 0; scroll-margin-top: 84px; }
.muted { color: var(--muted); }
footer { padding: 28px 0 48px; color: var(--muted); }

/* =============================
   Header / Navigation
   ============================= */
header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(1.2) blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 6px 20px var(--header-shadow);
}
.nav {
  display: flex; align-items: center; gap: 18px; padding: 10px 6px;
  flex-wrap: wrap; /* WICHTIG: erlaubt Umbruch auf kleinen Screens */
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo { height: 46px; width: auto; border-radius: 8px; transition: transform .2s ease; }
.brand:hover .logo { transform: rotate(-2deg) scale(1.03); }
.brand span { color: #fff; font-weight: 700; letter-spacing: .2px; }
.spacer { flex: 1; }

/* Navi-Links immer weiß */
.nav a { padding: 8px 10px; border-radius: 10px; position: relative; color: #fff; font-weight: 600; }
.nav a:hover { background: rgba(255,255,255,.08); }

/* Unterstreichung animiert + aktiver Status via aria-current="page" */
.nav a:not(.brand)::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -6px; height: 2px;
  background: #fff; border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav a:not(.brand):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* =============================
   Buttons
   ============================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.06);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0,0,0,.12); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; border-color: rgba(0,0,0,.15); }

/* WhatsApp */
.btn-wa { background: #25D366; border-color: #1ebe5c; color: #fff; font-weight: 600; }
.btn-wa:hover { background: #1ebe5c; border-color: #189a4a; }
html[data-theme="dark"] .btn-wa { background: #25D366; border-color: #1ebe5c; color: #fff; }

/* kleines Icon-Blob (dekorativ) */
.ico-wa { width: 0.75em; height: 0.75em; border-radius: 50%; background: radial-gradient(60% 60% at 35% 35%, #67e596 0 40%, #25d366 40% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }

/* „Jetzt anrufen” – kräftig blau */
.btn-call { background: var(--primary); color: #fff; border-color: rgba(0,0,0,.15); }

/* Runde Sonne/Mond Taste */
.btn-circle { width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #fff; color: #111; border: 1px solid var(--border); }
.btn-circle::before { content: "🌙"; font-size: 18px; line-height: 1; }
html[data-theme="dark"] .btn-circle { background: #111827; color: #fff; }
html[data-theme="dark"] .btn-circle::before { content: "☀️"; }

/* =============================
   Hero
   ============================= */
.hero { padding: clamp(40px, 8vw, 100px) 0 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(24px, 6vw, 42px); line-height: 1.1; margin: 0 0 10px; color: var(--text); }
.hero p { color: var(--muted); margin: 0 0 18px; }
.hero-visual { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.hero-visual img { width: 100%; height: auto; display: block; border-radius: 16px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* =============================
   Karten / Gitter
   ============================= */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: transform .18s ease, box-shadow .25s ease; color: var(--text); }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.card h3 { margin: 6px 0; color: var(--text); }
.card p { margin: 0; color: var(--muted); }

/* =============================
   Preise
   ============================= */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.price { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); }
.price h3 { margin: 0 0 8px; color: var(--text); }
.price ul { margin: 0; padding-left: 18px; }

/* =============================
   Karte (Google Maps)
   ============================= */
.map-wrap { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); }
.map-wrap iframe { width: 100%; height: 360px; display: block; border: 0; }

/* =============================
   Kontakt
   ============================= */
.contact-list { list-style: none; padding-left: 0; display: grid; gap: 6px; }
.contact-form { display: grid; gap: 12px; max-width: 520px; }
input, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
label { font-size: 14px; color: var(--muted); }

/* =============================
   Galerie – eine Reihe (1 → 2 → 3)
   ============================= */
.gallery-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.gallery-row .tile { flex: 1 1 300px; max-width: 340px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); transition: transform .25s ease, box-shadow .25s ease; background: #000; }
.gallery-row .tile img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gallery-row .tile:hover { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,0.35); }

/* =============================
   Lightbox
   ============================= */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 60; }
.lightbox[aria-hidden="false"] { display: flex; }
.lightbox__img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox__btn { position: absolute; background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.lightbox__btn:hover { background: rgba(0,0,0,.7); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

/* =============================
   Responsive Tweaks
   ============================= */
/* 1) Nav: bricht sauber um, Buttons werden groß/klickbar */
@media (max-width: 980px) {
  .nav { gap: 10px; }
  .logo { height: 40px; }
  .spacer { display: none; } /* verhindert riesige Lücken bei Umbruch */
  /* Links + Buttons dürfen umbrechen */
  .nav a, .btn, #themeToggle { flex: 0 1 auto; }
  .btn-call, .btn-wa { flex: 1 1 calc(50% - 8px); } /* zwei breite CTAs nebeneinander */
}

@media (max-width: 720px) {
  /* Brand in eigene Zeile, darunter Links, darunter CTAs */
  .nav { row-gap: 8px; }
  .brand { order: 1; flex: 1 1 100%; }
  /* die Sektionen-Links */
  .nav a[href^="#"] { order: 2; }
  /* Call-To-Actions */
  .btn-wa, .btn-call { order: 3; }
  /* Theme-Button rechts außen */
  #themeToggle { order: 4; margin-left: auto; }

  .nav a { padding: 8px 8px; font-weight: 600; }
}

/* 2) Layout-Gitter → 2 Spalten / 1 Spalte */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .grid, .pricing { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid, .pricing { grid-template-columns: 1fr; }
}

/* 3) Hero-Bild & Typo noch kompakter auf Phones */
@media (max-width: 520px) {
  .hero { padding: 28px 0 24px; }
  .hero h1 { font-size: clamp(22px, 7vw, 34px); }
  .cta .btn { width: 100%; } /* Buttons stapeln & volle Breite */
}

/* 4) Galerie & Karte kompakter */
@media (max-width: 780px) {
  .gallery-row .tile img { height: 200px; }
  .map-wrap iframe { height: 300px; }
}
@media (max-width: 640px) {
  .gallery-row .tile { max-width: 100%; }
  .gallery-row .tile img { height: 180px; }
  .map-wrap iframe { height: 240px; }
}
