/* Reitter Modern: optische Schicht über Hydro/Antimatter, ohne Inhaltsänderungen. */
:root {
  --rw-ink: #231f20;
  --rw-deep: #273991;
  --rw-accent: #273991;
  --rw-red: #c41131;
  --rw-soft: #eef1f9;
  --rw-paper: #f7f8fb;
  --rw-line: #dee3f0;
}

html { scroll-behavior: smooth; }
html, body, button, input, select, textarea,
.pure-g, .pure-g [class*="pure-u"] {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { color: var(--rw-ink); background: var(--rw-paper); line-height: 1.7; }
#body { background: var(--rw-paper); padding: 7.4rem clamp(1.25rem, 5vw, 5rem) 5rem; }
#body a:not(.button) { color: var(--rw-accent); text-underline-offset: .22em; }
#body a:not(.button):hover { color: var(--rw-red); }
#body img { max-width: 100%; height: auto; }
#body :target { scroll-margin-top: 7rem; }
:focus-visible { outline: 3px solid var(--rw-accent); outline-offset: 3px; }

h1, h2, h3, h4, h5, h6 { font-family: inherit; color: var(--rw-deep); letter-spacing: -.025em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -.045em; line-height: 1.13; }
h2 { font-size: clamp(1.8rem, 3.3vw, 2.7rem); line-height: 1.2; margin: 0 0 1.6rem; }
h3 { line-height: 1.3; }
/* Antimatter zieht eine h2 direkt unter einer h1 mit -2rem nach oben.
   Für die neue Ökologie-Seite braucht diese Titelkombination Abstand. */
body:not(.modular) #body > h1 { margin: 0 0 .65rem; }
body:not(.modular) #body > h1 + h2 {
  margin: 0 0 2.25rem;
  font-family: inherit;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.02em;
  text-align: center;
}
p, li { line-height: 1.75; }

/* Das Logo und die Navigation bleiben in den bestehenden Hydro-Templates. */
#header, #header.scrolled {
  height: 6.6rem;
  padding: .7rem clamp(1.25rem, 5vw, 5rem);
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: 0 1px 0 var(--rw-line), 0 12px 30px rgba(39, 57, 145, .06) !important;
  backdrop-filter: blur(10px);
}
#header #logo { max-width: 38%; }
#header .brand-home-link { display: inline-flex; align-items: center; height: 100%; text-decoration: none; }
#header #logoimg { display: block; position: static; height: auto; max-height: 4.8rem; max-width: min(100%, 20rem); width: auto; }
#header #logo.logotext { display: none; }
#header #navbar { line-height: 1.4; }
#header #navbar ul.navigation { margin-top: .5rem !important; }
#header #navbar ul.navigation li a,
#header.scrolled #navbar a { color: var(--rw-deep) !important; font-family: inherit; font-size: .88rem; font-weight: 650; letter-spacing: .045em; text-decoration: none; }
#header #navbar ul.navigation li a:hover,
#header.scrolled #navbar a:hover { color: var(--rw-red) !important; }
#header #navbar ul.navigation li a:before,
#header #navbar ul.navigation li a:after,
#header.scrolled #navbar a:before,
#header.scrolled #navbar a:after { background: var(--rw-accent) !important; }
#header #navbar ul.navigation li.active > a:after { background: var(--rw-red) !important; }
#header #navbar .panel-activation { color: var(--rw-deep) !important; }
#panel { padding: 1.5rem; }
.sb-slidebar { background: var(--rw-deep) !important; }
#panel .navigation li { border-color: rgba(255,255,255,.15); }
#panel .navigation li a { color: #fff; }
#panel .navigation li.active > a { color: var(--rw-deep); background: var(--rw-soft); }

/* Bilder werden als eigenständige große Flächen behandelt. */
.modular .showcase {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 75rem;
  height: clamp(13rem, 20vw, 19rem);
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 38px rgba(39, 57, 145, .12);
}
.modular .showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
}
.modular .showcase.flush-top br { display: none; }
.modular .showcase > div[style] { top: 0 !important; max-width: 52rem; }
.modular .showcase h1, .modular .showcase h2 { color: #fff; }
.modular .showcase .button, #body .button {
  display: inline-block;
  padding: .85rem 1.45rem;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .96);
  color: var(--rw-deep);
  font-size: clamp(1rem, 1.8vw, 1.3rem) !important;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(39, 57, 145, .14);
  transition: transform .18s ease, background .18s ease;
}
.modular .showcase .button:hover, #body .button:hover { background: #fff; color: var(--rw-red); transform: translateY(-2px); }

.modular .callout, .modular .features {
  display: block;
  width: 100%;
  max-width: 75rem;
  margin: 0 auto 1.25rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid var(--rw-line);
  border-radius: 1.25rem;
  box-sizing: border-box;
  background: #fff;
  text-align: left;
}
.modular .callout::after { content: ""; display: table; clear: both; }
.modular .callout p, .modular .features > p { max-width: 68ch; }
.modular .callout img { border-radius: .8rem; box-shadow: 0 14px 28px rgba(39,57,145,.1); }
/* In den bestehenden Seiten steht das Bild in einem eigenen Absatz. Ein Float
   lässt daneben nur eine schmale Restspalte und zerreißt den ersten Satz. */
.modular .callout img.align-left,
.modular .callout img.align-right {
  float: none !important;
  display: block;
  width: 100%;
  max-width: 42rem;
  height: auto;
  margin: 0 0 1.75rem;
}
/* Nur bestehende Bild/Text-Abschnitte zweispaltig; reine Textblöcke bleiben wie bisher. */
@media (min-width: 48.01rem) {
  .modular .callout:has(> p:first-of-type > img) {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
  }
  .modular .callout:has(> p:first-of-type > img) > h2 { grid-column: 1 / -1; }
  .modular .callout:has(> p:first-of-type > img) > p:first-of-type {
    grid-column: 1;
    grid-row: 2 / span 3;
    max-width: none;
    margin: 0;
  }
  .modular .callout:has(> p:first-of-type > img) > p:not(:first-of-type) {
    grid-column: 2;
    max-width: none;
    margin: 0 0 1.2rem;
  }
  .modular .callout:has(> p:first-of-type > img) > p:first-of-type img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 0;
  }
}
.modular .features { background: var(--rw-soft); }
.modular .features h2 { line-height: 1.2; }
.modular .features .feature-items,
.modular .features.big .feature-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
  justify-items: stretch;
}
.modular .features.big .feature-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modular .features .feature, .modular .features.big .feature {
  float: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--rw-line);
  border-radius: .85rem;
  box-sizing: border-box;
  background: #fff;
  text-align: left;
}
.modular .features .feature i.fa,
.modular .features.big .feature i.fa { float: none; display: block; margin: 0 0 1rem; font-size: 1.5rem; color: var(--rw-accent); }
.modular .features .feature-content.icon-offset,
.modular .features.big .feature-content.icon-offset { margin-left: 0; padding-right: 0; }
.modular .features .feature h4,
.modular .features.big .feature-content h4 { margin: 0 0 .35rem; color: var(--rw-deep); font-size: 1.08rem; line-height: 1.35; text-align: left; }
.modular .features.big .feature-content p { text-align: left; }
.modular .modular-row:last-child { margin-bottom: 1.25rem; }

/* Flex verhindert das Kollabieren des oberen Kartenabstands und hält
   den Footer auch auf kurzen Seiten am unteren Fensterrand. */
body:not(.modular) #sb-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Standardseiten und vorhandene Blog-Templates bleiben lesbar. */
body:not(.modular) #body {
  flex: 1 0 auto;
  width: calc(100% - 2.5rem);
  max-width: 72rem;
  min-height: 60vh;
  margin: 7.4rem auto 3rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  box-sizing: border-box;
  border: 1px solid var(--rw-line);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 14px 32px rgba(39, 57, 145, .06);
}
#footer { padding: 1.5rem clamp(1.25rem, 5vw, 5rem); background: var(--rw-deep); color: #fff; }
/* Antimatter positioniert den Footer absolut. Auf längeren Standardseiten würde
   er dadurch die unteren Ecken der Inhaltskarte überdecken. */
body:not(.modular) #footer { position: relative; flex-shrink: 0; }

#footer .totop span { background: var(--rw-accent); border-radius: .5rem; }

@media (max-width: 60rem) {
  #header, #header.scrolled { height: 5.7rem; }
  /* Antimatter verschiebt das Icon per translateY(-50%). Zusammen mit dem
     alten top: 0 war es dadurch oben abgeschnitten. */
  #header #navbar .panel-activation {
    top: .55rem !important;
    transform: none !important;
    padding: .75rem 1rem;
    line-height: 1;
  }
  #header #logo { max-width: 72%; }
  #header #logoimg { max-height: 4.2rem; }
  #body { padding-top: 6.5rem; }
  .modular .features .feature-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 48rem) {
  #body { padding: 6.5rem 1.1rem 3rem; }
  body:not(.modular) #body { width: calc(100% - 2rem); margin-top: 6.5rem; padding: 2rem 1.35rem; border-radius: .8rem; }

  #header, #header.scrolled { padding: .65rem 1.1rem; }
  #header #logoimg { max-width: min(100%, 15rem); }
  .modular .showcase { height: 12rem; min-height: 0; padding: 0; border-radius: .8rem; }
  .modular .callout, .modular .features { padding: 2rem 1.35rem; border-radius: .8rem; }

  .modular .features .feature-items,
  .modular .features.big .feature-items { grid-template-columns: 1fr; }
  .modular .features .feature, .modular .features.big .feature { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
