﻿/* ============================================================
   CDL Layout Core – Structure, Background, Spacing
   Modal-sicher, kein Z-Index-Gewürge
   ============================================================ */

/* Grund-HTML-Setup (ohne Z-Index-Spielereien) */
html {
    scroll-behavior: smooth;
}

/* Body-Grundlayout */
body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text, #1a1a1a);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #f3f3f7; /* Fallback hinter dem Bild */

    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative; /* erlaubt ::before, erzeugt aber keinen eigenen Z-Stack ohne z-index */
}

    /* Hintergrund-Layer – immer HINTER allem anderen */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background: url("../../images/bg/bg-dg2.png") center/cover no-repeat;
        opacity: 1;
        z-index: -1; /* entscheidend: hinter allem */
        pointer-events: none; /* blockiert keine Klicks / Scroll */
    }

/* Hauptinhalt – normale Stacking-Order (Bootstrap-Modal geht drüber) */
main {
    flex: 1 0 auto;
    margin-top: 3rem; /* Platz für Navbar */
    padding: 0 clamp(1rem, 4vw, 4rem);
}

/* Header & Footer einfach über dem Background, aber unter Modals */
header,
footer {
    flex-shrink: 0;
}

/* Footer-Optik kommt in footer.css – hier nur Struktur */
footer {
    width: 100%;
}

/* Generische Section-Sicherheit: Inhalte liegen über dem Hintergrund,
   aber wir definieren KEINE eigenen hohen Z-Indizes */
main section {
    position: relative;
}

/* Optional: Wrapper-Klasse für „Glass“-Seitenlayouts */
.page-shell {
    position: relative;
}

/* Mobile-Abstände leicht anpassen */
@media (max-width: 991.98px) {
    main {
        margin-top: 2rem;
        padding-inline: 1.25rem;
    }
}


/* Abstand nach großen Index-Grids */
.cdl-index-spacing {
    height: clamp(6rem, 10vh, 8rem);
}


/* =========================================================
   CDL – Base Section
   ========================================================= */
.cdl-section {
    padding: 4rem 0;
}

