/* Rosengarten – Divi-Partnerbereich und Footer */
.rg-partners,
.rg-footer,
.rg-footer-bottom {
    font-family: 'Poppins', Arial, sans-serif;
    box-sizing: border-box;
}

/* Partnerbereich */
.rg-partners {
    position: relative;
    background-color: #F7F3EE !important;
    padding: 48px 0 !important;
    padding-bottom: clamp(110px, 11vw, 180px) !important;
}

/* Dekorativer Übergang: Hügel, Tannen und rote Vordergrundwelle. */
.rg-partners::after {
    content: '';
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: clamp(80px, 10vw, 160px);
    background: url('../images/footer-silhouette.svg') center bottom / 100% 100% no-repeat;
    pointer-events: none;
}

.rg-partners-title,
.rg-partners-title :is(h1, h2, h3, h4, p) {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.18em;
    color: #292729;
    text-align: center;
}

.rg-partners-subtitle,
.rg-partners-subtitle p {
    color: #A07D65;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.rg-partners .et_pb_row {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Klasse auf der Logozeile: fünf Spalten oder fünf Bildmodule. */
.rg-partners-logos {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 28px;
    padding-top: 24px !important;
}

.rg-partners-logos::after {
    display: none;
}

.rg-partners-logos > .et_pb_column {
    width: 100% !important;
    margin: 0 !important;
    min-width: 0;
    float: none;
}

.rg-partners-logos .et_pb_image {
    margin-bottom: 0 !important;
    text-align: center;
}

.rg-partners-logos .et_pb_image_wrap {
    display: block;
}

.rg-partners-logos img {
    display: block;
    width: 100%;
    max-width: 150px;
    height: 84px;
    object-fit: contain;
    margin: 0 auto;
}

/* Hauptfooter: nur die Zeile mit den drei Inhaltsbereichen. */
.rg-footer {
    background-color: #B32248 !important;
    color: #FFFFFF;
    padding: 48px 0 0 !important;
}

.rg-footer .et_pb_row:has(.rg-footer-logo):not(:has(.rg-footer-bottom)),
.rg-footer.et_pb_row:has(.rg-footer-logo) {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 0;
    align-items: stretch;
}

.rg-footer .et_pb_row:has(.rg-footer-logo)::after,
.rg-footer.et_pb_row:has(.rg-footer-logo)::after {
    display: none;
}

.rg-footer .et_pb_row:has(.rg-footer-logo) > .et_pb_column,
.rg-footer.et_pb_row:has(.rg-footer-logo) > .et_pb_column {
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 32px;
    float: none;
}

.rg-footer .et_pb_row:has(.rg-footer-logo) > .et_pb_column + .et_pb_column,
.rg-footer.et_pb_row:has(.rg-footer-logo) > .et_pb_column + .et_pb_column {
    border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.rg-footer :is(p, h2, h3, h4, li),
.rg-footer a {
    color: #FFFFFF;
    font-family: 'Poppins', Arial, sans-serif;
}

.rg-footer a {
    transition: color 0.2s ease;
}

.rg-footer a:hover,
.rg-footer a:focus-visible {
    color: #A07D65;
}

.rg-footer-logo img {
    width: 100%;
    max-width: 320px;
    height: auto;
    filter: brightness(0) invert(1);
}

.rg-footer-links,
.rg-footer-contact {
    font-size: 18px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.rg-footer-links ul {
    list-style: none;
    padding: 0;
}

.rg-footer-links li {
    padding-bottom: 8px;
}

.rg-footer-social-title,
.rg-footer-social-title :is(p, h2, h3, h4) {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.rg-footer-social.et_pb_social_media_follow li a.icon {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.rg-footer-social.et_pb_social_media_follow li a.icon::before {
    color: #FFFFFF;
}

.rg-footer-social.et_pb_social_media_follow li a.icon:hover,
.rg-footer-social.et_pb_social_media_follow li a.icon:focus-visible {
    background-color: #A07D65 !important;
    border-color: #A07D65;
}

/* Abschlusszeile: Copyright zuerst, rechtliche Links zuletzt. */
.rg-footer-bottom {
    background-color: #8F1839 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    padding: 20px 0 !important;
    color: #FFFFFF;
    font-size: 12px;
    line-height: 1.7;
}

.rg-footer-bottom.et_pb_row,
.rg-footer-bottom > .et_pb_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.rg-footer-bottom.et_pb_row::after,
.rg-footer-bottom > .et_pb_row::after {
    display: none;
}

.rg-footer-bottom .et_pb_column {
    width: auto !important;
    margin: 0 !important;
    min-width: 0;
}

.rg-footer-bottom .et_pb_column:last-child {
    text-align: right;
}

.rg-footer-bottom :is(p, a) {
    color: #FFFFFF;
    font-family: 'Poppins', Arial, sans-serif;
}

.rg-footer-bottom a:hover,
.rg-footer-bottom a:focus-visible {
    color: #A07D65;
}

/* Präzise Modulregeln gegen die Divi-Standardtypografie. */
.rg-partners-title .et_pb_text_inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.rg-partners-title .et_pb_text_inner::before,
.rg-partners-title .et_pb_text_inner::after {
    content: '';
    flex: 0 1 150px;
    border-top: 1px solid #A07D65;
}

.rg-partners-subtitle.et_pb_text {
    letter-spacing: 0.18em;
}

.rg-partners-subtitle .et_pb_text_inner::before,
.rg-partners-subtitle .et_pb_text_inner::after {
    content: none;
    display: none;
}

.rg-partners-logos > .et_pb_column + .et_pb_column {
    border-left: 1px solid rgba(160, 125, 101, 0.4);
    padding-left: 20px;
}

.rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact) {
    display: grid !important;
    grid-template-columns: 1.2fr 0.9fr 1.3fr;
    width: 88%;
    max-width: 1440px;
    padding: 16px 0 44px;
}

.rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact)::after {
    display: none;
}

.rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact) > .et_pb_column {
    width: auto !important;
    margin: 0 !important;
    padding: 0 30px;
    min-width: 0;
}

.rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact) > .et_pb_column + .et_pb_column {
    border-left: 1px solid rgba(255, 255, 255, 0.45);
}

.rg-footer .rg-footer-links.et_pb_text,
.rg-footer .rg-footer-contact.et_pb_text,
.rg-footer .rg-footer-links :is(p, a, li),
.rg-footer .rg-footer-contact :is(p, a, li) {
    font-size: clamp(15px, 1.25vw, 20px) !important;
    line-height: 1.8 !important;
}

.rg-footer-links a {
    display: inline-block;
    margin-bottom: 14px;
}

.rg-footer-social-title.et_pb_text {
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    padding-top: 16px;
    margin-top: 20px;
    margin-bottom: 16px;
}

.rg-footer-social.et_pb_social_media_follow li a.icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
}

.rg-footer-social.et_pb_social_media_follow li a.icon::before {
    width: 48px;
    height: 48px;
    line-height: 48px;
    font-size: 28px;
}

.rg-footer .rg-footer-bottom.et_pb_row {
    width: 100% !important;
    max-width: none !important;
    padding: 24px 6% !important;
}

.rg-footer-bottom .et_pb_column:first-child {
    flex: 1 1 auto;
}

.rg-footer-bottom .et_pb_column:last-child {
    flex: 0 0 auto;
}

.rg-footer-bottom .et_pb_text,
.rg-footer-bottom :is(p, a) {
    font-size: 13px !important;
}

.rg-footer-bottom .et_pb_column:last-child .et_pb_text_inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
}

.rg-footer-bottom .et_pb_column:last-child p {
    padding-bottom: 0;
}

@media (max-width: 1100px) {
    .rg-partners-logos {
        gap: 20px;
    }

    .rg-partners-logos img {
        height: 80px;
    }

    .rg-footer .et_pb_row:has(.rg-footer-logo) > .et_pb_column,
    .rg-footer.et_pb_row:has(.rg-footer-logo) > .et_pb_column {
        padding: 0 18px;
    }
}

@media (max-width: 767px) {
    .rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact) {
        grid-template-columns: minmax(0, 1fr);
    }

    .rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact) > .et_pb_column {
        padding: 24px 0;
        text-align: center;
    }

    .rg-footer .et_pb_row:has(.rg-footer-links):has(.rg-footer-contact) > .et_pb_column + .et_pb_column {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
    }

    .rg-partners-logos > .et_pb_column + .et_pb_column {
        border-left: 0;
        padding-left: 0;
    }

    .rg-partners-title .et_pb_text_inner { gap: 12px; }
    .rg-footer-bottom .et_pb_column:last-child .et_pb_text_inner {
        justify-content: center;
    }

    .rg-partners,
    .rg-footer {
        padding: 32px 0 !important;
    }

    .rg-partners-title,
    .rg-partners-title :is(h1, h2, h3, h4, p) {
        font-size: 19px;
        letter-spacing: 0.12em;
    }

    .rg-partners {
        padding-bottom: 110px !important;
    }

    .rg-partners::after {
        background-size: auto 100%;
    }

    .rg-partners-logos {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 28px 24px !important;
        align-items: center;
        justify-items: center;
    }

    .rg-partners-logos > :last-child:nth-child(5) {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: calc((100% - 24px) / 2) !important;
    }

    .rg-partners-logos > .et_pb_column,
    .rg-partners-logos > .et_pb_image {
        width: 100% !important;
        min-width: 0;
        padding: 0 !important;
        margin: 0 !important;
    }

    .rg-partners-logos .et_pb_image,
    .rg-partners-logos .et_pb_image_wrap {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }

    .rg-partners-logos img {
        display: block;
        width: 100% !important;
        max-width: 150px !important;
        height: 84px !important;
        object-fit: contain !important;
        margin: 0 auto;
    }

    body #page-container :is(.rg-footer-logo, .rg-footer .et_pb_image:has(img.wp-image-540)) {
        width: 100% !important;
        max-width: 250px !important;
        margin: 0 auto 32px !important;
    }

    body #page-container :is(.rg-footer-logo, .rg-footer .et_pb_image:has(img.wp-image-540)) .et_pb_image_wrap,
    body #page-container :is(.rg-footer-logo, .rg-footer .et_pb_image:has(img.wp-image-540)) img {
        display: block !important;
        width: 100% !important;
        max-width: 250px !important;
        height: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .rg-footer .et_pb_row:has(.rg-footer-logo),
    .rg-footer.et_pb_row:has(.rg-footer-logo) {
        grid-template-columns: minmax(0, 1fr);
    }

    .rg-footer .et_pb_row:has(.rg-footer-logo) > .et_pb_column,
    .rg-footer.et_pb_row:has(.rg-footer-logo) > .et_pb_column {
        padding: 24px 0;
        text-align: center;
    }

    .rg-footer .et_pb_row:has(.rg-footer-logo) > .et_pb_column + .et_pb_column,
    .rg-footer.et_pb_row:has(.rg-footer-logo) > .et_pb_column + .et_pb_column {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.24);
    }

    .rg-footer :is(.rg-footer-logo, .rg-footer-links, .rg-footer-contact,
        .rg-footer-social-title, .rg-footer-social) {
        text-align: center;
    }

    .rg-footer-bottom.et_pb_row,
    .rg-footer-bottom > .et_pb_row {
        flex-direction: column;
        gap: 12px;
    }

    .rg-footer-bottom .et_pb_column,
    .rg-footer-bottom .et_pb_column:last-child {
        width: 100% !important;
        text-align: center;
    }
}

/* Partnerüberschrift – Tablet */
@media (min-width: 768px) and (max-width: 1100px) {
    .rg-partners-title .et_pb_text_inner {
        gap: 18px;
    }

    .rg-partners-title .et_pb_text_inner::before,
    .rg-partners-title .et_pb_text_inner::after {
        flex: 1 1 45px;
        min-width: 0;
    }

    .rg-partners-title .et_pb_text_inner {
        white-space: nowrap;
    }
}

/* Partnerbereich – Smartphone */
@media (max-width: 767px) {
    .rg-partners-title .et_pb_text_inner {
        gap: 12px;
        white-space: nowrap;
        font-size: 18px;
        letter-spacing: 0.12em;
    }

    .rg-partners-title .et_pb_text_inner::before,
    .rg-partners-title .et_pb_text_inner::after {
        flex: 1 1 20px;
        min-width: 0;
    }

    .rg-partners-subtitle .et_pb_text {
        font-size: 13px;
        letter-spacing: 0.06em;
    }
}
