/* Fix for black sections appearing on pages */

/* Remove any unintended black backgrounds */
.wp-block-group.has-black-background-color,
.wp-block-columns.has-black-background-color,
.wp-block-column.has-black-background-color,
.wp-block-separator.has-black-background-color,
div.has-black-background-color,
*[class*="has-black-background"] {
    background-color: transparent !important;
}

/* Fix contrast color that might appear too dark */
.has-contrast-background-color {
    background-color: var(--wp--preset--color--contrast-3, #A4A4A4) !important;
}

/* Fix very dark gray backgrounds */
.has-very-dark-gray-background-color {
    background-color: var(--wp--preset--color--contrast-2, #636363) !important;
}

/* Fix potential issues with dark overlays */
.wp-block-cover__background,
.wp-block-cover__gradient-background {
    opacity: 0.5 !important;
}

/* Ensure main content areas have proper backgrounds */
.entry-content > * {
    background-color: transparent;
}

/* Fix any potential z-index issues causing black overlays */
.wp-block-group {
    position: relative;
    z-index: 1;
}

/* Ensure separators don't create black lines */
.wp-block-separator {
    border-color: var(--wp--preset--color--contrast-3, #ddd) !important;
    background-color: transparent !important;
}

/* Fix potential issues with empty blocks showing black */
.wp-block-spacer {
    background-color: transparent !important;
}

/* Ensure no black backgrounds on common block types */
.wp-block-group,
.wp-block-columns,
.wp-block-column,
.wp-block-media-text,
.wp-block-pullquote,
.wp-block-quote {
    background-color: transparent;
}

/* Override any inline styles that might be causing black backgrounds */
[style*="background-color: #000"],
[style*="background-color: black"],
[style*="background-color: rgb(0, 0, 0)"],
[style*="background-color: rgba(0, 0, 0"] {
    background-color: transparent !important;
}

/* Fix for potential theme conflicts */
.site-main > *,
.entry-content > * {
    background-color: transparent;
}

/* Fix blocks that might have unwanted dark backgrounds */
.wp-block-group:not([class*="has-"][class*="background-color"]) {
    background-color: transparent !important;
}

/* Ensure proper text contrast if backgrounds are removed */
.has-black-background-color,
.has-very-dark-gray-background-color,
.has-contrast-background-color {
    color: var(--wp--preset--color--contrast, #111111) !important;
}

/* Fix potential pseudo-element issues */
.wp-block-group::before,
.wp-block-group::after,
.wp-block-columns::before,
.wp-block-columns::after {
    background-color: transparent !important;
}

/* Fix for blocks with dark theme classes */
.is-dark-theme .wp-block-group,
.is-dark-theme .wp-block-columns {
    background-color: transparent !important;
}

/* Override any twentytwentyfour theme dark patterns */
.wp-block-pattern [class*="has-black"],
.wp-block-pattern [class*="has-contrast-background"],
.wp-block-pattern [class*="has-very-dark"] {
    background-color: transparent !important;
}

/* Debug: Add visible borders to identify problem areas */
/* Uncomment to debug 
.wp-block-group,
.wp-block-columns,
.wp-block-column {
    border: 2px solid red !important;
}
*/