@charset "UTF-8";
/* ============================================================
   LVEB NRW | style-20261105-05.css | Stand: 05.11.2026
   VOLLSTAENDIGES Stylesheet. Ersetzt die komplette Fassung 04.
   Keine weitere Feinschliff-Datei zusaetzlich laden.

   05: Nur Startseitenraster korrigiert: Container-Seitenraender
       bleiben auch bei .container.block-startgrid erhalten.
       Partner-Raster und alle anderen Gestaltungsregeln unveraendert.

   Aus 04: Abstand zum Footer, interner Seitenanfang, echte Linkbuttons,
       buendige Textspalten, gemeinsame Lesebreite.
       Optionale .home-intro-Klassen fuer einen neuen Startseitentext.
   Beibehalten: rote Terminvorschau, H2-Groessen, Navigation,
       Bilder, Personen-/Hinweiskarten sowie CMS-Funktionen.

   Im oeffentlichen UND internen Header auf diese Datei verweisen.
   ============================================================ */

:root {
  /* =========================
     PRIMITIVE TOKENS (Rohwerte)
     ========================= */
  --color-blue-500: #0055aa;
  --color-gray-100: #f5f7fa;
  --color-gray-900: #222222;
  --color-white: #ffffff;
  --radius-small: 4px;
  --radius-medium: 8px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --font-base: "Helvetica Neue", system-ui, sans-serif;
  --font-heading: "Helvetica Neue", sans-serif;
}

/* =========================
   SEMANTIC TOKENS (Bedeutung)
   ========================= */
:root {
  --color-primary: var(--color-blue-500);
  --color-background: var(--color-white);
  --color-text: var(--color-gray-900);
  --color-on-background: var(--color-white);

  --border-radius-default: var(--radius-medium);
  --spacing-default: var(--spacing-md);
  --font-body: var(--font-base);
  --font-title: var(--font-heading);
}

/* =========================
   COMPONENT TOKENS (lokal/komponentenspezifisch)
   ========================= */
.card {
  --card-bg: var(--color-on-background);
  --card-radius: var(--border-radius-default);
  --card-padding: var(--spacing-sm);
}

.button {
  --button-bg: var(--color-primary);
  --button-color: var(--color-on-background);
  --button-padding: var(--spacing-sm) var(--spacing-md);
  --button-radius: var(--border-radius-small);
}

/* =========================
   DARK MODE
   ========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: var(--color-gray-900);
    --color-text: var(--color-gray-100);
    --color-on-background: var(--color-gray-900);
  }
}

/* RESET & CONTAINER */
* { box-sizing:border-box; margin:0; padding:0; }
body { 
  font-family:var(--font-base);
  line-height:1.5; 
  background:var(--color-background); 
  color:#333;   
  background-image: url('/img/logo-back.png');
  background-repeat: no-repeat;
  background-attachment:fixed;
  background-size: 30rem;
   background-color: rgba(255, 255, 255, 0.8);
  background-blend-mode: lighten;
  background-position: left top; 
}
.container { max-width:1100px; margin:0 auto; padding:0 1rem; }

/* Skip Link */
.skip-link { position:absolute; left:-999px; }
.skip-link:focus { left:1rem; top:1rem; background:#000; color:#fff; padding:0.5rem; z-index:999; }

/* Header Top */
.header-top { display:flex; justify-content:space-between; align-items:flex-start; padding:2rem 1rem 1rem 1rem; }
.logo-text { display:flex; align-items:center; gap:1rem; max-height:120px; }
.logo { display:block; width:85px; height:auto;max-height:100%; margin-left:-93px; border: 3px solid #fff}
.logo-link {
  display: inline-block;
}
.org-name { font-size:0.85rem; line-height:1.2; }

/* Top Links Desktop rechts */
.nav-top ul { display:flex; list-style:none; gap:0.35rem; }
.nav-top a { text-decoration:underline; color:#1d5fa7; font-size:1rem; white-space:nowrap; padding:0.55rem 0.65rem; }
.nav-top a:hover, .nav-top a:focus { text-decoration:none; background:#6fa9e9; color:#fff; }
.nav-top li a.first-menu-item { text-decoration:none;background:#009036; color:#fff; }
.nav-top li a.first-menu-item:hover, .nav-main li a.first-menu-item:focus { background:#1faa53; color:#fff; }
.nav-top li a:hover:not(.first-menu-item), .nav-main li a:focus:not(.first-menu-item) { background:#5a93d2; color:#fff; border-radius:0; }

/* Hamburger */
.nav-toggle { margin-top:0.7rem; margin-right:-0.55rem;display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:0.5rem; }
.nav-toggle span { width:25px; height:2px; background:#000; display:block; }

/* HauptmenÃ¼ Desktop */
.nav-main-wrapper { margin-top:1rem; }
.nav-main ul { display:flex; list-style:none; margin-top:0.5rem; max-width:400px; }
.nav-main li a { display:flex; align-items:center; padding:0.85rem 1rem; text-decoration:none; color:#1d5fa7; font-weight:600; font-size:1.1rem; white-space:nowrap; }
.nav-main li a:hover, .nav-main li a:focus { background:#5a93d2; color:#fff; }
.nav-main a.active {
   background:#1d5fa7; color:#fff;
}

.block-fullwidth {
  width: 100%;
  background-color: #f5f8fb; /* hellblau, Beispiel */
  padding: 2rem 0; /* oben/unten Abstand */
}


.breadcrumbs ul {
  list-style: none;
  display: flex;
  gap: 0rem; /* Abstand zwischen Links */
  padding: 0.75rem 0;
  margin: 0;
}

.breadcrumbs li::after {
  content: ">";
  margin: 0 0.5rem;
  color:#8ab9ec;
}

.breadcrumbs li:last-child::after {
  content: "";
}

.breadcrumbs a { color:#1d5fa7; text-decoration:underline; }
.breadcrumbs a:hover, .breadcrumbs a:focus { color:#6fa9e9; text-decoration:underline; }


/* Blauer Balken */
.blue-bar { display:flex; width:100%; height:12px; margin-top:0; }
.blue-bar .blue-segment { flex:1; }

.blue-bar {
  display: flex;
  width: 100%;
  height: 12px;
  margin-top: 0;
  position: sticky;
  top: 0;               /* bleibt am oberen Bildschirmrand */
  z-index: 100;         /* Ã¼ber dem Content */
}

/* Mobile Overlay Navigation */
.nav-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:#1d5fa7; 
 background-image: url('/img/logo-backnav.png');
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: auto top;
  display:none; flex-direction:column; padding:1rem; overflow-y:auto; z-index:9999; }
.nav-overlay.open { display:flex; }
.nav-overlay ul { list-style:none; margin-top:2.5rem; display:flex; flex-direction:column; gap:0rem; }
.nav-overlay li { border-bottom:1px solid #6fa9e9; }
.nav-overlay li a { display:flex; align-items:center; padding:0.75rem 1rem; text-decoration:none; color:#fff; font-weight:600; text-align:left; white-space:normal; }
.nav-overlay li a:hover, .nav-overlay li a:focus { background:#6fa9e9; color:#fff; border-radius:0; }
.nav-overlay li a.active {
   background:#6fa9e9; color:#fff;
}
.nav-close { position:absolute; font-weight:normal;top:0.5rem; right:0.5rem; font-size:2.5rem; width:2rem; height:2rem; background:none; border:none; cursor:pointer; color:#fff; }

/* Hero */
.hero {
  width: 100%;
  height: 400px;       /* HÃ¶he nach Bedarf anpassen */
  overflow: hidden;    /* Bild auÃŸerhalb des Containers abschneiden */
  position: relative;  /* wichtig fÃ¼r object-fit */
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .hero { height: 250px; }
}

@media (min-width: 1600px) {
  .hero { height: 500px; }
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* Bild proportional fÃ¼llen und bescheiden */
  object-position: center; /* optional: Fokuspunkt */
}

/* Grid Content */
.block-startgrid { display:grid; grid-template-columns:1fr 1fr 300px; gap:2rem; padding:2rem 0; margin-bottom:1.5rem; align-items:stretch; }
.block-3grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:2rem; padding:2rem 0; margin-bottom:1.5rem; align-items:stretch; }
.block-2grid { display:grid; grid-template-columns:1fr 1fr; gap:2rem; padding:2rem 0; margin-bottom:1.5rem; align-items:normal; }

h1 { margin:0.5rem 0 1rem 0; font-size:2.35rem; line-height:1.15em;font-weight:normal; color:#666;}
article, event { padding:0 1rem; display:flex; flex-direction:column; }
article h2 { margin-bottom:0.5rem; font-size:2rem; font-weight:normal; color:#333;}
section p, article p, article ul, article ol { margin-bottom:1.5rem; font-size:1.1rem; }
article ul, article ol { margin-left:2.5rem; font-size:1.1rem; }
article a { color:#1d5fa7; text-decoration:underline; }
article a:hover, article a:focus { color:#6fa9e9; text-decoration:underline; }

/* Rote Box */
.event { background:#ac5555; color:#fff; padding:1.5rem; text-align:left;   display: flex;
  flex-direction: column;
  justify-content: flex-end; /* <- Text am unteren Rand */}
 .note { background:#dae8f5; padding:1.5rem; text-align:left;   display: flex;
  flex-direction: column;} 

/* Footer */
.footer { padding:2rem 0 3rem 0; color:#666;font-size:0.9rem; }
.footer-inner { display:flex; justify-content:space-between; flex-wrap:wrap; }
.footer-menu { display:flex; list-style:none; gap:1rem; }
.footer a { color:#1d5fa7; text-decoration:underline; }
.footer a:hover, .footer a:focus { color:#6fa9e9; text-decoration:underline; background:none; }

/* Responsive */
@media (max-width:1270px){
  .logo { margin-left:0; }
}
@media (max-width:900px){
  .nav-main, .nav-top { display:none; }
  .nav-toggle { display:flex; }
  .nav-main-wrapper { margin-top:0rem; }
  .container { padding:0 1rem; }

  .block-startgrid, .block-2grid { grid-template-columns:1fr; gap:1.5rem; }

  .block-3grid {
    display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; padding:1.5rem 0; align-items:stretch; 
    margin-bottom:1.5rem;
  }

  article, .event { padding:0; }
  .event {
  background: #ac5555;  /* roter Hintergrund */
  color: #fff;
  padding: 1.5rem;      /* Text innenabstand */
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-left: calc(-1rem); /* negieren von container padding */
  margin-right: calc(-1rem);
  position: relative;
  }

  .first-article { padding-top:1.5rem; }
  .logo { width:auto;max-height:64px; }
  .logo-text { flex-direction:row; align-items:center; gap:0.5rem; padding:0.8rem 0; }
  .org-name { font-size:0.75rem; line-height:1.1; }
  @media (max-width:500px){ .org-name{ display:none; } }

  .event { padding:1rem; }
  .hero img { margin:0 auto; display:block; }

  .nav-toggle { padding:0.5rem; }
  .nav-close { top:0.5rem; right:0.5rem; }
}


@media (max-width: 600px) {
  .block-3grid {
    display:grid; grid-template-columns:1fr; gap:1rem; padding:1rem 0; align-items:stretch; 
    margin-bottom:1.5rem;
  }
}


/* Container */
.login-container {
  max-width: 500px;
  margin: 5rem auto;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 0px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: var(--font-base);
}

/* Fehler-Meldung */
.login-container .error {
  color: #c00;
  margin-bottom: 1rem;
  font-weight: bold;
}


/* Liste */
.subpage-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column; /* mobil: vertikal */
  margin:1rem 0 2rem 0;
  border-bottom:1px solid #5a93d2;
}

/* Listenelemente */
.subpage-menu li {
  margin: 0;
}

/* Links */
.subpage-menu li a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #1d5fa7;
  font-weight:600;
  transition: background-color 0.2s, border-bottom-color 0.2s;
}

/* Hover */
.subpage-menu li a:hover, .subpage-menu li a:focus {
  background-color: #e6f0fa;
}

/* Aktive Seite */
.subpage-menu li a.active {
  background-color: #5a93d2; /* blau */
  color: #fff;
}

.subpage-menu li a.active:hover, .subpage-menu li a.active:focus {
  background-color: #1d5fa7; /* blau */
  color: #fff;
}


/* Desktop: horizontal */
@media (min-width: 768px) {
  .subpage-menu ul {
    flex-direction: row;
  }
  .subpage-menu li a {
    border-bottom: 0px solid transparent;
    border-left: none;
  }
  .subpage-menu li a:hover {
    border-bottom-color: #5a93d2;
  }
  .subpage-menu li a.active {
    border-bottom-color: #3676c0;
  }
}

/* Mobile responsive: vertikal */
@media (max-width: 767px) {
  .subpage-menu li a {
    text-align: left;
  }
}


.external::after {
  text-decoration:none!important;
  content: " \2197"; /* Unicode fÃ¼r den Pfeil */
  font-size: 0.8em; /* Optional: Pfeil etwas kleiner */
   /* Abstand zum Linktext */
  opacity: 0.6; /* Optional: leicht transparent */
  white-space: nowrap;

}


.person-card {
  background: #dae8f5;
  padding: 1rem;
}

.vorstand-card {
  background: #1d5fa7;
  background-image: url(/img/logo-backnav.png);
   background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position:center;
  color:#fff;
  padding: 1rem;
}


.person-image {
  float: none;
  width: 175px;   /* halbiert fÃ¼r bessere Proportion */
  height: 225px;
  object-fit: cover;
  margin: 0 1rem 1rem 0;
}

@media (max-width: 600px) {
  .person-image {
    float: right;
    height: auto;
    margin: 0 0 0.5rem 1rem;
    max-width:40%;
  }
}

.person-image-small {
  float: right;
  width: 100px;   /* halbiert fÃ¼r bessere Proportion */
  height: 129px;
  object-fit: cover;
  margin: 0 0 1rem 1rem;
}

@media (max-width: 600px) {
  .person-image-small {
    float: right;
    height: auto;
    margin: 0 0 0.5rem 1rem;
    max-width:30%;
  }
}


/* Grid */

  .event {
  background: #ac5555;  /* roter Hintergrund */
  color: #fff;
  padding: 1.5rem;      /* Text innenabstand */
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-left: calc(-1rem); /* negieren von container padding */
  margin-right: calc(-1rem);
  position: relative;
  }
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Event-Box */
.event-card {
    display: flex;
    background-color: #dae8f5; /* Blau passend zur Seite */
    padding: 1rem;
    align-items: flex-start;
    border-radius: 0; /* keine abgerundeten Ecken */
}

/* Datum links */
.event-date {
    width: 60px;
    text-align: center;
    margin-right: 1rem;
}

.event-date .day {
    font-size: 2rem;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 500;
}

/* Info rechts */
.event-info h3 {
    margin: 0 0 0.25rem 0;
}

.event-meta {
    font-weight: 300; /* dÃ¼nn */
    margin: 0;
    line-height: 1.2;
}

/* Responsive: untereinander auf Mobil */
@media (max-width: 768px) {
    .event-card {
        flex-direction: row;
        justify-content: flex-start;
    }
}


/* Basis-Tabelle */
.cms-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.cms-table th, .cms-table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
}

.cms-table th {
    background-color: #d4f0d4;
    position:sticky;
    top:11px;
}

/* Sichtbarkeitspunkt im Titel */
.cms-table td span {
    vertical-align: middle;
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    border-radius: 50%;
    margin-right: 0.5em;
}


/* Edit/Delete Buttons */

a.edit-btn, .cms-table a.edit-btn, .cms-table a.delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    max-width: 100%;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 0.5rem 1rem;
    background-color: #00a34c;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
    margin-bottom: 0.75rem;
    text-decoration:none;
}
a.edit-btn:hover, .cms-table a.edit-btn:hover, .cms-table a.delete-btn:hover,
a.edit-btn:focus, .cms-table a.edit-btn:focus, .cms-table a.delete-btn:focus {
    background-color: #007637;
    color:#fff;
}

.cms-table a.delete-btn {
    background-color: #c97a7a;
}

.cms-table a.delete-btn:hover,
.cms-table a.delete-btn:focus {
    background-color: #b35151;
    color:#fff;
}

.cms-table td[data-type="actions"] {
    line-height: 2.5rem;
}

.cms-table a {
  color: #007637;
}

.cms-table a:hover, .cms-table a:focus  {
  color: #00a34c;
}


/* Mobile Darstellung */
@media (max-width: 768px) {
    /* thead ausblenden */
    .cms-table thead {
        display: none;
    }

    /* Tabelle als Block */
    .cms-table, .cms-table tbody, .cms-table tr, .cms-table td {
        display: block;
        width: 100%;
    }

    .cms-table tr {
        margin-bottom: 1rem;
        border-bottom: 2px solid #eee;
        padding-bottom: 0.5rem;
    }

    .cms-table td {
        padding: 0.25rem 0;
        text-align: left;
        position: relative;
        border: none;
    }

    /* Datum + Uhrzeiten zusammenfassen */
    .cms-table td[data-type="datetime"] {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Aktionen auf eigene Zeile */
    .cms-table td[data-type="actions"] {
        margin-top: 0.5rem;
    }
}


/* Basisformular */
.cms-form {
    max-width: 800px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Abstand zwischen Abschnitten */
    font-family: inherit;
    color: #222;
}

/* Grid fÃ¼r Felder */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem 2rem;
}

/* Einzelne Felder */
.form-item {
    display: flex;
    flex-direction: column;
}

.form-item.full-width {
    grid-column: 1 / -1;
}

/* Labels */
label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem; /* Sternchen inline */
}

/* Pflichtfeld-Sternchen */
.required {
    color: red;
    font-weight: bold;
}

/* Inputs / Textareas / Selects */
.cms-form input[type="text"],
.cms-form input[type="password"],
.cms-form input[type="email"],
.cms-form input[type="date"],
.cms-form input[type="time"],
.cms-form select,
.cms-form textarea {
    width: 100%;
    padding: 0.55rem 0.6rem;
    font-size: 1rem;
    line-height: 1.4;
    border: 1px solid #ccc;
    border-radius: 0;
    box-sizing: border-box;
}


.cms-form select {
    padding: 0.625rem 0.6rem;
}

/* Textarea speziell */
.cms-form textarea {
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

/* ZwischenÃ¼berschriften in Formularen */
.cms-form h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
}

/* Fehlermeldungen */
.form-error {
    color: red;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Button */
.cms-form button {
    padding: 0.6rem 1.4rem;
    background-color: #1d5fa7;
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem; /* Abstand zu Feldern */
}

.cms-form button:hover {
    background-color: #15487a;
}

/* Mobile */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Gemeinsame Layout- und Typografieregeln (aktuelle Fassung 05)
   ============================================================ */

:root {
  --lveb-ink: #2b3947;
  --lveb-muted: #526170;
  --lveb-blue: #1d5fa7;
  --lveb-blue-dark: #164d87;
  --lveb-border: #d8e3ed;
  --lveb-event-red: #ac5555;
  --lveb-event-edge: #8d4040;

  --lveb-h2-size: 2rem;
  --lveb-h3-size: 1.25rem;
  --lveb-section-gap: 2.5rem;
  --lveb-subsection-gap: 1.75rem;
  --lveb-heading-gap: 1rem;
  --lveb-paragraph-gap: 1.25rem;
  --lveb-service-size: 1rem;
  --lveb-reading-width: 72ch;
  --lveb-main-top: 2rem;
  --lveb-main-bottom: 3rem;
}

/* 1. Schriftbild: H2 wieder groesser und normalgewichtig.
   Auch Ueberschriften ausserhalb von article werden erfasst.
   Spezifischere Regeln fuer Karten und CMS-Formulare bleiben erhalten. */
h1 {
  font-size: 2.3rem;
  line-height: 1.22;
  font-weight: 400;
  color: #455260;
  margin: 0.5rem 0 1.15rem;
}

/* Hauptinhalt endet vor der Footerlinie. flow-root schliesst auch Floats
   ein, ohne Inhalte, Fokusrahmen oder Dropdowns abzuschneiden. */
main,
main.container {
  display: flow-root;
  padding-bottom: var(--lveb-main-bottom);
}

/* Der interne Bereich hat keine vorgeschaltete Bild-/Unternavigation.
   Der vorhandene gruene Balken ist sein Erkennungsmerkmal. */
.green-bar ~ main {
  padding-top: var(--lveb-main-top);
}

.green-bar ~ main h1:first-child {
  margin-top: 0;
}

.admin-notice {
  display: flow-root;
}

.admin-notice > :last-child {
  margin-bottom: 0;
}

:is(main, article) h2:not(:where(.cms-form *, .login-container *)) {
  font-size: var(--lveb-h2-size);
  line-height: 1.25;
  font-weight: 400;
  color: var(--lveb-ink);
  margin: var(--lveb-section-gap) 0 var(--lveb-heading-gap);
}

:is(main, article) h3:not(:where(.cms-form *, .login-container *)) {
  font-size: var(--lveb-h3-size);
  line-height: 1.35;
  font-weight: 600;
  color: inherit;
  margin: var(--lveb-subsection-gap) 0 0.65rem;
}

section p,
article p,
article ul,
article ol {
  line-height: 1.62;
  margin-bottom: var(--lveb-paragraph-gap);
}

/* Lesebreite fuer Erzaehltext unabhaengig vom HTML-Wrapper.
   Navigation, Formularfelder, Tabellen und kompakte Karten bleiben frei.
   Die Seitencontainer und mehrspaltigen Raster werden NICHT verengt. */
:where(main, article) :is(p, ul, ol):not(:where(
  nav *, .cms-form *, .cms-table *, .login-container *,
  .event *, .event-card *, .person-card *, .vorstand-card *,
  .home-actions
)) {
  max-width: var(--lveb-reading-width);
}

/* Direkte Absaetze in main bekommen dieselbe Typografie wie section/article. */
main > p {
  font-size: 1.1rem;
  line-height: 1.62;
  margin-bottom: var(--lveb-paragraph-gap);
}

/* Listen unter Textueberschriften: kein unnoetiger Aussenabstand
   innerhalb verschachtelter Listen, aber lesbare Eintraege. */
article li > ul,
article li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

article li + li {
  margin-top: 0.35rem;
}

/* Lange Ueberschriften duerfen bei schmalem Fenster oder vergroesserter
   Schrift umbrechen; die Schriftgroesse wird dafuer nicht verkleinert. */
:where(main, article) :is(h1, h2, h3) {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* 2. Vertikaler Rhythmus.
   Ein erster Titel hat keinen zusaetzlichen Abschnittsabstand.
   Bei einem folgenden H2/H3 liefert die Ueberschrift den Abstand;
   der vorherige Absatz steuert nicht noch einen zweiten bei.
   :has() normalisiert ebenso Block- wie Flex-Layouts. */
:where(main, article) :is(h2, h3):first-child:not(:where(.cms-form *, .login-container *)) {
  margin-top: 0;
}

:where(main, article) :is(p, ul, ol, .block-2grid, .block-3grid, .events-grid):has(+ :is(h2, h3)) {
  margin-bottom: 0;
}

/* Geschwisterabschnitte mit eigener H2: gleicher Abstand wie bei
   direkt aufeinanderfolgenden Textabschnitten, kein Kartenabstand. */
:where(main, article, section):not(:where(.block-startgrid, .block-2grid, .block-3grid, .events-grid))
  > :is(section, article, div):has(> h2:first-child):not(:first-child):not(:where(.event, .event-card, .person-card, .vorstand-card, .note, .cms-form, .login-container)) {
  margin-top: var(--lveb-section-gap);
}

:where(main, article, section):not(:where(.block-startgrid, .block-2grid, .block-3grid, .events-grid))
  > :is(p, ul, ol, section, article, div):has(+ :is(section, article, div) > h2:first-child) {
  margin-bottom: 0;
}

:where(main, article, section):not(:where(.block-startgrid, .block-2grid, .block-3grid, .events-grid))
  > :is(section, article, div):has(+ :is(section, article, div) > h2:first-child)
  > :last-child {
  margin-bottom: 0;
}

/* Inhaltsraster direkt nach einem Titel oder Einleitungstext:
   Der Abstand kommt bereits vom Text, nicht noch vom Raster.
   Gilt z.B. fuer Vorstand sowie Arbeitsgruppe. */
:where(main, article) :is(h2, h3, p) + :is(.block-2grid, .block-3grid, .events-grid),
:where(main, article) :is(section, article, div):has(> :is(h2, h3, p):last-child)
  + :is(.block-2grid, .block-3grid, .events-grid) {
  padding-top: 0;
  margin-top: 0;
}

/* Raster ohne zusaetzliches unteres Padding. Ihr Endabstand bleibt
   erhalten, entfaellt aber vor der naechsten Abschnittsueberschrift
   durch die obigen Nachbarschaftsregeln. */
:where(main, article) :is(.block-2grid, .block-3grid) {
  padding-bottom: 0;
  margin-bottom: var(--lveb-section-gap);
}

:where(main, article) :is(.block-2grid, .block-3grid, .events-grid) > * {
  min-width: 0;
}

/* Reine Textspalten sind keine Karten: kein zusaetzlicher linker Einzug.
   Das Raster liefert den Spaltenabstand. Echte Karten behalten ihr Padding. */
:is(.block-startgrid, .block-2grid, .block-3grid)
  > article:not(:where(.person-card, .vorstand-card, .note, .event, .event-card)) {
  padding-inline: 0;
}

/* Sprungziele nicht vom vorhandenen klebenden blauen Balken verdecken. */
:where(main, article) :is(h2, h3, section, article)[id] {
  scroll-margin-top: 2rem;
}

/* Kartentitel sind keine neuen Textabschnitte. Die weisse Schrift
   auf den blauen Vorstandskarten bleibt erhalten. */
:is(.person-card, .vorstand-card) :is(h2, h3) {
  color: inherit;
  margin: 0 0 0.5rem;
}

:is(.person-card, .vorstand-card) > :last-child {
  margin-bottom: 0;
}

/* 3. Kopfbereich: Groessen der Navigation wiederherstellen.
   Servicelinks und Footer nutzen exakt denselben Schriftgrad. */
.org-name {
  font-size: 0.9rem;
  line-height: 1.35;
  color: #475564;
  max-width: 29rem;
}

.nav-top a {
  font-size: var(--lveb-service-size);
}

.nav-main ul {
  max-width: none;
}

.nav-main li a {
  font-size: 1.1rem;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-main li a:hover,
.nav-main li a:focus {
  background: var(--lveb-blue);
}

/* Spezifischer als der alte :not()-Selektor. */
.nav-main li a:hover:not(.first-menu-item),
.nav-main li a:focus:not(.first-menu-item) {
  background: var(--lveb-blue);
  color: #fff;
}

/* Die gruene Kennzeichnung des internen Bereichs bleibt bestehen. */
.nav-top li a.first-menu-item:focus {
  background: #1faa53;
  color: #fff;
}

.breadcrumbs ul {
  flex-wrap: wrap;
  row-gap: 0.2rem;
}

.breadcrumbs a,
article a,
.footer a {
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

article a:hover,
article a:focus,
.footer a:hover,
.footer a:focus {
  color: var(--lveb-blue-dark);
}

.subpage-menu ul {
  border-bottom-color: var(--lveb-border);
  flex-wrap: wrap;
}

.subpage-menu li a {
  transition: background-color 160ms ease, color 160ms ease;
}

.subpage-menu li a:hover,
.subpage-menu li a:focus {
  background-color: #eaf2f9;
}

/* Aktive Links bleiben auch beim Hover kontrastreich. */
.subpage-menu li a.active:hover,
.subpage-menu li a.active:focus {
  background-color: var(--lveb-blue);
  color: #fff;
}

.note {
  border-left: 3px solid #7fa9d1;
}

.footer {
  font-size: var(--lveb-service-size);
  line-height: 1.5;
  border-top: 1px solid var(--lveb-border);
}

.footer p,
.footer a {
  font-size: inherit;
}

.footer-inner {
  gap: 1rem 1.5rem;
}

.footer-menu {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* 4. Startseite: einheitlicher Abstand vor und zwischen den Artikeln.
   Kein Sonder-padding fuer den ersten Artikel mehr. */
.block-startgrid {
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* 05: Ist das Startseitenraster selbst der Seitencontainer, muss es
   dessen Seitenraender behalten. Die Basisregel padding: 2rem 0
   setzt sie sonst am Desktop auf null. Ein Raster INNERHALB eines
   Containers bekommt dagegen keinen doppelten Einzug.
   Die funktionierende Ausrichtung von .block-3grid bleibt unberuehrt. */
.container.block-startgrid {
  padding-inline: 1rem;
}

.block-startgrid > * {
  min-width: 0;
}

.block-startgrid .first-article {
  padding-top: 0;
}

.block-startgrid > article > :last-child {
  margin-bottom: 0;
}

/* Nur am Uebergang zum Startseitenraster: Auch ein dort im HTML
   gesetzter Absatzabstand darf keinen zweiten Abstand erzeugen. */
:where(main, article, section) > :has(+ .block-startgrid),
:where(main, article, section) > :has(+ .block-startgrid) > :last-child {
  margin-bottom: 0 !important;
}

/* 5. Terminvorschau: urspruengliches Rot, neues Boxlayout.
   Weisse Schrift fuer alle Bestandteile, auch Links und Hover.
   Keine Aenderung anderer .event-Elemente ausserhalb der Startseite. */
.block-startgrid .event {
  background: var(--lveb-event-red);
  color: #fff;
  border: 1px solid var(--lveb-event-red);
  border-top: 3px solid var(--lveb-event-edge);
  padding: 1.35rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  min-width: 0;
}

/* Bestehende Beschriftung: nur Beschriftung, keine Termindaten im CSS. */
.block-startgrid .event::before {
  content: "N\00e4 chster Termin";
  display: block;
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: #fff;
}

.block-startgrid .event-date {
  width: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  text-align: left;
  margin: 0 0 0.6rem;
}

.block-startgrid .event-date .day {
  font-size: 2.05rem;
  line-height: 1.1;
  font-weight: 600;
  color: #fff;
}

.block-startgrid .event-date .month {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #fff;
}

.block-startgrid .event-info {
  min-width: 0;
}

.block-startgrid .event h2,
.block-startgrid .event h3 {
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  margin: 0 0 0.6rem;
}

.block-startgrid .event p,
.block-startgrid .event .event-meta {
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.block-startgrid .event p:last-child,
.block-startgrid .event .event-meta:last-child {
  margin-bottom: 0;
}

.block-startgrid .event a,
.block-startgrid .event a:visited,
.block-startgrid .event a:hover,
.block-startgrid .event a:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.block-startgrid .event a:hover {
  text-decoration-thickness: 2px;
}

/* 6. Terminliste: mobile Mindestbreite beibehalten.
   Sie ist nicht die rote Startseiten-Vorschau. */
.events-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
}

.event-card {
  background-color: #edf3f9;
  border-left: 3px solid #8fb5d7;
  gap: 0.1rem;
}

.event-card .event-date {
  flex-shrink: 0;
}

.event-card .event-info h3 {
  margin: 0 0 0.5rem;
}

.event-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-meta {
  font-weight: 400;
  line-height: 1.45;
}

/* Seitenende: main besitzt den gemeinsamen Abstand zur Footerlinie.
   Endstaendige Absaetze/Raster addieren deshalb keinen zweiten Aussenabstand.
   Karteninnenabstaende bleiben unangetastet. */
main > :last-child,
main > :where(.container, section, article):last-child > :last-child,
main > :where(.container, section, article):last-child
  > :where(section, article):last-child > :last-child {
  margin-bottom: 0;
}

main > :is(.block-startgrid, .block-2grid, .block-3grid, .events-grid):last-child,
main > :where(.container, section, article):last-child
  > :is(.block-startgrid, .block-2grid, .block-3grid, .events-grid):last-child,
main > :where(.container, section, article):last-child
  > :where(section, article):last-child
  > :is(.block-startgrid, .block-2grid, .block-3grid, .events-grid):last-child {
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Optionaler Startseiten-Einstieg. Diese Klassen greifen erst, wenn
   der vorgeschlagene HTML-Block auf der Startseite eingesetzt wird.
   Kein Austausch des Bildes und keine Aenderung dynamischer Termindaten. */
.home-intro {
  padding-block: 0.25rem 0.5rem;
}

.home-intro .home-kicker {
  color: var(--lveb-blue);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.045em;
  margin: 0 0 0.65rem;
}

.home-intro h1 {
  max-width: 25ch;
  font-size: clamp(2rem, 3.3vw, 2.75rem);
  line-height: 1.16;
  color: var(--lveb-ink);
  margin: 0 0 1rem;
  text-wrap: balance;
}

.home-intro .home-lead {
  max-width: 62ch;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.home-intro .home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
}

.home-intro .home-action-primary,
.home-intro .home-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
  text-underline-offset: 0.18em;
}

.home-intro .home-action-primary {
  padding: 0.75rem 1.1rem;
  background: var(--lveb-blue);
  border: 1px solid var(--lveb-blue);
  color: #fff;
  text-decoration: none;
}

.home-intro .home-action-primary:hover,
.home-intro .home-action-primary:focus-visible {
  background: var(--lveb-blue-dark);
  border-color: var(--lveb-blue-dark);
  color: #fff;
}

.home-intro .home-action-secondary,
.home-intro .home-action-secondary:visited {
  padding-block: 0.75rem;
  color: var(--lveb-blue);
  text-decoration: underline;
}

.home-intro .home-action-secondary:hover,
.home-intro .home-action-secondary:focus-visible {
  color: var(--lveb-blue-dark);
}

.block-startgrid .event .event-more {
  margin-top: 1rem;
}

/* 7. Kleine bestehende Korrekturen und sichtbarer Tastaturfokus. */
.button {
  --button-radius: var(--radius-small);
}

.nav-overlay {
  background-position: left top;
}

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

.nav-overlay a:focus-visible,
.nav-overlay button:focus-visible,
.block-startgrid .event a:focus-visible,
.vorstand-card a:focus-visible {
  outline-color: #fff;
}

@media (max-width: 900px) {
  :root {
    --lveb-h2-size: 1.75rem;
    --lveb-h3-size: 1.2rem;
    --lveb-section-gap: 2rem;
    --lveb-subsection-gap: 1.5rem;
    --lveb-main-bottom: 2.5rem;
  }

  h1 {
    font-size: 1.95rem;
  }

  .block-startgrid {
    padding-top: 2rem;
    row-gap: 2rem;
  }
}

@media (max-width: 600px) {
  .block-startgrid .event {
    padding: 1.15rem;
  }

  .block-startgrid .event-date .day {
    font-size: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-main li a,
  .subpage-menu li a {
    transition: none;
  }
}
