/* =======================
   Notice Page (반응형 버전)
   ======================= */

:root {
    --notice-red: #e11d2e;
    --notice-gray: #555;
    --notice-black: #111;
}

/* 기본 래퍼 */
.notice-wrap {
    width: min(1100px, 90%);
    margin: clamp(4rem, 6vw, 8rem) auto;
    text-align: center;
    position: relative;
    z-index: 1;
    font-family: "Noto Sans KR", system-ui, sans-serif;
}

/* 상단 영역 */
.notice-header {
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.notice-header .highlight {
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    font-weight: 800;
    color: #000;
    margin-bottom: 0.5rem;
}
.notice-header p {
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    color: var(--notice-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.notice-logo {
    width: clamp(120px, 10vw, 160px);
    margin: 0 auto;
    display: block;
}

/* =======================
   검색 영역
   ======================= */
.notice-search form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.6rem);
    flex-wrap: wrap;
}

.notice-search input {
    width: clamp(200px, 30vw, 280px);
    height: clamp(34px, 4vw, 38px);
    border: 1px solid #ccc;
    padding: 0 clamp(0.6rem, 1vw, 0.8rem);
    border-radius: 4px;
    font-size: clamp(0.85rem, 1.3vw, 0.9rem);
}
.notice-search button {
    background: var(--news-red);
    color: #fff;
    border: none;
    height: clamp(34px, 4vw, 38px);
    padding: 0 clamp(1rem, 2vw, 1.4rem);
    font-size: clamp(0.85rem, 1.3vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s ease;
}
.notice-search button:hover {
    background: #c80c1f;
}

/* =======================
   테이블 영역
   ======================= */
.notice-table-wrap {
    overflow-x: auto;
    margin-top: clamp(1.5rem, 3vw, 2rem);
}
.notice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    color: #333;
    min-width: unset;
    table-layout: fixed;
}
.notice-table th,
.notice-table td {
    padding: clamp(0.8rem, 1.2vw, 0.9rem);
    border-bottom: 1px solid #eee;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.notice-table th {
    background: #f8f8f8;
    font-weight: 700;
    border-top: 2px solid #aaa;
    border-bottom: 1px solid #ddd;
}
.notice-table tr:hover td {
    background: #fafafa;
}
.notice-table a {
    color: #333;
    text-decoration: none;
    transition: 0.2s;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
}
.notice-table a:hover {
    color: var(--notice-red);
}

/* 열 비율 */
.notice-table th:nth-child(1),
.notice-table td:nth-child(1) {
    width: 10%;
}
.notice-table th:nth-child(2),
.notice-table td:nth-child(2) {
    width: 60%;
    text-align: center;
}
.notice-table th:nth-child(3),
.notice-table td:nth-child(3) {
    width: 10%;
}
.notice-table th:nth-child(4),
.notice-table td:nth-child(4) {
    width: 10%;
}
.notice-table th:nth-child(5),
.notice-table td:nth-child(5) {
    width: 10%;
    color: var(--notice-black);
    font-weight: 600;
}

/* =======================
   페이지네이션
   ======================= */
.notice-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.6rem);
    margin-top: clamp(2rem, 4vw, 2.5rem);
    flex-wrap: wrap;
}
.notice-pagination button {
    width: clamp(26px, 4vw, 30px);
    height: clamp(26px, 4vw, 30px);
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    cursor: pointer;
    transition: all 0.3s ease;
}
.notice-pagination button.active {
    background: var(--notice-red);
    color: #fff;
    border-color: var(--notice-red);
}
.notice-pagination button:hover {
    border-color: var(--notice-red);
    color: var(--notice-red);
}
.notice-pagination span {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--notice-red);
    font-weight: bold;
    line-height: 1;
}

/* =======================
   상세보기 영역
   ======================= */
.notice-detail-wrap {
    width: min(900px, 90%);
    margin: clamp(3rem, 6vw, 4rem) auto;
    text-align: left;
}
.notice-title {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    border-bottom: 1px solid #555;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    text-align: center;
}
.notice-meta {
    color: #777;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    margin-bottom: 1.5rem;
    text-align: center;
}
.notice-content {
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: clamp(0.9rem, 1.4vw, 1.2rem);
    color: #333;
    margin-top: clamp(3rem, 6vw, 5rem);
    margin-bottom: clamp(5rem, 8vw, 10rem);
    text-align: center;
}
.notice-back {
    text-align: center;
}
.btn-back {
    background: var(--notice-red);
    color: white;
    padding: clamp(0.6rem, 1vw, 0.8rem) clamp(1.2rem, 2vw, 1.4rem);
    text-decoration: none;
    border-radius: 5px;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    transition: 0.3s;
}
.btn-back:hover {
    background: #c50d1f;
}

/* =======================
   반응형 Breakpoints
   ======================= */

/* 1200px 이하 - 작성자 숨김 */
@media (max-width: 1200px) {
    .notice-table th:nth-child(4),
    .notice-table td:nth-child(4) {
        display: none;
    }
}

/* 700px 이하 - 날짜 숨김 */
@media (max-width: 700px) {
    .notice-table th:nth-child(3),
    .notice-table td:nth-child(3) {
        display: none;
    }

    .notice-search {
        flex-direction: column;
        align-items: center;
    }
    .notice-search input {
        width: 90%;
    }
    .notice-search button {
        width: 90%;
        height: 38px;
    }
}

/* 500px 이하 - 번호 숨김 */
@media (max-width: 500px) {
    .notice-table th:nth-child(1),
    .notice-table td:nth-child(1) {
        display: none;
    }

    .notice-search {
        flex-direction: column;
        gap: 0.8rem;
    }

    .notice-search input {
        width: 90%;
    }

    .notice-table {
        min-width: 100%;
        font-size: clamp(0.75rem, 2vw, 0.85rem);
    }
}
