@font-face {
  font-family: webFont;
  src: url("../../fonts/Comfortaa.ttf");
}

/* =========================================================
   BASE / RESET
   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* WICHTIG: Stelle sicher, dass NICHT ein Container scrollt */
html,
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* =========================================================
   GLOBAL BACKGROUND (NUR FASSADE)
   ========================================================= */
body {
  font-family: webFont, Arial, sans-serif;
  color: #111827;
  line-height: 1.5;

  background-image: url("../../bilder/fassade.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* Platz für fixe Navbar */
  padding-top: 76px;
}

/* Mobile: fixed background kann ruckeln */
@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 92px;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Anchor Sprünge nicht unter Navbar */
#leistungen,
#bilder,
#kontakt {
  scroll-margin-top: 100px;
}
@media (max-width: 480px) {
  #leistungen,
  #bilder,
  #kontakt {
    scroll-margin-top: 120px;
  }
}

/* =========================================================
   TYPO
   ========================================================= */
h1,
h2 {
  margin: 0;
  text-align: center;
  color: #111827;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

h1 {
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.1;
}

h2 {
  color: #0b4aa2;
  font-size: clamp(22px, 4vw, 42px);
  margin-bottom: 12px;
}

/* =========================================================
   NAVBAR (WIRKLICH FIX)
   ========================================================= */
/* Schutz gegen "fixed broken": wenn irgendwo transform/filter aktiv wäre,
   erzwingen wir, dass auf body/html nix davon liegt (falls vorhanden). */
html,
body {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

.header-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 999999 !important;

  background: transparent !important;
  pointer-events: none; /* nur nav soll klickbar sein */
}

.header-container nav {
  pointer-events: auto;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
}

.header-container nav ul {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-container nav li {
  margin: 0;
  padding: 0 !important;
  display: block;
}

.header-container nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;

  color: #01579b;
  font-weight: 800;
  font-size: 18px;

  background: transparent;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.header-container nav a:hover {
  background: rgba(1, 87, 155, 0.1);
}

@media (max-width: 480px) {
  .header-container nav a {
    font-size: 16px;
    padding: 10px 10px;
  }
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  max-width: 1100px;
  margin: 18px auto 0 auto;
  padding: 0 14px;
}

.header h1 {
  margin-top: 10px;
  padding: 18px 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.75);
}

/* =========================================================
   SECTIONS (TRANSPARENT)
   ========================================================= */
.leistungen,
.bilder,
.kontakt,
footer {
  max-width: 1100px;
  margin: 22px auto;
  padding: 14px;

  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.leistungen p {
  margin: 0;
  text-align: center;
  font-size: clamp(16px, 2.2vw, 22px);
  color: #111827;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.kontakt {
  text-align: center;
  font-size: clamp(16px, 2.2vw, 22px);
  color: #111827;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.kontakt a {
  color: #01579b;
  font-weight: 900;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.kontakt a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  font-size: 16px;
  color: #0b4aa2;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

footer a {
  color: #01579b;
  text-decoration: none;
  font-weight: 900;
}
footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .leistungen,
  .bilder,
  .kontakt,
  footer {
    margin: 16px auto;
    padding: 12px;
  }
}

/* =========================================================
   GALLERY (DEINE gallery.css, integriert)
   ========================================================= */

.ref-gallery {
  max-width: 1100px;
  margin: 0 auto;
}

.ref-gallery__topbar {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px 0;
}

.ref-gallery__title {
  text-align: center;
  line-height: 1.1;
}
.ref-gallery__label {
  display: block;
  font-size: 18px;
  opacity: 0.9;
}
.ref-gallery__count {
  display: block;
  font-size: 22px;
  font-weight: 600;
}

.ref-gallery__nav {
  border: 2px solid #ffffff;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 12px;
  height: 48px;
  width: 56px;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.ref-gallery__nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transition: all 0.2s;
}

.ref-gallery__slides {
  position: relative;
}

.ref-slide {
  display: none;
  padding: 12px 0 0 0;
}
.ref-slide.is-active {
  display: block;
}

.ref-slide__headline {
  font-size: 26px;
  margin: 8px 0 14px 0;
}

.ref-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.ref-slide.only-after .ref-compare,
.ref-slide.only-before .ref-compare {
  grid-template-columns: 1fr;
}

.ref-compare__col {
  border-radius: 16px;
  padding: 12px;
}
.ref-compare__title {
  margin: 4px 0 10px 0;
  font-size: 20px;
}

.ref-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ref-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  outline: none;
}

.ref-thumb img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.2s;
}

.ref-thumb:hover img {
  transform: scale(1.05);
}

.no-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.lightbox.is-open {
  display: block;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.lightbox__content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  padding: 18px;
}

.lightbox__img {
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  height: 56px;
  width: 56px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}

/* Responsive Basis */
@media (max-width: 900px) {
  .ref-thumb img {
    height: 165px;
  }
}

@media (max-width: 700px) {
  .ref-compare {
    grid-template-columns: 1fr;
  }

  .ref-gallery__topbar {
    grid-template-columns: 48px 1fr 48px;
  }

  .ref-gallery__nav {
    width: 48px;
    height: 44px;
    font-size: 26px;
  }

  .ref-thumb img {
    height: 140px;
  }

  .lightbox__content {
    grid-template-columns: 44px 1fr 44px;
    padding: 12px;
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .ref-thumbs {
    grid-template-columns: 1fr;
  }
  .ref-thumb img {
    height: 190px;
  }
}

/* ===== Galerie Override (hell) ===== */
:root {
  --gal-text: #1f2937;
  --gal-muted: #374151;
  --gal-border: rgba(31, 41, 55, 0.25);
  --gal-card: rgba(255, 255, 255, 0.78);
  --gal-card-strong: rgba(255, 255, 255, 0.92);
  --gal-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

  --gal-btn-bg: rgba(255, 255, 255, 0.92);
  --gal-btn-border: rgba(31, 41, 55, 0.35);
  --gal-btn-text: #111827;
  --gal-btn-hover: rgba(255, 255, 255, 1);
}

.ref-slide__headline,
.ref-compare__title,
.ref-gallery__label,
.ref-gallery__count,
.gallery-empty {
  color: var(--gal-text) !important;
  text-shadow: none !important;
}

.ref-gallery__topbar {
  background: var(--gal-card);
  border: 1px solid var(--gal-border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--gal-shadow);
}

.ref-gallery__nav {
  border: 1px solid var(--gal-btn-border) !important;
  background: var(--gal-btn-bg) !important;
  color: var(--gal-btn-text) !important;
}

.ref-gallery__nav:hover {
  background: var(--gal-btn-hover) !important;
}

.ref-compare__col {
  background: var(--gal-card-strong) !important;
  border: 1px solid var(--gal-border) !important;
  box-shadow: var(--gal-shadow);
}

.ref-thumb {
  border: 1px solid var(--gal-border);
  background: rgba(255, 255, 255, 0.7);
}

.lightbox__close,
.lightbox__nav {
  border: 2px solid rgba(255, 255, 255, 0.75) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  color: #fff !important;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.5) !important;
}

.ref-thumb.is-portrait img {
  object-fit: contain;
  background: rgba(0, 0, 0, 0.04);
  height: 240px;
}

@media (max-width: 900px) {
  .ref-thumb.is-portrait img {
    height: 210px;
  }
}
@media (max-width: 420px) {
  .ref-thumb.is-portrait img {
    height: 240px;
  }
}

/* =========================================================
   HOTFIX: zurück zu "wie vorher" – Fassade überall, Navbar NICHT fixed
   (ganz unten in styles.css einfügen)
   ========================================================= */

/* 1) Navbar wieder normal (nicht fixed/sticky) */
.header-container {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  z-index: auto !important;
  pointer-events: auto !important;
  background: transparent !important;
}

/* 2) Body: nur Fassade, keine Layout-Spielereien */
body {
  padding-top: 0 !important; /* weil Navbar nicht mehr fixed */
  background-image: url("../../bilder/fassade.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: repeat !important;
  background-attachment: scroll !important; /* wie früher, kein fixed */
  min-height: 100vh !important;
}

/* 3) WICHTIG: keine weißen Boxen irgendwo */
.leistungen,
.bilder,
.kontakt,
footer,
.header-container,
.header h1 {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 4) Navigation mobil wieder stabil (ohne 10.5% padding) */
.header-container nav ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  text-align: center !important;
  display: block !important;
}

.header-container nav ul li {
  display: inline-block !important;
  margin: 0 10px !important;
  padding: 0 !important;
}

.header-container nav a {
  display: inline-block !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  color: #01579b !important;
  font-weight: 800 !important;
  background: transparent !important;
}

/* 5) Mobile: sauber umbrechen */
@media (max-width: 700px) {
  .header-container nav ul li {
    margin: 6px 6px !important;
  }
}
