/* Ewa Blauth Photography – Theme 2026 (Contao 5.7)
   Farben angelehnt an die bisherige Seite: heller Grund, dunkelgraue Kopfzeile,
   weißes Menü, rote Akzente. Schrift: Source Sans Pro (SIL OFL), lokal gehostet. */

@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-sans-pro-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-sans-pro-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-sans-pro-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #fcfcfc;
  --surface: #f5f5f5;
  --surface-2: #f2f2f2;
  --line: #e4e4e4;
  --text: #5e5e5e;
  --heading: #2d2d2d;
  --header: #505050;
  --header-line: #444;
  --nav: #ffffff;
  --accent: #e3000f;
  --accent-hover: #b8000c;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 400;
  color: var(--heading);
  letter-spacing: .01em;
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(26px, 3.4vw, 38px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 21px; }
strong, b { color: var(--heading); font-weight: 600; }

/* ---------- Rahmen ---------- */
#wrapper { min-height: 100vh; display: flex; flex-direction: column; }
#container { flex: 1; }
#header > .inside, #main > .inside, #footer > .inside {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Kopfzeile ---------- */
#header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  border-bottom: 1px solid var(--header-line);
}
#header > .inside {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.brand {
  font-size: 24px; font-weight: 600; color: #fff;
  letter-spacing: .01em; white-space: nowrap;
}
.brand span { color: var(--accent); font-weight: 400; margin-left: .2em; }
.brand:hover { text-decoration: none; color: #fff; }

/* Hauptmenü */
.mod_navigation ul { list-style: none; margin: 0; padding: 0; }
.mod_navigation .invisible { position: absolute; left: -9999px; }
.mod_navigation .level_1 { display: flex; gap: 2px; }
.mod_navigation li { position: relative; }
.mod_navigation a, .mod_navigation strong {
  display: block; padding: 9px 13px; color: var(--nav);
  font-size: 14px; letter-spacing: .06em; text-transform: uppercase; font-weight: 400;
}
.mod_navigation .level_1 > li > strong.active,
.mod_navigation .level_1 > li > a.trail { background: var(--accent); color: #fff; }
.mod_navigation a:hover { text-decoration: none; background: rgba(255,255,255,.1); color: #fff; }

/* Untermenüs (Desktop) */
.mod_navigation .level_2, .mod_navigation .level_3, .mod_navigation .level_4 {
  position: absolute; min-width: 260px; padding: 6px 0;
  background: var(--header); border-top: 3px solid var(--accent);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.mod_navigation .level_2 { top: 100%; left: 0; }
.mod_navigation .level_3, .mod_navigation .level_4 { top: -9px; left: 100%; }
.mod_navigation li:hover > ul, .mod_navigation li:focus-within > ul {
  opacity: 1; visibility: visible; transform: none;
}
.mod_navigation .level_2 a, .mod_navigation .level_2 strong {
  text-transform: none; letter-spacing: .01em; font-size: 15px; padding: 7px 18px;
}
.mod_navigation .level_2 strong.active, .mod_navigation .level_2 a.trail { color: #fff; background: rgba(255,255,255,.12); }
.mod_navigation .level_2 li.submenu > a::after,
.mod_navigation .level_2 li.submenu > strong::after { content: " ›"; opacity: .7; }

.nav-toggle {
  display: none; background: var(--accent); border: 0; color: #fff;
  padding: 8px 14px; font: inherit; font-size: 14px; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer;
}
.nav-toggle::before { content: "≡ "; }

/* ---------- Slider (RockSolid Slider, falls installiert) ---------- */
.mod_rocksolid_slider, .content-rocksolid-slider { margin: 0 0 8px; }
.home .mod_article:first-child:has(.mod_rocksolid_slider) { margin-bottom: 32px; }

/* ---------- Inhalt ---------- */
#main > .inside { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 72px; }
.mod_article { margin-bottom: 48px; }
.mod_article:last-child { margin-bottom: 0; }
.rte p, .content-text p, .ce_text p { max-width: 75ch; }
.content-text, .ce_text { margin-bottom: 28px; }
.content-text figure, .ce_text figure { margin: 0 0 16px; }

/* Rubrik-Kacheln der Startseite (alte Klasse "featurebox") */
.mod_article:has(> .featurebox) {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.featurebox {
  margin: 0; padding: 18px 18px 20px; text-align: center;
  background: var(--surface);
  transition: box-shadow .2s;
}
.featurebox:hover { box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.featurebox figure, .featurebox .image_container { margin: 0 0 14px; aspect-ratio: 1 / 1; overflow: hidden; }
.featurebox img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.featurebox:hover img { transform: scale(1.04); }
.featurebox h1, .featurebox h2, .featurebox h3, .featurebox h4 { font-size: 20px; margin: 0 0 8px; }
.featurebox p { margin: 0; max-width: none; }
.featurebox a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.featurebox a:hover { color: var(--accent); }

/* Galerien */
.content-gallery ul, .ce_gallery ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.content-gallery li, .ce_gallery li { margin: 0; }
.content-gallery figure, .ce_gallery figure { margin: 0; }
.content-gallery a, .ce_gallery a { display: block; overflow: hidden; background: var(--surface); }
.content-gallery img, .ce_gallery img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .5s, opacity .3s;
}
.content-gallery a:hover img, .ce_gallery a:hover img { transform: scale(1.03); opacity: .92; }
.content-gallery figcaption, .ce_gallery figcaption { font-size: 13px; padding: 6px 2px 0; }
.content-gallery, .ce_gallery { margin-bottom: 40px; }
.content-headline, .ce_headline { margin-bottom: 24px; }

/* Nur für Screenreader sichtbar (Contao-Klasse) */
.invisible {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Formulare (Kontakt) ---------- */
.mod_form, .content-form, .ce_form { max-width: 640px; margin-top: 40px; }
.widget-checkbox legend { padding: 0; }
.widget-altcha altcha-widget { display: block; max-width: 320px; }
.widget { margin: 0 0 18px; }
.widget > label, .widget legend { display: block; margin: 0 0 6px; color: var(--heading); font-weight: 600; }
.widget span.mandatory { color: var(--accent); margin-left: 2px; }
.widget input[type=text], .widget input[type=email], .widget input[type=tel], .widget textarea {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--heading);
  background: #fff; border: 1px solid #cfcfcf; border-radius: 2px;
}
.widget textarea { min-height: 170px; resize: vertical; }
.widget input:focus, .widget textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.widget-checkbox fieldset { border: 0; padding: 0; margin: 0; }
.widget-checkbox fieldset > span { display: flex; gap: 10px; align-items: flex-start; }
.widget-checkbox input { margin-top: 5px; flex: none; }
.widget-checkbox label { font-weight: 400; color: var(--text); }
.widget p.error, .widget .error { color: var(--accent); font-size: 15px; margin: 4px 0 0; }
.widget-explanation { font-size: 15px; }
button.submit, .widget-submit button {
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  padding: 12px 26px; font: inherit; font-weight: 600; letter-spacing: .04em;
}
button.submit:hover, .widget-submit button:hover { background: var(--accent-hover); }

/* ---------- Fußzeile ---------- */
#footer { background: var(--surface-2); border-top: 1px solid var(--line); font-size: 14px; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 24px 0;
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-inner a { color: var(--text); }
.footer-inner a:hover { color: var(--accent); }

/* ---------- Lightbox (ewa.js) ---------- */
.lb {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: rgba(20, 20, 20, .95);
}
.lb.open { display: flex; }
.lb img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #bbb; font-size: 14px; padding: 0 60px; }
.lb button {
  position: absolute; background: none; border: 0; color: #fff;
  font-size: 34px; line-height: 1; padding: 16px; cursor: pointer; opacity: .75;
}
.lb button:hover, .lb button:focus-visible { opacity: 1; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  #header .mod_navigation {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--header); border-top: 3px solid var(--accent);
    max-height: calc(100vh - 68px); overflow-y: auto; display: none;
  }
  #header.nav-open .mod_navigation { display: block; }
  .mod_navigation .level_1 { display: block; padding: 6px 0; }
  .mod_navigation .level_2, .mod_navigation .level_3, .mod_navigation .level_4 {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: none; padding: 0 0 0 16px; min-width: 0;
  }
  .mod_navigation a, .mod_navigation strong { padding: 9px var(--gutter); }
  .mod_navigation .level_2 li.submenu > a::after { content: ""; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
