/* workdone section styles */
#workdone .workdone_taital {
    margin-bottom: 50px;
    margin-top: 50px;
    text-align: center;
    font-size: 2em;
    width: 100%;
}

.workdone_taital:hover {
    color: #1458a7;
}

#workdone .container,
#workdone .container-fluid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.some_text a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
}

#workdone .container .row,
#workdone .row {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

#workdone .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 15px;
    box-sizing: border-box;
    margin-bottom: 30px;
}

#workdone .container_main {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#workdone .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    width: 100%;
    height: 0;
    transition: .5s ease;
    border-radius: 8px;
}

#workdone .container_main:hover .overlay {
    height: 100%;
}

#workdone .text {
    color: white;
    font-size: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#workdone .container_main .image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 8px;
}

#workdone .container_main:hover .image {
    transform: scale(1.1);
}

.image_description {
    text-align: center;
    font-size: 18px;
    margin-top: 10px;
    color: #333;
}

/* **إضافة المساحة عند التحويم** */
#workdone .container_main:hover .image_description {
    margin-top: 20px;
    /* تعديل القيمة حسب الحاجة */
    transition: margin-top 0.3s ease;
}




/* Responsive adjustments */
@media (max-width: 950px) {
    #workdone .col-md-4 {
        flex: 0 0 400px ;
        max-width: 550px;
        padding: 10px;
    }

    #workdone .container_main .image {
        width: 550px;
        height: 400px;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
    
    .image_description {
        font-size: 30px;
        padding: 0 10px;
    }

    .some_text a {
        font-size: 24px;
    }

    #custom_slider .carousel-inner .row {
        flex-direction: column;
        align-items: center;
    }

    /* Adjust carousel controls for better visibility on small screens */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        padding: 10px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 5%;
    }
}

/* Additional enhancements for very small screens (optional) */
@media (max-width: 600px) {
    #workdone .container_main .image {
        height: 300px;

    }

    .image_description {
        font-size: 20px;
    }

    .some_text a {
        font-size: 16px;
    }
}