/* ──────────────────────────────────────────────────────────────
   유진안과 — notice 전용 스타일
   공지사항 게시판 (notice.html) + 글보기 페이지 (notice-N.html)
   ──────────────────────────────────────────────────────────── */


/* ══════════════════════════════════════════════════════════════
   게시판 (notice-board)
   ══════════════════════════════════════════════════════════ */

/* 전체 게시판 래퍼 */
.notice-board {
    border-top: 2px solid var(--fg-heading);
    margin-top: 16px;
}

/* ─── 헤더 행 ─── */
.notice-board__hd {
    display: grid;
    /* 번호 · 분류 · 제목 · 날짜 · 화살표 */
    grid-template-columns: 72px 96px 1fr 120px 40px;
    padding: 14px 20px;
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-subtle);
}

/* 헤더 셀 공통 */
.notice-board__hd .nb-col {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-muted);
    letter-spacing: 0.04em;
}

/* ─── 게시물 행 (<a> 링크) ─── */
.notice-row {
    display: grid;
    grid-template-columns: 72px 96px 1fr 120px 40px;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
    color: inherit;
    transition: background 200ms;
}

/* 마지막 행 하단 테두리 */
.notice-row:last-child {
    border-bottom: 2px solid var(--fg-heading);
}

.notice-row:hover {
    background: var(--bg-section);
}

/* ─── 셀 공통 ─── */
.nb-col {
    font-size: 14px;
    color: var(--fg-muted);
}

/* 번호 셀 */
.nb-col--num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* 분류 배지 셀 */
.nb-col--badge {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 제목 셀 */
.nb-col--title {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 날짜 셀 */
.nb-col--date {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ─── 분류 배지 ─── */
.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* 공지 — 브랜드 그린 */
.notice-badge--notice {
    background: var(--brand-50);
    color: var(--brand-600);
}

/* 보도 — 파란 계열 */
.notice-badge--press {
    background: var(--info-bg);
    color: var(--info);
}

/* 장비 — 보라 계열 */
.notice-badge--equipment {
    background: #F0EBF9;
    color: #6B46C1;
}

/* 소식 — 청록 계열 */
.notice-badge--news {
    background: #E6F4F1;
    color: #1A7C6E;
}

/* 이벤트 — 주황 계열 */
.notice-badge--event {
    background: var(--warning-bg);
    color: var(--warning);
}

/* ─── 제목 텍스트 ─── */
.notice-row__text {
    padding: 22px 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--fg-heading);
    line-height: 1.55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 200ms;
}

.notice-row:hover .notice-row__text {
    color: var(--brand-500);
}

/* 모바일 전용 날짜 (기본: 숨김) */
.notice-row__date-mob {
    display: none;
    font-size: 14px;
    color: var(--fg-muted);
    font-variant-numeric: tabular-nums;
    padding: 4px 8px 20px;
}

/* ─── 화살표 아이콘 ─── */
.notice-row__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-disabled);
    opacity: 0;
    transform: translateX(-6px);
    transition:
        opacity 200ms,
        transform 200ms,
        color 200ms;
}

.notice-row:hover .notice-row__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--brand-400);
}


/* ══════════════════════════════════════════════════════════════
   글보기 페이지 (notice view)
   ══════════════════════════════════════════════════════════ */

/* 글보기 페이지 헤더 구분선 */
.nv-head-divider {
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
    border: none;
    margin: 32px 0 0;
}

/* 배지 + 날짜 묶음 */
.nv-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* 날짜 */
.nv-meta__date {
    font-size: 14px;
    color: var(--fg-muted);
    font-variant-numeric: tabular-nums;
}

/* 글보기 제목 */
.nv-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--fg-heading);
    line-height: 1.4;
    letter-spacing: -0.02em;
    word-break: keep-all;
}

/* 글보기 콘텐츠 래퍼 */
.nv-content {
    max-width: 780px;
}

/* 목록으로 버튼 */
.nv-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-muted);
    text-decoration: none;
    border: 1px solid var(--border-base);
    border-radius: 8px;
    padding: 9px 18px;
    margin-bottom: 40px;
    transition:
        color 200ms,
        border-color 200ms,
        background 200ms;
}

.nv-back:hover {
    color: var(--fg-heading);
    border-color: var(--fg-heading);
    background: var(--bg-section);
}

/* 하단 목록 버튼 구분선 */
.nv-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border-subtle);
}

/* ─── 기사 본문 ─── */

/* hidden 속성이 display 에 묻히지 않도록 명시적 오버라이드 */
.notice-article[hidden] {
    display: none;
}

/* 기사 구분선 */
.notice-article__divider {
    width: 48px;
    height: 3px;
    background: var(--brand-400);
    border: none;
    border-radius: 2px;
    margin: 0 0 28px 0;
}

/* 기사 단락 */
.notice-article p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--fg1);
    margin-bottom: 18px;
    word-break: keep-all;
}

.notice-article p:last-child {
    margin-bottom: 0;
}

/* 비교표 */
.notice-article__table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.notice-article__table th,
.notice-article__table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.notice-article__table th {
    font-weight: 600;
    color: var(--fg-heading);
    background: var(--bg-section);
    font-size: 14px;
}

.notice-article__table td {
    color: var(--fg1);
}

/* 강조 박스 */
.notice-article__box {
    background: var(--brand-50);
    border-left: 4px solid var(--brand-400);
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 24px 0;
}

.notice-article__box p {
    color: var(--brand-700);
    margin-bottom: 8px;
}

.notice-article__box p:last-child {
    margin-bottom: 0;
}


/* ══════════════════════════════════════════════════════════════
   반응형
   ══════════════════════════════════════════════════════════ */

/* ── 태블릿 (≤ 1024px) ─── */
@media (max-width: 1024px) {

    .notice-board__hd {
        grid-template-columns: 56px 84px 1fr 100px 40px;
        padding: 12px 16px;
    }

    .notice-row {
        grid-template-columns: 56px 84px 1fr 100px 40px;
        padding: 0 16px;
    }

    .nv-title {
        font-size: 26px;
    }
}

/* ── 모바일 (≤ 767px) ─── */
@media (max-width: 767px) {

    /* 게시판 헤더 숨기기 (항목명 불필요) */
    .notice-board__hd {
        display: none;
    }

    /* 게시물 행: 분류(76px) + 제목/날짜(1fr) + 화살표(28px) */
    .notice-row {
        grid-template-columns: 76px 1fr 28px;
        padding: 0 16px;
        align-items: start;
    }

    /* 번호·날짜 열 숨기기 */
    .notice-row .nb-col--num,
    .notice-row .nb-col--date {
        display: none;
    }

    /* 배지 셀: 상단에서 세로 정렬 */
    .nb-col--badge {
        justify-content: center;
        padding-top: 20px;
        align-items: flex-start;
    }

    /* 제목 셀 세로 여백 */
    .nb-col--title {
        padding: 18px 0;
    }

    /* 제목 텍스트: 모바일에서 줄바꿈 허용 */
    .notice-row__text {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        padding: 0 8px;
        font-size: 15px;
        line-height: 1.5;
    }

    /* 모바일 날짜 표시 */
    .notice-row__date-mob {
        display: block;
        padding: 6px 8px 0;
    }

    /* 화살표: 상단 정렬 + 항상 표시 */
    .notice-row__arrow {
        padding-top: 22px;
        opacity: 0.35;
        transform: translateX(0);
    }

    .notice-row:hover .notice-row__arrow {
        opacity: 1;
    }

    /* 글보기 제목 */
    .nv-title {
        font-size: 20px;
    }

    /* 표: 작은 글씨 */
    .notice-article__table {
        font-size: 14px;
    }

    .notice-article__table th,
    .notice-article__table td {
        padding: 10px 12px;
    }

    /* 강조 박스 */
    .notice-article__box {
        padding: 16px 18px;
    }
}
