/* .services {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background-color: #ffffff;
}

.services .image-container {
    flex-basis: calc(100%/2);
    position:sticky;
    transition: all 0.5s ease;
}

.services .image-container:hover {
    margin-top: -10px;
}

.services .image-container img {
    width: 100%;
}

.services .image-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.50);
}

.services .image-container .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 250px;
    text-align: center;
    padding: 5px;
    font-size: 22px;
    font-weight: 600;
    color: white;
    letter-spacing: 2px;
    cursor: pointer;
}

.services .image-container .caption2 {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100px;
    text-align: center;
    padding: 5px;
    font-size: 18px;
    font-weight: 500;
    color: white;
    letter-spacing: 2px;
    cursor: pointer;
}

@media (max-width: 767px) {
    .services .image-container {
        flex-basis: 100%;
    }
}

@media (min-width: 768px) {
    .services .image-container .caption {
        font-size: 26px;
    }
    .services .image-container .caption2 {
        font-size: 22px;
    }
} */
.services {
    display: flex;
    flex-wrap: wrap;
    background-color: #ffffff;
}

.services .image-container {
    flex-basis: calc(100% / 2);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.services .image-container:hover {
    transform: translateY(-10px); 
}

.services .image-container img {
    width: 100%;
    display: block;
}

.services .image-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.50);
}

.services .image-container .text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* الجملة الأولى في المنتصف */
    align-items: center;
    text-align: center;
    color: white;
}

.services .image-container .caption {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
    cursor: pointer;
}

.services .image-container .caption2 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
}

/* التصميم المتجاوب */
@media (max-width: 767px) {
    .services .image-container {
        flex-basis: 100%; /* عنصر واحد في كل سطر للشاشات الصغيرة */
    }

    .services .image-container .caption {
        font-size: 18px; /* حجم أصغر للنص في الشاشات الصغيرة */
    }

    .services .image-container .caption2 {
        font-size: 14px; /* حجم أصغر للنص في الشاشات الصغيرة */
    }
}

@media (min-width: 768px) {
    .services .image-container .caption {
        font-size: 26px; /* حجم أكبر للنص في الشاشات الكبيرة */
    }

    .services .image-container .caption2 {
        font-size: 22px; /* حجم أكبر للنص في الشاشات الكبيرة */
    }
}