.latest-posts {
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 2rem;
}
.hero {
    padding: 6rem 2rem;
    text-align: center;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #f8fafc
        );

    border-radius: 24px;

    margin-bottom: 4rem;
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;

    margin-bottom: 1rem;

    color: #0f172a;

    letter-spacing: -0.04em;
}

.hero h2 span:first-child {
    color: #64748b;
    font-weight: 600;
}

.hero h2 span:last-child {
    color: #4f46e5;
    position: relative;
}

.hero h2 span:last-child::after {
    content: '';
    position: absolute;

    left: 0;
    bottom: -8px;

    width: 100%;
    height: 4px;

    border-radius: 999px;

    background: #4f46e5;
}

.hero p {
    max-width: 700px;
    margin: 0 auto;

    color: #64748b;

    font-size: 1.1rem;
    line-height: 1.8;
}

/* ==========================================================================
   3. LATEST POSTS SECTION (4 Columns, Image takes half height)
   ========================================================================== */
.latest-posts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.latest-post-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    border: 1px solid #e5e7eb;

    transition: all .35s ease;

    box-shadow:
        0 4px 12px rgba(15,23,42,.05);
}

.latest-post-card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 20px 40px rgba(15,23,42,.12);
}

/* Image */

.latest-post-card figure {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.latest-post-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform .7s ease;
}

.latest-post-card:hover figure img {
    transform: scale(1.08);
}

/* Category Badge */

.post-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;

    padding: 6px 12px;

    border-radius: 999px;

    background: rgba(255,255,255,.9);

    backdrop-filter: blur(10px);

    font-size: .75rem;
    font-weight: 600;
    color: #4f46e5;
}

/* Content */

.latest-post-card .post-info {
    flex: 1;

    padding: 1.5rem;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.latest-post-card .post-info h3 {
    font-size: 1.15rem;
    line-height: 1.5;
    font-weight: 700;
    color: #0f172a;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.latest-post-card .post-info p {
    color: #64748b;
    font-size: .95rem;
    line-height: 1.7;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* Date */

.post-date {
    font-size: .8rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Footer Stats */

.latest-post-card .post-stats {
    display: flex;
    align-items: center;
    gap: 1rem;

    padding: 1rem 1.5rem;

    border-top: 1px solid #f1f5f9;

    color: #64748b;
    font-size: .85rem;
}

.latest-post-card .post-stats section {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.latest-post-card .post-stats section:last-child {
    margin-left: auto;

    width: 36px;
    height: 36px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;

    cursor: pointer;

    transition: all .3s ease;
}

.latest-post-card .post-stats section:last-child:hover {
    background: #eef2ff;
    color: #4f46e5;
}


@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr; /* Stacks hero segments into one block */
    }
    .latest-posts {
        grid-template-columns: 1fr; /* 2 columns on tablets */
    }

    .section-heading{
        text-align: center;
    }
}
