/* ============================================================
   FILE: css/02-layout.css
   VERSION: 1.21
   LAST MODIFIED: March 12, 2026
   DESCRIPTION: GRID-SKELETT & MODERNES BANNER-STYLING.
                Bilder werden via object-fit: cover eingepasst.
                v1.21: Mobile Ausrichtung an --mobile-edge-left (15px) fixiert.
   ============================================================ */

/* 1. BASIS & STICKY FOOTER */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fff;
    font-family: "Open Sans", sans-serif;
    line-height: 1.6;
}
#page {
    flex: 1 0 auto;
    width: 100%;
}

/* 2. CONTAINER */
.container {
    width: 92%;
    margin: 0 auto;
}

/* 3. MODERNES BANNER-STYLING (AVIF/WebP Integration) */
.header-banner {
    width: 100%;
    /* Responsive Höhen-Logik */
    height: 19vw;
    max-height: 281px;
    min-height: 150px;
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}

/* Das Picture-Tag und Bild füllen den Container komplett aus */
.header-banner-picture,
.header-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    /* Simuliert background-size: cover */
    object-fit: cover;
    /* Zentrierung wie background-position: center center */
    object-position: center center;
}

/* 4. MAIN GRID (Nutzt Sync-Variablen) */
.main-grid {
    display: flex;
    flex-wrap: nowrap;
    margin-top: var(--sync-gap); /* SYNC: 30px */
    gap: 40px;
    padding-bottom: 50px;
}
.sidebar {
    flex: 0 0 370px;
}
.content-area {
    flex: 1;
    min-width: 0;
}

/* 5. FOOTER */
.site-footer {
    flex-shrink: 0;
    background: #3e4244;
    color: #fff;
    height: 50px;
    width: 100%;
    display: flex;
    align-items: center;
}
.footer-center-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 0.9rem;
    gap: 30px;
}
.footer-navigation {
    display: flex;
    gap: 20px;
}
.footer-navigation a {
    color: #eee;
    text-decoration: none;
    font-weight: bold;
}

/* 6. RESPONSIVITÄT GRID & MOBILE HEIGHTS */
@media (max-width: 1023px) {
    /* Container auf volle Breite bringen und via Padding ausrichten */
    .container {
        width: 100% !important;
        padding-left: var(--mobile-edge-left) !important; /* 15px */
        padding-right: var(--mobile-edge-right) !important; /* 25px */
    }

    .main-grid {
        flex-direction: column;
        margin-top: 0;
        gap: 20px;
    }

    .sidebar {
        width: 100%;
        flex: 0 0 auto;
    }

    .content-area {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .header-banner {
        /* Mobile Höhe für das Picture-Tag */
        height: 50vw;
        max-height: 250px;
    }

    .site-footer {
        height: auto;
        padding: 15px 0;
    }
    .footer-center-wrap {
        flex-direction: column;
        gap: 10px;
    }
}

/* 7. BREAKPOINT 390px (Sync mit vars.css) */
@media (max-width: 390px) {
    .container {
        padding-left: var(--mobile-edge-small) !important; /* 12px */
        padding-right: var(--mobile-edge-small) !important; /* 12px */
    }
}
