/* ==========================================================================
   responsiveDesign.css
   Zweck: Alle responsive Regeln (Media Queries) zentral bündeln.
   Hinweis: Diese Datei NACH allen Modul-CSS-Dateien einbinden, damit Overrides greifen.
   Breakpoints:
   - 480px  : sehr kleine Phones
   - 640px  : Phones
   - 900px  : Tablet / kleine Laptops (Haupt-Layoutwechsel)
   - 992px  : Bootstrap-ish / Fallback-Menü
   ========================================================================== */


/* =========================================================================
   <= 992px : Fallback-Menü (.menu / .menu-toggle) aus bk.css
   ========================================================================= */
@media (max-width: 992px){
    .menu-toggle{
        display: inline-block;
    }
    .menu{
        position: absolute;
        left: 0; right: 0; top: 100%;
        background: var(--brand);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .menu.show{
        max-height: 60vh;
    }
}


/* =========================================================================
   <= 900px : Haupt-Layoutwechsel (Grid -> 1 Spalte, Padding runter, etc.)
   ========================================================================= */
@media (max-width: 900px){

    .datenschutz-section{
        padding: clamp(2rem, 6vw, 5rem);
    }

    /* WICHTIG: auch #d2/#d4 überschreiben (sonst gewinnt datenschutz.css) */
    .datenschutz-inner,
    #d2 .datenschutz-inner,
    #d4 .datenschutz-inner{
        grid-template-columns: 1fr;
        grid-template-areas:
      "media"
      "info";
    }

    /* Bild soll oben volle Breite */
    .datenschutz-media{
        width: 100%;
    }
    .datenschutz-media img{
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
    }

    /* Inhalt darunter volle Breite */
    .datenschutz-info{
        width: 100%;
    }

    /* Index / Startseite: Section Grid auf 1 Spalte + mobile Padding */
    section{
        padding: clamp(2rem, 6vw, 5rem);
        /* Auf kleineren Screens lieber nichts abschneiden */
        overflow: visible;
        height: auto;
        min-height: 100dvh;
    }
    .section-inner{
        grid-template-columns: 1fr;
        height: auto;
    }

    /* Title-Section: riesiges Top-Padding auf Mobile etwas entschärfen */
    .title-section h1{
        padding-top: clamp(4rem, 18vw, 8rem);
    }

    /* Impressum: Grid auf 1 Spalte */
    .impressum-section{
        padding: clamp(2rem, 6vw, 5rem);
    }
    .impressum-inner{
        grid-template-columns: 1fr;
    }

    /* Partner: Container darf umbrechen */
    #partner-container{
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}


/* =========================================================================
   <= 899.98px : Navbar Mobile Drawer (aus navbar.css)
   (Bleibt bewusst bei 899.98px, um exakt dein bestehendes Verhalten zu matchen)
   ========================================================================= */
@media (max-width: 899.98px){
    .nav-content{
        justify-content: space-between;
        padding: 0 1rem;
    }
    .navbar::after{ width: 92%; }

    .hamburger{
        display: inline-flex;
        position: fixed;
        right: 1.5rem;
        top: calc(var(--nav-h)/2);
        transform: translateY(-50%);
        z-index: 10002;
        pointer-events: auto;
    }
    .nav-backdrop { z-index: 9995; }
    #myLinks{ z-index: 9999; }

    #myLinks{
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 100%;
        background: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: calc(var(--nav-h) + 1rem) 2rem 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform .35s ease;
        font-size: var(--base);
    }
    #myLinks.open{
        transform: translateX(0);
    }

    #myLinks a:hover{
        text-decoration: underline;
        text-decoration-color: var(--comp02);
        text-decoration-thickness: 3px;
    }

    #dropbtn.is-open svg{ transform: rotate(-45deg); }
    #dropbtn.is-open .line-top-bottom{
        stroke-dasharray: 20 300;
        stroke-dashoffset: -32.42;
    }
}


/* =========================================================================
   <= 640px : Footer Anpassung (aus footer.css) + Partner ggf. Spalte
   ========================================================================= */
@media (max-width: 640px){
    .lead-footer{
        justify-self: start;
        text-align: start;
        padding-right: 0;
    }

    /* Partner: auf sehr kleinen Screens lieber untereinander */
    #partner-container{
        flex-direction: column;
        align-items: stretch;
    }
}


/* =========================================================================
   <= 480px : Modal Buttons stapeln (aus partner.css)
   ========================================================================= */
@media (max-width: 480px){
    .link-actions{
        gap: 0.5rem;
    }
    .link-actions .btn{
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }
}
