/* News Grid 2 - 3 Columns x 4 Rows (Clean list: title+date left, thumb right) */

/* Wrapper */
.news-grid-2-wrap {
    max-width: 1200px;
    margin: 20px auto 25px auto;
    padding: 0 20px;
}

/* Header Title Bar — identical to grid-1 */
.news-grid-2-header {
    display: flex;
    align-items: center;
    padding: 0 0 12px 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #222;
}

.news-grid-2-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.3;
}

.news-grid-2-title strong {
    font-weight: 700;
}

/* 3-Column Grid */
.news-grid-2-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 30px;
}

/* Each Card */
.ng2-item {
    width: 100%;
    border-bottom: 1px solid #e5e5e5;
}

.ng2-item:nth-last-child(-n+3) {
    border-bottom: none;
}

/* Link: title left, thumb right — no border */
.ng2-link {
    display: flex;
    align-items: stretch;
    /* content div stretches to match image height */
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 0 0 15px 0;
}

/* Title + Date (left) */
.ng2-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* title top, date bottom */
}

.ng2-title {
    font-size: 18px;
    /* same as grid-1 */
    font-weight: 500;
    color: #222;
    /* same as grid-1 */
    line-height: 1.5;
    margin: 0 0 6px 0;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.ng2-link:hover .ng2-title {
    color: #555;
    /* same as grid-1 */
}

.ng2-date {
    display: block;
    color: #555;
    font-size: 13px;
}

/* Thumbnail (right) */
.ng2-thumb {
    flex: 0 0 calc(35% - 12px);
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #e5e5e5;
}

.ng2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ng2-link:hover .ng2-thumb img {
    transform: scale(1.05);
}

/* Tablet / Mobile: 1 Column, show only 8 items */
@media (max-width: 768px) {
    .news-grid-2-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Hide items 9~12 on mobile — show only 8 */
    .news-grid-2-container .ng2-item:nth-child(n+9) {
        display: none;
    }

    /* Remove border from last visible item on mobile (8th) */
    .news-grid-2-container .ng2-item:nth-child(8) {
        border-bottom: none;
    }

    .news-grid-2-title {
        font-size: 20px;
    }

    .ng2-title {
        font-size: 17px;
    }

    .ng2-thumb {
        flex: 0 0 120px;
    }
}