/* ==========================================================
   news.css - 뉴스·커뮤니티·이벤트 상세 페이지(news_view.ejs) 전용
   - 다른 CSS 파일에 의존하지 않고, 클래스는 모두 nv- 접두어를 사용합니다.
   - 색상, 크기는 .nv-wrap 안의 변수에서만 바꾸면 됩니다.
   ========================================================== */

.nv-wrap {
    --nv-text: #212529;
    --nv-text-body: #343a40;
    --nv-gray: #868e96;
    --nv-gray-light: #ced4da;
    --nv-line: #e9ecef;
    --nv-bg-img: #f1f3f5;
    --nv-accent: #1c7ed6;
    --nv-radius: 10px;

    max-width: 860px;
    margin: 0 auto;
    padding: 0 4px 80px;
}

/* ---------- 뒤로가기 ---------- */
.nv-back {
    display: inline-block;
    margin-bottom: 40px;
    font-size: .9rem;
    color: var(--nv-gray);
}
.nv-back:hover { color: var(--nv-text); text-decoration: none; }

/* ---------- 카드 ---------- */
.nv-card {
    overflow: hidden;
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.nv-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--nv-bg-img);
}
.nv-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nv-card__body { padding: 28px 28px 32px; }

.nv-title {
    margin: 0 0 14px;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--nv-text);
    word-break: break-word;
}

/* 출처 · 날짜 · 공유 */
.nv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin: 0 0 22px;
    font-size: .9rem;
    color: var(--nv-gray);
}
.nv-meta__author { color: #495057; font-weight: 600; }
.nv-meta__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--nv-gray-light);
}
.nv-share {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--nv-gray);
    cursor: pointer;
}
.nv-share:hover {
    color: var(--nv-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 요약 본문: 줄바꿈은 살리고 HTML은 이스케이프된 채로 출력 */
.nv-summary {
    margin: 0 0 28px;
    font-size: 1.05rem;
    line-height: 1.85;
    letter-spacing: -0.01em;
    color: var(--nv-text-body);
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 원문 보러가기 버튼 */
.nv-origin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: var(--nv-radius);
    background: var(--nv-text);
    color: #fff;
    text-decoration: none;
    transition: background .15s;
}
.nv-origin:hover { background: var(--nv-accent); color: #fff; text-decoration: none; }
.nv-origin__main  { min-width: 0; }
.nv-origin__label { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.nv-origin__host {
    display: block;
    margin-top: 2px;
    font-size: .85rem;
    opacity: .75;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nv-origin__arrow { flex: 0 0 auto; font-size: 1.5rem; font-weight: 700; line-height: 1; }

/* 카드 아래 광고 */
.nv-ad { margin-top: 24px; }

/* ---------- 모바일 ---------- */
@media (max-width: 576px) {
    .nv-back { margin-bottom: 28px; }
    .nv-card__body { padding: 20px 18px 22px; }
    .nv-title { font-size: 1.35rem; }
    .nv-summary { font-size: 1rem; line-height: 1.8; margin-bottom: 22px; }
    .nv-origin { padding: 15px 18px; }
    .nv-origin__label { font-size: 1.05rem; }
}