/* =========================================================
   Baugenossenschaft Laufen - Joomla 6 / Cassiopeia
========================================================= */

:root {
    --cassiopeia-color-primary: #15356f;
    --bauge-blue: #15356f;
    --bauge-blue-dark: #082b5f;
    --bauge-border: #d9dee8;
    --bauge-content-width: 1280px;
}

/* Grundlayout */
body {
    background: #fff;
}

.grid-child,
.site-grid,
.container-footer .grid-child {
    max-width: var(--bauge-content-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =========================================================
   HEADER
========================================================= */

.container-header {
    background: #fff !important;
    color: var(--bauge-blue);
    padding: 10px 0 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.container-header .grid-child:first-child {
    min-height: 80px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px !important;
}

.navbar-brand {
    margin: 0 !important;
}

.navbar-brand img,
.brand-logo img {
    max-height: 120px !important;
    width: auto !important;
    max-width: 420px !important;
}

.container-header .container-search {
    position: absolute;
    top: 28px;
    right: calc((100vw - var(--bauge-content-width)) / 2 + 20px);
    color: var(--bauge-blue);
    font-size: 17px;
    font-weight: 600;
}

.header-contact {
    line-height: 1.8;
}

.header-contact i {
    width: 24px;
    color: var(--bauge-blue);
}

.header-contact a {
    color: var(--bauge-blue);
    text-decoration: none;
}

/* =========================================================
   MENÜ
========================================================= */

.container-nav {
    background: var(--bauge-blue-dark) !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.container-nav .mod-menu {
    max-width: var(--bauge-content-width);
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
}

.container-nav .mod-menu > li > a,
.container-nav .mod-menu > li > span {
    color: #fff !important;
    padding: 12px 24px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-decoration: none;
}

.container-nav .mod-menu > li.active > a,
.container-nav .mod-menu > li > a:hover {
    background: rgba(255,255,255,.14);
}

/* =========================================================
   SLIDER
========================================================= */

.container-banner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #dce9f8 !important;
}

.container-banner .mod-custom {
    width: 100% !important;
    max-width: var(--bauge-content-width) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

.hero-slider {
    width: 100% !important;
    height: 340px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #fff !important;
}

.hero-slider .slides {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 300% !important;
    height: 340px !important;
    animation: heroSlide 18s infinite !important;
}

.hero-slider .slides img {
    width: 33.333333% !important;
    min-width: 33.333333% !important;
    height: 340px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    background: #fff !important;
}

@keyframes heroSlide {
    0%, 28% { transform: translateX(0); }
    33%, 61% { transform: translateX(-33.333333%); }
    66%, 94% { transform: translateX(-66.666666%); }
    100% { transform: translateX(0); }
}

/* =========================================================
   CONTENT
========================================================= */

.site-grid {
    background: #fff;
    padding: 35px 20px 40px !important;
}

.container-component {
    max-width: none !important;
}

.item-page .page-header h1 {
    display: none;
}

.item-page h1 {
    color: var(--bauge-blue);
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 24px;
}

.item-page p {
    font-size: 17px;
    line-height: 1.8;
}

/* =========================================================
   WOHNUNGSBESTAND
========================================================= */

.container-sidebar-right {
    align-self: stretch !important;
}

.container-sidebar-right .card {
    height: 100% !important;
    min-height: 360px !important;
    border: 1px solid var(--bauge-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(8,43,95,.08);
    overflow: hidden;
    background: #fff;
}

.wohn-card {
    height: 100%;
    min-height: 360px;
    padding: 24px !important;
    display: flex;
    flex-direction: column;
}

.wohn-card h3 {
    color: var(--bauge-blue) !important;
    font-size: 22px !important;
    margin: 0 0 18px !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wohn-card h3 i {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--bauge-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.wohnungsliste {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.wohnungsliste li {
    padding: 9px 0;
    border-bottom: 1px solid #e5e5e5;
    font-size: 16px;
    color: #333;
}

.wohnungsliste li i {
    color: var(--bauge-blue);
    width: 22px;
}

/* =========================================================
   INFOKARTEN
========================================================= */

.main-bottom.card {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-top: 35px !important;
}

.main-bottom .card-header {
    display: none !important;
}

.main-bottom .card-body {
    padding: 0 !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

.stat-box {
    width: 100% !important;
    min-height: 145px !important;
    display: grid !important;
    grid-template-columns: 64px 1fr !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 24px 26px !important;
    background: #fff !important;
    border: 1px solid var(--bauge-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(8,43,95,.08) !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.stat-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    background: var(--bauge-blue) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
    flex-shrink: 0 !important;
}

.stat-text h3,
.stat-box h3 {
    margin: 0 0 6px !important;
    color: var(--bauge-blue) !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.stat-text p,
.stat-box p {
    margin: 0 !important;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

/* =========================================================
   FOOTER
========================================================= */

.container-footer {
    background: var(--bauge-blue-dark) !important;
    color: #fff;
    padding: 45px 0 22px !important;
}

.container-footer .grid-child {
    width: 100% !important;
    max-width: var(--bauge-content-width) !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1.4fr 1fr 1fr !important;
    gap: 90px !important;
    align-items: start !important;
    color: #fff;
}

.footer-grid h4 {
    color: #fff;
    margin: 0 0 15px;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: #fff;
    font-size: 16px;
    line-height: 1.7;
    text-decoration: none;
}

.footer-grid a:hover {
    text-decoration: underline;
}

.footer-grid i {
    width: 24px;
}

.footer-indent {
    margin-left: 28px;
}

.footer-copy {
    width: 100%;
    max-width: var(--bauge-content-width);
    margin: 28px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.25);
    text-align: center;
    color: #fff;
    font-size: 15px;
}

/* altes Footer-Menü ausblenden, falls noch aktiv */
.container-footer > .grid-child > .mod-menu {
    display: none !important;
}

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

@media (max-width: 1200px) {
    .container-header .container-search {
        right: 20px;
    }
}

@media (max-width: 992px) {
    .container-header .grid-child:first-child {
        flex-direction: column;
        gap: 10px;
    }

    .container-header .container-search {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }

    .container-nav .mod-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .stats-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-slider,
    .hero-slider .slides,
    .hero-slider .slides img {
        height: 280px !important;
    }
}

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

    .stat-box {
        grid-template-columns: 58px 1fr !important;
    }

    .hero-slider,
    .hero-slider .slides,
    .hero-slider .slides img {
        height: 220px !important;
    }

    .navbar-brand img,
    .brand-logo img {
        max-height: 75px !important;
    }

    .item-page h1 {
        font-size: 28px;
    }
}

/* FINAL FIX: Layout sauber trennen */

/* Wohnungsbestand nicht mehr künstlich strecken */
.container-sidebar-right .card,
.wohn-card {
    height: auto !important;
    min-height: auto !important;
}

/* Infokarten in bottom-a über komplette Inhaltsbreite */
.container-bottom-a {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 10px 20px 45px !important;
}

.container-bottom-a .card,
.container-bottom-a .card-body {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.container-bottom-a .card-header {
    display: none !important;
}

.container-bottom-a .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

.container-bottom-a .stat-box {
    min-height: 125px !important;
    display: grid !important;
    grid-template-columns: 64px 1fr !important;
    align-items: center !important;
}

/* Footer volle Inhaltsbreite */
.container-footer {
    width: 100% !important;
    max-width: none !important;
}

.container-footer .grid-child {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1.4fr 1fr 1fr !important;
    gap: 90px !important;
}

/* Mobile */
@media (max-width: 992px) {
    .container-bottom-a .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .container-bottom-a .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
    }
}

.wohn-card h3 {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
}

.wohn-card h3 i {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 50%;
    background: #15356f;
    color: #fff;

    margin-top: 0 !important;
}

.footer-grid {
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr !important;

    gap: 120px !important;

    max-width: 1280px !important;
    margin: 0 auto !important;
}

.container-footer .grid-child {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* =========================================================
   FINAL FOOTER FIX
========================================================= */

.container-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 45px 0 22px !important;
}

.container-footer .grid-child {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* Das eigentliche Custom-Modul im Footer auf volle Breite zwingen */
.container-footer .mod-custom,
.container-footer .custom {
    width: 100% !important;
    max-width: 100% !important;
}

.footer-grid {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1.6fr 1fr 1fr !important;
    column-gap: 140px !important;
    align-items: start !important;
}

/* Copyright-Linie auf gleiche Breite */
.footer-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 30px !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(255,255,255,.25) !important;
    text-align: center !important;
}

/* FINAL SLIDER JOOMLA */
.container-banner {
    background: linear-gradient(90deg, #dbe9fb 0%, #ffffff 18%, #ffffff 82%, #dbe9fb 100%) !important;
}

.container-banner .mod-custom {
    max-width: none !important;
    width: 100% !important;
    background: transparent !important;
}

.bauge-slider {
    position: relative;
    width: 100%;
    height: 385px;
    overflow: hidden;
}

.bauge-slider input {
    display: none;
}

.bauge-slides {
    width: 300%;
    height: 100%;
    display: flex;
    transition: transform .7s ease;
}

.bauge-slide {
    width: 33.333333%;
    height: 100%;
}

.bauge-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

#slide-1:checked ~ .bauge-slides {
    transform: translateX(0);
}

#slide-2:checked ~ .bauge-slides {
    transform: translateX(-33.333333%);
}

#slide-3:checked ~ .bauge-slides {
    transform: translateX(-66.666666%);
}

.slider-arrows label {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0,0,0,.18);
    color: #fff;
    font-size: 58px;
    line-height: 46px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
}

.slider-arrows .prev {
    left: 8%;
}

.slider-arrows .next {
    right: 8%;
}

#slide-1:checked ~ .slider-arrows .prev-1,
#slide-1:checked ~ .slider-arrows .next-1,
#slide-2:checked ~ .slider-arrows .prev-2,
#slide-2:checked ~ .slider-arrows .next-2,
#slide-3:checked ~ .slider-arrows .prev-3,
#slide-3:checked ~ .slider-arrows .next-3 {
    display: block;
}

.slider-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 6;
}

.slider-dots label {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(255,255,255,.35);
    cursor: pointer;
}

#slide-1:checked ~ .slider-dots label:nth-child(1),
#slide-2:checked ~ .slider-dots label:nth-child(2),
#slide-3:checked ~ .slider-dots label:nth-child(3) {
    background: #fff;
}

@media (max-width: 992px) {
    .bauge-slider {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .bauge-slider {
        height: 220px;
    }

    .slider-arrows label {
        width: 42px;
        height: 42px;
        font-size: 44px;
        line-height: 34px;
    }
}

.stat-box:hover {
    transform: translateY(-3px);
    transition: .2s;
}

.organe-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin: 24px 0 34px;
}

.organe-box,
.info-box,
.download-box {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.organe-box {
    padding: 24px 28px;
}

.organe-box h3 {
    color: #15356f;
    margin-top: 0;
    margin-bottom: 16px;
}

.organe-box ul {
    margin: 0;
    padding-left: 20px;
}

.organe-box li {
    margin-bottom: 8px;
}

.organe-box li span {
    color: #666;
    font-size: .92em;
}

.info-box {
    padding: 22px 26px;
    margin: 16px 0 34px;
}

.download-box {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 28px;
    margin: 18px 0 30px;
    border-left: 6px solid #15356f;
}

.download-icon {
    width: 66px;
    height: 66px;
    min-width: 66px;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.download-content h3 {
    margin: 0 0 8px;
    color: #15356f;
}

.download-content p {
    margin-bottom: 16px;
}

.download-button {
    display: inline-block;
    background: #15356f;
    color: #fff !important;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none !important;
}

.download-button:hover {
    background: #0f2a59;
}

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

    .download-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px;
    margin: 30px 0;
}

.download-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.download-card .download-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #15356f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.download-card h3 {
    color: #15356f;
    margin-bottom: 10px;
}

.download-card p {
    min-height: 70px;
}

@media (max-width: 900px) {
    .download-grid {
        grid-template-columns: 1fr;
    }
}

.kontakt-box {
    display: flex;
    gap: 30px;
    align-items: center;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    margin: 25px 0 35px;
}

.kontakt-icon {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.kontakt-daten h2 {
    color: #15356f;
    margin-top: 0;
}

.download-card {
    margin: 30px auto;
    max-width: 600px;
    background: #fff;
    border: 1px solid #e3e8f0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,.06);
}

.download-icon {
    font-size: 42px;
    color: #173a73;
    margin-bottom: 15px;
}

.download-card h3 {
    color: #173a73;
    margin-bottom: 10px;
}

.download-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #173a73;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: .3s;
}

.download-button:hover {
    background: #214b92;
    transform: translateY(-2px);
}



/* Wohnungsbestand Modul + Modal - optimiert */
.wb-module-modern {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
    max-width: 100%;
    overflow: hidden;
}

.wb-module-modern h3 {
    margin: 0 0 8px;
    color: #15356f;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 21px;
    line-height: 1.25;
    white-space: normal;
}

.wb-small {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.35;
}

.wb-place {
    border-top: 1px solid #edf0f5;
    padding: 7px 0;
}

.wb-place:not([open]) .wb-object-list {
    display: none;
}

.wb-place summary {
    cursor: pointer;
    font-weight: 700;
    color: #15356f;
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.wb-place summary::-webkit-details-marker {
    display: none;
}

.wb-object-list {
    padding: 8px 0 2px;
}

.wb-object-btn {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 7px 0;
    border-bottom: 1px solid #edf0f5;
    color: #263747;
    cursor: pointer;
    font-size: 12.5px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.wb-object-btn:hover {
    color: #15356f;
    font-weight: 700;
}

.wb-object-btn span {
    color: #7a8794;
    font-size: 11.5px;
    white-space: nowrap;
}

/* Modal */
.wb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.wb-modal.is-open {
    display: block;
}

.wb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8,21,42,.74);
}

.wb-modal-dialog {
    position: relative;
    max-width: 1050px;
    max-height: 92vh;
    overflow: auto;
    margin: 4vh auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 70px rgba(0,0,0,.35);
    padding: 32px;
}

.wb-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.wb-modal-header p {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 5px;
    background: #15356f;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12px;
}

.wb-modal-header h2 {
    margin: 0 48px 18px 0;
    color: #15356f;
    font-size: 30px;
    line-height: 1.2;
}

.wb-image-wrap {
    margin-bottom: 12px;
}

.wb-image-wrap img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    background: #f3f5f8;
}

.wb-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 22px;
}

.wb-thumb {
    border: 2px solid transparent;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: none;
    cursor: pointer;
}

.wb-thumb.active {
    border-color: #15356f;
}

.wb-thumb img {
    width: 118px;
    height: 76px;
    object-fit: cover;
    display: block;
}

.wb-info-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin: 20px 0;
}

.wb-info-grid div {
    background: #f6f8fb;
    border-radius: 10px;
    padding: 15px;
}

.wb-info-grid strong {
    display: block;
    color: #15356f;
    font-size: 13px;
    margin-bottom: 6px;
}

.wb-detail-tables {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 24px;
}

.wb-detail-tables h3 {
    color: #15356f;
    margin-bottom: 10px;
}

.wb-detail-tables table {
    width: 100%;
    border-collapse: collapse;
}

.wb-detail-tables td {
    padding: 9px 6px;
    border-bottom: 1px solid #e7ebf1;
}

.wb-detail-tables td:last-child {
    text-align: right;
    font-weight: 700;
    color: #15356f;
}

.wb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    font-size: 34px;
    line-height: 38px;
    cursor: pointer;
    z-index: 100000;
}

.wb-prev {
    left: calc(50% - 590px);
}

.wb-next {
    right: calc(50% - 590px);
}

body.wb-modal-open {
    overflow: hidden;
}

/* Mobile */
@media (max-width: 1000px) {
    .wb-modal-dialog {
        margin: 3vh 14px;
        max-height: 94vh;
        padding: 22px;
    }

    .wb-nav {
        display: none;
    }

    .wb-info-grid,
    .wb-detail-tables {
        grid-template-columns: 1fr;
    }

    .wb-image-wrap img {
        height: 280px;
    }

    .wb-thumb img {
        width: 88px;
        height: 58px;
    }

    .wb-modal-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .wb-module-modern {
        padding: 15px;
    }

    .wb-module-modern h3 {
        font-size: 19px;
    }

    .wb-object-btn {
        font-size: 12px;
    }

    .wb-image-wrap img {
        height: 220px;
    }
}



/* =========================================================
   Baugenossenschaft Laufen - Joomla 6 / Cassiopeia
========================================================= */

:root {
    --cassiopeia-color-primary: #15356f;
    --bauge-blue: #15356f;
    --bauge-blue-dark: #082b5f;
    --bauge-border: #d9dee8;
    --bauge-content-width: 1280px;
}

/* Grundlayout */
body {
    background: #fff;
}

.grid-child,
.site-grid,
.container-footer .grid-child {
    max-width: var(--bauge-content-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =========================================================
   HEADER
========================================================= */

.container-header {
    background: #fff !important;
    color: var(--bauge-blue);
    padding: 10px 0 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.container-header .grid-child:first-child {
    min-height: 80px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px !important;
}

.navbar-brand {
    margin: 0 !important;
}

.navbar-brand img,
.brand-logo img {
    max-height: 120px !important;
    width: auto !important;
    max-width: 420px !important;
}

.container-header .container-search {
    position: absolute;
    top: 28px;
    right: calc((100vw - var(--bauge-content-width)) / 2 + 20px);
    color: var(--bauge-blue);
    font-size: 17px;
    font-weight: 600;
}

.header-contact {
    line-height: 1.8;
}

.header-contact i {
    width: 24px;
    color: var(--bauge-blue);
}

.header-contact a {
    color: var(--bauge-blue);
    text-decoration: none;
}

/* =========================================================
   MENÜ
========================================================= */

.container-nav {
    background: var(--bauge-blue-dark) !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.container-nav .mod-menu {
    max-width: var(--bauge-content-width);
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
}

.container-nav .mod-menu > li > a,
.container-nav .mod-menu > li > span {
    color: #fff !important;
    padding: 12px 24px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-decoration: none;
}

.container-nav .mod-menu > li.active > a,
.container-nav .mod-menu > li > a:hover {
    background: rgba(255,255,255,.14);
}

/* =========================================================
   SLIDER
========================================================= */

.container-banner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #dce9f8 !important;
}

.container-banner .mod-custom {
    width: 100% !important;
    max-width: var(--bauge-content-width) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

.hero-slider {
    width: 100% !important;
    height: 340px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #fff !important;
}

.hero-slider .slides {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 300% !important;
    height: 340px !important;
    animation: heroSlide 18s infinite !important;
}

.hero-slider .slides img {
    width: 33.333333% !important;
    min-width: 33.333333% !important;
    height: 340px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    background: #fff !important;
}

@keyframes heroSlide {
    0%, 28% { transform: translateX(0); }
    33%, 61% { transform: translateX(-33.333333%); }
    66%, 94% { transform: translateX(-66.666666%); }
    100% { transform: translateX(0); }
}

/* =========================================================
   CONTENT
========================================================= */

.site-grid {
    background: #fff;
    padding: 35px 20px 40px !important;
}

.container-component {
    max-width: none !important;
}

.item-page .page-header h1 {
    display: none;
}

.item-page h1 {
    color: var(--bauge-blue);
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 24px;
}

.item-page p {
    font-size: 17px;
    line-height: 1.8;
}

/* =========================================================
   WOHNUNGSBESTAND
========================================================= */

.container-sidebar-right {
    align-self: stretch !important;
}

.container-sidebar-right .card {
    height: 100% !important;
    min-height: 360px !important;
    border: 1px solid var(--bauge-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(8,43,95,.08);
    overflow: hidden;
    background: #fff;
}

.wohn-card {
    height: 100%;
    min-height: 360px;
    padding: 24px !important;
    display: flex;
    flex-direction: column;
}

.wohn-card h3 {
    color: var(--bauge-blue) !important;
    font-size: 22px !important;
    margin: 0 0 18px !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wohn-card h3 i {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--bauge-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.wohnungsliste {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.wohnungsliste li {
    padding: 9px 0;
    border-bottom: 1px solid #e5e5e5;
    font-size: 16px;
    color: #333;
}

.wohnungsliste li i {
    color: var(--bauge-blue);
    width: 22px;
}

/* =========================================================
   INFOKARTEN
========================================================= */

.main-bottom.card {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-top: 35px !important;
}

.main-bottom .card-header {
    display: none !important;
}

.main-bottom .card-body {
    padding: 0 !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

.stat-box {
    width: 100% !important;
    min-height: 145px !important;
    display: grid !important;
    grid-template-columns: 64px 1fr !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 24px 26px !important;
    background: #fff !important;
    border: 1px solid var(--bauge-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(8,43,95,.08) !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.stat-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    background: var(--bauge-blue) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
    flex-shrink: 0 !important;
}

.stat-text h3,
.stat-box h3 {
    margin: 0 0 6px !important;
    color: var(--bauge-blue) !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.stat-text p,
.stat-box p {
    margin: 0 !important;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

/* =========================================================
   FOOTER
========================================================= */

.container-footer {
    background: var(--bauge-blue-dark) !important;
    color: #fff;
    padding: 45px 0 22px !important;
}

.container-footer .grid-child {
    width: 100% !important;
    max-width: var(--bauge-content-width) !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1.4fr 1fr 1fr !important;
    gap: 90px !important;
    align-items: start !important;
    color: #fff;
}

.footer-grid h4 {
    color: #fff;
    margin: 0 0 15px;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: #fff;
    font-size: 16px;
    line-height: 1.7;
    text-decoration: none;
}

.footer-grid a:hover {
    text-decoration: underline;
}

.footer-grid i {
    width: 24px;
}

.footer-indent {
    margin-left: 28px;
}

.footer-copy {
    width: 100%;
    max-width: var(--bauge-content-width);
    margin: 28px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.25);
    text-align: center;
    color: #fff;
    font-size: 15px;
}

/* altes Footer-Menü ausblenden, falls noch aktiv */
.container-footer > .grid-child > .mod-menu {
    display: none !important;
}

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

@media (max-width: 1200px) {
    .container-header .container-search {
        right: 20px;
    }
}

@media (max-width: 992px) {
    .container-header .grid-child:first-child {
        flex-direction: column;
        gap: 10px;
    }

    .container-header .container-search {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }

    .container-nav .mod-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .stats-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-slider,
    .hero-slider .slides,
    .hero-slider .slides img {
        height: 280px !important;
    }
}

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

    .stat-box {
        grid-template-columns: 58px 1fr !important;
    }

    .hero-slider,
    .hero-slider .slides,
    .hero-slider .slides img {
        height: 220px !important;
    }

    .navbar-brand img,
    .brand-logo img {
        max-height: 75px !important;
    }

    .item-page h1 {
        font-size: 28px;
    }
}

/* FINAL FIX: Layout sauber trennen */

/* Wohnungsbestand nicht mehr künstlich strecken */
.container-sidebar-right .card,
.wohn-card {
    height: auto !important;
    min-height: auto !important;
}

/* Infokarten in bottom-a über komplette Inhaltsbreite */
.container-bottom-a {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 10px 20px 45px !important;
}

.container-bottom-a .card,
.container-bottom-a .card-body {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.container-bottom-a .card-header {
    display: none !important;
}

.container-bottom-a .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

.container-bottom-a .stat-box {
    min-height: 125px !important;
    display: grid !important;
    grid-template-columns: 64px 1fr !important;
    align-items: center !important;
}

/* Footer volle Inhaltsbreite */
.container-footer {
    width: 100% !important;
    max-width: none !important;
}

.container-footer .grid-child {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1.4fr 1fr 1fr !important;
    gap: 90px !important;
}

/* Mobile */
@media (max-width: 992px) {
    .container-bottom-a .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .container-bottom-a .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
    }
}

.wohn-card h3 {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
}

.wohn-card h3 i {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 50%;
    background: #15356f;
    color: #fff;

    margin-top: 0 !important;
}

.footer-grid {
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr !important;

    gap: 120px !important;

    max-width: 1280px !important;
    margin: 0 auto !important;
}

.container-footer .grid-child {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* =========================================================
   FINAL FOOTER FIX
========================================================= */

.container-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 45px 0 22px !important;
}

.container-footer .grid-child {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* Das eigentliche Custom-Modul im Footer auf volle Breite zwingen */
.container-footer .mod-custom,
.container-footer .custom {
    width: 100% !important;
    max-width: 100% !important;
}

.footer-grid {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1.6fr 1fr 1fr !important;
    column-gap: 140px !important;
    align-items: start !important;
}

/* Copyright-Linie auf gleiche Breite */
.footer-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 30px !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(255,255,255,.25) !important;
    text-align: center !important;
}

/* FINAL SLIDER JOOMLA */
.container-banner {
    background: linear-gradient(90deg, #dbe9fb 0%, #ffffff 18%, #ffffff 82%, #dbe9fb 100%) !important;
}

.container-banner .mod-custom {
    max-width: none !important;
    width: 100% !important;
    background: transparent !important;
}

.bauge-slider {
    position: relative;
    width: 100%;
    height: 385px;
    overflow: hidden;
}

.bauge-slider input {
    display: none;
}

.bauge-slides {
    width: 300%;
    height: 100%;
    display: flex;
    transition: transform .7s ease;
}

.bauge-slide {
    width: 33.333333%;
    height: 100%;
}

.bauge-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

#slide-1:checked ~ .bauge-slides {
    transform: translateX(0);
}

#slide-2:checked ~ .bauge-slides {
    transform: translateX(-33.333333%);
}

#slide-3:checked ~ .bauge-slides {
    transform: translateX(-66.666666%);
}

.slider-arrows label {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0,0,0,.18);
    color: #fff;
    font-size: 58px;
    line-height: 46px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
}

.slider-arrows .prev {
    left: 8%;
}

.slider-arrows .next {
    right: 8%;
}

#slide-1:checked ~ .slider-arrows .prev-1,
#slide-1:checked ~ .slider-arrows .next-1,
#slide-2:checked ~ .slider-arrows .prev-2,
#slide-2:checked ~ .slider-arrows .next-2,
#slide-3:checked ~ .slider-arrows .prev-3,
#slide-3:checked ~ .slider-arrows .next-3 {
    display: block;
}

.slider-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 6;
}

.slider-dots label {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(255,255,255,.35);
    cursor: pointer;
}

#slide-1:checked ~ .slider-dots label:nth-child(1),
#slide-2:checked ~ .slider-dots label:nth-child(2),
#slide-3:checked ~ .slider-dots label:nth-child(3) {
    background: #fff;
}

@media (max-width: 992px) {
    .bauge-slider {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .bauge-slider {
        height: 220px;
    }

    .slider-arrows label {
        width: 42px;
        height: 42px;
        font-size: 44px;
        line-height: 34px;
    }
}

.stat-box:hover {
    transform: translateY(-3px);
    transition: .2s;
}

.organe-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin: 24px 0 34px;
}

.organe-box,
.info-box,
.download-box {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.organe-box {
    padding: 24px 28px;
}

.organe-box h3 {
    color: #15356f;
    margin-top: 0;
    margin-bottom: 16px;
}

.organe-box ul {
    margin: 0;
    padding-left: 20px;
}

.organe-box li {
    margin-bottom: 8px;
}

.organe-box li span {
    color: #666;
    font-size: .92em;
}

.info-box {
    padding: 22px 26px;
    margin: 16px 0 34px;
}

.download-box {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 28px;
    margin: 18px 0 30px;
    border-left: 6px solid #15356f;
}

.download-icon {
    width: 66px;
    height: 66px;
    min-width: 66px;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.download-content h3 {
    margin: 0 0 8px;
    color: #15356f;
}

.download-content p {
    margin-bottom: 16px;
}

.download-button {
    display: inline-block;
    background: #15356f;
    color: #fff !important;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none !important;
}

.download-button:hover {
    background: #0f2a59;
}

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

    .download-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px;
    margin: 30px 0;
}

.download-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.download-card .download-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #15356f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.download-card h3 {
    color: #15356f;
    margin-bottom: 10px;
}

.download-card p {
    min-height: 70px;
}

@media (max-width: 900px) {
    .download-grid {
        grid-template-columns: 1fr;
    }
}

.kontakt-box {
    display: flex;
    gap: 30px;
    align-items: center;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    margin: 25px 0 35px;
}

.kontakt-icon {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.kontakt-daten h2 {
    color: #15356f;
    margin-top: 0;
}

.download-card {
    margin: 30px auto;
    max-width: 600px;
    background: #fff;
    border: 1px solid #e3e8f0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,.06);
}

.download-icon {
    font-size: 42px;
    color: #173a73;
    margin-bottom: 15px;
}

.download-card h3 {
    color: #173a73;
    margin-bottom: 10px;
}

.download-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #173a73;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: .3s;
}

.download-button:hover {
    background: #214b92;
    transform: translateY(-2px);
}



/* Wohnungsbestand Modul + Modal - optimiert */
.wb-module-modern {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
    max-width: 100%;
    overflow: hidden;
}

.wb-module-modern h3 {
    margin: 0 0 8px;
    color: #15356f;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 21px;
    line-height: 1.25;
    white-space: normal;
}

.wb-small {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.35;
}

.wb-place {
    border-top: 1px solid #edf0f5;
    padding: 7px 0;
}

.wb-place:not([open]) .wb-object-list {
    display: none;
}

.wb-place summary {
    cursor: pointer;
    font-weight: 700;
    color: #15356f;
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.wb-place summary::-webkit-details-marker {
    display: none;
}

.wb-object-list {
    padding: 8px 0 2px;
}

.wb-object-btn {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 7px 0;
    border-bottom: 1px solid #edf0f5;
    color: #263747;
    cursor: pointer;
    font-size: 12.5px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.wb-object-btn:hover {
    color: #15356f;
    font-weight: 700;
}

.wb-object-btn span {
    color: #7a8794;
    font-size: 11.5px;
    white-space: nowrap;
}

/* Modal */
.wb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.wb-modal.is-open {
    display: block;
}

.wb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8,21,42,.74);
}

.wb-modal-dialog {
    position: relative;
    max-width: 1050px;
    max-height: 92vh;
    overflow: auto;
    margin: 4vh auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 70px rgba(0,0,0,.35);
    padding: 32px;
}

.wb-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.wb-modal-header p {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 5px;
    background: #15356f;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12px;
}

.wb-modal-header h2 {
    margin: 0 48px 18px 0;
    color: #15356f;
    font-size: 30px;
    line-height: 1.2;
}

.wb-image-wrap {
    margin-bottom: 12px;
}

.wb-image-wrap img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    background: #f3f5f8;
}

.wb-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 22px;
}

.wb-thumb {
    border: 2px solid transparent;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: none;
    cursor: pointer;
}

.wb-thumb.active {
    border-color: #15356f;
}

.wb-thumb img {
    width: 118px;
    height: 76px;
    object-fit: cover;
    display: block;
}

.wb-info-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin: 20px 0;
}

.wb-info-grid div {
    background: #f6f8fb;
    border-radius: 10px;
    padding: 15px;
}

.wb-info-grid strong {
    display: block;
    color: #15356f;
    font-size: 13px;
    margin-bottom: 6px;
}

.wb-detail-tables {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 24px;
}

.wb-detail-tables h3 {
    color: #15356f;
    margin-bottom: 10px;
}

.wb-detail-tables table {
    width: 100%;
    border-collapse: collapse;
}

.wb-detail-tables td {
    padding: 9px 6px;
    border-bottom: 1px solid #e7ebf1;
}

.wb-detail-tables td:last-child {
    text-align: right;
    font-weight: 700;
    color: #15356f;
}

.wb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #15356f;
    color: #fff;
    font-size: 34px;
    line-height: 38px;
    cursor: pointer;
    z-index: 100000;
}

.wb-prev {
    left: calc(50% - 590px);
}

.wb-next {
    right: calc(50% - 590px);
}

body.wb-modal-open {
    overflow: hidden;
}

/* Mobile */
@media (max-width: 1000px) {
    .wb-modal-dialog {
        margin: 3vh 14px;
        max-height: 94vh;
        padding: 22px;
    }

    .wb-nav {
        display: none;
    }

    .wb-info-grid,
    .wb-detail-tables {
        grid-template-columns: 1fr;
    }

    .wb-image-wrap img {
        height: 280px;
    }

    .wb-thumb img {
        width: 88px;
        height: 58px;
    }

    .wb-modal-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .wb-module-modern {
        padding: 15px;
    }

    .wb-module-modern h3 {
        font-size: 19px;
    }

    .wb-object-btn {
        font-size: 12px;
    }

    .wb-image-wrap img {
        height: 220px;
    }
}

/* =========================================================
   FINAL MOBILE OPTIMIERUNG
========================================================= */

@media (max-width: 992px) {
    body { overflow-x:hidden; }
    .site-grid { padding:24px 16px 34px !important; }
}

@media (max-width: 768px) {
    .stats-grid,
    .container-bottom-a .stats-grid {
        grid-template-columns:1fr !important;
        gap:16px !important;
    }

    .footer-grid {
        grid-template-columns:1fr !important;
        gap:28px !important;
    }

    .kontakt-box {
        flex-direction:column;
        align-items:flex-start;
    }
}

@media (max-width: 600px) {
    .item-page h1 { font-size:26px !important; }
}

/* Footer Copyright */
.footer-copy {
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* Design-Hinweis */
.footer-credit {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.60);
    letter-spacing: 0.3px;
}

.footer-credit a {
    color: rgba(255,255,255,0.70);
    text-decoration: none;
    transition: color .2s ease;
}

.footer-credit a:hover {
    color: #c4a05a;
}

/* Footer Copyright */
.footer-copy {
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* Design-Hinweis */
.footer-credit {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.60);
    letter-spacing: 0.3px;
}

.footer-credit a {
    color: rgba(255,255,255,0.70);
    text-decoration: none;
    transition: color .2s ease;
}

.footer-credit a:hover {
    color: #c4a05a;
}

/* =========================================================
   FINAL FIX: Mobile Header + Menü geschlossen
========================================================= */

/* Desktop: Menü immer sichtbar, Hamburger aus */
@media (min-width: 992px) {
    .bauge-menu-toggle {
        display: none !important;
    }

    #baugeMobileMenu {
        display: block !important;
    }

    #baugeMobileMenu .mod-menu {
        display: flex !important;
    }
}

/* Mobile: Menü geschlossen, per Button öffnen */
@media (max-width: 991.98px) {
    .container-nav {
        min-height: 52px;
        padding: 8px 16px !important;
    }

    .bauge-menu-toggle {
        display: inline-block !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,.45) !important;
        padding: 8px 12px !important;
        font-weight: 700 !important;
        background: transparent !important;
    }

    #baugeMobileMenu:not(.show) {
        display: none !important;
    }

    #baugeMobileMenu.show {
        display: block !important;
    }

    #baugeMobileMenu.show .mod-menu {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding-top: 12px !important;
    }

    #baugeMobileMenu.show .mod-menu > li > a,
    #baugeMobileMenu.show .mod-menu > li > span {
        display: block !important;
        width: 100% !important;
        padding: 14px 22px !important;
    }

    .container-header .container-search,
    .header-contact {
        display: block !important;
        position: static !important;
        text-align: center !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        color: #fff !important;
        margin: 6px 0 2px !important;
    }

    .header-contact a,
    .header-contact i {
        color: #fff !important;
    }
}

/* FIX: PDF Icon in Satzung sichtbar machen */
.download-box .download-icon {
    background: #15356f !important;
    color: #ffffff !important;
}

.download-box .download-icon i {
    color: #ffffff !important;
}