/* ==========================================================================
   core.css — Alle Stile (strukturell + projektspezifisch)
   Setzt voraus, dass custom.css (Variablen) bereits geladen ist.
   Reihenfolge: custom.css → core.css → overrides.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Generische CSS-Variablen (projektunabhängig — Standardwerte)
   Projekt-spezifische Werte stehen in custom.css und überschreiben diese.
   -------------------------------------------------------------------------- */
:root {
    /* Font-Weights */
    --fw-light:     300;
    --fw-normal:    400;
    --fw-medium:    500;
    --fw-semibold:  600;
    --fw-bold:      700;
    --fw-extrabold: 800;

    /* Z-Index-Ebenen */
    --z-nav:     100;
    --z-overlay: 99;
    --z-fixed:   9999;
    --z-modal:   10000;

    /* Transitions */
    --transition-base: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
}

/* --------------------------------------------------------------------------
   1. Reset & Box-Sizing
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    overflow-y: scroll;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-base);
    font-size: var(--fs-md);
    line-height: var(--line-height);
    color: var(--color-text);
}

button, input, label, select, textarea {
    font-family: var(--font-base);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: var(--fw-medium);
    color: var(--color-primary);
}
h1 { font-size: var(--font-size-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--font-size-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--font-size-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--font-size-h4); line-height: var(--lh-h4); }
h5 { font-size: var(--font-size-h5); line-height: var(--lh-h5); }
h6 { font-size: var(--font-size-h6); line-height: var(--lh-h6); }

a {
    text-decoration: none;
    color: var(--color-primary);
}

img {
    border: 0;
    max-width: 100%;
}

video { width: 100%; }

iframe { border: 0; }

menu, ol, ul {
    padding: 0 0 0 var(--spacing-xl);
}

hr {
    height: 1px;
    background-color: var(--color-primary);
    border: none;
}

li::marker {
    content: var(--marker-content);
    color: var(--marker-color);
    font-size: var(--marker-size);
}

/* Listen-Abstände: Modifier-Klassen auf <ul> oder inline style="--list-gap: 1rem" */
li + li { margin-top: var(--list-gap, 0); }

.list--sm { --list-gap: var(--spacing-sm); }
.list--md { --list-gap: var(--spacing-md); }
.list--lg { --list-gap: var(--spacing-lg); }

/* --------------------------------------------------------------------------
   2. Seitengerüst
   -------------------------------------------------------------------------- */

.wrap {
    width: min(90%, var(--container-max));
    margin-inline: auto;
    position: relative;
}

.wrap--wide {
    width: min(90%, var(--container-wide));
    margin-inline: auto;
    position: relative;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   3. Typografie-Utilities
   -------------------------------------------------------------------------- */
.fs-sm { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.fs-md { font-size: var(--fs-md); line-height: var(--line-height); }
.fs-lg { font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-light);
}
.c  { text-align: center; }
.r  { text-align: right; }
.l  { text-align: left; }
.j  { text-align: justify; }

.color       { color: var(--color-primary); }
.colorw      { color: var(--color-white); }
.colorw a    { color: var(--color-white); }
.bcolor      { background-color: var(--color-primary); }
.bcolor-lightblue { background-color: var(--color-lightblue); }
.bg-white    { background-color: var(--color-white); box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);}
.stretch { align-self: stretch; }
.sticky  { position: sticky; top: var(--spacing-xl); align-self: flex-start; }

strong, b { font-weight: var(--fw-bold); }
.gruen { color: #009639; } /* kein passendes CSS-Var vorhanden (--color-success: #2e7d4f ist abweichendes Grün) */
.rot   { color: #a50000; } /* Fehlermeldungen Kontaktformular */

/* --------------------------------------------------------------------------
   4. Layout-Utilities
   -------------------------------------------------------------------------- */
.clear { clear: both; }
.ovvi  { overflow: visible; }

/* Abstands-Utilities
   Skala: xs=4px · sm=8px · md=16px · lg=24px · xl=48px · 2xl=80px
   Benennung: {eigenschaft}-{größe}
   ---------------------------------------------------------------- */
.mb-xs  { margin-bottom: var(--spacing-xs); }
.mb-sm  { margin-bottom: var(--spacing-sm); }
.mb-md  { margin-bottom: var(--spacing-md); }
.mb-lg  { margin-bottom: var(--spacing-lg); }
.mb-xl  { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }

.mt-xs  { margin-top: var(--spacing-xs); }
.mt-sm  { margin-top: var(--spacing-sm); }
.mt-md  { margin-top: var(--spacing-md); }
.mt-lg  { margin-top: var(--spacing-lg); }
.mt-xl  { margin-top: var(--spacing-xl); }
.mt-2xl { margin-top: var(--spacing-2xl); }

.ml-sm  { margin-left: var(--spacing-sm); }
.ml-md  { margin-left: var(--spacing-md); }
.ml-lg  { margin-left: var(--spacing-lg); }
.ml-xl  { margin-left: var(--spacing-xl); }

.mr-sm  { margin-right: var(--spacing-sm); }
.mr-md  { margin-right: var(--spacing-md); }
.mr-lg  { margin-right: var(--spacing-lg); }
.mr-xl  { margin-right: var(--spacing-xl); }

.p-sm   { padding: var(--spacing-sm); }
.p-md   { padding: var(--spacing-md); }
.p-lg   { padding: var(--spacing-lg); }
.p-xl   { padding: var(--spacing-xl); }

.pl-sm  { padding-left: var(--spacing-sm); }
.pl-md  { padding-left: var(--spacing-md); }
.pl-lg  { padding-left: var(--spacing-lg); }
.pl-xl  { padding-left: var(--spacing-xl); }

.pr-sm  { padding-right: var(--spacing-sm); }
.pr-md  { padding-right: var(--spacing-md); }
.pr-lg  { padding-right: var(--spacing-lg); }
.pr-xl  { padding-right: var(--spacing-xl); }

.p-3xl  { padding: var(--spacing-3xl); }
.py-3xl { padding-top: var(--spacing-3xl); padding-bottom: var(--spacing-3xl); }
.py-4xl { padding-top: var(--spacing-4xl); padding-bottom: var(--spacing-4xl); }


.upper  { text-transform: var(--h-upper);}

/* --------------------------------------------------------------------------
   5. 12-Spalten-Raster (Bootstrap-5-Standard, Mobile-first)
   -------------------------------------------------------------------------- */
.row { display: flex; flex-wrap: wrap; gap: var(--row-gap); align-items: stretch; }

/* --- Row: Horizontale Ausrichtung (justify-content) --- */
.row--justify-start   { justify-content: flex-start; }
.row--justify-center  { justify-content: center; }
.row--justify-end     { justify-content: flex-end; }
.row--justify-between { justify-content: space-between; }
.row--justify-around  { justify-content: space-around; }
.row--justify-evenly  { justify-content: space-evenly; }

/* --- Row: Vertikale Ausrichtung (align-items) --- */
.row--top    { align-items: flex-start; }
.row--center,
.row--middle { align-items: center; }
.row--bottom { align-items: flex-end; }

/* --- Col: Vertikale Selbst-Ausrichtung (align-self) --- */
.col--top    { align-self: flex-start; }
.col--middle { align-self: center; }
.col--bottom { align-self: flex-end; }

/* --- Margin-auto: Spalten innerhalb einer Row verschieben --- */
.ms-auto { margin-left: auto; }
.me-auto { margin-right: auto; }

[class*="col-"] { width: 100%; }

/* Korrekte Formel: col-N füllt exakt N/12 der Reihe inkl. Gap
   width = N/12 * 100% - (1 - N/12) * gap                      */
.col-1  { width: calc(8.3333%  - 0.9167 * var(--row-gap)); }
.col-2  { width: calc(16.6666% - 0.8333 * var(--row-gap)); }
.col-3  { width: calc(25%      - 0.75   * var(--row-gap)); }
.col-4  { width: calc(33.3333% - 0.6667 * var(--row-gap)); }
.col-5  { width: calc(41.6666% - 0.5833 * var(--row-gap)); }
.col-6  { width: calc(50%      - 0.5    * var(--row-gap)); }
.col-7  { width: calc(58.3333% - 0.4167 * var(--row-gap)); }
.col-8  { width: calc(66.6666% - 0.3333 * var(--row-gap)); }
.col-9  { width: calc(75%      - 0.25   * var(--row-gap)); }
.col-10 { width: calc(83.3333% - 0.1667 * var(--row-gap)); }
.col-11 { width: calc(91.6666% - 0.0833 * var(--row-gap)); }
.col-12 { width: 100%; }


/* --------------------------------------------------------------------------
   7. Header / Hero
   -------------------------------------------------------------------------- */

/* Hero-Hintergrund — URL wird über --header-image in custom.css konfiguriert */
#header {
    background-image: var(--header-image);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
}

/* Overlay — Farbe/Deckkraft via --header-overlay in custom.css steuerbar */
#header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--header-overlay, rgba(0,0,0,0.4));
    pointer-events: none;
}


#header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, white 0%, transparent 60%);
    pointer-events: none;
}

.wrap--wide.headercontent {
    z-index: 999 !important;
}


/* Wenn Slider aktiv: #header-Hintergrundbild ausblenden, Slider übernimmt */
#header:has(#teaser) { background-image: none; }

/* Slider-Teaser: volle Fläche des Headers als Hintergrundebene */
#teaser {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Höhen-Kette: jedes Slick-Element muss 100% Höhe bekommen */
#teaser.teaserslider,
#teaser .slick-list,
#teaser .slick-track,
#teaser .slick-slide { height: 100% !important; }

/* overflow:hidden explizit sichern */
#teaser .slick-list { overflow: hidden !important; }

/* Slick kopiert background-image des Original-Elements auf .slick-slide →
   Cover + kein Repeat setzen (Breite/Position NICHT überschreiben: Slick
   setzt width + position per Inline-Style, !important würde das brechen) */
#teaser .slick-slide {
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

#teaser .slick-slide img { display: none; } /* img ist nur für SEO/Alt-Text */

.hero-title {
    color: var(--color-primary);
    font-size: var(--font-size-hero);
}

/* --------------------------------------------------------------------------
   8. Navigationsbalken
   -------------------------------------------------------------------------- */
#headerbalken {
    position: relative;
    z-index: var(--z-nav);
    background-color: transparent;
    transition: background-color var(--transition-slow), box-shadow var(--transition-slow);
}

.headerbalken__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
}

#logo img{
    width: var(--logo-width);
    height: auto;
}

#smartnavi {
    display: none;
    height: var(--nav-height);
}


#mobil_menu {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: var(--nav-height);
    height: var(--nav-height);
    cursor: pointer;
}

#mobil_menu span {
    display: block;
    background-color: var(--color-white);
    height: 3px;
    width: 30px;
    border-radius: 1px;
    transition: transform var(--transition-slow), opacity var(--transition-base);
}


#mobil_menu.klickopen .line1 { transform: translateY(9px) rotate(45deg); }
#mobil_menu.klickopen .line2 { opacity: 0; }
#mobil_menu.klickopen .line3 { transform: translateY(-9px) rotate(-45deg); }

#menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

html.menu-open,
body.menu-open { overflow: hidden !important; }

/* --------------------------------------------------------------------------
   9. Navigation (Menü)
   -------------------------------------------------------------------------- */
#menu ul {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    background: transparent;
    font-size: 1rem;
    margin-bottom: 0;
}

#menu li {
    list-style: none;
    display: flex;
    align-items: center;
    position: relative;
}

#menu a {
    display: block;
    padding: 13px 20px 14px;
    color: var(--color-primary);
    font-weight: var(--fw-semibold);
    font-size: 1.375rem;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
}

/* Gleitende Unterlinie (nur für Links ohne Untermenü) */
#menu > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: var(--color-white);
    transform: scaleX(0);
    transform-origin: center center;
    transition: transform var(--transition-base);
}

#menu > ul > li > a:hover::after,
#menu > ul > li > a:focus-visible::after,
#menu > ul > li > a.on::after {
    transform: scaleX(1);
}

/* Pfeil bei Untermenü-Eltern nicht bewegen */
#menu > ul > li:has(ul) > a:hover::after,
#menu > ul > li:has(ul) > a:focus-visible::after,
#menu > ul > li:has(ul) > a.on::after {
    transform: translateY(-70%) rotate(45deg);
}

/* Pfeil-Indikator für Links mit Untermenü */
#menu > ul > li:has(ul) > a {
    padding-right: 30px;
}

#menu > ul > li:has(ul) > a::after {
    background-color: transparent;
    bottom: auto;
    left: auto;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--color-white);
    border-bottom: 2px solid var(--color-white);
    transform: translateY(-70%) rotate(45deg);
    transform-origin: center center;
}


#menu .on,
#menu ul li a:hover,
#menu ul li a:focus-visible {
    color: var(--color-primary-dark);
    text-decoration: none;
}




/* Untermenü */
#menu ul ul {
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background-color: var(--color-white);
    border-top: 3px solid var(--color-primary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xs) 0;
}

#menu ul li:hover ul,
#menu ul li ul:hover,
#menu ul li:focus-within ul,
#menu ul li.touch-open ul {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

#menu ul ul li a:focus-visible {
    color: var(--color-primary);

}

#menu ul ul li {
    display: block;
    text-align: left;
}

#menu ul ul li a {
    background-color: transparent;
    color: var(--color-text);
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: var(--fw-normal);
    text-transform: none;
    transition: background-color var(--transition-base), color var(--transition-base);
    border-bottom: var(--border-base);
}

#menu ul ul li:last-child a { border-bottom: none; }

#menu ul ul li a::after { display: none; }

#menu ul ul li a.on,
#menu ul ul li a:hover {
    background-color: var(--color-gray);
    color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------------
   10. Accordion
   -------------------------------------------------------------------------- */
.accordion {
    border: var(--border-base);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion__item {
    border-bottom: var(--border-base);
}

.accordion__item:last-child {
    border-bottom: none;
}

.accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    font-family: inherit;
    transition: background var(--transition-base), color var(--transition-base);
}

.accordion__trigger:hover {
    background: var(--color-gray);
    color: var(--color-primary);
}

.accordion__item.is-open > .accordion__trigger {
    color: var(--color-primary);
    background: var(--color-gray);
}

.accordion__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-primary);
    transition: transform 0.35s ease;
}

.accordion__item.is-open .accordion__icon {
    transform: rotate(180deg);
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.accordion__item.is-open .accordion__content {
    max-height: 2000px;
}

.accordion__body {
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
    border-top: var(--border-base);
}

/* News-spezifische Accordion-Elemente */
.news-credit {
    margin-top: var(--spacing-sm);
    font-size: 0.8em;
    color: var(--color-text-light, #666);
    border-top: 1px dotted var(--color-border);
    padding-top: var(--spacing-sm);
}

/* Mobile Menu — klickbtn nur für Hamburger */
.klickbtn { cursor: pointer; }

/* --------------------------------------------------------------------------
   11. Icons
   -------------------------------------------------------------------------- */
.icon {
    fill: var(--color-primary);
    height: var(--nav-height);
    padding: 8px;
    width: var(--nav-height);
}

.back-to-top .path {
    fill: var(--color-primary);
}

/* --------------------------------------------------------------------------
   12. Inhalt / Sections
   -------------------------------------------------------------------------- */

.section--white { background-color: var(--color-white); }
.section--gray  { background: var(--color-gradient); }

/* --- Section-Abstand Utilities -------------------------------------------- */
.pad-sm { padding-top: var(--section-pad-sm); padding-bottom: none; }
.pad-md { padding-top: var(--section-pad-md); padding-bottom: var(--section-pad-md); }
.pad-lg { padding-top: var(--section-pad-lg); padding-bottom: var(--section-pad-lg); }

.section--split {
    background: linear-gradient(
        to right,
        var(--color-split) 0%,
        var(--color-split) 33%,
        var(--color-primary) 33%,
        var(--color-primary) 100%
    );
}

.section--nosplit {
    background-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   13. Button
   -------------------------------------------------------------------------- */
button.myButton {
    /* Reset Browser-Defaults nur für <button> */
    appearance: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.myButton {
    background-color: var(--color-primary);
    border-radius: none;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0);
    color: var(--color-white) !important;
    padding: var(--button-padding-y) var(--button-padding-x);
    font-weight: var(--fw-light) !important;
    cursor: pointer;
    text-align: center;
    transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.myButton:hover {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
}

.myButton:active {
    transform: translateY(1px);
}

.myButton--primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white) !important;
}

.myButton--primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white) !important;
}

/* --------------------------------------------------------------------------
   14. Typografie-Utilities (projektspezifisch)
   -------------------------------------------------------------------------- */

/* Schnittstellen-Inhalte: reduzierte Überschriftengrößen + h1 ausgeblendet */
.content--cms h1 { display: none; }
.content--cms h2 { font-size: var(--font-size-h3); }
.content--cms h3 { font-size: var(--font-size-h4); }
.content--cms h4 { font-size: var(--font-size-h5); }
.content--cms p  { margin-bottom: var(--spacing-sm); }
.content--cms li::marker { content: none; }

.content--white                      { color: var(--color-white); }
.content--white h2,
.content--white h3                   { color: var(--color-white); }
.content--white a                    { color: var(--color-white); }
.content--white a:hover              { text-decoration: underline; }
.content--white .icon                { fill: var(--color-white); }
.content--white .iconlist__item a,
.content--white .iconlist__item span { color: var(--color-white); }

.row + .row { margin-top: var(--row-gap); }

/* --------------------------------------------------------------------------
   16. Icon-List (Kontakt)
   -------------------------------------------------------------------------- */
.iconlist {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.iconlist__item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.iconlist__item a,
.iconlist__item span {
    color: var(--color-text);
    text-decoration: none;
}

.iconlist__item a:hover{
    color: var(--color-primary);
}
.content--white .iconlist__item a:hover{
    color: var(--color-text);
}



/* --------------------------------------------------------------------------
   17. Karte / Google Maps
   -------------------------------------------------------------------------- */
#karte {
    background-image: url(../img/karte.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.kartebg {
    background-color: rgba(255, 255, 255, 0.6);
    height: 100%;
}

#karte p {
    padding: 120px 20px;
    color: var(--color-text);
    text-align: center;
}

.privacy-map {
    width: 100%;
    height: 350px;
    border: 0;
    display: block;
}

/* Layout-Override für Cookie-Button (visuell via .myButton) */
.cookiebutton {
    display: block;
    margin: 10px auto 0;
    max-width: 350px;
}

/* --------------------------------------------------------------------------
   18. Formulare
   -------------------------------------------------------------------------- */
.info { margin-bottom: var(--spacing-md); text-align: right; }
.form-pflicht { font-size: var(--fs-sm); color: var(--color-text); }

/* Form-Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    text-transform: uppercase;
}

.form-group .req { color: var(--color-primary); }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 4px;
    font-size: var(--fs-md);
    font-family: var(--font-base);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--color-border);
    border-radius: 0;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--color-primary);
}

/* Valid-Zustand: nur required Felder nach Eingabe */
.form-group input[required]:not(:placeholder-shown):valid,
.form-group textarea[required]:not(:placeholder-shown):valid {
    border-bottom-color: var(--color-success);
}

.form-group textarea {
    min-height: 120px;
    max-height: 300px;
    resize: vertical;
}

/* Captcha */
.form-captcha-hint {
    font-size: var(--fs-sm);
    margin-bottom: 6px;
    color: var(--color-text);
}

img.captcha { cursor: pointer; display: block; margin-bottom: var(--spacing-sm); }

/* Checkbox-Zeilen */
.pos {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: var(--spacing-sm) 0;
    font-size: var(--fs-md);
}

.pos input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color);
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: var(--line-height);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

/* --------------------------------------------------------------------------
   18b. Kontakt-Karte
   -------------------------------------------------------------------------- */
.contact-card {
    background-color: var(--color-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

/* Öffnungszeiten-Trenner */
.contact-card__oeffnung {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   18c. Notdienst-Tabelle
   -------------------------------------------------------------------------- */
.notdienst-tabelle-wrapper {
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
}

.notdienst-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-md);
    color: var(--color-text);
    background-color: var(--color-white);
}

.notdienst-tabelle thead { background-color: var(--color-gray); }

.notdienst-tabelle th,
.notdienst-tabelle td {
    border: 1px solid var(--color-border);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.footerlogo {
    width: var(--logo-width-footer);
    height: auto;
}

/* --------------------------------------------------------------------------
   21. Floating Contact-Buttons
   -------------------------------------------------------------------------- */
#drw-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drw-buttons {
    border: none;
    border-radius: 10px 0 0 10px;
    outline: none;
    background-color: var(--color-white);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: background-color var(--transition-base),
                transform var(--transition-base),
                box-shadow var(--transition-base);
}

.drw-buttons:hover {
    background-color: var(--color-gray);
    transform: translateX(-3px);
    box-shadow: var(--shadow-sm);
}

.drw-buttons .icon {
    fill: var(--color-primary);
    width: 44px;
    height: 44px;
}

/* --------------------------------------------------------------------------
   22. Galerie
   -------------------------------------------------------------------------- */
#galerie {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.galeriebild {
    overflow: hidden;
}

.galeriebild a {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.galeriebild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.galeriebild a:hover img { transform: scale(1.08); }

/* --------------------------------------------------------------------------
   23. News
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   24. Parallax
   -------------------------------------------------------------------------- */
.parallax1 {
    background-image: url(../img/living.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* --------------------------------------------------------------------------
   25. Profil / Timeline
   -------------------------------------------------------------------------- */
.profile h2        { color: var(--color-white) !important; }
.profile__intro    { text-align: center; margin-bottom: 26px; color: var(--color-white); }

.timeline {
    position: relative;
    display: grid;
    gap: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 16px;
    width: 2px;
    background-color: var(--color-gray);
    translate: -50% 0;
    pointer-events: none;
}

.timeline::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    translate: -50% 0;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 14px solid var(--color-gray);
    pointer-events: none;
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: stretch;
}

.tl-card {
    width: min(420px, 100%);
    background-color: var(--color-white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.tl-left  .tl-card { grid-column: 1; justify-self: end; }
.tl-right .tl-card { grid-column: 3; justify-self: start; }


/* --------------------------------------------------------------------------
   29. Back-to-top
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 10px;
    z-index: var(--z-fixed);
    background-color: var(--color-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--color-white);
    padding: 0;
    transition: background-color var(--transition-base),
                transform var(--transition-base),
                box-shadow var(--transition-base);
}

.back-to-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.back-to-top svg { fill: var(--color-white); }

/* --------------------------------------------------------------------------
   30. Barrierefreiheit
   -------------------------------------------------------------------------- */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Focus-Styles auf dunklem Hintergrund (Menü + Headerbalken) */
#menu a:focus-visible,
#smartnavi a:focus-visible,
#mobil_menu:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 2px;
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   GALERIE-SLIDER
   ========================================================================== */

.galerie-slider-wrapper {
    position: relative;
}

.galerie-slider .galerie-slide {
    padding: 0 8px;
}

.galerie-slider .galerie-slide a {
    display: block;
    overflow: hidden;
}

.galerie-slider .galerie-slide img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.galerie-slider .galerie-slide a:hover img {
    transform: scale(1.04);
}

.galerie-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.galerie-nav__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base), color var(--transition-base);
}

.galerie-nav__btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.galerie-nav__btn svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Code-Block (Doku-Seiten)
   -------------------------------------------------------------------------- */
.code-block {
    background: var(--color-gray);
    border: var(--border-base);
    border-radius: var(--border-radius);
    padding: var(--spacing-md) var(--spacing-lg);
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre;
}

/* ==========================================================================
   Popup — zeitgesteuert
   ========================================================================== */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.popup-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);

}

.popup-overlay.is-visible .popup-card {
    transform: translateY(0) scale(1);
}

.popup-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-gray-dark);
    padding: 2px 6px;
    transition: color var(--transition-base);
    font-family: inherit;
}

.popup-close:hover { color: var(--color-primary); }

.popup-titel {
    font-size: var(--font-size-h3);
    margin-bottom: var(--spacing-md);
    padding-right: var(--spacing-xl);
    color: var(--color-primary);
}

.popup-text {
    color: var(--color-text);
    line-height: var(--line-height);
    margin-bottom: var(--spacing-md);
}


.vorteile-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vorteile-liste li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vorteile-liste li + li {
  padding-top: var(--section-pad-xsm);
}

.vorteile-liste li::before {
  content: '';
  width: 10px;
  height: 10px;
  min-width: 10px;
  background: var(--color-primary);
  display: inline-block;
}

.whylist{
    font-weight: var(--fw-medium);
}

.hero-content-box {
    background-color: rgba(255, 255, 255, 0.8);
    padding: var(--section-pad-sm);
    display: inline-block;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* --- Responsive Hilfsklassen (inline, keine Zusammenführung nötig) --------- */
@media (max-width: 980px)  { .hide980 { display: none !important; } }
@media (max-width: 780px)  { .hide780 { display: none !important; } }
@media (min-width: 981px)  { .show980 { display: none !important; } }
@media (min-width: 781px)  { .show780 { display: none !important; } }

/* --- min-width: 576px ----------------------------------------------------- */
/* (Grid col-sm) */
@media (min-width: 576px) {
    .col-sm-1  { width: calc(8.3333%  - 0.9167 * var(--row-gap)); }
    .col-sm-2  { width: calc(16.6666% - 0.8333 * var(--row-gap)); }
    .col-sm-3  { width: calc(25%      - 0.75   * var(--row-gap)); }
    .col-sm-4  { width: calc(33.3333% - 0.6667 * var(--row-gap)); }
    .col-sm-5  { width: calc(41.6666% - 0.5833 * var(--row-gap)); }
    .col-sm-6  { width: calc(50%      - 0.5    * var(--row-gap)); }
    .col-sm-7  { width: calc(58.3333% - 0.4167 * var(--row-gap)); }
    .col-sm-8  { width: calc(66.6666% - 0.3333 * var(--row-gap)); }
    .col-sm-9  { width: calc(75%      - 0.25   * var(--row-gap)); }
    .col-sm-10 { width: calc(83.3333% - 0.1667 * var(--row-gap)); }
    .col-sm-11 { width: calc(91.6666% - 0.0833 * var(--row-gap)); }
    .col-sm-12 { width: 100%; }
}

/* --- min-width: 768px ----------------------------------------------------- */
/* (Grid col-md) */
@media (min-width: 768px) {
    .col-md-1  { width: calc(8.3333%  - 0.9167 * var(--row-gap)); }
    .col-md-2  { width: calc(16.6666% - 0.8333 * var(--row-gap)); }
    .col-md-3  { width: calc(25%      - 0.75   * var(--row-gap)); }
    .col-md-4  { width: calc(33.3333% - 0.6667 * var(--row-gap)); }
    .col-md-5  { width: calc(41.6666% - 0.5833 * var(--row-gap)); }
    .col-md-6  { width: calc(50%      - 0.5    * var(--row-gap)); }
    .col-md-7  { width: calc(58.3333% - 0.4167 * var(--row-gap)); }
    .col-md-8  { width: calc(66.6666% - 0.3333 * var(--row-gap)); }
    .col-md-9  { width: calc(75%      - 0.25   * var(--row-gap)); }
    .col-md-10 { width: calc(83.3333% - 0.1667 * var(--row-gap)); }
    .col-md-11 { width: calc(91.6666% - 0.0833 * var(--row-gap)); }
    .col-md-12 { width: 100%; }
}

/* --- min-width: 992px ----------------------------------------------------- */
/* (Grid col-lg) */
@media (min-width: 992px) {
    .col-lg-1  { width: calc(8.3333%  - 0.9167 * var(--row-gap)); }
    .col-lg-2  { width: calc(16.6666% - 0.8333 * var(--row-gap)); }
    .col-lg-3  { width: calc(25%      - 0.75   * var(--row-gap)); }
    .col-lg-4  { width: calc(33.3333% - 0.6667 * var(--row-gap)); }
    .col-lg-5  { width: calc(41.6666% - 0.5833 * var(--row-gap)); }
    .col-lg-6  { width: calc(50%      - 0.5    * var(--row-gap)); }
    .col-lg-7  { width: calc(58.3333% - 0.4167 * var(--row-gap)); }
    .col-lg-8  { width: calc(66.6666% - 0.3333 * var(--row-gap)); }
    .col-lg-9  { width: calc(75%      - 0.25   * var(--row-gap)); }
    .col-lg-10 { width: calc(83.3333% - 0.1667 * var(--row-gap)); }
    .col-lg-11 { width: calc(91.6666% - 0.0833 * var(--row-gap)); }
    .col-lg-12 { width: 100%; }
}

/* --- min-width: 1200px ---------------------------------------------------- */
/* (Grid col-xl) */
@media (min-width: 1200px) {
    .col-xl-1  { width: calc(8.3333%  - 0.9167 * var(--row-gap)); }
    .col-xl-2  { width: calc(16.6666% - 0.8333 * var(--row-gap)); }
    .col-xl-3  { width: calc(25%      - 0.75   * var(--row-gap)); }
    .col-xl-4  { width: calc(33.3333% - 0.6667 * var(--row-gap)); }
    .col-xl-5  { width: calc(41.6666% - 0.5833 * var(--row-gap)); }
    .col-xl-6  { width: calc(50%      - 0.5    * var(--row-gap)); }
    .col-xl-7  { width: calc(58.3333% - 0.4167 * var(--row-gap)); }
    .col-xl-8  { width: calc(66.6666% - 0.3333 * var(--row-gap)); }
    .col-xl-9  { width: calc(75%      - 0.25   * var(--row-gap)); }
    .col-xl-10 { width: calc(83.3333% - 0.1667 * var(--row-gap)); }
    .col-xl-11 { width: calc(91.6666% - 0.0833 * var(--row-gap)); }
    .col-xl-12 { width: 100%; }
}

/* --- min-width: 1400px ---------------------------------------------------- */
/* (Grid col-xxl) */
@media (min-width: 1400px) {
    .col-xxl-1  { width: calc(8.3333%  - 0.9167 * var(--row-gap)); }
    .col-xxl-2  { width: calc(16.6666% - 0.8333 * var(--row-gap)); }
    .col-xxl-3  { width: calc(25%      - 0.75   * var(--row-gap)); }
    .col-xxl-4  { width: calc(33.3333% - 0.6667 * var(--row-gap)); }
    .col-xxl-5  { width: calc(41.6666% - 0.5833 * var(--row-gap)); }
    .col-xxl-6  { width: calc(50%      - 0.5    * var(--row-gap)); }
    .col-xxl-7  { width: calc(58.3333% - 0.4167 * var(--row-gap)); }
    .col-xxl-8  { width: calc(66.6666% - 0.3333 * var(--row-gap)); }
    .col-xxl-9  { width: calc(75%      - 0.25   * var(--row-gap)); }
    .col-xxl-10 { width: calc(83.3333% - 0.1667 * var(--row-gap)); }
    .col-xxl-11 { width: calc(91.6666% - 0.0833 * var(--row-gap)); }
    .col-xxl-12 { width: 100%; }
}

/* --- min-width: 981px ----------------------------------------------------- */
/* (Desktop-spezifisch) */
@media (min-width: 981px) {
    #menu { height: 80px !important; }
    #header { height: 100vh; }
    .headercontent { padding-top: 15vh; }
}

/* --- max-width: 1200px ---------------------------------------------------- */
@media (max-width: 1200px) {
    #menu a       { font-size: 1.125rem;
                    padding: 13px 15px 14px; }
    .section      { padding: var(--section-pad-md) 0; }

    #logo img {width: var(--logo-width-tablet);}
}


/* --- max-width: 980px ----------------------------------------------------- */
@media (max-width: 980px) {
    .wrap,
    .wrap--wide { width: 100%; padding-inline: var(--spacing-lg); }

    /* Mobile: Bild nur hinter headercontent, nicht hinter Navbar */
    #header {
        background-image: none;
        padding: 0;
    }
    #header::before { display: none; }

    .headercontent {
        background-image: var(--header-image);
        background-size: cover;
        background-position: center center;
        text-align: center;
        padding: 150px 10px;
        position: relative;
    }
    .headercontent::before {
        content: '';
        position: absolute;
        inset: 0;
        background-color: var(--header-overlay, rgba(0,0,0,0.4));
        pointer-events: none;
    }
    .headercontent > * {
        position: relative;
    }

    .headerbalken__row {
        padding-top: 0;
        flex-direction: column;
        align-items: stretch;
    }

    #logo {
        background-color: var(--color-white);
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 14px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    #logo img {
        width: var(--logo-width-tablet);
        height: auto;
        display: block;
    }

    .hero-content-box {
        padding: var(--section-pad-xsm);
    }

    #karte p { padding: 100px 20px; }

    #smartnavi {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        height: var(--nav-height);
        overflow: hidden;
    }

    /* Smartnavi klebt oben sobald JS .fixheader setzt */
    .fixheader #smartnavi {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        z-index: var(--z-nav);
    }

    #smartnavi a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        flex-shrink: 0;
        overflow: hidden;
    }

    #smartnavi .icon {
        width: 30px;
        height: 30px;
        padding: 0;
    }

    #mobil_menu { display: flex; }

    #menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 0;
        overflow: hidden;
        background-color: var(--color-white);
        z-index: 100;
        visibility: hidden;
    }

    #menu.divopen {
        visibility: visible;
    }

   
    #menu ul li a:focus-visible {
        color: var(--color-white);
    }


    /* Wenn gescrollt: Menü + Overlay fixed direkt unter dem Smartnavi-Balken */
    .fixheader #menu {
        position: fixed;
        top: var(--nav-height);
    }

    .fixheader #menu-overlay {
        top: var(--nav-height) !important;
    }

    #menu a {
        color: var(--color-primary);
    }

    #menu > ul > li > a::after { display: none; }

    /* Pfeil im responsiven Menü */
    #menu > ul > li:has(ul) > a {
        padding-right: 30px;
    }

    #menu > ul > li:has(ul) > a::after {
        display: block;
        background-color: transparent;
        bottom: auto;
        left: auto;
        right: 16px;
        top: 50%;
        width: 6px;
        height: 6px;
        border-right: 2px solid var(--color-primary);
        border-bottom: 2px solid var(--color-primary);
        transform: translateY(-70%) rotate(45deg);
        transform-origin: center center;
    }

    #menu li { display: block; width: 100%; }

    #menu > ul {
        display: block;
        width: 100%;
        font-size: 0.9375rem;
        margin: 0;
        padding: 8px 0 0;
    }

    #menu ul li a {
        display: block;
        padding: 12px 16px;
        border-bottom: var(--border-base);
    }

    #menu .on,
    #menu ul li a:hover,
    #menu ul li a:focus-visible {
        background-color: var(--color-primary);
        color: var(--color-white) !important;
        text-decoration: none !important;
    }

    #menu > ul > li:has(ul) > a:hover::after,
    #menu > ul > li:has(ul) > a.on::after {
        border-right-color: var(--color-white);
        border-bottom-color: var(--color-white);
    }

    /* Untermenü mobile: inline statt absolut, per JS .openchildren gesteuert */
    #menu ul ul {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
        display: none;
        position: static;
        min-width: 100%;
        border-top: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        background-color: var(--color-gray);
    }

    #menu ul ul li { text-align: left; }

    #menu ul ul li a:hover,
    #menu ul ul li a.on {
        background-color: var(--color-primary);
        color: var(--color-white) !important;
    }

    /* Desktop-Hover + Focus-within deaktivieren auf Mobile */
    #menu ul li:hover ul,
    #menu ul li:focus-within ul { display: none; }

    .section {
        padding: var(--section-pad-sm) 0;
    }

    .col-md-6 h2      { font-size: 1.375rem; }
    .section--split   { background: var(--color-primary); }
    .section--nosplit { background-color: var(--color-primary); }

    #headerbalken svg { fill: var(--color-white); }
    #headerbalken     { background-color: var(--color-primary); }

    .iconlist   { gap: 5px; }

    .parallax1 { background-attachment: scroll; }

    .wrap--wide.headerbalken__row {
        width: 100%;
        padding: 0;
    }

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

    #galerie { grid-template-columns: repeat(2, 1fr); }
    .sticky  { position: static; }
}

/* --- max-width: 780px ----------------------------------------------------- */
@media (max-width: 780px) {
    footer { text-align: center; }
    #menu { width: 100%; }

    .timeline::before { left: 18px; translate: 0 0; }
    .timeline::after  { left: 10px; translate: 0 0; }
    .tl-item          { grid-template-columns: 36px 1fr; }
    .tl-card          { grid-column: 2 !important; width: 100% !important; }

    .drw-buttons { width: 60px !important; height: 60px !important; }

    .notdienst-tabelle,
    .notdienst-tabelle thead,
    .notdienst-tabelle tbody,
    .notdienst-tabelle th,
    .notdienst-tabelle td,
    .notdienst-tabelle tr { display: block; width: 100%; }

    .notdienst-tabelle thead { display: none; }

    .notdienst-tabelle tr {
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-sm);
        background: var(--color-gray);
    }

    .notdienst-tabelle td::before {
        content: attr(data-label);
        font-weight: var(--fw-bold);
        display: block;
        margin-bottom: 5px;
    }

    #galerie { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .headercontent { padding: 100px 10px; }
}
