/* =====================================================
   LATEST MEDICAL ARTICLES
===================================================== */


.latest-posts {

    padding: 100px 0;

    background: #f8fbff;

}



/* =====================================================
   HEADER
===================================================== */


.latest-posts .section-header {

    text-align: center;

    max-width: 750px;

    margin: 0 auto 60px;

}



.latest-posts .section-header h2 {

    font-size: 44px;

    font-weight: 700;

    color: var(--dark);

    margin-bottom: 15px;

}



.latest-posts .section-header p {

    color: var(--text);

    font-size: 18px;

}





/* =====================================================
   GRID
===================================================== */


.latest-posts .posts-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 30px;

}





/* =====================================================
   POST CARD
===================================================== */


.latest-posts .post-card {

    background: var(--white);

    border-radius: var(--radius-lg);

    overflow: hidden;

    display: flex;

    flex-direction: column;

    box-shadow: var(--shadow-sm);

    transition: .3s ease;

}



.latest-posts .post-card:hover {

    transform: translateY(-8px);

    box-shadow: var(--shadow-lg);

}





/* =====================================================
   IMAGE
===================================================== */


.latest-posts .post-image {

    width: 100%;

    height: 240px;

    overflow: hidden;

}



.latest-posts .post-image a {

    display: block;

    height: 100%;

}



.latest-posts .post-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: .4s ease;

}



.latest-posts .post-card:hover img {

    transform: scale(1.05);

}





/* =====================================================
   CONTENT
===================================================== */


.latest-posts .post-content {

    padding: 30px;

    display: flex;

    flex-direction: column;

    flex: 1;

}





/* =====================================================
   CATEGORY BADGE
===================================================== */


.latest-posts .badge {

    width: max-content;

    background: #ecfeff;

    color: #0f766e;

    padding: 7px 16px;

    border-radius: var(--radius-full);

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 18px;

}





/* =====================================================
   TITLE
===================================================== */


.latest-posts .post-content h3 {

    font-size: 22px;

    line-height: 1.4;

    margin-bottom: 15px;

}



.latest-posts .post-content h3 a {

    color: var(--dark);

}



.latest-posts .post-content h3 a:hover {

    color: var(--primary);

}





/* =====================================================
   EXCERPT
===================================================== */


.latest-posts .post-content p {

    color: var(--text);

    font-size: 15px;

    line-height: 1.8;

    margin-bottom: 25px;

}





/* =====================================================
   META
===================================================== */


.latest-posts .post-meta {

    margin-top: auto;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.latest-posts .post-meta span {

    color: var(--text);

    font-size: 14px;

}



.latest-posts .read-more {

    color: var(--primary-dark);

    font-weight: 600;

    font-size: 14px;

}





/* =====================================================
   VIEW ALL
===================================================== */


.latest-posts .view-all {

    text-align: center;

    margin-top: 50px;

}





/* =====================================================
   RESPONSIVE
===================================================== */


@media(max-width:1024px) {


    .latest-posts .posts-grid {

        grid-template-columns: repeat(2, 1fr);

    }

}



@media(max-width:768px) {


    .latest-posts {

        padding: 70px 0;

    }



    .latest-posts .section-header h2 {

        font-size: 32px;

    }



    /* Horizontal swipeable row instead of a single stacked
       column - shows several cards side by side, user swipes
       to see more (same idea as a Netflix/YouTube mobile row). */
    .latest-posts .posts-grid {

        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 14px;
        padding-bottom: 10px;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;

    }

    .latest-posts .posts-grid::-webkit-scrollbar {
        height: 0;
        display: none;
    }

    .latest-posts .post-card {

        flex: 0 0 auto;
        width: 78%;
        max-width: 300px;
        scroll-snap-align: start;

    }

    .latest-posts .post-image {

        height: 170px;

    }

    .latest-posts .post-content {

        padding: 18px;

    }

    .latest-posts .post-content h3 {

        font-size: 17px;
        margin-bottom: 8px;

    }

    .latest-posts .post-content p {

        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 15px;

    }


}






.latest-posts .post-card {
    display: flex !important;
    flex-direction: column !important;
}

.latest-posts .post-image {
    order: 1 !important;
}

.latest-posts .post-content {
    order: 2 !important;
}