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

   Zweck:
   Diese Datei steuert ausschließlich den Footer.

   Hier stehen:
   - feste Footerbreite
   - Footer-Hintergrundbild
   - Footer-Overlay
   - Footer 1 mit 3 Spalten
   - Footer 2 mit 33% / 33% / 33%

   Wichtige Werte:
   - width: 1200px = feste Seitenbreite
   - padding steuert die Innenabstände
   - background-image nutzt dasselbe Bild wie der Header
================================================== */

/* ==================================================
   FOOTER: Gemeinsamer Hintergrund
   --------------------------------------------------
   Wrapper für Footer 1 und Footer 2.

   Auswirkungen:
   - Footer 1 und Footer 2 liegen auf demselben Hintergrundbild.
   - background-image kommt aus derselben Seitenvariable wie der Header.
================================================== */

.site-footer {
    position: relative;
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background-image: var(--page-header-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ==================================================
   FOOTER: Overlay
   --------------------------------------------------
   Dunkle transparente Fläche über dem Footerbild.

   Auswirkungen:
   - macht den Footertext besser lesbar.
   - letzter rgba-Wert steuert die Deckkraft.
================================================== */

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(32, 54, 101, 0.72);
    z-index: 1;
}

.footer-main,
.footer-bottom {
    position: relative;
    z-index: 2;
}

/* ==================================================
   FOOTER 1: Hauptfooter
   --------------------------------------------------
   Dreispaltiger Bereich für Rechtliches, Kontakt und Adresse.

   Auswirkungen:
   - padding bestimmt die Höhe des Footerbereichs.
   - grid-template-columns erzeugt 3 gleich breite Spalten.
   - gap bestimmt den Abstand zwischen den Footer-Spalten.
================================================== */

.footer-main {
    padding: 56px 20px;
}

.footer-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.footer-column {
    padding: 24px;
    background: rgba(45, 73, 132, 0.523);
    border: 1px solid var(--color-dark-blue);
    border-radius: 5px;
}

.footer-column h2 {
    margin-bottom: 18px;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
}

.footer-column p,
.footer-column a {
    color: var(--color-text-muted);
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-column li + li {
    margin-top: 8px;
}

/* ==================================================
   FOOTER 2: Unterer Footer
   --------------------------------------------------
   Eine Zeile mit drei Bereichen zu je 33%.

   Auswirkungen:
   - links bleibt leer.
   - Mitte enthält Copyright.
   - rechts enthält Social Media.
================================================== */

.footer-bottom {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-bottom-grid {
    display: grid;
    grid-template-columns: 33.333% 33.333% 33.333%;
    align-items: center;
}

.footer-bottom-left {
    min-height: 1px;
}

.footer-bottom-center {
    text-align: center;
}

.footer-bottom-center p {
    margin: 0;
    color: var(--color-text-muted);
}

.footer-bottom-right {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

.footer-bottom-right a {
    color: var(--color-text-muted);
}

.footer-bottom-right a:hover {
    color: #ffffff;
}

/* ==================================================
   FOOTER: Responsive
   --------------------------------------------------
   Auf kleinen Screens wird der Footer einspaltig.
================================================== */

@media (max-width: 760px) {
    .site-footer {
        width: 100%;
    }

    .footer-grid-3,
    .footer-bottom-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-grid {
        gap: 12px;
        text-align: center;
    }

    .footer-bottom-right {
        justify-content: center;
    }
}
