/* ===========================
   공통: 메인 헤더 테두리 제거
=========================== */
.main-header {
    box-shadow: none;
}

/* 메인 영역 공통 레이아웃 */
.notice-main {
    padding: 0 0 4em 0;
}

/* 페이지 헤더 (introduction 페이지와 비슷한 스타일) */
.page-header {
    text-align: center;
    margin: 4em auto 2em auto;
    max-width: 80%;
    padding: 1.4em 1em;
    background: linear-gradient(90deg, var(--color-green), var(--color-blue));
    color: white;
    border-radius: 0.5em;
    box-shadow: 0 0.2em 0.4em rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 1.8em;
    margin: 0;
    padding: 0;
}

.page-header-sub {
    margin-top: 0.6em;
    font-size: 1em;
    opacity: 0.9;
}

/* 상단 nav (카테고리 탭) - 기존 section-nav 재활용 */
.section-nav {
    position: sticky;
    top: 4em;
    background-color: white;
    border-bottom: 0.1em solid #ddd;
    padding: 1em 0;
    z-index: 999;
    box-shadow: 0 0.125em 0.25em rgba(0,0,0,0.1);
    font-weight: 500;
    border-top: 0.1em solid #494747;
}

.section-nav ul {
    display: flex;
    justify-content: center;
    gap: 2em;
    list-style: none;
    margin: 0;
    padding: 0;
}

.section-nav ul li a {
    text-decoration: none;
    color: rgb(90, 87, 87);
    font-size: 1em;
    transition: color 0.3s ease;
}

.section-nav ul li a:hover {
    color: var(--color-blue);
}

.section-nav ul li.is-active a {
    color: var(--color-blue);
}

.section-nav ul span {
    color: #ccc;
}

/* 공지 섹션 컨테이너 (introduction의 content-section 톤과 맞춤) */
.content-section {
    max-width: 75%;
    margin: 2.5em auto;
    padding: 2em 3em;
    background-color: #f9f9f9;
    border-radius: 1em;
    box-shadow: 0 0.2em 0.4em rgba(0,0,0,0.1);
}

.notice-section-head h2 {
    font-size: 1.5em;
    margin: 0 0 0.4em 0;
    color: var(--color-blue);
}

.notice-section-desc {
    font-size: 0.98em;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.9;
}

/* 상단 툴바: 개수 / 정렬 버튼 */
.notice-toolbar {
    margin-top: 1.5em;
    margin-bottom: 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    font-size: 0.95em;
}

.notice-count strong {
    font-weight: 700;
    color: var(--color-blue);
}

.notice-sort {
    display: flex;
    gap: 0.5em;
}

.notice-sort-btn {
    border: 0.08em solid #ddd;
    border-radius: 999px;
    padding: 0.3em 0.8em;
    background: #ffffff;
    font-size: 0.9em;
    cursor: pointer;
}

.notice-sort-btn.is-active {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

/* 리스트 전체 래퍼 */
.notice-list-wrapper {
    margin-top: 1em;
}

/* 헤더 라인 */
.notice-list-header {
    display: flex;
    align-items: center;
    padding: 0.8em 1em;
    border-bottom: 0.1em solid #e0e0e0;
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
}

/* 공통 컬럼 레이아웃 */
.notice-list .notice-item,
.notice-list-header {
    display: flex;
    align-items: center;
}

.notice-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 각 공지 행 */
.notice-item {
    padding: 0.8em 1em;
    border-bottom: 0.06em solid #ececec;
    background: #ffffff;
    transition: background 0.2s ease, transform 0.1s ease;
}

.notice-item:hover {
    background: #f5f9ff;
    transform: translateY(-0.05em);
}

/* 상단에 고정되는 공지 느낌 */
.notice-item.is-pinned {
    background: #fffaf0;
}

/* 컬럼 비율 */
.col {
    display: flex;
    align-items: center;
}

.col-label {
    flex: 0 0 6em;
}

.col-title {
    flex: 1;
    min-width: 0;
    padding: 0 1em;
}

.col-date {
    flex: 0 0 7em;
    justify-content: flex-end;
    font-size: 0.9em;
    color: #777;
}

/* 제목 링크 */
.notice-title-link {
    text-decoration: none;
    color: #333;
    font-size: 0.98em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-title-link:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

/* 배지 스타일 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12em 0.6em;
    border-radius: 999px;
    font-size: 0.78em;
    font-weight: 600;
    border: 0.08em solid transparent;
}

.badge-pin {
    background: var(--color-blue);
    color: #ffffff;
}

.badge-normal {
    background: #f2f2f2;
    color: #666;
}

.badge-new {
    margin-left: 0.5em;
    background: #ff5252;
    color: #ffffff;
}




/* ===========================
   반응형
=========================== */
@media (max-width: 768px) {
    /* 상단 nav 세로 정렬 */
    .section-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
    }

    .section-nav ul span {
        display: none;
    }

    .content-section {
        max-width: 95%;
        margin: 1.8em auto;
        padding: 1.4em;
    }

    .page-header {
        max-width: 92%;
        margin: 3em auto 1.5em auto;
        padding: 1.2em 0.8em;
    }

    .page-header h1 {
        font-size: 1.5em;
    }

    .page-header-sub {
        font-size: 0.9em;
    }

    /* 리스트를 세로로 심플하게 */
    .notice-list-header {
        display: none; /* 모바일에서는 헤더 라인 제거 */
    }

    .notice-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4em;
    }

    .col-label,
    .col-title,
    .col-date {
        flex: 0 0 auto;
        padding: 0;
    }

    .col-title {
        width: 100%;
    }

    .col-date {
        font-size: 0.85em;
        color: #999;
    }

    .notice-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6em;
    }
}
