﻿/* 5개 한 줄 + 간격 + 현재 article 구조용 */

.news-grid {
    --news-gap: 24px;
    display: grid;
    grid-template-columns: repeat(5, calc((100% - (var(--news-gap) * 4)) / 5));
    gap: var(--news-gap);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.news-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d9e0ea;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .news-card:hover {
        transform: translateY(-3px);
        border-color: #1f4f8f;
        box-shadow: 0 16px 36px rgba(16, 24, 40, 0.14);
    }

.news-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

    .news-card-link:hover {
        color: inherit;
        text-decoration: none;
    }

.news-img-wrap {
    position: relative;
    width: 100%;
    height: 155px;
    overflow: hidden;
    background: #eef2f7;
    border-bottom: 1px solid #d9e0ea;
}

.news-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #eef2f7;
    transition: transform 0.24s ease;
}

.news-card:hover .news-img {
    transform: scale(1.04);
}

.news-img[src=""],
.news-img:not([src]) {
    content: url("/iBoard/Skin/iBoard/iBoardNews/image/NoImage.png");
    object-fit: contain;
    padding: 26px;
    background: #f8fafc;
}

.news-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-notice {
    background: #1f4f8f;
}

.news-reply {
    background: #0f766e;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /*min-height: 118px;*/
    padding: 22px 20px;
    background: #ffffff;
}

.news-title {
    display: -webkit-box;
    min-height: 62px;
    margin: 0;
    overflow: hidden;
    color: #071225;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.03em;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-card.is-active,
.news-card.active,
.news-card.selected {
    border-color: #1f4f8f;
    box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.12), 0 12px 30px rgba(16, 24, 40, 0.10);
}

@media (max-width: 1200px) {
    .news-grid {
        --news-gap: 22px;
        grid-template-columns: repeat(3, calc((100% - (var(--news-gap) * 2)) / 3));
    }
}

@media (max-width: 760px) {
    .news-grid {
        --news-gap: 18px;
        grid-template-columns: repeat(2, calc((100% - var(--news-gap)) / 2));
    }

    .news-img-wrap {
        height: 220px;
    }

    .news-card-body {
        min-height: 100px;
        padding: 18px;
    }

    .news-title {
        min-height: 52px;
        font-size: 19px;
    }
}

@media (max-width: 520px) {
    .news-grid {
        grid-template-columns: 100%;
        gap: 18px;
    }

    .news-img-wrap {
        height: 230px;
    }
}
