.carousel-background {
    position: absolute;
    inset: 0;
    z-index: 0; /* Behind page content, inside <main> only */
    pointer-events: none; /* Never block navbar/buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Initially hidden */
    transition: opacity 3s ease-in-out; /* Smooth transition */
}

.carousel-background.visible {
    opacity: 1; /* Visible state */
}

.carousel-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the entire area */
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Smooth transition */
}

.carousel-image.active {
    opacity: 1;
}

/* Keep modal content readable above the page background. */
.modal-content {
    position: relative;
    z-index: 1056; /* above backdrop (1055) */
}
