/* ==========================================================================
   Gabriel Fenstertechnik GmbH – Stylesheet
   Nachbau des Joomla/Helix3-Templates in reinem CSS (kein Bootstrap)
   ========================================================================== */

/* ---------- 1. Design-Tokens ---------- */
:root {
  --brand:        #0086cb;
  --brand-dark:   #006ba3;
  --brand-light:  #e8f4fb;

  --ink:          #333333;
  --ink-soft:     #4b4b4b;
  --ink-muted:    #777777;

  --line:         #dddddd;
  --bg:           #ffffff;
  --bg-soft:      #f7f7f7;
  --bg-grey:      #f5f5f5;
  --bg-mid:       #cccccc;
  --topbar-bg:    #f5f5f5;

  --font-body: "Segoe UI", "Open Sans", -apple-system, BlinkMacSystemFont,
               Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1140px;
  --gutter: 15px;

  --radius: 3px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, .14);

  --header-h: 90px;
  --header-h-sm: 70px;
}

/* ---------- 2. Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .2s ease;
  -webkit-tap-highlight-color: rgba(0, 134, 203, .2);
}
a:hover, a:focus { color: var(--brand-dark); text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
h5 { font-size: 15px; }

p { margin: 0 0 18px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  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: 10px; top: -60px;
  z-index: 2000; background: var(--brand); color: #fff;
  padding: 10px 18px; border-radius: var(--radius);
  transition: top .2s ease;
}
.skip-link:focus { top: 10px; color: #fff; }

/* ---------- 3. Layout-Helfer ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.row, .sppb-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--gutter) * -1);
}
.row > *, .sppb-row > * {
  padding: 0 var(--gutter);
  width: 100%;
}

/* Bootstrap-artige Spalten (mobile-first, greifen ab 768px) */
@media (min-width: 768px) {
  .col-sm-3,  .sppb-col-sm-3  { width: 25%; }
  .col-sm-4,  .sppb-col-sm-4  { width: 33.3333%; }
  .col-sm-6,  .sppb-col-sm-6  { width: 50%; }
  .col-sm-8,  .sppb-col-sm-8  { width: 66.6667%; }
  .col-sm-9,  .sppb-col-sm-9  { width: 75%; }
  .col-sm-12, .sppb-col-sm-12 { width: 100%; }
}
@media (min-width: 992px) {
  .col-md-3,  .sppb-col-md-3  { width: 25%; }
  .col-md-4,  .sppb-col-md-4  { width: 33.3333%; }
  .col-md-6,  .sppb-col-md-6  { width: 50%; }
  .col-md-8,  .sppb-col-md-8  { width: 66.6667%; }
  .col-md-12, .sppb-col-md-12 { width: 100%; }
  .col-lg-3 { width: 25%; }
  .col-lg-4 { width: 33.3333%; }
  .col-lg-9 { width: 75%; }
  .col-lg-12 { width: 100%; }
}

.text-center, .sppb-text-center { text-align: center; }
.sppb-text-left  { text-align: left; }
.sppb-text-right { text-align: right; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- 4. Buttons ---------- */
.btn, .sppb-btn, .bwp-button {
  display: inline-block;
  padding: 11px 26px;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  /* Touch-Ziel >= 44px (Apple HIG) */
  min-height: 44px;
  touch-action: manipulation;
}
.btn:hover, .btn:focus,
.sppb-btn:hover, .sppb-btn:focus,
.bwp-button:hover, .bwp-button:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-outline, .sppb-btn-default {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline:hover, .btn-outline:focus,
.sppb-btn-default:hover, .sppb-btn-default:focus {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}
.sppb-btn-rounded { border-radius: 40px; }
.bwp-button.small { padding: 9px 20px; font-size: 12px; }

/* ---------- 5. Top-Bar ---------- */
#sp-top-bar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}
#sp-top-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: center;
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 6px;
}
#sp-top-bar a { color: var(--ink-muted); }
#sp-top-bar a:hover { color: var(--brand); }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar-item svg { width: 14px; height: 14px; flex: none; fill: var(--brand); }

@media (max-width: 767px) {
  #sp-top-bar { font-size: 12px; }
  #sp-top-bar .container { gap: 4px 14px; justify-content: center; }
}

/* ---------- 6. Header + Navigation ---------- */
#sp-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
#sp-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
@media (max-width: 991px) {
  #sp-header .container { min-height: var(--header-h-sm); }
}

.logo { display: flex; align-items: center; }
.logo img { max-height: 62px; width: auto; }
@media (max-width: 991px) { .logo img { max-height: 46px; } }

/* Text-Ersatz, falls das Logo-Bild nicht lädt */
.logo-fallback {
  display: flex; flex-direction: column; line-height: 1.15;
  font-weight: 700; color: var(--ink); letter-spacing: .02em;
}
.logo-fallback .lf-1 { font-size: 21px; color: var(--brand); }
.logo-fallback .lf-2 { font-size: 11px; font-weight: 600; color: var(--ink-muted); letter-spacing: .16em; text-transform: uppercase; }

/* --- Desktop-Menü --- */
.main-nav { display: none; }

@media (min-width: 992px) {
  .main-nav { display: block; }
  .main-nav > ul {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .main-nav > ul > li { position: relative; }
  .main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 13px;
    height: var(--header-h);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 3px solid transparent;
  }
  .main-nav > ul > li > a:hover,
  .main-nav > ul > li:focus-within > a,
  .main-nav > ul > li.active > a { color: var(--brand); border-bottom-color: var(--brand); }

  .main-nav .caret { width: 9px; height: 9px; fill: currentColor; flex: none; }

  .main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: #fff;
    border-top: 3px solid var(--brand);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .main-nav > ul > li:hover > .submenu,
  .main-nav > ul > li:focus-within > .submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
  }
  /* Letztes Dropdown rechtsbuendig, damit es bei schmalen Desktops
     (ca. 992-1100px) nicht aus dem Viewport laeuft */
  .main-nav > ul > li:last-child > .submenu {
    left: auto;
    right: 0;
  }

  .main-nav .submenu a {
    display: block;
    padding: 9px 20px;
    font-size: 13.5px;
    color: var(--ink-soft);
    border-left: 3px solid transparent;
  }
  .main-nav .submenu a:hover,
  .main-nav .submenu a:focus {
    background: var(--brand-light);
    border-left-color: var(--brand);
    color: var(--brand);
  }
  .main-nav .submenu li.active > a { color: var(--brand); border-left-color: var(--brand); }
}

/* --- Hamburger-Button --- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.nav-toggle:hover { border-color: var(--brand); color: var(--brand); }

.nav-toggle .bars {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background .2s ease;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, top .2s ease;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after  { top: 7px; }

body.nav-open .nav-toggle .bars { background: transparent; }
body.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle .bars::after  { top: 0; transform: rotate(-45deg); }

@media (min-width: 992px) { .nav-toggle { display: none; } }

/* --- Off-Canvas-Menü (Mobil) --- */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
  z-index: 1000;
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 340px);
  /* dvh statt vh: verhindert Abschneiden durch die iOS-Safari-Adressleiste */
  height: 100vh;
  height: 100dvh;
  background: #fff;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom);
}
body.nav-open .offcanvas { transform: translateX(0); }

.offcanvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.offcanvas-head .logo img { max-height: 40px; }

.offcanvas-close {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); cursor: pointer;
  font-size: 22px; line-height: 1;
  touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.offcanvas-close:hover { border-color: var(--brand); color: var(--brand); }

.offcanvas nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.offcanvas nav > ul > li { border-bottom: 1px solid var(--line); }

.offcanvas nav a {
  display: block;
  padding: 14px 18px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.offcanvas nav a:hover,
.offcanvas nav a:focus { background: var(--brand-light); color: var(--brand); }
.offcanvas nav li.active > a > span:first-child { color: var(--brand); }

/* Zeile mit eigenem Toggle-Knopf für Untermenüs */
.oc-row { display: flex; align-items: stretch; }
.oc-row > a { flex: 1 1 auto; }
.oc-sub-toggle {
  flex: none;
  width: 52px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none; appearance: none;
}
.oc-sub-toggle svg {
  width: 13px; height: 13px; fill: currentColor;
  transition: transform .25s ease;
}
.oc-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.oc-sub-toggle:hover { color: var(--brand); background: var(--brand-light); }

.offcanvas .submenu {
  display: none;
  background: var(--bg-grey);
  border-top: 1px solid var(--line);
}
.offcanvas .submenu.open { display: block; }
.offcanvas .submenu a {
  padding-left: 34px;
  font-weight: 400;
  font-size: 14.5px;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.offcanvas .submenu li:last-child a { border-bottom: 0; }

.offcanvas-foot {
  margin-top: auto;
  padding: 20px 18px 26px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.7;
}
.offcanvas-foot a { color: var(--brand); }

/* Fallback ohne JavaScript: :target öffnet das Menü */
.offcanvas:target { transform: translateX(0); }
.no-js .nav-backdrop { display: none; }

/* ---------- 7. Seitentitel / Breadcrumb ---------- */
#sp-page-title {
  background: var(--bg-grey);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
#sp-page-title h1,
#sp-page-title .page-title {
  margin: 0 0 6px;
  font-size: 28px;
  color: var(--ink);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--ink-muted); }
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- 8. Hauptbereich / Sektionen ---------- */
#sp-main-body { padding: 0; }
.sppb-section { padding: 55px 0; position: relative; }
.sppb-section.tight { padding: 30px 0; }
.sppb-row-container,
.sppb-container-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.sppb-section.full-bleed > .sppb-row-container { max-width: none; padding: 0; }

.section-soft { background: var(--bg-soft); }
.section-grey { background: var(--bg-grey); }
.section-mid  { background: var(--bg-mid); }
.section-mid .sppb-title-heading { color: #fff; }

.sppb-section-title { margin-bottom: 34px; }
.sppb-title-heading {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: .01em;
}
.sppb-title-subheading {
  max-width: 860px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 15px;
}
.sppb-text-center .sppb-title-subheading { margin: 0 auto; }

.sppb-empty-space { height: 45px; }
@media (max-width: 767px) { .sppb-empty-space { height: 24px; } }

/* Zweispaltige Text/Bild-Blöcke ("service-listing") */
.media-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
}
.media-block:last-child { margin-bottom: 0; }
.media-block > .mb-text,
.media-block > .mb-media { flex: 1 1 340px; min-width: 0; }
.media-block.reverse > .mb-media { order: 2; }
.media-block img { width: 100%; border-radius: var(--radius); }
@media (max-width: 767px) {
  .media-block { gap: 24px; margin-bottom: 40px; }
  .media-block.reverse > .mb-media { order: 0; }
}

/* Icon-/Feature-Blöcke */
.bwp-service-box,
.sppb-addon-feature {
  margin-bottom: 32px;
}
.sppb-addon-feature .feature-icon,
.bwp-icon-box .icon {
  width: 78px;
  height: 78px;
  margin-bottom: 16px;
}
.sppb-text-center .feature-icon { margin-left: auto; margin-right: auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 34px 30px;
}
.feature-card { }
.feature-card h3 { font-size: 18px; margin-bottom: 10px; }
.feature-card img,
.feature-card .feature-icon { width: 72px; height: 72px; margin-bottom: 14px; }

/* Aufzählungen im "»"-Stil des Originals */
.arrow-list { list-style: none; padding: 0; margin: 0 0 18px; }
.arrow-list li { padding-left: 20px; position: relative; margin-bottom: 6px; }
.arrow-list li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

/* CTA-Streifen */
.major-background,
.sppb-addon-cta {
  background: var(--brand);
  color: #fff;
}
.major-background { padding: 46px 0; }
.major-background h2,
.major-background h3,
.major-background .sppb-title-heading { color: #fff; }
.major-background p { color: rgba(255, 255, 255, .92); margin-bottom: 0; }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-inner .cta-text { flex: 1 1 460px; }
.cta-inner .cta-action { flex: 0 0 auto; }

/* Parallax-/Fakten-Sektion */
.facts-section {
  min-height: 320px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #4a4a4a;
  position: relative;
  display: flex;
  align-items: center;
}
@media (min-width: 992px) {
  .facts-section { background-attachment: fixed; }
}
.facts-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}
.facts-section > * { position: relative; z-index: 1; }
.facts-section, .facts-section h2, .facts-section p { color: #fff; }

/* ---------- 9. Hero-Slider ---------- */
.hero {
  position: relative;
  overflow: hidden;
  /* dunkler Fallback: Text bleibt lesbar, falls ein Slider-Bild fehlt */
  background: #33424d;
  height: clamp(320px, 56vw, 600px);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  display: flex;
  align-items: center;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .32) 55%, rgba(0, 0, 0, .18) 100%);
}
.hero-slide.center::after { background: rgba(0, 0, 0, .42); }

.hero-caption {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  color: #fff;
}
.hero-slide.center .hero-caption { text-align: center; }
.hero-caption h2 {
  color: #fff;
  font-size: clamp(24px, 4.6vw, 52px);
  line-height: 1.15;
  font-weight: 300;
  letter-spacing: .02em;
  margin: 0 0 16px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.hero-caption p {
  color: #fff;
  font-size: clamp(13px, 1.7vw, 18px);
  font-weight: 300;
  max-width: 620px;
  margin: 0 0 26px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
.hero-slide.center .hero-caption p { margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-slide.center .hero-actions { justify-content: center; }

.hero-dots {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dots button {
  width: 12px; height: 12px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.hero-dots button[aria-current="true"] { background: #fff; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.hero-arrow:hover { background: var(--brand); }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }
.hero-arrow svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 767px) { .hero-arrow { display: none; } }

/* ---------- 10. Galerien ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-grey);
  aspect-ratio: 3 / 4;
}
.gallery-item.wide { aspect-ratio: 4 / 3; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery-item:hover .caption,
.gallery-item:focus-visible .caption { opacity: 1; }
@media (hover: none) { .gallery-item .caption { opacity: 1; } }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .9);
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  max-height: 84dvh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox .lb-caption {
  position: absolute;
  bottom: 22px; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-size: 14px;
  padding: 0 20px;
}
.lightbox button {
  position: absolute;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 24px; line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.lightbox button:hover { background: var(--brand); }
.lb-close { top: 16px; right: 16px; }
.lb-prev  { top: 50%; left: 12px;  transform: translateY(-50%); }
.lb-next  { top: 50%; right: 12px; transform: translateY(-50%); }

/* ---------- 11. Tabs (Markisen) ---------- */
.tabs { margin-bottom: 34px; }
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0 0 -1px;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.tab-nav button {
  padding: 11px 18px;
  min-height: 44px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.tab-nav button[aria-selected="true"] {
  background: #fff;
  border-color: var(--line);
  color: var(--brand);
}
.tab-panel { padding: 26px 0 0; }
.tab-panel[hidden] { display: none; }

/* ---------- 12. Formular (Kontakt) ---------- */
.form-note {
  background: var(--bg-soft);
  border-left: 3px solid var(--brand);
  padding: 16px 20px;
  margin-bottom: 30px;
  font-size: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.form-group .req { color: #c0392b; }

.form-control,
input[type="text"], input[type="email"], input[type="tel"],
input[type="file"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  min-height: 44px;
  font-family: inherit;
  font-size: 16px; /* verhindert Auto-Zoom in iOS Safari */
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid #c9c9c9;
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23777' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.form-control:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 134, 203, .16);
  outline: none;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  margin-bottom: 14px;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px;
  min-height: 0;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--brand);
}

/* ---------- 13. Bottom-Bereich + Footer ---------- */
#sp-bottom {
  background: var(--bg-grey);
  border-top: 1px solid var(--line);
  padding: 55px 0;
  color: var(--ink-soft);
  font-size: 14px;
}
#sp-bottom .bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 34px 30px;
}
#sp-bottom h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 18px;
  color: var(--ink);
}
#sp-bottom a { color: var(--ink-soft); }
#sp-bottom a:hover { color: var(--brand); }

.contact-lines { list-style: none; margin: 0; padding: 0; }
.contact-lines li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
}
.contact-lines svg { width: 15px; height: 15px; margin-top: 5px; flex: none; fill: var(--brand); }

.link-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.link-columns a { display: block; padding: 5px 0; }

.map-link { display: block; border-radius: var(--radius); overflow: hidden; }
.map-link img { width: 100%; }

#sp-footer {
  background: var(--brand);
  color: #fff;
  padding: 18px 0;
  font-size: 13px;
  text-align: center;
}
#sp-footer a { color: #fff; text-decoration: underline; }
#sp-footer a:hover { color: rgba(255, 255, 255, .8); }

/* ---------- 14. Scroll-Up + Cookie-Hinweis ---------- */
.scrollup {
  position: fixed;
  right: 18px;
  bottom: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 800;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
  touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.scrollup.show { opacity: 1; visibility: visible; }
.scrollup:hover { background: var(--brand-dark); }
.scrollup svg { width: 16px; height: 16px; fill: currentColor; }

.cookiehint {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  background: #2c2c2c;
  color: #eee;
  padding: 16px var(--gutter);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  font-size: 13.5px;
  box-shadow: 0 -3px 16px rgba(0, 0, 0, .25);
}
.cookiehint[hidden] { display: none; }
.cookiehint .inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.cookiehint p { flex: 1 1 340px; margin: 0; }
.cookiehint a { color: #7fc9f0; }
.cookiehint .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookiehint .btn { font-size: 12px; padding: 9px 18px; }

/* ---------- 15. Bild-Platzhalter (fehlende Dateien) ---------- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 18px;
  background:
    repeating-linear-gradient(45deg, #eef3f7 0 10px, #e6edf3 10px 20px);
  border: 1px dashed #b9c9d6;
  border-radius: var(--radius);
  color: #6b7f8d;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}
.img-placeholder svg { width: 34px; height: 34px; fill: #9fb4c4; }
.img-placeholder .ph-name { font-weight: 600; word-break: break-word; }
.gallery-item .img-placeholder { height: 100%; aspect-ratio: auto; border-radius: 0; }

/* ---------- 16. Artikel-Typografie ---------- */
.item-page img { border-radius: var(--radius); }
.item-page .lead-img { margin-bottom: 30px; }
.item-page h2 { margin-top: 34px; }
.item-page h3 { margin-top: 26px; }
.item-page h2:first-child,
.item-page h3:first-child { margin-top: 0; }

.contact-cta {
  margin-top: 40px;
  padding: 22px 26px;
  background: var(--bg-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  font-size: 16px;
}
.contact-cta strong { color: var(--ink); }

.legal-text { max-width: 900px; }
.legal-text h2 { font-size: 22px; margin-top: 40px; }
.legal-text h3 { font-size: 18px; margin-top: 28px; }
.legal-text h4 { font-size: 16px; margin-top: 22px; }
.legal-text p, .legal-text li { font-size: 14.5px; }

/* ---------- 17. Druck ---------- */
@media print {
  #sp-top-bar, #sp-header, .offcanvas, .nav-backdrop,
  .scrollup, .cookiehint, .hero-dots, .hero-arrow { display: none !important; }
  body { color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}

/* ---------- 18. Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
