/* Space Between Section latest-news And projects */

.latest-news {
    margin-bottom: 50px;
    margin-top: -77px;
}

.latest-news {
    padding: 80px 100px;
    /* position of all data in container */
    background: linear-gradient(to bottom, #eff6ff 45%, #ffffff 0%);
    /* background-color of container */
}

.projects {
    padding: 80px 100px;
    /* position of all data in container */
    background: linear-gradient(to top, #eff6ff 45%, #ffffff 0%);
    /* background-color of container */
}

/* design of title container for each News and Projects */

.section {
    display: flex;
    flex-direction: column;
    text-align: start;
    align-items: flex-start;
    /* عشان Our Work تبقى على الشمال */
    max-width: 1200px;
    margin-right: auto;
    margin-left: 250px;
}


/* design of container for each News and Projects */

.news-container,
.projects-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    max-width: 1350px;
    margin: 0 auto;
    gap: 20px;
    overflow-x: auto;
    padding: 10px;
    scroll-snap-type: x mandatory;
    user-select: none;
    -webkit-user-drag: none;
}


/* All Cards style in each container of News and Projects */

.news-cards,
.projects-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    overflow-y: hidden
}


/* Card Design */

.news-card,
.projects-card {
    background: white;
    border-radius: 12px;
    min-width: 250px;
    max-width: 410px;
    flex-shrink: 0;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: translateY(30px);
    will-change: opacity, transform;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    user-select: none;

}


/* Cards effect */

.projects-card:hover,
.news-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-card.visible,
.news-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.projects-card img,
.news-card img {
    transition: transform 0.5s ease;
}

.projects-card:hover img,
.news-card:hover img {
    transform: scale(1.05);
}


/* Img Design In Card*/

.news-card img,
.projects-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.news-card img {
    -webkit-user-drag: none;
    /* للسحب في متصفحات WebKit مثل Chrome/Safari */
    pointer-events: none;
    /* (اختياري) يمنع التفاعلات مع الصورة */
}

/* Date Design In Card     color: #46688a;
*/

.news-card .date,
.projects-card .date {
    font-size: 15px;
    color: #003366ea;
    font-weight: 500;
    margin: 10px 10px 10px;
    user-select: none;
}


/* Description Text In Card*/

.news-card h3,
.projects-card h3 {
    font-size: 16px;
    color: #003366;
    margin: 13px 10px 15px;
    user-select: none;

}


/* Container Fotter */

.news-footer,
.projects-footer {
    margin-top: 0px;
    margin-left: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* Button Design */

.explore-button,
.news-btn,
.projects-btn {
    display: inline-block;
    margin-top: 0px;
    padding: 10px 20px;
    border: 2px solid #f26522;
    color: #f26522;
    font-weight: bold;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}


/* Button effect color */

.explore-button:hover,
.news-btn:hover,
.projects-btn:hover {
    background-color: #f26522;
    color: #fff;
}


/* Scroll Function In Container */

.scrollable-news,
.scrollable-projects {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 10px;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    user-select: none;
}

.scrollable-news img,
.scrollable-projects img {
    -webkit-user-drag: none;
    pointer-events: none;
}

.scrollable-news::-webkit-scrollbar,
.scrollable-projects::-webkit-scrollbar {
    display: none;
}

.scrollable-projects,
.scrollable-news {
    will-change: transform;
}


/* Scroll Function Support For Mobile*/

@media (prefers-reduced-motion: reduce) {
    .projects-card {
        transition: none !important;
        transform: none !important;
    }
}


@media (max-width: 768px) {

    /* latest-news section Adjustments for mobile view */
    .latest-news {
        margin-top: -120px;
        margin-bottom: -100px;
        padding: 40px 10px;
    }
    
    .projects {
        margin-top: -120px;
        margin-bottom: -100px;
        padding: 150px 10px;
    }
    .section {
        margin-left: 0;
        margin-right: 0;
        align-items: flex-start;
        text-align: start;
        padding: 100 10px;
    }

    .scrollable-news,
    .scrollable-projects {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        padding: 10px 0;
        scroll-snap-type: x mandatory;
    }

    .news-card,
    .projects-card {
        min-width: 220px;
        max-width: 250px;
        height: auto;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .news-card img,
    .projects-card img {
        height: 180px;
    }

    .news-footer,
    .projects-footer {
        justify-content: center;
        margin-top: 20px;
    }

    .section-title {
        font-size: 1.6em;
    }



    /* latest-news section Adjustments for mobile view */
    .projects {
        padding: -300px 10px;
    }

    .section {
        margin-left: 0;
        margin-right: 0;
        padding: 0 10px;
        align-items: flex-start;
        text-align: start;
    }

    /* الكروت بشكل أفقي */
    .scrollable-projects {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        padding: 10px 0;
        scroll-snap-type: x mandatory;
    }

    /* كرت المشروع */
    .projects-card {
        min-width: 220px;
        max-width: 250px;
        height: auto;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* صورة الكرت */
    .projects-card img {
        height: 180px;
    }

    .projects-footer {
        justify-content: center;
        margin-top: 20px;
    }

    .section-title {
        font-size: 1.6em;
    }

}