/* ==========================================================================
   POST CATEGORY / NEWS LIST STYLING
   ========================================================================== */

.news-list {
    padding: 30px 0 0px 0;
    background-color: #fff;
}

/* Featured News Layout (Top Section) */
.news-featured-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.news-featured-left {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    min-height: 530px;
    height: 100%;
    display: block;
    text-decoration: none;
    background-color: #1a202c;
}

.news-featured-overlay .desc {
    color: #fff;
    margin-top: 8px;
}

.news-featured-right {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

.news-featured-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    background-color: #1a202c;
}

.news-featured-item--small {
    min-height: 200px;
}

.news-featured-thumb {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.news-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.news-featured-left:hover .news-featured-thumb img,
.news-featured-item:hover .news-featured-thumb img {
    transform: scale(1.05);
}

.news-featured-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px 24px;
    background: linear-gradient(to top,
            rgba(15, 42, 53, 0.95) 0%,
            rgba(15, 42, 53, 0.75) 30%,
            rgba(15, 42, 53, 0.25) 60%,
            transparent 100%);
    transition: background 0.3s ease;
}

.news-featured-left:hover .news-featured-overlay,
.news-featured-item:hover .news-featured-overlay {
    background: linear-gradient(to top,
            rgba(10, 30, 38, 0.98) 0%,
            rgba(10, 30, 38, 0.8) 35%,
            rgba(10, 30, 38, 0.3) 65%,
            transparent 100%);
}

.news-featured-title {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.news-featured-left .news-featured-title {
    font-size: 24px;
    line-height: 1.35;
}

.news-featured-item--small .news-featured-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* News Meta (Avatar + Author + Date) */
.news-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.news-meta__avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    display: block;
}

.news-meta__author {
    color: inherit;
}

.news-meta__divider {
    opacity: 0.6;
    margin: 0 1px;
}

.news-meta__date {
    color: inherit;
    font-weight: 400;
}

.news-featured-overlay .news-meta {
    color: #e2e8f0;
}

.news-featured-overlay .news-meta__avatar {
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.news-featured-date {
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Regular News Grid (4 Columns) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 20px;
    /* margin-bottom: 40px; */
}

.news-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f1f5f9;
}

.news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card__thumb img {
    transform: scale(1.06);
}

.news-card__body {
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.news-card:hover .news-card__title {
    color: #0284c7;
}

.news-card .news-meta {
    color: #475569;
    margin-top: auto;
    padding-top: 4px;
}

.news-card__date {
    font-size: 13px;
    color: #64748b;
    margin-top: auto;
    font-weight: 400;
}

/* Pagination container */
.news-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .news-featured-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-featured-left {
        min-height: 320px;
        /* aspect-ratio: 16 / 9; */
    }

    .news-featured-right {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }

    .news-featured-item--small {
        min-height: 180px;
        aspect-ratio: 16 / 9;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 16px;
    }
}

@media (max-width: 768px) {
    .news-list {
        padding: 20px 0 30px 0;
    }

    .news-featured-grid {
        margin-bottom: 24px;
    }

    .news-featured-right {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .news-featured-overlay {
        padding: 16px;
    }

    .news-featured-left .news-featured-title {
        font-size: 17px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px 12px;
    }

    .news-card__title {
        font-size: 14px;
        line-height: 1.4;
    }

    .news-card__body {
        padding-top: 8px;
    }

    .news-meta {
        font-size: 12px;
        gap: 5px;
    }

    .news-meta__avatar {
        width: 18px;
        height: 18px;
    }

    .news-featured-overlay .desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .news-featured-left {
        min-height: 220px;
    }

    .news-featured-item--small {
        min-height: 160px;
    }

    .news-featured-date,
    .news-card__date {
        font-size: 12px;
    }

    .news-meta {
        font-size: 11.5px;
        gap: 4px;
    }

    .news-meta__avatar {
        width: 16px;
        height: 16px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
    }
}
