/* 신규 파일: board.css */

* {
    box-sizing: border-box;
}

html {
    background: #f3f5f7;
}

body {
    margin: 0;
    color: #202124;
    background: #f3f5f7;
    font-family: Arial, "Malgun Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: #1558b0;
}

.board-page {
    width: min(1100px, calc(100% - 32px));
    margin: 28px auto 60px;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    padding: 6px;
    border: 1px solid #dce2ea;
    border-radius: 10px;
    background: #ffffff;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 7px;
    color: #4b5563;
    font-weight: 700;
    text-decoration: none;
}

.site-nav-link:hover {
    background: #f1f5fa;
}

.site-nav-link.is-active {
    background: #1558b0;
    color: #ffffff;
}

.member-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding-right: 8px;
    font-size: 14px;
}

.member-navigation a {
    text-decoration: none;
}

.board-card {
    padding: 24px;
    border: 1px solid #dce2ea;
    border-radius: 11px;
    background: #ffffff;
}

.board-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.board-heading h1 {
    margin: 0;
    font-size: 28px;
}

.board-heading-actions {
    margin-left: auto;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 7px;
    background: #1558b0;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    background: #596474;
}

.button.danger,
button.danger {
    background: #b3261e;
}

.button.light {
    border: 1px solid #ccd4dd;
    background: #ffffff;
    color: #333b46;
}

.board-filter {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 18px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9c2cd;
    border-radius: 7px;
    background: #ffffff;
    color: #202124;
    font: inherit;
}

textarea {
    min-height: 320px;
    resize: vertical;
}

.form-row {
    margin-bottom: 17px;
}

.form-row label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.form-help {
    margin-top: 5px;
    color: #68717c;
    font-size: 13px;
}

.form-error {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid #e1a4a4;
    border-radius: 7px;
    background: #fff0f0;
    color: #8a1f1f;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.board-table {
    width: 100%;
    border-collapse: collapse;
}

.board-table th,
.board-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e4e8ed;
    text-align: center;
}

.board-table th {
    background: #f7f9fb;
    font-size: 14px;
}

.board-table .title-cell {
    text-align: left;
}

.board-table .notice-row {
    background: #fff9e8;
}

.board-table a {
    color: #202124;
    text-decoration: none;
}

.board-table a:hover {
    color: #1558b0;
    text-decoration: underline;
}

.badge {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1558b0;
    font-size: 12px;
    font-weight: 700;
}

.badge.notice {
    background: #fff0c8;
    color: #7a5700;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 22px;
}

.pagination a,
.pagination span {
    min-width: 36px;
    padding: 7px 9px;
    border: 1px solid #d4dae2;
    border-radius: 6px;
    background: #ffffff;
    text-align: center;
    text-decoration: none;
}

.pagination .current {
    border-color: #1558b0;
    background: #1558b0;
    color: #ffffff;
}

.post-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #e3e7ec;
}

.post-header h1 {
    margin: 8px 0 12px;
    font-size: 28px;
    line-height: 1.45;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #68717c;
    font-size: 14px;
}

.post-content {
    min-height: 220px;
    padding: 28px 2px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.post-actions {
    display: flex;
    gap: 8px;
    padding-top: 17px;
    border-top: 1px solid #e3e7ec;
}

.comment-area {
    margin-top: 22px;
}

.comment-item {
    padding: 17px 0;
    border-bottom: 1px solid #e5e9ee;
}

.comment-meta {
    display: flex;
    gap: 10px;
    color: #68717c;
    font-size: 13px;
}

.comment-content {
    margin-top: 8px;
    white-space: pre-wrap;
}

.comment-delete {
    margin-left: auto;
}

.comment-form textarea {
    min-height: 110px;
}

.flash-message {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 7px;
}

.flash-message.is-success {
    border: 1px solid #84bd91;
    background: #effaf2;
    color: #1e6930;
}

.flash-message.is-error {
    border: 1px solid #e1a4a4;
    background: #fff0f0;
    color: #8a1f1f;
}

.auth-card {
    width: min(560px, 100%);
    margin: 0 auto;
}

.empty-message {
    padding: 40px 20px;
    color: #68717c;
    text-align: center;
}

@media (max-width: 760px) {
    .board-page {
        width: min(100% - 18px, 1100px);
        margin-top: 10px;
    }

    .site-navigation {
        flex-wrap: wrap;
    }

    .site-nav-link {
        flex: 1 1 auto;
    }

    .member-navigation {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        padding: 5px 8px;
    }

    .board-filter {
        grid-template-columns: 1fr;
    }

    .board-table th:nth-child(1),
    .board-table td:nth-child(1),
    .board-table th:nth-child(2),
    .board-table td:nth-child(2),
    .board-table th:nth-child(5),
    .board-table td:nth-child(5) {
        display: none;
    }

    .board-card {
        padding: 18px;
    }

    .post-header h1 {
        font-size: 23px;
    }
}
