/* =============================================================
   공지사항 페이지 스타일
   - 목록 (border-bottom 구분선, 고정공지 배지)
   - 상세 페이지
   - 페이지네이션
   - 모바일 반응형
   ============================================================= */

/* -------------------------------------------------------------
   공지사항 목록
   ------------------------------------------------------------- */
.notice-list {
    border-top: 2px solid var(--color-text);
}

.notice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background 0.15s;
}

.notice-item:hover {
    background: var(--color-bg-light);
}

/* 고정 공지사항 배경 강조 */
.notice-item--pinned {
    background: #fffbeb;
}

.notice-item--pinned:hover {
    background: #fef9c3;
}

/* 좌측: 배지 + 제목 */
.notice-item__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* 우측: 조회수 + 날짜 */
.notice-item__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.notice-item__title {
    font-size: 15px;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-item__views {
    font-size: 13px;
    color: var(--color-text-light);
}

.notice-item__date {
    font-size: 13px;
    color: var(--color-text-light);
    white-space: nowrap;
}

/* -------------------------------------------------------------
   고정 공지 배지
   ------------------------------------------------------------- */
.notice-pin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: #fef3c7;
    color: #d97706;
    flex-shrink: 0;
    white-space: nowrap;
}

/* -------------------------------------------------------------
   로딩 / 빈 상태
   ------------------------------------------------------------- */
.notice-loading {
    text-align: center;
    padding: 48px 20px;
    color: var(--color-text-light);
    font-size: 14px;
}

.notice-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    font-size: 15px;
}

/* -------------------------------------------------------------
   페이지네이션
   ------------------------------------------------------------- */
.notice-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
}

.notice-page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-page-btn:hover:not([disabled]) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.notice-page-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.notice-page-btn[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* -------------------------------------------------------------
   공지사항 상세 페이지
   ------------------------------------------------------------- */
.notice-detail {
    max-width: 800px;
    margin: 0 auto;
}

.notice-detail__header {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-text);
    margin-bottom: 24px;
}

.notice-detail__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.notice-detail__meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--color-text-light);
}

/* 상세 내용 (HTML 렌더링) */
.notice-detail__content {
    min-height: 300px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text);
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 24px;
}

.notice-detail__content img {
    max-width: 100%;
    height: auto;
}

/* 상세 하단 버튼 */
.notice-detail__footer {
    margin-bottom: 24px;
}

/* -------------------------------------------------------------
   모바일 반응형 (최대 480px)
   ------------------------------------------------------------- */
@media (max-width: 480px) {
    .notice-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 4px;
    }

    .notice-item__left {
        width: 100%;
    }

    .notice-item__title {
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .notice-item__right {
        width: 100%;
        justify-content: flex-end;
    }

    .notice-detail__title {
        font-size: 17px;
    }

    .notice-detail__meta {
        flex-direction: column;
        gap: 4px;
    }

    .notice-detail__content {
        font-size: 14px;
    }
}

/* -------------------------------------------------------------
   태블릿 반응형 (768px 이하)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .notice-detail {
        max-width: 100%;
    }

    .notice-item__views {
        display: none;
    }
}
