/**
 * ============================================
 * 워크캠프 2026 리뉴얼 - 새소식 페이지 CSS
 * ============================================
 * 디자인: renew/news_01.png, news_02.png 참조
 */

/* ========== 새소식 페이지 공통 ========== */
.news-page {
    padding-top: 90px; /* 헤더가 relative이므로 여백만 */
    padding-bottom: 80px;
    min-height: 100vh;
    background-color: var(--color-bg-white);
}

.news-page .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 페이지 헤더 */
.news-page__header {
    margin-bottom: 40px;
}

.news-page__title {
    font-size: 40px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    line-height: 1.2;
}

/* ========== 탭 메뉴 ========== */
.news-tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 40px; /* 탭과 게시물 간격 */
}

.news-tabs__item {
    padding: 16px 0;
    font-size: 18px; /* 16px → 18px */
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.news-tabs__item:hover {
    color: var(--color-text-body);
}

.news-tabs__item--active {
    color: var(--color-text-dark);
    font-weight: var(--font-weight-bold);
    border-bottom-color: var(--color-text-dark);
}

/* ========== 게시물 리스트 ========== */
.news-list {
    border-top: 1px solid var(--color-text-dark);
}

.news-list__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.news-list__item:hover {
    background-color: var(--color-bg-section);
}

/* 첫번째 게시물 (공지영역) */
.news-list__item--notice-area {
    background-color: #FDFDFC;
}

/* 배지 */
.news-list__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    color: var(--color-text-white);
}

/* 배지 색상 - 제목에 [공지], [모집], [발표] 등으로 표시 시 적용 */
.news-list__badge--notice {
    background-color: #8E8E8E; /* 공지 */
}

.news-list__badge--recruit {
    background-color: #003486; /* 모집 */
}

.news-list__badge--announce {
    background-color: #FF6200; /* 발표 */
}

.news-list__badge--default {
    background-color: #999999;
}

/* 제목 */
.news-list__title {
    flex: 1;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-list__item:hover .news-list__title {
    color: var(--color-text-dark);
}

/* 날짜 */
.news-list__date {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--color-text-muted);
}

/* 빈 리스트 */
.news-list__empty {
    padding: 60px 0;
    text-align: center;
    color: var(--color-text-muted);
}

/* ========== 페이지네이션 ========== */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
}

.news-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--color-text-body);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.news-pagination__item:hover {
    background-color: var(--color-bg-section);
}

.news-pagination__item--active {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    background-color: rgba(255, 87, 34, 0.1);
}

.news-pagination__item--disabled {
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.news-pagination__item--disabled:hover {
    background-color: transparent;
}

/* ========== 검색 ========== */
.news-search {
    display: flex;
    align-items: center;
    max-width: 400px;
    margin: 32px auto 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

/* 검색 필드 선택박스 */
.news-search__select {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--color-text-body);
    background: transparent;
    border: none;
    border-right: 1px solid var(--color-border);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.news-search__select:focus {
    background-color: var(--color-bg-section);
}

.news-search__input {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    border: none;
    outline: none;
    background: transparent;
}

.news-search__input::placeholder {
    color: var(--color-text-muted);
}

.news-search__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.news-search__btn:hover {
    color: var(--color-text-dark);
}

/* ========== 상세 페이지 ========== */
.news-detail {
    padding-top: 40px;
}

/* 상세 헤더 */
.news-detail__header {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 32px;
}

/* 제목 행 (배지 + 제목 같은 줄) */
.news-detail__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.news-detail__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 52px;
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    color: var(--color-text-white);
}

/* 배지 색상 (상세 페이지) */
.news-detail__badge--notice {
    background-color: #8E8E8E; /* 공지 */
}

.news-detail__badge--recruit {
    background-color: #003486; /* 모집 */
}

.news-detail__badge--announce {
    background-color: #FF6200; /* 발표 */
}

.news-detail__title {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    line-height: 1.4;
    margin: 0;
}

/* 메타 정보 (날짜, 작성자, 조회수) */
.news-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.news-detail__date,
.news-detail__author,
.news-detail__views {
    display: inline-flex;
    align-items: center;
}

/* 첨부파일 */
.news-detail__files {
    padding: 16px 20px;
    margin-bottom: 24px;
    background-color: var(--color-bg-section);
    border-radius: var(--radius-md);
    font-size: 14px;
}

.news-detail__files strong {
    color: var(--color-text-dark);
    margin-right: 12px;
}

.news-detail__files ul {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-detail__files li {
    display: inline;
}

.news-detail__files li:not(:last-child)::after {
    content: ", ";
}

.news-detail__files a {
    color: var(--color-primary);
    text-decoration: none;
}

.news-detail__files a:hover {
    text-decoration: underline;
}

/* 본문 */
.news-detail__body {
    padding-bottom: 40px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-body);
}

.news-detail__body p {
    margin-bottom: 16px;
}

.news-detail__body h3 {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    margin-top: 32px;
    margin-bottom: 16px;
}

.news-detail__body h3:first-child {
    margin-top: 0;
}

/* 이전/다음 네비게이션 */
.news-detail__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.news-detail__nav-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    padding: 16px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.news-detail__nav-item:hover {
    background-color: var(--color-bg-section);
}

.news-detail__nav-item--next {
    text-align: right;
}

.news-detail__nav-item--empty {
    background: transparent;
}

.news-detail__nav-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.news-detail__nav-title {
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 목록 버튼 */
.news-detail__actions {
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

.news-detail__list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-body);
    text-decoration: none;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.news-detail__list-btn:hover {
    background-color: var(--color-bg-section);
    border-color: var(--color-text-muted);
}

/* ========== 반응형 ========== */
@media (max-width: 1024px) {
    .news-page {
        padding-top: 120px;
    }

    .news-page__title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .news-page {
        padding-top: 80px; /* 모바일: 헤더 relative, 여백만 */
        padding-bottom: 60px;
    }

    .news-page__header {
        margin-bottom: 24px;
    }

    .news-page__title {
        font-size: 28px;
    }

    /* 탭 */
    .news-tabs {
        gap: 24px;
    }

    .news-tabs__item {
        font-size: 15px;
        padding: 12px 0;
    }

    /* 리스트 - 배지, 제목, 날짜 같은 줄 유지 */
    .news-list__item {
        gap: 8px;
        padding: 16px 0;
    }

    .news-list__badge {
        min-width: 44px;
        height: 24px;
        padding: 0 8px;
        font-size: 11px;
    }

    .news-list__title {
        font-size: 14px;
    }

    .news-list__date {
        font-size: 12px;
    }

    /* 상세 */
    .news-detail__title-row {
        gap: 8px;
    }

    .news-detail__title {
        font-size: 22px;
    }

    .news-detail__body {
        font-size: 15px;
    }

    .news-detail__nav {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-detail__nav-item--next {
        text-align: left;
    }

    .news-detail__list-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .news-page__title {
        font-size: 24px;
    }

    .news-tabs {
        gap: 16px;
    }

    .news-tabs__item {
        font-size: 14px;
    }

    .news-detail__title-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .news-detail__title {
        font-size: 20px;
        width: 100%;
    }

    .news-search {
        margin-top: 24px;
    }

    .news-search__input {
        padding: 10px 16px;
        font-size: 13px;
    }
}
