/* WB Background Overlays - Global styles for background overlay functionality */

/* Base overlay positioning for all widgets using the centralized background controls */
[class*="wb-"]:not(.wb-no-overlay)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Ensure content stays above overlay */
[class*="wb-"] > * {
    position: relative;
    z-index: 2;
}

/* Override for sections that shouldn't have overlay positioning context */
.wb-no-overlay::before {
    display: none !important;
}

/* Specific widget overlay positioning contexts */
.section_layout488::before,
.section_blog67::before,
.section_layout249::before,
.section_gallery23::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    z-index: 1;
    pointer-events: none;
}

/* Ensure existing sections have positioning context */
.section_layout488,
.section_blog67,
.section_layout249,
.section_gallery23 {
    position: relative;
}

/* Background video support */
.wb-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Background image optimizations */
[class*="wb-"][style*="background-image"] {
    background-attachment: scroll; /* Better performance on mobile */
}

@media (max-width: 768px) {
    /* Disable parallax on mobile for better performance */
    [class*="wb-"][style*="background-attachment: fixed"] {
        background-attachment: scroll !important;
    }
} 