/* ============================================
 * FOOTER – Grundlayout
 * ========================================== */

.footer {
    margin-top: 100px;
    color: #ffffff;
    background: #627E12 !important;
}

footer .mod-custom.custom {
    max-width: 100% !important;
}

.custom-footer {
    background: #627E12;
    color: #ffffff;
    padding: 2rem 1rem;
    font-size: 1.15rem;
}

.custom-footer a {
    color: #ffffff;
    text-decoration: none;
}

.custom-footer a:hover,
.custom-footer a:focus {
    text-decoration: underline;
}

/* ============================================
 * FOOTER – Grid
 * ========================================== */

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    column-gap: 2rem;
    row-gap: 0.5rem;
    max-width: 1320px;
    margin: 0 auto;
}

.footer-box {
    padding-top: 0;
    padding-bottom: 0;
}

.footer-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0;
    color: #ffffff;
}

.footer-box h4 {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: #ffffff;
}

.footer-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-box ul li {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
}

.footer-box a {
    font-size: 0.95rem;
    color: #ffffff;
}

/* ============================================
 * FOOTER – Accordion
 * ========================================== */

.custom-footer .footer-box details,
.custom-footer .footer-box summary,
.custom-footer .footer-box summary.btn {
    background: #627E12;
}

.custom-footer .footer-box details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-footer .footer-box summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    list-style: none;
}

.custom-footer .footer-box summary::-webkit-details-marker {
    display: none;
}

.custom-footer .footer-box summary::marker {
    content: '';
}

.custom-footer .footer-box summary::after {
    content: "" !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
}

.footer-summary-icon {
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.custom-footer details[open] .footer-summary-icon {
    transform: rotate(180deg);
}

/* Link-Pfeile */
.custom-footer .footer-box ul li a::after,
.custom-footer .footer-box ul li h4 a::after {
    content: "▸";
    position: relative;
    top: 2px;
    left: 2px;
    display: inline-block;
}

/* keine Pfeile bei Logos */
.custom-footer .footer-box ul.social a::after,
.custom-footer .footer-box ul.bundeslogo a::after {
    display: none;
}

/* ============================================
 * FOOTER – Logozeile
 * ========================================== */

.footer-logos {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    padding-top: 20px;
}

.footer-logos ul {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-logos li {
    margin: 0;
    padding: 0;
}

.footer-logos img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 50px;
    padding: 0;
    float: none;
}

.footer-logos .bundeslogo {
    justify-content: flex-start;
}

.footer-logos .bundeslogo .dw-thumb img {
    width: 600px;
    height: auto;
    max-width: 100%;
        background-color: #ffffff;
    padding: 10px;
}

.footer-logos .bundeslogo .dw-lb img {
    width: 1320px;
    height: auto;
    max-width: 100%;
    background-color: #ffffff;
    padding: 10px;
}
.footer-logos .social {
    justify-content: flex-end;
}

/* ============================================
 * FOOTER – Bottom / Rechtliches
 * ========================================== */

.footer-container .moduletable.footer-bottom {
    grid-column: 1 / -1;
}

.footer-bottom {
    border-top: 1px solid #ffffff;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: right;
    font-size: 0.85rem;
    color: #ffffff;
}

.footer-bottom nav ul.social {
    display: inline-block;
    text-align: right;
    width: auto;
}

.footer-bottom nav ul.social li {
    display: inline-block;
}

.footer-bottom .mod-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0;
    justify-content: flex-end;
}

/* ============================================
 * BACK TO TOP
 * ========================================== */

.back-to-top-link {
    color: var(--cassiopeia-color-primary, #112855) !important;
}

.back-to-top-link:hover {
    color: #ffffff !important;
}

/* ============================================
 * Sonderfälle
 * ========================================== */

#mod-menu1.mod-menu.mod-list.nav {
    display: none;
}

@media (min-width: 992px) {
    .footer-box.footer-infra h3 {
        white-space: nowrap;
    }
}

/* ============================================
 * RESPONSIVE
 * ========================================== */

@media (max-width: 768px) {

    .custom-footer .footer-container {
        text-align: center;
    }

    .custom-footer .footer-box,
    .custom-footer .footer-box ul,
    .custom-footer .footer-box li {
        text-align: center;
    }

    .custom-footer .footer-box summary {
        justify-content: center;
    }

    .footer-logos {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
    }

    .footer-logos ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer-logos .bundeslogo img {
        max-width: 100%;
    }

    .footer-logos img {
        height: 45px;
    }

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

    .footer-bottom .mod-menu {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .footer-bottom .mod-menu > li {
        display: block !important;
        margin: 0.3rem 0;
        text-align: center;
    }
}

@media (max-width: 480px) {

    .custom-footer {
        padding: 2rem 1rem;
    }

    .footer-logos {
        gap: 20px;
    }

    .footer-logos .social {
        flex-direction: column;
        gap: 16px;
    }

    .footer-logos img {
        height: 40px;
    }

    .footer-logos .bundeslogo img {
        max-width: 100%;
    }

    .footer-bottom {
        text-align: center;
        font-size: 0.85rem;
    }
}