/* Full-screen black overlay that appears first */
.screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
    will-change: opacity, visibility;
    backface-visibility: hidden;
}

.screen-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile menu overlay styles - appears after screen overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, visibility;
    backface-visibility: hidden;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Image overlay styles for carousel and hero sections */
.carousel-item {
    position: relative;
}

.carousel-item .overlay {
    position: absolute;
    
    /* background:linear-gradient(45deg, rgb(0 0 0), rgb(0 0 0 / 49%));; */
   
    transition: all 0.3s ease;
       
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 78%);
    z-index: 1;
}

/* .carousel-item:hover .overlay {
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
} */

/* Hero section image overlays */
#Hero .col-auto {
    position: relative;
    margin-bottom: 20px;
}

#Hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    z-index: 1;
    transition: all 0.3s ease;
    border-radius: 8px;
}

#Hero .col-auto:hover .overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
}

#Hero .image-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
    font-size: 14px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 4px;
}