

/* The CMS uses the generic heading/link colors even on brand-colored blocks. */
.beContainerBlock[style*="background-color"] {
    color: #fff;
}

.beContainerBlock[style*="background-color"] .beItemContent h1,
.beContainerBlock[style*="background-color"] .beItemContent h2,
.beContainerBlock[style*="background-color"] .beItemContent h3,
.beContainerBlock[style*="background-color"] .beItemContent h4,
.beContainerBlock[style*="background-color"] .beItemContent h5,
.beContainerBlock[style*="background-color"] .beItemContent h6 {
    color: #fff;
}

.beContainerBlock[style*="background-color"] .beItemContent a:not(.button),
.beContainerBlock[style*="background-color"] .beItemContent a:not(.button):visited {
    color: #fff;
}

.beContainerBlock[style*="background-color"] .beItemContent a:not(.button):hover,
.beContainerBlock[style*="background-color"] .beItemContent a:not(.button):focus-visible {
    color: #e5e5e5;
}

.beContainerBlock[style*="background-color"] :is(
    .fab, .fal, .far, .fas, .fad,
    .fa-brands, .fa-light, .fa-regular, .fa-solid, .fa-thin
) {
    color: #fff;
}

/* Keep the existing theme-level padding without overriding CMS layout rules. */
.beContainerBlock[style*="background-color"],
.beContainerLayoutContainer[style*="background-color"],
.beContainerBlock[style*="background-image"],
.beContainerLayoutContainer[style*="background-image"] {
    padding: 30px 25px;
}

/* Preserve styling for non-anchor buttons on colored blocks. */
.beContainerBlock[style*="background-color"] .button {
    background-color: #e5e5e5;
}

.beContainerBlock[style*="background-color"] .button:hover {
    background-color: #fff;
}

/* Contrast for buttons placed on colored blocks. */
.beContainerBlock[style*="background-color"] .beItemContent a.button,
.beContainerBlock[style*="background-color"] .beItemContent a.button:visited {
    color: var(--LinkColor, #0a8137);
    background-color: #e5e5e5;
    border-color: #e5e5e5;
}

.beContainerBlock[style*="background-color"] .beItemContent a.button:hover,
.beContainerBlock[style*="background-color"] .beItemContent a.button:focus-visible {
    color: var(--LinkColor, #0a8137);
    background-color: #fff;
    border-color: #fff;
}


/* Light background blocks containing the news slider */

.beContainerBlock:has(.newsAndNewsPaperSlider) {
    color: var(--CSSColor, #333);
}

    .beContainerBlock:has(.newsAndNewsPaperSlider) .beItemContent h1,
    .beContainerBlock:has(.newsAndNewsPaperSlider) .beItemContent h2,
    .beContainerBlock:has(.newsAndNewsPaperSlider) .beItemContent h3 {
        color: var(--HeadingColor, #0A8137);
    }

    .beContainerBlock:has(.newsAndNewsPaperSlider) .beItemContent a:not(.button),
    .beContainerBlock:has(.newsAndNewsPaperSlider) .beItemContent a:not(.button):visited {
        color: var(--LinkColor, #0A8137);
    }

        .beContainerBlock:has(.newsAndNewsPaperSlider) .beItemContent a:not(.button):hover {
            color: var(--LinkHoverColor, #4FBE37);
        }