/* ── GENIUS Wohnbau eG – Stylesheet ────────────────────── */
/* Basierend auf TYPO3 sitepackage.css                      */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #2864AE;
  --color-primary-dark: #1a4a82;
  --color-green: #568c31;
  --color-orange: #f4971b;
  --color-red: #d3312f;
  --color-purple: #6d358c;
  --color-grey: #767575;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-light: #f5f5f5;
  --color-bg-blue: #2864AE;
  --color-border: #ddd;
  --font-body: "Open Sans", tahoma, arial, helvetica, sans-serif;
  --font-heading: "Open Sans", comfortaa, verdana, helvetica, tahoma;
  --max-width: 1200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media screen and (min-width: 30em) {
  body { font-size: 1.125rem; }
}

@media screen and (min-width: 48em) {
  body { font-size: 1.25rem; }
}

a {
  color: #f4971b;
  text-decoration: none;
}
a:hover {
  color: #d6820f;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Typography (TYPO3-exakt) ───────────────────────────── */

header, footer, nav, .card-title, .button {
  font-family: var(--font-heading);
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
}

h1, .h1 {
  font-weight: bold;
  font-size: 1.875rem;
  margin: 0 0 1.5rem 0;
}

h2, .h2 {
  font-weight: bold;
  font-size: 1.875rem;
  margin: 0 0 1.5rem 0;
}

h3, .h3 {
  font-weight: normal;
  font-size: 0.9375rem;
  letter-spacing: 0.3rem;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
}

p {
  margin-bottom: 1em;
}

ul.plain-list {
  list-style: none;
  padding: 0;
}
ul.plain-list li {
  padding: 0.2em 0;
}


/* ── Keyframe Animations (TYPO3-exakt) ──────────────────── */

@keyframes fadeInLogo {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes slideInLogo1 {
  0%   { left: 205px; opacity: 0; }
  100% { left: 105px; opacity: 1; }
}

@keyframes slideInLogo2 {
  0%   { left: 410px; opacity: 0; }
  100% { left: 215px; opacity: 1; }
}


/* ── Page Header (Homepage – 100vh) ─────────────────────── */

.page-header {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background-color: #f0f0f0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* Scroll-Indikator (Pfeil unten) */
.page-header a.scroller {
  transform: rotate(-45deg);
  transform-origin: bottom left;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  width: 50px;
  height: 50px;
  z-index: 99;
  opacity: 1;
  transition: all 0.7s linear;
  text-decoration: none;
}


/* ── Navigation (Homepage) ──────────────────────────────── */

.page-header nav {
  z-index: 25;
  position: fixed;
  width: 100%;
  background-color: transparent;
  transition: all 0.7s linear;
  padding: 2rem 2rem;
  box-shadow: none;
}

.page-header nav a#logo {
  display: inline-block;
  position: relative;
  text-decoration: none;
  transform: scale(0.7, 0.7);
  transition: transform 0.7s linear;
  transform-origin: top left;
}

@media screen and (min-width: 48em) {
  .page-header nav a#logo {
    transform: scale(1, 1);
  }
}

/* Nav Menu */
.page-header nav ul.menu,
.page-header nav ul.menu-pages {
  list-style: none;
  width: max-content;
  float: right;
  margin-top: 47px;
  opacity: 0;
  animation: fadeInLogo 1s linear forwards;
  animation-delay: 2s;
  display: flex;
  gap: 0;
}

.page-header nav ul.menu a,
.page-header nav ul.menu-pages a {
  color: #000000;
  padding: 0.25rem 1rem;
  font-size: 0.95rem;
  text-decoration: none;
}

.page-header nav ul.menu a:hover,
.page-header nav ul.menu a.active,
.page-header nav ul.menu-pages a:hover,
.page-header nav ul.menu-pages a.active {
  color: var(--color-primary);
  text-decoration: none;
}

.page-header nav ul.menu .nav-divider,
.page-header nav ul.menu-pages .nav-divider {
  color: #999;
  padding: 0.25rem 0.2rem;
  font-size: 0.95rem;
  list-style: none;
}

@media screen and (max-width: 47.99875em) {
  .page-header nav ul.menu,
  .page-header nav ul.menu-pages {
    display: none;
  }
}

/* Logo-Claim responsive auf kleinen Bildschirmen */
@media screen and (max-width: 47.99875em) {
  .page-header nav svg#logo-claim {
    width: 115vw;
  }
}


/* ── Sticky Nav (nach Scroll) ───────────────────────────── */

.page-header nav.sticky {
  padding: 0 1rem;
  background-color: #ffffff;
  box-shadow: rgba(30, 30, 30, 0.3) 0px 0px 30px;
}

.page-header nav.sticky a#logo {
  transform: scale(0.7, 0.7);
}

.page-header nav.sticky svg#logo-claim {
  position: absolute;
  top: 95px;
  left: 105px;
  width: 320px;
  padding: 0;
}

.page-header nav.sticky svg#logo-claim path.fill-blue {
  fill: #020203;
}

@media screen and (max-width: 47.99875em) {
  .page-header nav.sticky ul.menu,
  .page-header nav.sticky ul.menu-pages {
    display: flex;
    position: absolute;
    right: 0;
    top: 0.8rem;
    margin-top: 0;
    z-index: 999;
  }
}

/* Scroller verschwindet bei Sticky */
.page-header nav.sticky ~ a.scroller {
  opacity: 0;
}


/* ── SVG Logo Animationen (TYPO3-exakt) ─────────────────── */

svg#logo-claim {
  transition: all 0.7s linear;
  position: absolute;
  top: 40vh;
  left: 0px;
  width: 95vw;
  padding: 1rem 0;
  opacity: 0;
  animation: fadeInLogo 1s ease forwards;
  animation-delay: 2s;
}

svg#logo-claim path {
  transition: all 0.7s linear;
}

svg#logo-wohnbau {
  position: absolute;
  top: 57px;
  left: 215px;
  width: 213px;
  opacity: 0;
  animation: slideInLogo2 0.7s ease forwards;
  animation-delay: 1.3s;
}

svg#logo-enius {
  position: absolute;
  top: 57px;
  left: 105px;
  width: 110px;
  opacity: 0;
  animation: slideInLogo1 0.7s ease forwards;
  animation-delay: 1s;
}

svg#logo-g {
  width: 100px;
}

svg#logo-g path,
svg#logo-g circle {
  opacity: 0;
  animation: fadeInLogo 1.5s linear forwards;
}

svg#logo-g circle:nth-child(1) { animation-delay: 0.2s; }
svg#logo-g circle:nth-child(2) { animation-delay: 0.4s; }
svg#logo-g circle:nth-child(3) { animation-delay: 0.6s; }
svg#logo-g circle:nth-child(4) { animation-delay: 0.8s; }
svg#logo-g circle:nth-child(5) { animation-delay: 1.0s; }
svg#logo-g circle:nth-child(6) { animation-delay: 1.2s; }


/* ── Static Header (Unterseiten) ────────────────────────── */

.page-header-static {
  background: var(--color-bg);
}

.page-header-static nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8em 1em;
}

.page-header-static #logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0;
  text-decoration: none;
}

/* Unterseiten: Logo kompakt, inline – G links, Texte rechts gestapelt */
.page-header-static svg#logo-g {
  width: 60px;
  height: auto;
  flex-shrink: 0;
}
.page-header-static svg#logo-g path,
.page-header-static svg#logo-g circle {
  opacity: 1;
  animation: none;
}

/* Text-SVGs: rechts neben dem G, übereinander */
.page-header-static svg#logo-enius {
  position: absolute;
  top: 2px;
  left: 0;
  width: 70px;
  height: auto;
  opacity: 1;
  animation: none;
}
.page-header-static svg#logo-wohnbau {
  position: absolute;
  top: 2px;
  left: 72px;
  width: 140px;
  height: auto;
  opacity: 1;
  animation: none;
}

/* Wrapper for the text parts beside the G */
.page-header-static .logo-text-wrap {
  position: relative;
  width: 215px;
  height: 42px;
}

.page-header-static svg#logo-claim {
  position: absolute;
  top: 22px;
  left: 0;
  width: 215px;
  height: auto;
  display: block;
  opacity: 1;
  animation: none;
  padding: 0;
}
.page-header-static svg#logo-claim path {
  fill: #020203;
}

/* Unterseiten Headerbild */
.subpage-hero {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}
.subpage-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-header-static .menu-container {
  display: flex;
  flex-flow: column;
  justify-content: center;
}

.page-header-static nav ul.menu {
  list-style: none;
  display: flex;
  gap: 0;
  align-items: center;
}

.page-header-static nav ul.menu a {
  color: #000000;
  padding: 0.25rem 1rem;
  font-size: 0.95rem;
  text-decoration: none;
}

.page-header-static nav ul.menu a:hover,
.page-header-static nav ul.menu a.active {
  color: var(--color-primary);
  text-decoration: none;
}

@media screen and (min-width: 48em) {
  .page-header-static nav ul.menu {
    padding-right: 1.5rem;
  }
}

/* Mobile Menu-Positionierung */
@media screen and (max-width: 47.99875em) {
  .menu-pages {
    position: absolute;
    right: 0;
    top: 0.8rem;
    background-color: white;
    padding-bottom: 0.25rem;
  }
}


/* ── Layout ───────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1em;
}

.container-narrow {
  max-width: 800px;
}

.text-center {
  text-align: center;
}

.section {
  padding: 3em 0;
}

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


/* ── Grid ─────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 2em;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.grid-article {
  grid-template-columns: 2fr 1fr;
}
.grid-article-full {
  grid-template-columns: 1fr;
}
.article-video {
  margin: 3em 0 2em;
  text-align: center;
}
.article-video h3 {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--color-text, #333);
  margin-bottom: 1em;
}
.article-video video {
  width: 100%;
  max-width: 1200px;
  display: block;
  margin: 0 auto;
  background: #000;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-article {
    grid-template-columns: 1fr;
  }
}


/* ── Home: Welcome + Checkmarks (ein Block) ──────────── */

.section-welcome {
  background: var(--color-bg-blue);
  color: #fff;
  padding: 2em 0 3em;
}

/* Willkommen-Überschrift mit dekorativen Linien */
.welcome-title {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.welcome-title::before,
.welcome-title::after {
  content: '';
  flex: 1;
  max-width: 40%;
  height: 2px;
  background: #fff;
}

.intro {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  color: #fff;
}

.section-welcome a {
  color: #fff;
  text-decoration: underline;
}

/* Checkmarks als vertikale Liste */
.checkmarks-list {
  max-width: 900px;
  margin: 2em auto 0;
}

.checkmark-item {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  padding: 0.8em 0;
}

.checkmark-item .icon-wrap {
  flex-shrink: 0;
  font-size: 1.2em;
  width: 2em;
  height: 2em;
  line-height: 2em;
}

.checkmark-item .fa-circle {
  color: rgba(0, 0, 0, 0.6);
}

.checkmark-item .fa-check {
  color: #fff;
}

.checkmark-item p {
  font-size: 1rem;
  color: #fff;
  line-height: 1.6;
  margin: 0;
}


/* ── Home: Die Idee ───────────────────────────────────── */

.section-idee {
  background: var(--color-bg-blue);
  color: #fff;
  padding: 2em 0 3em;
}

.section-idee h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  white-space: nowrap;
}

.section-idee h2::before,
.section-idee h2::after {
  content: '';
  flex: 1;
  max-width: 40%;
  height: 2px;
  background: #fff;
}

.section-idee a {
  color: #fff;
  text-decoration: underline;
}

.section-idee .col p {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Zwischenbild between Willkommen and Idee */
.section-zwischenbild {
  padding: 0;
  line-height: 0;
}

.section-zwischenbild img {
  width: 100%;
  height: auto;
  display: block;
}

/* Remove border-top around blue / image sections */
.section-welcome + .section-zwischenbild,
.section-zwischenbild + .section-idee,
.section-welcome + .section-idee {
  border-top: none;
}


/* ── Home: Genossenschaft ─────────────────────────────── */

.section-genossenschaft {
  background-image: url('../images/genossenschaft.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 3rem 1rem;
}

.section-genossenschaft h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-shadow: #000 0 0 10px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  white-space: nowrap;
}

.section-genossenschaft h2::before,
.section-genossenschaft h2::after {
  content: '';
  flex: 1;
  max-width: 40%;
  height: 2px;
  background: #fff;
}

.section-genossenschaft .geno-inner {
  background-color: #fff;
  padding: 2.5rem 2.5rem 2rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
}

.section-genossenschaft .geno-inner .intro {
  font-size: 1.1rem;
  max-width: none;
  margin-bottom: 2rem;
}

.section-genossenschaft .geno-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .section-genossenschaft .geno-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .section-genossenschaft .geno-grid {
    grid-template-columns: 1fr;
  }
  .section-genossenschaft {
    background-attachment: scroll;
  }
}

.section-genossenschaft .geno-grid h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0;
  margin-bottom: 0.5em;
}

.section-genossenschaft .geno-grid p,
.section-genossenschaft .geno-grid li {
  font-size: 1.1rem;
  line-height: 1.6;
}

.section-genossenschaft .geno-grid a {
  color: var(--color-primary);
}

.section-genossenschaft .register {
  font-size: 0.85rem;
  color: #777;
  margin-top: 2rem;
}

/* Remove border-top before genossenschaft */
.section-idee + .section-genossenschaft {
  border-top: none;
}


/* ── Home: Mitglieder ─────────────────────────────────── */

.section-mitglieder {
  background: #fff;
}

.section-mitglieder h2 {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  white-space: nowrap;
}

.section-mitglieder h2::before,
.section-mitglieder h2::after {
  content: '';
  flex: 1;
  max-width: 40%;
  height: 2px;
  background: var(--color-primary);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2em 1em;
  margin-top: 2em;
}

@media (max-width: 1024px) {
  .member-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .member-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 100px;
  text-decoration: none;
}

.member-item:hover {
  text-decoration: none;
}

.member-item img {
  max-height: 80px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.member-name {
  font-size: 0.85rem;
  text-align: center;
  color: var(--color-text);
}


/* ── Article / Project List ───────────────────────────── */

.article-list,
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  margin-top: 1.5em;
}

.article-card a,
.project-card a {
  display: flex;
  gap: 1.5em;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  padding: 1em;
  border-radius: 4px;
  transition: background 0.15s;
}

.article-card a:hover,
.project-card a:hover {
  background: var(--color-bg-light);
}

.article-card-image,
.project-card-image {
  flex-shrink: 0;
  width: 400px;
  height: 280px;
  overflow: hidden;
  border-radius: 4px;
  border: 3px solid var(--color-primary);
}

/* Placeholder wenn kein Bild vorhanden */
.card-placeholder-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-light, #f5f5f5);
}
.card-placeholder-logo svg {
  width: 80px;
  height: auto;
  opacity: 0.5;
}

.article-card-image img,
.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-body h3,
.project-card-body h3 {
  margin-bottom: 0.3em;
  color: var(--color-primary);
  text-transform: none;
  letter-spacing: normal;
  font-weight: bold;
  font-size: 1.1rem;
}
.btn-more {
  display: inline-block;
  margin-top: 0.8em;
  padding: 0.5em 1.5em;
  background: #f4971b;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
}
.article-card a:hover .btn-more {
  background: #d6820f;
}

.article-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5em;
}

@media (max-width: 600px) {
  .article-card a,
  .project-card a {
    flex-direction: column;
  }
  .article-card-image {
    width: 100%;
    height: 220px;
  }
  .project-card-image {
    width: 100%;
    height: 220px;
  }
}


/* ── Subpage Headings & Text (Unterseiten) ───────────── */

body:not([data-tmpl="start"]) .page-body > .section > .container > h2 {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  white-space: nowrap;
}

body:not([data-tmpl="start"]) .page-body > .section > .container > h2::before,
body:not([data-tmpl="start"]) .page-body > .section > .container > h2::after {
  content: '';
  flex: 1;
  max-width: 40%;
  height: 2px;
  background: var(--color-primary);
}

.page-body .section p,
.page-body .section li {
  font-size: 1.1rem;
  line-height: 1.6;
}


/* ── Article Detail ───────────────────────────────────── */

.article-detail {
  margin-top: 1.5em;
}

.article-text {
  margin-top: 1em;
}

.article-text a {
  text-decoration: underline;
}

.article-image {
  margin-bottom: 1em;
}

.article-image img {
  border-radius: 4px;
  width: 100%;
}

.article-nav {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--color-border);
}

.article-nav a {
  font-size: 0.9rem;
}

.article-nav-back {
  background: var(--color-primary);
  color: #fff !important;
  padding: 0.5em 1.5em;
  border-radius: 4px;
}
.article-nav-back:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}


/* ── Text Content (Impressum, Datenschutz) ────────────── */

.text-content h2 {
  margin-top: 1.5em;
  font-size: 1.3rem;
}
.text-content h3 {
  margin-top: 1.2em;
  font-size: 1.1rem;
  text-transform: none;
  letter-spacing: normal;
}


/* ── Footer ───────────────────────────────────────────── */

.site-footer {
  background: #2864ae;
  color: #fff;
  padding: 2.5em 0;
  font-size: 1rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1em;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 2em;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}
.site-footer a:hover {
  color: #f4971b;
  text-decoration: underline;
}

.site-footer strong {
  color: #fff;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8em 0;
}

.footer-menu li {
  padding: 0.15em 0;
}

.footer-submenu {
  padding: 0 !important;
  list-style: none;
}

.footer-submenu ul {
  list-style: none;
  padding: 0 0 0 0.8em;
  margin: 0;
  border-left: 2px solid rgba(255,255,255,0.5);
  margin-left: 0.2em;
}

.footer-submenu ul li {
  padding: 0.15em 0;
  list-style: none;
}

.footer-partner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.footer-partner img {
  max-width: 200px;
  opacity: 0.8;
}

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

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


/* ── Scroll-to-top Button ────────────────────────────── */

.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: rgba(0,0,0,0.6);
  color: #fff;
}

/* ── Projekte Teaser (Home) ───────────────────────────── */

.section-projekte-teaser {
  background: var(--color-bg-light);
}


/* ── Back-to-Top Button ───────────────────────────────── */

.totop {
  width: 40px;
  height: 40px;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 50;
}

.totop.visible {
  opacity: 1;
}

.totop:hover {
  background: var(--color-primary-dark);
}


/* ── Fade-in on Scroll Animation ─────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }


/* ═══════════════════════════════════════════════════════
   Home: Layout-System (Kirby layout field)
   Abschnitte = Zeilen im Panel; Hintergrund, Breite und
   Abstand werden pro Zeile eingestellt.
   ═══════════════════════════════════════════════════════ */

.layout-section {
  padding: 3em 0;
}
.layout-section.padding-small { padding: 1.5em 0; }
.layout-section.padding-none  { padding: 0; line-height: 0; }
.layout-section.padding-none .layout-row { line-height: 1.6; }

/* Breite */
.layout-section .layout-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1em;
}
.layout-section.width-wide .layout-inner { max-width: none; padding: 0 1rem; }
.layout-section.width-full .layout-inner { max-width: none; padding: 0; }

/* Trennlinien nur zwischen zwei weißen Abschnitten */
.layout-section + .layout-section { border-top: none; }
.layout-section.bg-white + .layout-section.bg-white { border-top: 1px solid var(--color-border); }

/* Hintergründe */
.layout-section.bg-white { background: var(--color-bg); color: var(--color-text); }
.layout-section.bg-light { background: var(--color-bg-light); color: var(--color-text); }
.layout-section.bg-blue  { background: var(--color-bg-blue); color: #fff; padding: 2em 0 3em; }
.layout-section.bg-blue.padding-small { padding: 1.5em 0; }
.layout-section.bg-blue.padding-none  { padding: 0; }
.layout-section.bg-image {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  padding: 3rem 0;
}
@media (max-width: 480px) {
  .layout-section.bg-image { background-attachment: scroll; }
}

.layout-section.bg-blue a,
.layout-section.bg-image a { color: #fff; text-decoration: underline; }

/* Zeilen & Spalten (12er-Raster) */
.layout-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2em;
}
.layout-row + .layout-row { margin-top: 2rem; }
.layout-col { grid-column: span var(--span, 12); min-width: 0; }
@media (max-width: 768px) {
  .layout-col { grid-column: span 12; }
}

/* Weißer Kasten (z. B. Genossenschaft auf Hintergrundbild) */
.layout-box {
  background-color: #fff;
  color: #333;
  padding: 2.5rem 2.5rem 2rem;
  margin-top: 1rem;
}
.layout-section .layout-box a,
.layout-section.bg-blue .layout-box a,
.layout-section.bg-image .layout-box a { color: var(--color-primary); text-decoration: none; }
.layout-section .layout-box a:hover { text-decoration: underline; }
.layout-box + .layout-row { margin-top: 2rem; }
@media (max-width: 600px) {
  .layout-box { padding: 1.5rem 1.25rem; }
}

/* ── Block: Überschrift ─────────────────────────────── */
.block-heading {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
}
h3.block-heading { font-size: 1.4rem; }
.block-heading.align-center { text-align: center; }
.block-heading.has-lines {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
}
.block-heading.has-lines.align-center { justify-content: center; }
.block-heading.has-lines::before,
.block-heading.has-lines::after {
  content: '';
  flex: 1;
  max-width: 40%;
  height: 2px;
  background: currentColor;
}
.block-heading.has-lines.align-left::before { display: none; }
.bg-blue .block-heading,
.bg-image .block-heading { color: #fff; }
.bg-image .block-heading { text-shadow: #000 0 0 10px; }
.layout-box .block-heading { color: var(--color-primary); text-shadow: none; }
@media (max-width: 600px) {
  .block-heading { font-size: 1.5rem; white-space: normal; }
}

/* ── Block: Text ────────────────────────────────────── */
.block-text p,
.block-text li {
  font-size: 1.1rem;
  line-height: 1.6;
}
.block-text.size-small p { font-size: 0.85rem; color: #777; }
.bg-blue .block-text.size-small p,
.bg-image .block-text.size-small p { color: rgba(255,255,255,0.75); }
.layout-box .block-text.size-small p { color: #777; }
.block-text.align-center {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.block-text ul, .block-text ol { padding-left: 1.4em; margin-bottom: 1em; }
.block-text > :last-child { margin-bottom: 0; }

.block-subhead {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5em;
  color: inherit;
}
.layout-box .block-subhead { color: #333; }

/* ── Block: Bild ────────────────────────────────────── */
.block-image { margin: 0; }
.block-image img { width: 100%; height: auto; display: block; }
.block-image figcaption {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.5em;
  line-height: 1.5;
}
.width-full .block-image img { border-radius: 0; }

/* ── Block: Merkmale ────────────────────────────────── */
.layout-section .checkmarks-list { max-width: 900px; margin: 2em auto 0; }
.layout-col > .checkmarks-list:first-child { margin-top: 0; }
.bg-white .checkmark-item .fa-circle,
.bg-light .checkmark-item .fa-circle { color: var(--color-primary); }
.bg-white .checkmark-item p,
.bg-light .checkmark-item p { color: var(--color-text); }

/* ── Block: Mitglieder ──────────────────────────────── */
.layout-col > .member-grid:first-child { margin-top: 0; }

/* ── Block: Button ──────────────────────────────────── */
.block-button { margin: 1em 0 0; }
.block-button.align-center { text-align: center; }
.btn {
  display: inline-block;
  padding: 0.6em 1.6em;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}
.btn-orange { background: var(--color-orange); color: #fff !important; }
.btn-orange:hover { background: #d6820f; }
.btn-blue { background: var(--color-primary); color: #fff !important; }
.btn-blue:hover { background: var(--color-primary-dark); }
.btn-white { background: #fff; color: var(--color-primary) !important; }
.btn-white:hover { background: #e8eef6; }

/* Abstand zwischen gestapelten Blöcken in einer Spalte */
.layout-col > * + * { margin-top: 1.25em; }
.layout-col > .block-heading + * { margin-top: 0; }
