/* wampfler.swiss – schlankes Stylesheet, angelehnt an das bisherige Divi-Design */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/open-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --accent: #2ea3f2;
  --link: #3366ff;
  --text: #666;
  --head: #333;
  --line: #e5e5e5;
  --bg-soft: #eee;
  --shadow: 6px 6px 18px 0 rgba(0,0,0,.3);
  --shadow-soft: 0 2px 18px 0 rgba(0,0,0,.3);
  --maxw: 1280px;
  --gap: 2.5%;
  --header-h: 80px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 15px/1.7 "Open Sans", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .8; }
h1, h2, h3, h4 { color: var(--head); font-weight: 500; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p, ul, ol, table { margin: 0 0 1em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
strong { color: #444; font-weight: 700; }

/* Kopfzeile (fix, weiss) */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.1); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 0 7px rgba(0,0,0,.1); }
.header-inner { width: 90%; max-width: 1080px; margin: 0 auto; min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { line-height: 0; }
.logo img { height: 41px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav a { display: block; padding: 8px 11px; color: rgba(0,0,0,.6); font-weight: 600; font-size: 14px; }
.nav a:hover { opacity: .7; }
.nav li.active > a { color: var(--accent); }
.nav-toggle { display: none; }

/* Seite */
.page { flex: 1; padding: 0 0 40px; }
.page > * { width: 95%; max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.page > .hero { width: 100%; max-width: none; }
.page > .schmal, .box.schmal { max-width: 900px; }
.page-title { margin-top: 40px; margin-bottom: 25px; font-size: 30px; font-weight: 700; }
.zentriert { text-align: center; }
.page > p > img:only-child, .page > p > a > img:only-child { display: block; width: 100%; }
.page > p:has(> img:only-child) { margin: 30px auto; }
.page > h2.titel { max-width: 900px; margin: 35px auto; padding: 10px; text-align: center; font-size: 30px; box-shadow: var(--shadow-soft); }

/* Titelbild mit Text (früher Slider) */
.hero { position: relative; background: #000 center / cover no-repeat; color: #fff; text-align: center; margin-bottom: 30px; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.hero-inner { position: relative; width: 80%; max-width: 1080px; margin: 0 auto; padding: 100px 0; min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.hero h1, .hero h2 { color: #fff; font-size: 75px; font-weight: 500; margin: 0 0 20px; text-shadow: 0 1px 3px rgba(0,0,0,.3); line-height: 1.1; }
.hero p { font-size: 16px; line-height: 1.5; margin-bottom: .8em; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
a.button, .hero a.button { display: inline-block; margin-top: 10px; padding: .3em 1em; border: 2px solid #fff; border-radius: 3px; color: #fff; font-size: 16px; font-weight: 500; transition: all .3s; }
a.button:hover { background: #fff; color: #666; opacity: 1; }

/* Zeilen und Spalten */
.row { display: grid; grid-template-columns: var(--cols, repeat(var(--n, 1), 1fr)); gap: 30px var(--gap); margin-top: 30px; margin-bottom: 30px; align-items: stretch; }
.row[data-cols="2"] { --n: 2; } .row[data-cols="3"] { --n: 3; } .row[data-cols="4"] { --n: 4; }
.row > * { min-width: 0; margin: 0; }

/* Kasten (früher "Blurb" mit Schatten) */
.box { padding: 10px; box-shadow: var(--shadow); background: #fff; margin-top: 30px; margin-bottom: 30px; }
.row > .box { margin: 0; }
.box-title { font-size: 18px; font-weight: 500; color: var(--head); padding-bottom: 10px; margin: 0; }
.box-body ul { padding-left: 1.2em; }
.box-body ul li { margin: 0; }
.box-body img { border-radius: 0; }
.box-body .portrait { float: left; width: 42%; max-width: 208px; margin: 0 15px 10px 0; }
.box-body::after { content: ""; display: block; clear: both; }
.box.plain ul { list-style: none; padding-left: 0; }
.box.spalten-2 .box-body { column-count: 2; column-gap: 30px; }
.box.spalten-3 .box-body { column-count: 3; column-gap: 30px; }
.box[class*="spalten-"] .box-body p { break-after: avoid; margin-bottom: .3em; }
.box[class*="spalten-"] .box-body ul { margin-bottom: 1.2em; }
.box[class*="spalten-"] .box-body li { break-inside: avoid; }
.box.text { max-width: 900px; padding: 20px 25px; }
.box.text h2 { font-size: 20px; margin-top: 1.4em; }
.box.text h2:first-of-type { margin-top: .8em; }
.box-body table { border-collapse: collapse; width: 100%; font-size: 14px; }
.box-body th, .box-body td { text-align: left; padding: 3px 6px 3px 0; vertical-align: top; }
.box-body th { color: var(--head); border-bottom: 1px solid var(--line); }
a.kontaktlink { display: inline-flex; align-items: center; gap: 8px; color: var(--link); }
a.kontaktlink::before { content: ""; width: 16px; height: 16px; background: url("icon-kontakt.png") center / contain no-repeat; }

/* Kacheln Startseite */
.kachel { text-align: center; padding: 20px 10px 50px; }
.kachel img { width: 208px; max-width: 100%; display: block; margin: 0 auto 10px; }
.kachel h2 { font-size: 26px; margin: 0 0 .4em; }
.kachel h2 a { color: #000; }
.kachel p a:not(:has(img)) { color: var(--link); }
.page > h2.zentriert { font-size: 24px; margin: 10px auto 30px; }

/* Bildergalerie als Raster */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 1em; }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover { opacity: 1; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: 13px; padding: 3px 2px 0; }

/* Bildergalerie als Slider (früher Divi-Galerie "Vollbreite") */
.page > .slider { max-width: 900px; margin: 30px auto; }
.slider { position: relative; box-shadow: var(--shadow); background: #000; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.slides::-webkit-scrollbar { display: none; }
.slides figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; position: relative; }
.slides a { display: block; height: 100%; }
.slides a:hover { opacity: 1; }
.slides img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slides figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 14px; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 28px; line-height: 44px; cursor: pointer; padding: 0; }
.slider-btn:hover { background: rgba(0,0,0,.6); }
.slider-btn.prev { left: 10px; } .slider-btn.next { right: 10px; }
.slider-count { position: absolute; right: 10px; bottom: 8px; color: #fff; font-size: 13px; background: rgba(0,0,0,.4); padding: 1px 8px; border-radius: 10px; }

/* Eingebettete Inhalte (erst nach Klick) */
.embed { margin: 0 0 1em; background: #f7f7f7; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.embed iframe { display: block; border: 0; width: 100%; }
.embed-hint { max-width: 460px; padding: 24px; text-align: center; }
.embed-hint p { margin: 0 0 10px; }
.embed-hint button, .kontakt-form button { background: var(--accent); color: #fff; border: 0; border-radius: 3px; padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer; }
.embed-hint button:hover, .kontakt-form button:hover { background: #1b8ad6; }

/* Kontaktformular */
.box.formular { padding: 15px 20px 20px; box-shadow: var(--shadow-soft); }
.kontakt-form .form-row { display: flex; gap: 3%; }
.kontakt-form .field { margin: 0 0 15px; flex: 1; }
.kontakt-form label { display: block; font-size: 14px; color: var(--head); margin-bottom: 4px; }
.kontakt-form input, .kontakt-form textarea { width: 100%; padding: 14px 16px; border: 0; border-radius: 0; background: var(--bg-soft); color: #4e4e4e; font: inherit; }
.kontakt-form input:focus, .kontakt-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; background: #e8e8e8; }
.kontakt-form textarea { resize: vertical; min-height: 150px; }
.kontakt-form .hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.kontakt-form .form-note { font-size: 13px; margin-bottom: 15px; }
.kontakt-form .form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.kontakt-form button[disabled] { opacity: .6; cursor: wait; }
.form-status { margin: 0 auto 0 0; font-weight: 600; }
.form-status.ok { color: #2e7d32; }
.form-status.err { color: #c62828; }

/* Fusszeile */
.site-footer { background: #222; color: #fff; font-size: 14px; }
.footer-menu ul { list-style: none; margin: 0 auto; padding: 18px 0; width: 90%; max-width: 1080px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-menu a { color: #bbb; }
.footer-menu a:hover { color: #fff; opacity: 1; }
.bottom-bar { background: rgba(0,0,0,.32); }
.bottom-inner { width: 90%; max-width: 1080px; margin: 0 auto; padding: 15px 0 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.credits { margin: 0; color: #666; }
.credits a { color: #888; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.social svg { width: 22px; height: 22px; fill: #666; display: block; transition: fill .2s; }
.social a:hover svg { fill: #fff; }
.to-top { position: fixed; right: 0; bottom: 125px; width: 36px; height: 36px; background: rgba(0,0,0,.4); border-radius: 5px 0 0 5px; opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 50; }
.to-top::before { content: ""; position: absolute; left: 13px; top: 15px; width: 9px; height: 9px; border: solid #fff; border-width: 2px 0 0 2px; transform: rotate(45deg); }
.to-top.show { opacity: 1; pointer-events: auto; }

/* sanftes Einblenden (früher Divi-Animationen) */
.reveal { opacity: 0; transform: scale(.96); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Lightbox */
.lb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.lb-overlay img { max-width: 92vw; max-height: 86vh; box-shadow: 0 0 30px rgba(0,0,0,.5); }
.lb-cap { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }
.lb-overlay button { position: absolute; background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; padding: 10px 16px; opacity: .8; }
.lb-overlay button:hover { opacity: 1; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 4px; right: 8px; }
.box-body a.lb, .box-body img:not(.nolb):not(a img) { cursor: zoom-in; }

/* Tablet */
@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; font: inherit; font-weight: 600; color: rgba(0,0,0,.6); cursor: pointer; padding: 8px 0; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2px; background: var(--accent); position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
  .nav ul { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 3px solid var(--accent); box-shadow: 0 2px 5px rgba(0,0,0,.1); padding: 10px 5%; flex-direction: column; }
  .nav.open ul { display: flex; }
  .nav a { padding: 10px 5px; border-bottom: 1px solid rgba(0,0,0,.03); }
  .row[data-cols="4"] { --cols: 1fr 1fr !important; }
  .row[data-cols="3"], .row[data-cols="2"] { --cols: 1fr !important; }
  .page > .row:has(> .kachel) { --cols: repeat(3, 1fr) !important; }
  .hero h1, .hero h2 { font-size: 50px; }
  .box.spalten-3 .box-body { column-count: 2; }
}
/* Handy */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .row { --cols: 1fr !important; gap: 25px; }
  .page > .row:has(> .kachel) { --cols: 1fr !important; }
  .kachel { padding-bottom: 10px; }
  .hero-inner { width: 90%; padding: 60px 0; }
  .hero h1, .hero h2 { font-size: 40px; }
  .box.spalten-2 .box-body, .box.spalten-3 .box-body { column-count: 1; }
  .kontakt-form .form-row { flex-direction: column; gap: 0; }
  .page-title { font-size: 26px; margin-top: 25px; }
}
