/* =========================================
   PHASE 6.1
   LAYOUT / RESPONSIVE
   Stadt-Kritik
========================================= */


/* =========================================
   HAUPT-LAYOUT
========================================= */

.site-layout {
    display: grid;
    grid-template-columns:
        220px
        minmax(0, 1fr);

    width: 100%;
    min-height: calc(100vh - 64px);

    background: #f5f7f9;
}


/* =========================================
   LAYOUT MIT UNTERNAVIGATION
========================================= */

.site-layout.with-subnav {
    grid-template-columns:
        220px
        250px
        minmax(0, 1fr);
}


/* =========================================
   LINKE NAVIGATION
========================================= */

.main-sidebar {
    min-width: 0;
    padding: 18px 14px;

    box-sizing: border-box;

    background: #ffffff;

    border-right: 1px solid #e3e7eb;

    overflow-y: auto;
}

.main-sidebar h2 {
    margin: 0 0 14px 0;

    font-size: 17px;
    line-height: 1.25;
}


/* =========================================
   MITTLERE NAVIGATION
========================================= */

.sub-sidebar {
    min-width: 0;
    padding: 18px 14px;

    box-sizing: border-box;

    background: #fafbfc;

    border-right: 1px solid #e3e7eb;

    overflow-y: auto;
}

.sub-sidebar h2 {
    margin: 0 0 14px 0;

    font-size: 17px;
    line-height: 1.25;
}


/* =========================================
   HAUPTINHALT
========================================= */

.content-area {
    min-width: 0;
    width: 100%;

    padding: 22px;

    box-sizing: border-box;

    overflow-x: hidden;
}

#content {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}


/* =========================================
   INHALTSKARTE
========================================= */

.content-card {
    width: 100%;
    max-width: 920px;

    padding: 18px;

    margin-bottom: 14px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e1e5e9;
    border-radius: 10px;

    box-shadow:
        0 2px 7px rgba(20, 30, 40, 0.05);
}

.content-card h1 {
    margin-top: 0;
}


/* =========================================
   KATEGORIE
========================================= */

.content-category {
    color: #66707a;
}


/* =========================================
   WILLKOMMEN
========================================= */

.welcome {
    width: 100%;
    max-width: 800px;
}


/* =========================================
   STARTSEITE
========================================= */

.home-page {
    width: 100%;
    max-width: 980px;

    margin: 0 auto;

    box-sizing: border-box;
}


/* =========================================
   HOME BANNER
========================================= */

.home-banner {
    width: 100%;

    box-sizing: border-box;

    padding: 16px 18px;
    margin-bottom: 16px;

    border: 1px solid #e0e5e8;
    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 2px 8px rgba(20, 30, 40, 0.05);
}

.home-banner::after {
    content: "";
    display: table;
    clear: both;
}

.home-banner-label {
    font-size: 13px;
    font-weight: 700;

    margin-bottom: 5px;

    color: #5d6872;
}

.home-banner h1 {
    margin: 0 0 6px 0;

    font-size: 22px;
    line-height: 1.25;
}

.home-banner p {
    margin: 0 0 11px 0;

    line-height: 1.45;
}

.home-banner-button {
    padding: 8px 13px;

    border: 1px solid #cfd6dc;
    border-radius: 7px;

    background: #f4f6f8;

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;
}

.home-banner-button:hover {
    background: #e9edf1;
}


/* =========================================
   HOME INFORMATION
========================================= */

.home-information {
    width: 100%;
    max-width: 800px;

    padding: 8px 2px;
}

.home-information h2 {
    margin-top: 0;
}


/* =========================================
   ZURÜCK BUTTON
========================================= */

.back-home-button {
    border: none;
    background: transparent;

    cursor: pointer;

    padding: 4px 0;
    margin-bottom: 10px;

    font-size: 14px;
}


/* =========================================
   HOME-BANNER BILD
========================================= */

.home-banner-image {
    width: 118px;
    height: 78px;

    object-fit: cover;

    border-radius: 7px;

    float: right;

    margin-left: 16px;
    margin-bottom: 8px;
}


/* =========================================
   PHASE 6.2
   DESKTOP / TABLET / MOBILE NAVIGATION
========================================= */

.mobile-navigation-bar,
.navigation-backdrop,
.sidebar-close-button {
    display: none;
}


/* =========================================
   DESKTOP
========================================= */

@media (min-width: 901px) {
    .sub-sidebar {
        display: none;
    }

    .site-layout.with-subnav .sub-sidebar {
        display: block;
    }
}


/* =========================================
   KLEINER DESKTOP / TABLET QUERFORMAT
========================================= */

@media (max-width: 1100px) and (min-width: 901px) {
    .site-layout {
        grid-template-columns:
            190px
            minmax(0, 1fr);
    }

    .site-layout.with-subnav {
        grid-template-columns:
            190px
            220px
            minmax(0, 1fr);
    }

    .content-area {
        padding: 18px;
    }
}


/* =========================================
   TABLET UND HANDY: DRAWER-NAVIGATION
========================================= */

@media (max-width: 900px) {
    body.navigation-open {
        overflow: hidden;
    }

    .mobile-navigation-bar {
        display: flex;
        align-items: center;
        gap: 8px;

        position: sticky;
        top: 0;
        z-index: 180;

        padding: 8px 12px;

        border-bottom: 1px solid #dfe4e8;
        background: #ffffff;
    }

    .mobile-navigation-button {
        min-height: 38px;
        padding: 7px 12px;

        border: 1px solid #ccd4da;
        border-radius: 8px;

        background: #f5f7f9;
        color: #26313a;

        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-navigation-button:hover {
        background: #e9eef2;
    }

    .mobile-navigation-button[hidden] {
        display: none !important;
    }

    .navigation-backdrop {
        display: block;

        position: fixed;
        inset: 0;
        z-index: 190;

        padding: 0;
        border: 0;

        background: rgba(20, 28, 35, 0.45);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            opacity 0.18s ease,
            visibility 0.18s ease;
    }

    body.navigation-open .navigation-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .site-layout,
    .site-layout.with-subnav {
        display: block;
        min-height: calc(100vh - 100px);
    }

    .main-sidebar,
    .sub-sidebar {
        display: block;

        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 200;

        width: min(340px, 88vw);
        max-width: 100%;

        padding: 16px 14px 24px;

        border-right: 1px solid #dfe4e8;
        border-bottom: 0;

        box-shadow: 8px 0 24px rgba(20, 30, 40, 0.16);

        overflow-y: auto;
        overscroll-behavior: contain;

        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    .main-sidebar.is-open,
    .sub-sidebar.is-open {
        transform: translateX(0);
    }

    .sub-sidebar {
        background: #fafbfc;
    }

    .sidebar-heading-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;

        margin-bottom: 10px;
    }

    .main-sidebar h2,
    .sub-sidebar h2 {
        margin: 0;
    }

    .sidebar-close-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 36px;
        height: 36px;
        flex: 0 0 36px;

        padding: 0;

        border: 1px solid #d3d9de;
        border-radius: 8px;

        background: #ffffff;
        color: #26313a;

        cursor: pointer;
        font-size: 16px;
    }

    .content-area {
        padding: 16px;
    }
}


/* =========================================
   HANDY
========================================= */

@media (max-width: 650px) {
    .mobile-navigation-bar {
        padding: 7px 10px;
    }

    .mobile-navigation-button {
        flex: 1 1 0;
        min-width: 0;
    }

    .content-area {
        padding: 12px;
    }

    #content {
        max-width: none;
    }

    .content-card {
        padding: 14px;
        margin-bottom: 12px;
    }

    .home-banner {
        padding: 14px;
    }

    .home-banner h1 {
        font-size: 20px;
    }

    .home-banner-image {
        width: 95px;
        height: 66px;

        margin-left: 12px;
    }
}
