/* ==========================================================================
   geh3D. – Gestaltung aller Seiten (styles.css)
   Diese eine Datei enthält sämtliche Formatierungen der Website.
   
   Farben ändern: Abschnitt 3 („Farben und Maße“), Variablen in :root.
     --accent  = Rot aus dem Logo (#962828)
     --ink     = Dunkelblau (#2A3E6B)
   
   Reihenfolge ist wichtig: Spätere Regeln überschreiben frühere.
   Abschnitte 1–2 und 23–24 ergänzen bzw. überschreiben die Grundregeln.
   ========================================================================== */

/* ==========================================================================
   1. Schriften (EB Corp, lokal eingebunden)
   Dateien liegen in /assets/fonts/. font-display: swap zeigt Text sofort.
   ========================================================================== */
@font-face {
  font-family: 'EB Corp';
  src: url('/assets/fonts/EBCorp-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Corp';
  src: url('/assets/fonts/EBCorp-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Corp';
  src: url('/assets/fonts/EBCorp-RegularOblique.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'EB Corp';
  src: url('/assets/fonts/EBCorp-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Corp';
  src: url('/assets/fonts/EBCorp-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. Fotos (Platzhalter)
   Jede Klasse .ph-… zeigt ein Foto aus /assets/img/.
   Eigenes Foto: Datei mit gleichem Namen ersetzen, hier nichts ändern.
   ========================================================================== */


/* Startseite oben: Bildschirmfoto aus dem Rundgang Gutskapelle Niedergandern (eigenes Foto) */
.ph-niedergandern {
  background-image: url('/assets/img/niedergandern.jpg');
}

/* Seite Kirchen oben: Bildschirmfoto aus dem Rundgang Kirche Deiderode (eigenes Foto) */
.ph-deiderode {
  background-image: url('/assets/img/kirche-deiderode-3.jpg');
}

/* Referenzen und Slider: Bildschirmfotos aus den Rundgängen (eigene Fotos) */
.ph-deiderode2 {
  background-image: url('/assets/img/kirche-deiderode-3.jpg');
}

.ph-zwangsarbeit {
  background-image: url('/assets/img/zwangsarbeit.jpg');
}

.ph-bbs {
  background-image: url('/assets/img/bbs-bauhalle.jpg');
}

/* Seite Gewerbe oben: Bildschirmfoto aus dem Rundgang BBS II, Metallwerkstatt (eigenes Foto) */
.ph-bbs-metall {
  background-image: url('/assets/img/bbs-metallwerkstatt.jpg');
}

.ph-garemani {
  background-image: url('/assets/img/garemani-rundgang-hell.jpg');
}


.ph-kamera {
  background-image: url('/assets/img/kamera.jpg');
}

.ph-wohnung {
  background-image: url('/assets/img/wohnung-hell.jpg');
}

.ph-restaurant {
  background-image: url('/assets/img/restaurant-hell.jpg');
}

.ph-verein {
  background-image: url('/assets/img/verein-hell.jpg');
}

.ph-friedo {
  background-image: url('/assets/img/friedo-karte-2.jpg');
}

/* Referenzen: Karte FriedO ganz zeigen (Grafik auf Weiß, nicht beschneiden) */
.thumb.ph-friedo {
  background-color: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);   /* feiner Rand, damit die weiße Karte sich von der Kachel abhebt */
}


.ph-mariengarten {
  background-image: url('/assets/img/klosterkirche-mariengarten-hell.jpg');   /* Seite Rundgänge oben, eigenes Foto */
}


/* Rundgang-Vorschau mit Foto statt Raum-Skizze */
.viewer.photo {
  background-size: cover;
  background-position: center;
}

.viewer.photo .room,
.viewer.photo .floor {
  display: none;
}

.viewer.photo .overlay {
  background: linear-gradient(180deg,rgba(14,19,30,.15),rgba(14,19,30,.55));
}

/* Slider auf der Startseite: Fotos, Bildunterschriften, Punkte */
.slide {
  background-size: cover;
  background-position: center 75%;   /* Slider ist flacher als die Fotos: oben mehr, unten weniger abschneiden */
}

/* Vorschaubilder, Porträt und Bild-Text-Boxen */
.thumb {
  aspect-ratio: 3/2;
  max-width: 100%;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin: -.4rem -.4rem .4rem;
}

.portrait {
  aspect-ratio: 4/3;
  max-width: 100%;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: .8rem;
}

.portrait span,
.thumb-cap {
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .8rem;
  padding: .25rem .55rem;
  border-radius: 6px;
}

.board-img {
  display: grid;
  grid-template-columns: minmax(0,2fr) minmax(0,1fr);
  gap: 2rem;
  align-items: stretch;
}

.board-pic {
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  min-height: 14rem;
  display: flex;
  align-items: flex-end;
  padding: .6rem;
}

.board-pic span {
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .78rem;
  padding: .2rem .5rem;
  border-radius: 6px;
}

@media (max-width:760px) {
  .board-img {
    grid-template-columns: 1fr;
  }
}

.slide {
  aspect-ratio: 16/8;
  min-height: 18rem;
  padding: 0;
  align-items: stretch;
}

.slide-cap {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 2.5rem 1.4rem 1.2rem;
  background: linear-gradient(180deg,transparent,rgba(10,14,24,.82));
  color: #fff;
  text-decoration: none;
}

.slide-cap .eyebrow {
  color: rgba(255,255,255,.8);
}

.slide-cap strong {
  font-size: 1.25rem;
  font-family: var(--f-display);
}

.slide-cap span:last-child {
  max-width: 60ch;
  font-size: .98rem;
}

.slide .slide-cap span {
  background: none;
  padding: 0;
}

.slide-tag {
  position: absolute;
  top: .7rem;
  right: .7rem;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 6px;
}

.slider-nav {
  align-items: center;
}

/* Nur die Punkte unter dem Slider (nicht die Listen ul.dots) */
.slider-nav .dots {
  display: flex;
  gap: .3rem;
  margin-right: auto;
  align-items: center;
}

.slider-nav .dots button {
  position: relative;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0;
}

.slider-nav .dots button::after {
  content: "";
  position: absolute;
  inset: -.4rem -.15rem;
  border-radius: 8px;
}

.dots button::before {
  content: "";
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  border: 1px solid var(--ink);
  box-sizing: border-box;
}

.dots button[aria-current="true"]::before {
  background: var(--accent);
  border-color: var(--accent);
}

/* Sprungziele: Abstand nach oben, damit die Kopfzeile nichts verdeckt */
#special,
#kirchen-special-box,
#vereine-special-box,
#anfrage-box {
  scroll-margin-top: calc(env(safe-area-inset-top,0px) + 7.5rem);
}

/* Kasten „Das Special“ (Kirchen, Vereine): direkt unter der Kopfzeile, ohne Rest des Kastens davor */
#special {
  scroll-margin-top: calc(env(safe-area-inset-top,0px) + 5.5rem);
}

/* Rasterlinien („Grundriss-Muster“) oben auf allen Unterseiten */
.pg {
  position: relative;
}

.pg:not([data-page="start"])::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34rem;
  background-image: linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(#000 68%,transparent);
  mask-image: linear-gradient(#000 68%,transparent);
  pointer-events: none;
  z-index: 0;
}

.pg>.wrap {
  position: relative;
  z-index: 1;
}

:is(.cl,#calc,#contact) input[type=checkbox] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: .32rem 0 0;
  border: 2px solid var(--accent);
  border-radius: 2px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

:is(.cl,#calc,#contact) input[type=checkbox]:checked {
  background: var(--accent);
}

:is(.cl,#calc,#contact) input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: .24rem;
  top: .05rem;
  width: .28rem;
  height: .52rem;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Auswahlkreise in der Akzentfarbe */
input[type=radio] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
}

input[type=radio]::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .12s;
}

input[type=radio]:checked::before {
  transform: scale(1);
}

/* Pfeil „Nach oben“ unten rechts */
.totop {
  position: fixed;
  right: max(16px,env(safe-area-inset-right,0px));
  bottom: calc(16px + env(safe-area-inset-bottom,0px));
  z-index: 30;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(17,23,35,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(.6rem);
  pointer-events: none;
  transition: opacity .25s,transform .25s;
}

.totop.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.totop:hover {
  filter: brightness(1.08);
}

/* Bildnachweis in der Fußzeile */
.credits {
  font-size: .78rem;
  line-height: 1.45;
}

/* ==========================================================================
   3. Farben und Maße (hier zentral ändern)
   Helle Fläche mit feinem Grundriss-Raster, Inhalte in einer 72rem-Spalte.
   Dunkler Modus folgt der Einstellung des Geräts (prefers-color-scheme).
   ========================================================================== */
:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --ink: #2A3E6B;
  --text: #2B3446;
  --muted: #6B7280;
  --line: #E2E5EB;
  --grid: rgba(42,62,107,.1);
  --accent: #962828;
  --accent-ink: #FFFFFF;
  --accent-soft: #F3E4E4;
  --navy: #2A3E6B;
  --navy-ink: #FFFFFF;
  --logo-ink: #2A3E6B;
  --logo-red: #962828;
  --ok: #2F7D5B;
  --note: #FFF7E6;
  --note-line: #E9C77B;
  --f-display: 'EB Corp', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'EB Corp', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --r: 10px;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111723;
    --surface: #18202F;
    --ink: #E9EDF4;
    --text: #CFD5E0;
    --muted: #98A1B2;
    --line: #2A3446;
    --grid: rgba(233,237,244,.085);
    --accent: #D05B55;
    --accent-ink: #FFFFFF;
    --accent-soft: #3A2020;
    --navy: #26324D;
    --navy-ink: #FFFFFF;
    --logo-ink: #E9EDF4;
    --logo-red: #D05B55;
    --ok: #5FBF93;
    --note: #2C2718;
    --note-line: #8A7238;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111723;
  --surface: #18202F;
  --ink: #E9EDF4;
  --text: #CFD5E0;
  --muted: #98A1B2;
  --line: #2A3446;
  --grid: rgba(233,237,244,.085);
  --accent: #D05B55;
  --accent-ink: #FFFFFF;
  --accent-soft: #3A2020;
  --navy: #26324D;
  --navy-ink: #FFFFFF;
  --logo-ink: #E9EDF4;
  --logo-red: #D05B55;
  --ok: #5FBF93;
  --note: #2C2718;
  --note-line: #8A7238;
  color-scheme: dark;
}

/* ==========================================================================
   4. Grundlagen
   Box-Modell, Schrift, Überschriften, Abstände, Spaltenbreite
   ========================================================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none!important;
    animation: none!important;
  }
}

body {
  margin: 0;   /* ohne diese Zeile setzt der Browser 8 px Rand um die ganze Seite */
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

a {
  color: var(--accent);
}

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

h1,
h2,
h3 {
  font-family: var(--f-display);
  color: var(--ink);
  text-wrap: balance;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem,1.3rem + 3vw,3.4rem);
  font-weight: 600;
  letter-spacing: -.015em;
}

h2 {
  font-size: clamp(1.5rem,1.2rem + 1.2vw,2.1rem);
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0;
  max-width: 65ch;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  /* 20 px Seitenrand; im Querformat auf dem iPhone mindestens so breit wie die Kamera-Aussparung */
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.lead {
  font-size: 1.2rem;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .9rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.proto-unused {
  background: var(--navy);
  color: var(--navy-ink);
  font-size: .85rem;
  text-align: center;
  padding: .45rem 16px;
}

/* ==========================================================================
   5. Kopfzeile und Navigation
   ========================================================================== */
header.site {
  position: sticky;
  top: env(safe-area-inset-top,0px);
  z-index: 20;
  background: color-mix(in srgb,var(--bg) 92%,transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
}

.brand {
  display: block;
  width: 12.5rem;
  max-width: 52vw;
  line-height: 0;
}

/* Logo: Schrift und Abstände aus der Logo-Datei (gelten für das eingebettete Logo) */
.logo .cls-1,
.logo .cls-2,
.logo .cls-3 {
  isolation: isolate;
}

.logo .cls-2 {
  font-family: EBCorp-Medium, 'EB Corp';
  font-size: 33.75px;
  font-weight: 500;
}

.logo .cls-3 {
  font-family: EBCorp-Regular, 'EB Corp';
  font-size: 196.37px;
}

.logo .cls-5 {
  letter-spacing: -.07em;
}

/* Laufweiten einzelner Buchstabengruppen im Logo */
.logo .cls-6,
.logo .cls-7 {
  letter-spacing: -.05em;
}

.logo .cls-8 {
  letter-spacing: -.04em;
}

.logo .cls-9 {
  letter-spacing: .02em;
}

.logo .cls-10 {
  letter-spacing: .03em;
}

.logo .cls-11,
.logo .cls-12 {
  letter-spacing: .04em;
}

.logo .cls-13 {
  letter-spacing: 0em;
}

/* Logo-Größe und Farben (überschreiben die Farben der Logo-Datei) */
.logo {
  width: 100%;
  height: auto;
  display: block;
}

.logo .cls-2,
.logo .cls-3 {
  fill: var(--logo-ink);
}

.logo .cls-4 {
  fill: var(--logo-red);
}

nav.main {
  display: flex;
  gap: .25rem;
  align-items: center;
  flex-wrap: wrap;
}

nav.main>a,
nav.main .dd>button {
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  text-decoration: none;
  padding: .5rem .7rem;
  border-radius: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}

nav.main>a:hover,
nav.main .dd>button:hover,
nav.main a.on {
  background: var(--surface);
}

.dd {
  position: relative;
}

.dd-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 16rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .4rem;
  box-shadow: 0 12px 30px rgba(17,23,35,.12);
  display: none;
}

.dd:hover .dd-menu,
.dd:focus-within .dd-menu {
  display: block;
}

.dd-menu a {
  display: block;
  padding: .5rem .7rem;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
}

.dd-menu a:hover {
  background: var(--bg);
}

/* Schaltflächen: .btn = rot gefüllt, .btn.ghost = nur Rahmen */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: .75rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover {
  border-color: var(--ink);
}

.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

/* Menü-Schaltfläche (nur auf dem Smartphone sichtbar) */
.menu-toggle {
  display: none;
}

@media (max-width:960px) {
  .menu-toggle {
    display: inline-flex;
    font: inherit;
    background: none;
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 8px;
    padding: 0;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  nav.main {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: .6rem 16px 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  nav.main.open {
    display: flex;
  }
  .dd-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 .8rem;
    min-width: 0;
  }
  .dd>button {
    width: 100%;
    text-align: left;
  }
}

/* ==========================================================================
   6. Seitenaufbau: Abschnitte und Spalten
   ========================================================================== */
main {
  display: block;
}

.page {
  padding-block: 2.5rem 4rem;
}

.section {
  padding-block: 3rem;
}

.section+.section {
  border-top: 1px solid var(--line);
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 2rem;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1.25rem;
}

@media (max-width:860px) {
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   7. Startseite: Kopfbereich (Hero) und Störer
   ========================================================================== */
.hero {
  position: relative;
  padding-block: 3rem 3.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(#000 72%,transparent);
  mask-image: linear-gradient(#000 72%,transparent);
  pointer-events: none;
  z-index: 0;
}

.hero>.wrap {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.15fr);
  gap: 2.5rem;
  align-items: center;
}

@media (max-width:900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .5rem;
}

/* Störer: roter, schräger Kreis oben rechts (Text über /intern änderbar) */
.stoerer {
  position: absolute;
  right: max(16px,calc((100vw - var(--wrap))/2 + 8px));
  top: 1.2rem;
  width: 10.75rem;
  height: 10.75rem;
  hyphens: manual;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  font-size: .8rem;
  line-height: 1.22;
  transform: rotate(-8deg);
  box-shadow: 0 10px 24px rgba(150,40,40,.3);
  z-index: 3;
}

.stoerer strong {
  font-size: 1.05rem;
  display: block;
  margin-bottom: .15rem;
}

.stoerer .st-head {
  margin-bottom: .55rem;
}

@media (max-width:900px) {
  .stoerer .st-head {
    margin-bottom: 0;
    margin-right: .3rem;
  }
}

.stoerer:hover {
  transform: rotate(-4deg) scale(1.03);
}

@media (max-width:900px) {
  .stoerer:hover {
    transform: rotate(-3deg);
  }
}

@media (max-width:900px) {
  .stoerer {
    position: static;
    transform: rotate(-3deg);
    width: auto;
    max-width: calc(100% - 32px);
    height: auto;
    border-radius: var(--r);
    margin: -2.1rem 16px 2rem;
    flex-wrap: wrap;
    align-items: baseline;
    flex-direction: row;
    gap: .6rem;
    justify-content: flex-start;
    text-align: left;
  }
  .stoerer strong {
    display: inline;
    margin: 0;
  }
}

/* ==========================================================================
   8. Rundgang-Fenster (Zwei-Klick-Lösung)
   Der Rundgang wird erst nach Zustimmung und Klick geladen.
   ========================================================================== */
.viewer {
  position: relative;
  aspect-ratio: 16/10;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background-color: #1b2337;
  color: #fff;
  border: 1px solid var(--line);
}

/* Dunkler Verlauf nur ohne Foto, damit die Fotos (Klassen ph-…, Abschnitt „Fotos“) sichtbar bleiben */
.viewer:not(.photo) {
  background-image: linear-gradient(160deg,#2a3550,#1b2337);
}

.viewer .room {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,transparent 55%,rgba(0,0,0,.35)), conic-gradient(from 200deg at 50% 62%,#3b4a6b,#24304a 25%,#3a4867 50%,#2a3652 75%,#3b4a6b);
}

.viewer .floor {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  height: 38%;
  background: linear-gradient(transparent 0 0),repeating-linear-gradient(90deg,rgba(255,255,255,.08) 0 1px,transparent 1px 48px),repeating-linear-gradient(0deg,rgba(255,255,255,.08) 0 1px,transparent 1px 30px);
  transform: perspective(500px) rotateX(55deg);
  transform-origin: bottom;
}

.viewer .pt {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  background: rgba(255,255,255,.18);
}

.viewer .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  text-align: center;
  padding: 1.2rem;
  background: rgba(14,19,30,.35);
}

.viewer .overlay .btn {
  background: #fff;
  color: #2A3E6B;
  border-color: #fff;
}

.viewer .overlay p {
  font-size: .85rem;
  color: rgba(255,255,255,.85);
  max-width: 30ch;
}

.viewer .tag {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: .75rem;
  background: rgba(0,0,0,.45);
  padding: .25rem .55rem;
  border-radius: 6px;
  letter-spacing: .04em;
}

.viewer.loaded .overlay {
  background: rgba(14,19,30,.6);
}

/* ==========================================================================
   9. Kacheln (Zielgruppen, Leistungen)
   ========================================================================== */
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

a.tile:hover {
  border-color: var(--ink);
}

.tile h3 {
  font-size: 1.15rem;
}

.tile .go {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: .95rem;
}

.tiles5 {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
}

@media (max-width:900px) {
  .tiles5 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:560px) {
  .tiles5 {
    grid-template-columns: 1fr;
  }
}

.tile ul.dots {
  margin: 0;
}

/* ==========================================================================
   10. Ablauf in Schritten (nummeriert)
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1.25rem;
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: s;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

.steps li::before {
  content: counter(s);
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}

@media (max-width:860px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:520px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   11. Preise und Leistungsliste
   ========================================================================== */
.price {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
}

.price small {
  font-weight: 400;
  color: var(--muted);
}

.leist {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}

@media (max-width:700px) {
  .leist {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   12. Listen mit roten Quadraten
   ========================================================================== */
ul.clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

ul.clean li {
  padding-left: 1.4rem;
  position: relative;
}

ul.clean li::before,
ul.dots li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  transform: translateY(-50%);
  width: .55rem;
  height: .55rem;
  border: 2px solid var(--accent);
  border-radius: 2px;
  box-sizing: border-box;
}

ul.dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

ul.dots li {
  padding-left: 1.4rem;
  position: relative;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1.5rem;
}

.benefits>div {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

@media (max-width:860px) {
  .benefits {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   13. Tabellen (Preise, Schätzung)
   ========================================================================== */
.tbl {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

th,
td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}

tr.sum td {
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   14. Häufige Fragen (aufklappbar)
   ========================================================================== */
details {
  border-bottom: 1px solid var(--line);
  padding-block: .9rem;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

details summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
}

details[open] summary::after {
  content: "–";
}

/* Antworten: längere Zeilen als normaler Fließtext (65ch) */
details p {
  margin-top: .6rem;
  max-width: 92ch;
}

/* ==========================================================================
   15. Kästen, Hinweise, Platzhalterflächen
   ========================================================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
}

.board {
  background: var(--navy);
  color: var(--navy-ink);
  border-radius: 14px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.board h2,
.board h3 {
  color: var(--navy-ink);
}

.board .muted {
  color: rgba(255,255,255,.75);
}

.board ul.clean li::before {
  border-color: #fff;
}

.note {
  background: var(--note);
  border: 1px solid var(--note-line);
  border-radius: 8px;
  padding: .8rem 1rem;
  font-size: .95rem;
  color: var(--text);
}

.ph {
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 1rem;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

/* ==========================================================================
   16. Slider (Grundgerüst)
   ========================================================================== */
.slider {
  position: relative;
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  scrollbar-width: none;
  border-radius: 14px;
}

.slides::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16/9;   /* höher als vorher (21/9) */
  max-width: 100%;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: #fff;
}

.slide span {
  background: rgba(0,0,0,.5);
  padding: .3rem .65rem;
  border-radius: 6px;
  font-size: .85rem;
}

.s1 {
  background: linear-gradient(135deg,#5b4a3c,#2c2420);
}

.s2 {
  background: linear-gradient(135deg,#46566e,#1f2738);
}

.s3 {
  background: linear-gradient(135deg,#6a5546,#2d2a3a);
}

.s4 {
  background: linear-gradient(135deg,#3f5a52,#1d2a2c);
}

.s5 {
  background: linear-gradient(135deg,#7a3a33,#2a1d22);
}

.slider-nav {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-top: .75rem;
}

.slider-nav button {
  font: inherit;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.1rem;
}

/* ==========================================================================
   17. Formulare: Kostenrechner und Anfrage
   ========================================================================== */
form .row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}

@media (max-width:640px) {
  form .row {
    grid-template-columns: 1fr;
  }
}

label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-weight: 600;
  color: var(--ink);
  font-size: .95rem;
}

label .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: .85rem;
}

input[type=text],
input[type=email],
input[type=tel],
input[type=number],
select,
textarea {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem .7rem;
  width: 100%;
  min-width: 0;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  background: var(--surface);
}

legend {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.1rem;
  padding-inline: .4rem;
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  font-weight: 400;
}

.choice label {
  flex-direction: row;
  align-items: center;
  gap: .45rem;
  font-weight: 400;
  color: var(--text);
}

.check {
  flex-direction: row;
  align-items: flex-start;
  gap: .6rem;
  font-weight: 400;
  color: var(--text);
}

.check input {
  margin-top: .35rem;
}

.result {
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 1.4rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ok {
  color: var(--ok);
  font-weight: 600;
}

.layout-calc {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap: 2rem;
  align-items: start;
}

.layout-calc .sticky {
  position: sticky;
  top: calc(env(safe-area-inset-top,0px) + 5.5rem);
}

@media (max-width:960px) {
  .layout-calc {
    grid-template-columns: 1fr;
  }
  .layout-calc .sticky {
    position: static;
  }
}

/* ==========================================================================
   18. Checkliste
   ========================================================================== */
.cl {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1.25rem;
}

@media (max-width:760px) {
  .cl {
    grid-template-columns: 1fr;
  }
}

.cl fieldset label {
  font-weight: 400;
  color: var(--text);
  flex-direction: row;
  align-items: flex-start;
  gap: .6rem;
}

.cl fieldset label input {
  margin-top: .35rem;
}

/* ==========================================================================
   19. Fußzeile
   ========================================================================== */
footer.site {
  background: var(--navy);
  color: var(--navy-ink);
  padding-block: 3rem 2rem;
  margin-top: 2rem;
}

footer.site a {
  color: var(--navy-ink);
}

footer .cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width:760px) {
  footer .cols {
    grid-template-columns: 1fr;
  }
}

footer .logo .cls-2,
footer .logo .cls-3 {
  fill: #fff;
}

footer .logo .cls-4 {
  fill: #D05B55;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

footer .muted {
  color: rgba(255,255,255,.7);
}

/* ==========================================================================
   20. Impressum, Datenschutz, Sonstiges
   ========================================================================== */
.legal h3 {
  margin-top: 1.4rem;
}

.legal p {
  margin-top: .5rem;
}

.intern table input {
  width: 7rem;
  text-align: right;
}

.viewer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.result .err {
  color: var(--accent);
  font-weight: 600;
}

.result.stale {
  opacity: .55;
}

/* ==========================================================================
   21. Druckansicht (Schätzung als PDF speichern)
   ========================================================================== */
@media print {
  header.site,
  footer.site,
  .totop,
  #calc,
  #anfrage,
  .board,
  .proto,
  .pg::before {
    display: none!important;
  }
  .result {
    border: 1px solid #000;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* ==========================================================================
   22. Cookie-Hinweis
   ========================================================================== */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom,0px));
  pointer-events: none;
}

.consent-in {
  pointer-events: auto;
  max-width: 46rem;
  margin-inline: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(17,23,35,.25);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  max-height: 80vh;
  overflow: auto;
}

.consent-in h2 {
  font-size: 1.2rem;
}

.consent-in p,
.consent-in li {
  font-size: .95rem;
}

.consent-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .3rem;
}

/* ==========================================================================
   23. Hilfsklassen
   Kleine Einzel-Formatierungen, die früher direkt im HTML standen.
   !important sorgt dafür, dass sie wie vorher Vorrang haben.
   .pt-1 … .pt-6 = Positionen der Punkte in der Raum-Skizze
   ========================================================================== */
.u-ai-center {
  align-items: center !important;
}

.u-btnrow {
  display: flex !important;
  gap: .75rem !important;
  flex-wrap: wrap !important;
}

.u-mw-half {
  max-width: 50% !important;
}

.u-mw-28 {
  max-width: 28rem !important;
}

.u-strong-ink {
  font-weight: 600 !important;
  color: var(--ink) !important;
}

.u-fs-14 {
  font-size: 1.4rem !important;
}

.u-white-75 {
  color: rgba(255,255,255,.75) !important;
}

.u-white-fs-14 {
  color: #fff !important;
  font-size: 1.4rem !important;
}

.u-btn-onDark {
  color: #fff !important;
  border-color: rgba(255,255,255,.5) !important;
}

.u-w-12 {
  width: 12rem !important;
}

.u-mw-52 {
  max-width: 52rem !important;
}

.u-mt-05 {
  margin-top: .5rem !important;
}

.pt-6 {
  left: 70% !important;
  top: 64% !important;
}

.pt-5 {
  left: 66% !important;
  top: 66% !important;
}

.pt-4 {
  left: 52% !important;
  top: 72% !important;
}

.pt-3 {
  left: 48% !important;
  top: 74% !important;
}

.pt-2 {
  left: 30% !important;
  top: 66% !important;
}

.pt-1 {
  left: 28% !important;
  top: 68% !important;
}

.u-fw-400 {
  font-weight: 400 !important;
}

.u-overlay-msg {
  font-size: 1rem !important;
  color: #fff !important;
  max-width: 34ch !important;
}

.u-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.u-accent {
  color: var(--accent) !important;
}

.u-white {
  color: #fff !important;
}

.u-border-accent {
  border-color: var(--accent) !important;
}

.u-ai-start {
  align-items: start !important;
}

/* ==========================================================================
   24. Interne Eingabeseite (/intern)
   ========================================================================== */
.intern-wrap {
  max-width: 52rem;
  margin-inline: auto;
  padding: 2rem 20px 4rem;
}

.intern-wrap fieldset {
  margin-top: 1rem;
}

.intern-wrap .row2 {
  display: grid;
  grid-template-columns: minmax(0,1fr) 10rem;
  gap: .6rem 1rem;
  align-items: center;
}

.intern-wrap .row2 input {
  text-align: right;
}

.intern-wrap .row2 input.txt {
  text-align: left;
}

@media(max-width:560px) {
  .intern-wrap .row2 {
    grid-template-columns: 1fr;
  }
}

/* Kurze Erklärungen in Tabellenzellen (z. B. Sprungmarke, Infopunkt auf der Preisseite): enger Zeilenabstand */
.td-note {
  display: inline-block;
  line-height: 1.35;
  margin-top: .2rem;
}

/* Zusätzlicher Abstand vor neuen Abschnitten in den Special-Kästen (Kirchen, Vereine) */
.mt-gap {
  margin-top: 1.5rem;
}

/* ==========================================================================
   25. Smartphone: Kopfzeile, Hamburger-Menü und breite Tabellen
   ========================================================================== */

/* Menü-Schaltfläche ohne Rahmen; um die halbe Innenfläche nach rechts gerückt,
   damit die Striche genauso weit vom rechten Rand entfernt sind wie das Logo vom linken */
@media (max-width:960px) {
  .menu-toggle {
    border: 0;
    margin-right: -.7rem;
  }
}

/* Drei Striche; bei geöffnetem Menü werden sie zu einem X */
.burger {
  position: relative;
  display: block;
  width: 1.35rem;
  height: 1rem;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s, opacity .2s, top .2s;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: calc(50% - 1px); }
.burger span:nth-child(3) { top: calc(100% - 2px); }

.menu-toggle[aria-expanded="true"] .burger span:nth-child(1) { top: calc(50% - 1px); transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .burger span:nth-child(3) { top: calc(50% - 1px); transform: rotate(-45deg); }

/* Logo: Unterkante nicht abschneiden */
.brand .logo {
  overflow: visible;
}

.brand {
  padding-block: 2px 4px;
}

@media (max-width: 560px) {
  /* Logo auf dem Smartphone etwas kleiner */
  .brand {
    width: 11rem;
  }

  /* Tabellen: etwas kompakter, damit sie in die Breite passen */
  th,
  td {
    padding: .6rem .55rem;
  }

  th {
    font-size: .72rem;
    letter-spacing: .03em;
  }
}

/* Inhalte in Spalten dürfen schmaler werden als ihr Inhalt
   (sonst schieben breite Tabellen die Seite nach rechts hinaus) */
.grid2 > *,
.grid3 > * {
  min-width: 0;
}

/* Kasten „Ablauf und Vorbereitung“ (Zielgruppen-Seiten): auf Tablet und Laptop
   auf die Höhe der Überschrift im Kasten daneben setzen (Innenabstand von .panel) */
@media (min-width: 861px) {
  .ablauf {
    padding-top: 1.6rem;
  }
}

/* Abschnitt „Häufige Fragen“: Überschrift etwas kleiner, mehr Abstand nach oben */
.faq {
  margin-top: 1.5rem;
}

.faq h2 {
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem);
}

/* Einleitung, die auf breiten Bildschirmen in einer Zeile stehen soll (z. B. Checkliste) */
.lead-wide {
  max-width: none;
}

/* Zähler der Checkliste („x von y Punkten erledigt“) in der Akzentfarbe */
.cl-count {
  color: var(--accent);
  font-weight: 600;
}

/* Zwei Störer nebeneinander oben rechts (Laptop): etwas kleiner und höher,
   damit sie die Schaltfläche „Rundgang starten“ nicht verdecken */
@media (min-width:901px) {
  .stoerer {
    width: 9.5rem;
    height: 9.5rem;
    top: .3rem;
    font-size: .76rem;
  }

  .stoerer strong {
    font-size: .98rem;
  }

  /* Zweiter Störer (Vereine): links neben dem ersten, anders gedreht */
  .stoerer-2 {
    right: calc(max(16px,calc((100vw - var(--wrap))/2 + 8px)) + 10.2rem);
    top: 1.3rem;
    transform: rotate(6deg);
  }

  .stoerer-2:hover {
    transform: rotate(3deg) scale(1.03);
  }
}

@media (max-width:900px) {
  /* Tablet und Smartphone: zwei Bänder untereinander, nur leicht gedreht */
  .stoerer {
    transform: rotate(-2deg);
    margin-bottom: 1rem;
  }

  .stoerer-2 {
    transform: rotate(1.5deg);
    margin: 0 16px 2rem;
  }

  .stoerer:hover,
  .stoerer-2:hover {
    transform: none;
  }
}

/* ==========================================================================
   26. Infoblatt für Vorstände (/infoblatt-kirchen, /infoblatt-vereine)
   DIN A4 im Stil des Briefpapiers. Maße in mm, Schriftgrößen in pt wie im Druck.
   Farben aus dem Briefpapier: Blau #3655AD, Rot #971A35.
   ========================================================================== */
body.infoblatt {
  --ib-blue: #3655AD;
  --ib-red: #971A35;
  --ib-text: #222222;
  background: #E9EBEF;
  color: var(--ib-text);
  font-family: var(--f-body);
}

/* Leiste mit Schaltflächen (nur Bildschirm) */
.ib-bar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 16px;
}

.ib-wrap {
  padding: 0 0 2rem;
  overflow: hidden;
}

/* Das Blatt */
.ib-sheet {
  position: relative;
  width: 210mm;
  height: 297mm;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 6px 30px rgba(0,0,0,.18);
  overflow: hidden;
  transform-origin: top left;
  font-size: 9pt;
  line-height: 1.38;
  hyphens: manual;
}

/* Schraffierte Streifen links und rechts */
.ib-hatch {
  position: absolute;
  top: 0;
  height: 297mm;
  display: block;
}

.ib-hatch-l { left: 0; width: 14.3mm; }
.ib-hatch-r { right: 0; width: 8.3mm; }

/* Blaue senkrechte Linie */
.ib-line {
  position: absolute;
  left: 14.3mm;
  top: 0;
  bottom: 0;
  width: 1mm;
  background: var(--ib-blue);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Falzmarken (105 und 210 mm) und Lochmarke (148,5 mm) */
.ib-mark {
  position: absolute;
  left: 0;
  height: 0;
  border-top: .25pt solid #000;
}

.ib-mark-1 { top: 105mm; width: 4.5mm; }
.ib-mark-2 { top: 148.5mm; width: 7.5mm; }
.ib-mark-3 { top: 210mm; width: 4.5mm; }

/* Logo oben rechts, in den Farben des Briefpapiers */
.ib-logo {
  position: absolute;
  top: 10.3mm;
  right: 15.5mm;
  width: 69mm;
  line-height: 0;
}

.ib-logo .logo .cls-2,
.ib-logo .logo .cls-3 { fill: var(--ib-blue); }
.ib-logo .logo .cls-4 { fill: var(--ib-red); }

/* Inhaltsbereich */
.ib-body {
  position: absolute;
  left: 22.2mm;
  right: 15.5mm;
  top: 40mm;
  bottom: 27mm;
  display: flex;
  flex-direction: column;
  gap: 2.8mm;
}

.ib-body h1,
.ib-body h2,
.ib-body h3 {
  font-family: var(--f-display);
  color: var(--ib-blue);
  margin: 0;
  line-height: 1.2;
}

.ib-body h1 { font-size: 17.5pt; letter-spacing: -.01em; font-weight: 600; white-space: nowrap; }   /* Hauptüberschrift in einer Zeile, leicht enger gesetzt */
.ib-body h2 { font-size: 11pt; font-weight: 600; }
.ib-body h3 { font-size: 9.5pt; font-weight: 600; margin-bottom: .8mm; }
.ib-body p  { margin: 0; max-width: none; }

.ib-eyebrow {
  color: var(--ib-red);
  font-size: 7.5pt;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ib-lead { font-size: 10pt; }

.ib-small { font-size: 8pt; color: #555; }

.ib-body ul,
.ib-body ol {
  margin: 0;
  padding-left: 4.2mm;
}

.ib-body li { margin-bottom: .7mm; }
.ib-body ul li::marker { color: var(--ib-red); }

/* Drei Spalten mit dem Nutzen */
.ib-cols3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5mm;
  border-top: .5pt solid var(--ib-blue);
  padding-top: 2.5mm;
}

/* Zwei Spalten: Preise links, Kosten/Ablauf/Referenzen rechts */
.ib-cols2 {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 6mm;
  margin-top: 2.5mm;   /* mehr Abstand vor „Das Special“ und „Laufende Kosten“ */
}

.ib-box {
  background: #F3F5FB;
  border-left: 1mm solid var(--ib-red);
  padding: 3mm 3.5mm;
  display: flex;
  flex-direction: column;
  gap: 1.6mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.ib-box h3 { margin-top: 1.2mm; }
.ib-box h2 { margin-bottom: 1.4mm; }   /* mehr Luft nach „Das Special …“ */

.ib-side {
  display: flex;
  flex-direction: column;
  gap: 1.4mm;
}

.ib-side h3 { margin-top: 1.4mm; }
.ib-side h3:first-child { margin-top: 0; }

.ib-steps li::marker { color: var(--ib-red); font-weight: 600; }

/* Abschluss: Beispiel und Kontakt */
.ib-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6mm;
  border-top: .5pt solid var(--ib-blue);
  padding-top: 2.5mm;
  margin-top: auto;
}

.ib-stand { font-size: 7pt; color: #666; }

/* Fußzeile wie im Briefpapier */
.ib-foot {
  position: absolute;
  left: 22.2mm;
  right: 15.5mm;
  top: 275.3mm;
  display: grid;
  /* vier Spalten mit gleichem Abstand: Jede Spalte beginnt 51,8 mm nach der vorigen,
     die 4. Spalte ist so breit wie der QR-Code und endet am rechten Rand (wie das Logo) */
  grid-template-columns: repeat(3, 1fr) 17mm;
  font-size: 7pt;
  line-height: 9pt;
  font-weight: 300;
  color: var(--ib-text);
}

/* QR-Code in der 4. Spalte der Fußzeile (der weiße Rand des Bildes gleicht die Oberkante aus) */
.ib-qr {
  display: block;
  width: 17mm;
  height: 17mm;
  margin-top: -1mm;
  position: relative;
  left: 1.03mm;   /* weißer Rand im Bild (40 von 660 px): QR-Code schließt rechts bündig mit dem Logo ab */
}

/* Drucken: nur das Blatt, ohne Rand und Schatten */
@media print {
  @page { size: A4; margin: 0; }
  body.infoblatt { background: #fff; }
  .ib-bar { display: none !important; }
  .ib-wrap { padding: 0; overflow: visible; height: auto !important; }
  .ib-sheet { box-shadow: none; margin: 0; transform: none !important; }
}

/* Cookie-Hinweis als Sperre: Seite abgedunkelt, nicht scrollbar, Fenster in der Mitte */
html.consent-lock,
html.consent-lock body {
  overflow: hidden;
  overscroll-behavior: none;
}

.consent.modal {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 23, 35, .55);
  pointer-events: auto;
}

.consent.modal .consent-in {
  width: 100%;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

.consent-in:focus {
  outline: none;
}

/* „Selbst ausprobieren“: Bezeichnung links, Adressen beginnen genau untereinander */
.ib-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.5mm;
}

/* Kirchen-Infoblatt: freien Platz gleichmäßig über und unter dem Mittelteil verteilen
   (oben und unten je „auto“, dadurch gleich viel Abstand zu den drei Spalten und zum Abschluss) */
.ib-infoblatt-kirchen .ib-cols2 {
  margin-top: auto;
  position: relative;
  top: -1mm;   /* Mittelteil 1 mm nach oben: oben etwas weniger, unten etwas mehr Abstand */
}

/* Vereins-Infoblatt: rechte Spalte ist am längsten – etwas kompakter, damit alles auf eine Seite passt */
.ib-infoblatt-vereine .ib-cols2 { margin-top: 1mm; }
.ib-infoblatt-vereine .ib-side { gap: 1mm; }
.ib-infoblatt-vereine .ib-side h3 { margin-top: 1mm; }
.ib-infoblatt-vereine .ib-side h3:first-child { margin-top: 0; }

/* Infoblatt: Festpreise wie mit Tabulator – Bezeichnung links, Beträge beginnen an derselben Stelle,
   umbrechende Zeilen bleiben am Tabstopp ausgerichtet */
.ib-tab {
  display: grid;
  grid-template-columns: 20.5mm 1fr;   /* Tabstopp bei 20,5 mm */
}

.ib-tab > span:first-child {
  white-space: nowrap;
}

/* Preise, Zusatzleistungen: Hinweis „(nur zu einem erstellten Rundgang)“ ab Tablet-Breite in einer Zeile;
   die Spalte „Leistung“ wird dadurch so breit wie dieser Hinweis */
@media (min-width: 700px) {
  .nowrap-d { white-space: nowrap; }
}

/* Preise, Specials: jede Fläche mit Preis in eigener Zeile, Folgezeilen exakt unter dem ersten Buchstaben (Punkt „·“ davor) */
.sp-z { display: block; position: relative; padding-left: .75em; }   /* alle Zeilen beginnen exakt an derselben Stelle */
.sp-z::before { content: "·"; position: absolute; left: 0; }

/* Preise: Button „Kosten unverbindlich berechnen“ ab Laptop-Breite in der linken Spalte,
   auf Höhe der Überschrift „Nach Aufwand“ (auf schmalen Bildschirmen ganz unten) */
@media (min-width: 861px) {
  .grid-preise { row-gap: 1rem; }                                   /* wie der Abstand innerhalb der Spalte */
  .grid-preise > .stack:first-child { grid-column: 1; grid-row: 1; }
  .grid-preise > .stack:nth-child(2) { grid-column: 2; grid-row: 1; }
  .grid-preise > .aufwand { grid-column: 2; grid-row: 2; }
  .btn-unten { grid-column: 1; grid-row: 2; align-self: start; margin: 1.25rem 0 0; }   /* mittig zur Überschrift */
}
@media (max-width: 860px) {
  .grid-preise > .aufwand { margin-top: -1rem; }                    /* gleicher Abstand wie vorher innerhalb der Spalte */
}

/* Zwei Buttons nebeneinander (Preise: Kirchen- und Vereinsspecial) */
.btn-reihe { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Rundgänge: „Was kostet ein Rundgang?“ nach unten schieben, damit der Button unten
   bündig mit dem Kasten „Was dazugehört“ abschließt (wirkt nur nebeneinander) */
.push-unten { margin-top: auto; }
.push-unten ~ p:last-child { margin-bottom: 0; }

/* Zeilenumbruch nur in der Laptop-Version (z. B. Startseite vor „in Göttingen und Umgebung.“) */
.br-lap { display: none; }
@media (min-width: 901px) {                   /* ab hier steht der Text neben dem Rundgang */
  .br-lap { display: inline; }
}

/* Startseite „Persönlich“: Text- und Bildbox gleich hoch. Die Absätze verteilen sich
   auf die Höhe des Fotos (Mindestabstand .5rem); ist der Text höher, wächst das Foto mit */
@media (min-width: 861px) {
  .persoenlich { align-items: stretch; }
  .persoenlich > .stack { gap: .5rem; justify-content: space-between; }
  .persoenlich > .portrait { align-self: stretch; min-height: 0; }
}

/* Kosten: Kasten „Ihre unverbindliche Schätzung“ beginnt exakt auf Höhe der Rahmenlinie von Schritt 1
   (die Überschrift „Schritt 1 …“ sitzt mittig auf der Linie und ragt um eine halbe Zeilenhöhe darüber) */
@media (min-width: 961px) {
  .layout-calc .sticky { margin-top: calc(1.1rem * 1.6 / 2); }
}

/* Mit dem Attribut „hidden“ ausgeblendete Elemente bleiben immer unsichtbar,
   auch wenn eine Klasse wie .stack, .panel oder .result eine Anzeigeart (display: flex) setzt.
   Betrifft z. B. auf /kosten die Box „Gern. So erreichen Sie mich:“ und die Bestätigung. */
[hidden] { display: none !important; }

/* ==========================================================================
   Checkliste als A4-Blatt (/checkliste-druck), ergänzt Abschnitt „Infoblatt“
   ========================================================================== */
/* Hinweis „Wichtig:“ im Stil des Preis-Kastens der Infoblätter */
.ibc-note {
  background: #F3F5FB;
  border-left: 1mm solid var(--ib-red);
  padding: 2.2mm 3.5mm 1.28mm;   /* unten weniger, damit der Text optisch mittig sitzt (Grundlinie statt Unterlänge) */
  font-size: 8.5pt;
  hyphens: auto;          /* Silbentrennung: spart eine Zeile */
  -webkit-hyphens: auto;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Zwei Spalten mit den Abschnitten, automatisch gleich hoch verteilt;
   ein Abschnitt darf zwischen zwei Punkten in die nächste Spalte umbrechen, ein einzelner Punkt nicht */
.ibc-cols {
  column-count: 2;
  column-gap: 6mm;
  border-top: .5pt solid var(--ib-blue);
  padding-top: 2.5mm;
}
.ibc-sec { margin-bottom: 3.7mm; }   /* Abstand zwischen den Abschnitten 1–7 */
.ibc-sec:nth-last-child(2) { margin-bottom: 3.2mm; }   /* vor „Gut zu wissen“ wie bisher */
.ibc-sec:last-child { margin-bottom: 0; }
.ibc-sec h3 { break-after: avoid; }
.ibc-list li { break-inside: avoid; }
.ib-body .ibc-list li { margin-bottom: .5mm; }

/* Punkte mit Kästchen zum Abhaken auf Papier */
.ib-body ul.ibc-list { list-style: none; padding-left: 0; }
.ibc-list li { position: relative; padding-left: 5mm; }
.ibc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .4mm;               /* mittig zur Schrift, ragt oben und unten je 0,2 mm über Oberlänge bzw. Grundlinie */
  width: 2.8mm;
  height: 2.8mm;
  box-sizing: border-box;  /* Maße inklusive Rahmen */
  border: .25mm solid var(--ib-blue);
  border-radius: .4mm;
}

/* Termin zum Eintragen: Linien zum Ausfüllen */
.ibc-feld span {
  display: inline-block;
  width: 34mm;
  border-bottom: .25mm solid var(--ib-text);
  margin: 0 3mm 0 1mm;
}
.ibc-feld span:last-child { width: 20mm; margin-right: 0; }

/* Checkliste als A4-Blatt: Inhalt näher an den oberen Rand (Logo endet bei etwa 26 mm) */
.ib-checkliste .ib-body { top: 32mm; }

/* Checkliste als A4-Blatt: mehr Luft vor und nach den beiden blauen Linien */
.ib-checkliste .ibc-cols { margin-top: 1.7mm; padding-top: 4.5mm; }   /* vor der Linie 2,8 + 1,7 = 4,5 mm */
.ib-checkliste .ibc-cta  { padding-top: 4.5mm; }
.ib-checkliste .ibc-feld { margin-top: calc(1.38em + .8mm); }   /* Leerzeile zwischen „Ihr Scan-Termin“ und „Datum“, Zeile auf Höhe von „info@…“ daneben */
.ib-checkliste .ibc-list strong { font-weight: inherit; }   /* „Umkleiden …:“, „Gastronomie …:“, „Kirchen …:“ im Blatt nicht fett */

/* Startseite oben: das Bildschirmfoto zeigt schon echte Infopunkte, die angedeuteten Punkte entfallen */
.ph-niedergandern .pt { display: none; }
/* Alle Rundgang-Fenster mit Foto: nur ein leichter Schleier, damit das Foto hell und freundlich wirkt (Button bleibt gut lesbar) */
.viewer.photo .overlay { background: linear-gradient(180deg,rgba(14,19,30,0),rgba(14,19,30,.28)); }
.viewer.photo .overlay p { text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* Alle Rundgang-Fenster: Button und Hinweis weit unten im Bild, der Hinweis in einer Zeile ganz unten */
.viewer .overlay { justify-content: flex-end; gap: .7rem; padding-bottom: .9rem; }
.viewer .overlay p { max-width: none; white-space: nowrap; font-size: .8rem; }
@media (max-width: 360px) {
  .viewer .overlay p { font-size: .62rem; }   /* sehr schmale Smartphones: Hinweis bleibt in einer Zeile */
}

/* ==========================================================================
   Referenzen: Rundgang in einer Box über der Seite (assets/js/main.js, Abschnitt 7)
   ========================================================================== */
.thumb-link { cursor: pointer; transition: filter .2s; }
.thumb-link:hover, .thumb-link:focus-visible { filter: brightness(1.06); }
.thumb-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

html.lbox-lock, html.lbox-lock body { overflow: hidden; }

.lbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14,19,30,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(2vh, env(safe-area-inset-top)) 2vw max(2vh, env(safe-area-inset-bottom));
}
.lbox-in {
  width: min(1400px, 100%);
  height: 100%;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
/* schmaler Balken oben mit Titel und „X“ */
.lbox-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 2.4rem;
  padding: 0 .4rem 0 1rem;
  background: #1E2023;   /* sehr dunkles Anthrazit, auch im dunklen Modus */
  color: #fff;
}
.lbox-title {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lbox-x {
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.lbox-x:hover, .lbox-x:focus-visible { background: rgba(255,255,255,.16); outline: none; }
.lbox-body { flex: 1; position: relative; }
.lbox-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Smartphone: Box füllt den Bildschirm */
@media (max-width: 640px) {
  .lbox { padding: 0; }
  .lbox-in { border-radius: 0; max-height: none; }
}

/* Infoblätter: „je nach Größe der Fläche:“ in der Größe der Zwischenüberschriften (wie „Im Festpreis ist bereits …“) */
.ib-body h2 .ib-h2-sub { font-size: 9.5pt; }

/* Infoblätter: rechte Spalte („Laufende Kosten und Finanzierung“) 2 mm tiefer */
.ib-side { padding-top: 2mm; }

/* Seite Grundrisse: Beispielbild rechts neben der Einleitung */
.gr-bild { display: block; width: 100%; max-width: 30rem; height: auto; margin-left: auto; border-radius: 14px; }   /* rechtsbündig mit der Box darunter */
@media (min-width: 861px) { .gr-bild { margin-top: 2.25rem; } }   /* etwas tiefer als die Mitte des Textes */
/* Zeilenumbruch nur auf breiten Bildschirmen (dort passt jede Zeile ganz neben das Bild) */
.br-weit { display: none; }
@media (min-width: 1180px) { .br-weit { display: inline; } }

/* Seite Hosting: Beispiel einer Aufrufstatistik im Kasten „Was dazugehört“ */
.stat-bild { margin: .4rem 0 0; }
.stat-bild img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.stat-bild figcaption { margin-top: .4rem; }

/* Seite Hosting: rechte Spalte („Inklusivmonate“) einen Tick tiefer */
@media (min-width: 861px) { .spalte-tiefer { padding-top: .5rem; } }

/* Seite Hosting, Tabelle „Inklusivmonate“: Zellen ohne Umbruch, damit „(Kirchen, Vereine)“
   in einer Zeile steht; dafür dürfen die Spaltenköpfe umbrechen, auf schmalen Bildschirmen etwas kompakter */
.tbl-inkl td { white-space: nowrap; }
.tbl-inkl th { white-space: normal; }
@media (max-width: 1100px) {
  .tbl-inkl th, .tbl-inkl td { padding-left: .45rem; padding-right: .45rem; }
  .tbl-inkl td { font-size: .92rem; }
  .tbl-inkl th { font-size: .7rem; letter-spacing: .02em; }
}
@media (max-width: 560px) {
  .tbl-inkl th, .tbl-inkl td { padding-left: .3rem; padding-right: .3rem; }
  .tbl-inkl td { font-size: .88rem; }
}
@media (max-width: 400px) {
  .tbl-inkl th, .tbl-inkl td { padding-left: .25rem; padding-right: .25rem; }
  .tbl-inkl td { font-size: .8rem; }
  .tbl-inkl th { font-size: .62rem; letter-spacing: 0; }
}

/* Seite Erweiterungen: Beispielbilder für Sprungmarken und Infopunkte */
.bsp-bild { margin: auto 0 0; }   /* Bild und Preis unten im Kasten, beide Kästen schließen gleich ab */
.bsp-bild img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.bsp-bild figcaption { margin-top: .4rem; }
/* Absatz ohne Begrenzung der Zeilenlänge (läuft über die ganze Breite) */
.u-nomax { max-width: none; }

/* Kosten: Bestätigung nach der Anfrage mit kleinem Vorschaubild der Checkliste rechts */
.thanks-cl { display: flex; gap: 1.2rem; align-items: flex-start; }
.thanks-cl > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .6rem; padding-top: .6rem; }   /* Text etwas tiefer */
.thanks-pdf { flex: none; width: 6.5rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-decoration: none; text-align: center; }
.thanks-pdf img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .2s; }
.thanks-pdf:hover img { transform: translateY(-2px); }
@media (max-width: 480px) { .thanks-pdf { width: 5rem; } }
.thanks-pdf-t { font-size: .72rem; line-height: 1.2; }   /* Beschriftung unter dem Vorschaubild: kleiner, enger */

/* Kosten, Anfrageformular: kleine Rechenaufgabe als Spamschutz (inc/captcha.php) */
.cap { display: flex; flex-direction: column; gap: .35rem; }
.cap-z { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cap-z img { display: block; width: 110px; height: 36px; border: 1px solid var(--line); border-radius: 8px; }
.cap-z input[type=text] { width: 4.2rem; padding: .45rem .5rem; text-align: center; }
.cap-neu { width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.cap-neu:hover { border-color: var(--accent); color: var(--accent); }
.cap-h { font-size: .85rem; color: var(--muted); }

/* Hinweis auf die AGB (agb_hinweis() in inc/core.php); im dunklen Kasten weißer Link */
.agb-hinweis a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }
.board .agb-hinweis { color: rgba(255,255,255,.75); }
