/* =========================================================
   기본 설정
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f3f6f8;
    color: #101820;
    font-family: 'Noto Sans KR', Arial, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================================================
   공통 레이아웃
========================================================= */

.wrap {
    width: min(calc(100% - 48px), 1220px);
    margin: auto;
}


/* =========================================================
   헤더 / 네비게이션
========================================================= */

header {
    height: 70px;
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    background: #040a10ed;
    color: #fff;
    border-bottom: 1px solid #fff2;
}

.nav {
    height: 70px;
    width: min(calc(100% - 48px), 1220px);
    margin: auto;

    display: flex;
    align-items: center;
    gap: 45px;
}

.brand img {
    width: 175px;
    display: block;
    filter: brightness(0) invert(1);
}

nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex: 1;

    font-size: 13px;
    font-weight: 600;
}

nav a:hover {
    color: #42a0e8;
}


/* =========================================================
   게시판 페이지
========================================================= */

.board-page {
    padding: 125px 0 90px;
    min-height: 100vh;
}


/* =========================================================
   페이지 제목
========================================================= */

.page-title {
    text-align: center;
    margin-bottom: 45px;
}

.page-title h1 {
    font-size: 42px;
    margin: 0;
    letter-spacing: -0.05em;
}

.page-title p {
    font-size: 10px;
    color: #7a858e;
    letter-spacing: 0.15em;
}


/* =========================================================
   공통 박스
========================================================= */

.box,
.view,
.form {
    background: #fff;
    border: 1px solid #dce2e7;
    box-shadow: 0 10px 30px #1020300a;
}


/* =========================================================
   검색 영역
========================================================= */

.search {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.search form {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.search select,
.search input {
    height: 36px;
    border: 1px solid #d7dde2;
    padding: 0 10px;
    font-size: 12px;
}

.search input {
    width: 230px;
}


/* =========================================================
   버튼
========================================================= */

.btn {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    border: 0;

    padding: 10px 18px;
    font-size: 12px;
    cursor: pointer;
}

.btn.gray {
    background: #68737d;
}

.btn.red {
    background: #ff3a3a;
}


/* =========================================================
   게시판 목록
========================================================= */

.list-head,
.list-row {
    display: grid;
    grid-template-columns: 70px 1fr 110px 110px 70px;
    gap: 15px;

    padding: 14px 20px;
    border-bottom: 1px solid #e7ebee;

    font-size: 12px;
}

.list-head {
    background: #f7f9fa;
    font-size: 10px;
    font-weight: 700;
}

.list-row:hover {
    background: #f6fbff;
}

.list-row .title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   페이지네이션
========================================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 25px;
}

.pagination a,
.pagination strong {
    min-width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #dce2e7;
    font-size: 11px;
}

.pagination strong {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}


/* =========================================================
   글쓰기 버튼 영역
========================================================= */

.write {
    text-align: right;
    padding: 18px;
    border-top: 0;
}


/* =========================================================
   게시글 보기
========================================================= */

.view,
.form {
    padding: 30px;
}

.view h2 {
    margin: 0 0 8px;
    font-size: 25px;
}


/* =========================================================
   게시글 메타 정보
========================================================= */

.meta {
    font-size: 11px;
    color: #87919a;

    border-bottom: 1px solid #e5e9ec;
    padding-bottom: 17px;
}


/* =========================================================
   게시글 내용
========================================================= */

.content {
    min-height: 250px;

    padding: 28px 0;

    border-bottom: 1px solid #e5e9ec;

    line-height: 1.9;
    font-size: 13px;
}


/* =========================================================
   첨부파일
========================================================= */

/*
.files {
    padding: 18px 0;
    border-bottom: 1px solid #e5e9ec;
}

.files a {
    display: block;
    color: #1976d2;
    ___font-size: 12px;
    ___margin: 7px 0;
}
*/


/* =========================================================
   게시글 액션 버튼
========================================================= */

.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}


/* =========================================================
   입력 폼
========================================================= */

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;

    font-size: 12px;
    font-weight: 700;

    margin-bottom: 7px;
}

.field input,
.field textarea {
    width: 100%;

    border: 1px solid #d7dde2;

    padding: 11px;

    font: inherit;
    font-size: 12px;
}

.field textarea {
    min-height: 240px;
    resize: vertical;
}


/* =========================================================
   안내 문구
========================================================= */

.help {
    font-size: 10px;
    color: #89939c;
    margin-top: 5px;
}


/* =========================================================
   오류 메시지
========================================================= */

.error {
    background: #fff1f1;
    border: 1px solid #ffd2d2;
    color: #c43b3b;

    padding: 12px;
    margin-bottom: 20px;

    font-size: 12px;
}


/* =========================================================
   안내 박스
========================================================= */

.notice {
    background: #f4f8fc;
    border: 1px solid #dceaf6;
    color: #62707c;

    padding: 14px;
    margin-bottom: 20px;

    font-size: 11px;
}


/* =========================================================
   비밀번호 입력 박스
========================================================= */

.pwbox {
    max-width: 450px;
    margin: auto;
}

.pwbox h2 {
    font-size: 20px;
    margin-top: 0;
}


/* =========================================================
   모달 배경
========================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.5);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 1000;
}


/* =========================================================
   모달 박스
========================================================= */

.modal-content {
    background: #fff;
    border-radius: 8px;


    min-width: 300px;
    height: 320px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

    position: relative;
    overflow: hidden;
}

#modalContent {
    background: #fff;
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden; /* 내부 요소 위치 이탈 방지 */
    display: flex;
    flex-direction: column;
}

#modalIframe {
    width: 100%;
    height: 100%;
    border: 0 !important; /* 브라우저 기본 2px border 제거 */
    margin: 0 !important;
    padding: 0 !important;
    display: block !important; /* inline 기준선 밀림 방지 */
    outline: none;
}

.modal-close {
    position: absolute;

    top: 10px;
    right: 15px;

    background: none;
    border: none;

    font-size: 24px;

    cursor: pointer;
    color: #888;

    z-index: 10;
}

.modal-close:hover {
    color: #333;
}


/* =========================================================
   모바일 반응형
========================================================= */

@media (max-width: 700px) {

    /* 네비게이션 숨김 */
    nav {
        display: none;
    }

    .nav {
        width: calc(100% - 32px);
    }

    .brand img {
        width: 150px;
    }


    /* 전체 폭 */
    .wrap {
        width: calc(100% - 32px);
    }


    /* 게시판 */
    .board-page {
        padding-top: 105px;
    }


    /* 페이지 제목 */
    .page-title h1 {
        font-size: 32px;
    }


    /* 검색 */
    .search {
        display: block;
    }

    .search form {
        margin-top: 10px;
    }

    .search input {
        width: 180px;
    }


    /* 게시판 목록 */
    .list-head,
    .list-row {
        grid-template-columns: 45px 1fr 75px;
        font-size: 10px;
    }


    /* 모바일에서는 작성자/날짜/조회수 숨김 */
    .list-head span:nth-child(3),
    .list-head span:nth-child(4),
    .list-head span:nth-child(5),
    .list-row span:nth-child(3),
    .list-row span:nth-child(4),
    .list-row span:nth-child(5) {
        display: none;
    }


    /* 게시글 / 폼 */
    .view,
    .form {
        padding: 20px;
    }
}
