/**
 * Board - 게시판 스타일
 * 공지사항, 갤러리, 자료실 등 모든 게시판 유형에 사용 가능
 */

/* ==========================================================================
   1. Board Table (목록 페이지)
   ========================================================================== */
.board-table {
    width: 100%;
}

.board-table-header {
    display: flex;
    align-items: center;
    background-color: #E2E8F0;
    border-top: 1px solid #2C323A;
}

.board-table-body {
    display: flex;
    flex-direction: column;
}

.board-item {
    display: flex;
    align-items: center;
    min-height: 72px;
    border-bottom: 1px solid #D0D4DA;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.board-item:hover {
    background-color: #F6F8FC;
}

.no-data {
    text-align: center;
    padding: 40px 0;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #5A626E;
}

/* Table Columns - 공통 */
.table-col {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    font-family: 'Pretendard', sans-serif;
}

/* Table Header Columns */
.board-table-header .table-col {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
    color: #5A626E;
    justify-content: center;
}

/* Table Body Columns */
.board-item .col-number {
    font-size: 16px;
    font-weight: 500;
    color: #848D9A;
    justify-content: center;
}

.board-item .col-title {
    font-size: 18px;
    font-weight: 500;
    color: #1B1B1B;
    justify-content: flex-start;
    display: block; /* flex 대신 block으로 변경 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-item .col-author,
.board-item .col-date {
    font-size: 18px;
    font-weight: 500;
    color: #9CA7B5;
    justify-content: center;
    white-space: nowrap;
}

/* Column Widths - 기본 (공지사항, 갤러리 등) */
.col-number {
    width: 83px;
    flex-shrink: 0;
}

.col-title {
    flex: 1;
    min-width: 0;
}

.col-author {
    width: 100px;
    flex-shrink: 0;
}

.col-date {
    width: 141px;
    flex-shrink: 0;
}

/* 첨부파일 컬럼 (자료실용) */
.col-file {
    width: 141px;
    flex-shrink: 0;
    justify-content: center;
}

/* File Download Button */
.btn-file-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px 6px;
    border: 0.472px solid #5A626E;
    border-radius: 4px;
    background-color: transparent;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #5A626E;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-file-download:hover {
    background-color: #5A626E;
    color: #FFFFFF;
}

/* ==========================================================================
   2. Board Detail Section (상세 페이지)
   ========================================================================== */
.board-detail-section {
    padding: 100px 0 140px;
    background-color: #ffffff;
}

/* Board Title Area */
.board-title-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    margin-bottom: 0;
}

.board-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.4;
    color: #1B1B1B;
    margin: 0;
}

.board-meta {
    display: flex;
    gap: 60px;
    align-items: center;
}

.meta-item {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 14px;
    line-height: 1.5;
}

.meta-label {
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    color: #5A626E;
}

.meta-value {
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    color: #9CA7B5;
}

.board-divider {
    width: 100%;
    height: 1px;
    background-color: #1B1B1B;
}

/* Board Content Area */
.board-content-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.board-body {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 80px 0;
    border-bottom: 1px solid #B9C2CE;
    width: 100%;
}

.board-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.board-image {
    width: 700px;
    height: 399px;
    object-fit: cover;
    display: block;
}

.board-text {
    width: 700px;
    font-family: 'Pretendard', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #2C323A;
}

.board-text p {
    margin: 0;
}

.board-text p + p {
    margin-top: 0;
}

/* Board Navigation (이전글/다음글) */
.board-navigation {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.board-nav-item {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 20px 30px;
    background-color: #F6F8FC;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.board-nav-item:hover:not(.disabled) {
    background-color: #E2E8F0;
}

.board-nav-item.disabled {
    cursor: default;
}

.nav-header {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-label {
    font-family: 'Pretendard', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    color: #2C323A;
    white-space: nowrap;
}

html[lang="en"] .nav-label {
    width: 73px;
}

.nav-divider {
    width: 1px;
    height: 11px;
    background-color: #B9C2CE;
}

.nav-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
    color: #2D333C;
}

.board-nav-item.disabled .nav-title {
    color: #5A626E;
}

/* Board Attachments (첨부파일) */
.board-attachments {
    width: 100%;
}

.attachments-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    color: #1B1B1B;
    margin: 0 0 20px 0;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-item {
    display: flex;
}

.attachment-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #0068B7;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.attachment-link:hover {
    opacity: 0.7;
}

.attachment-name {
    text-decoration: underline;
}

.attachment-icon {
    flex-shrink: 0;
}

/* Board Actions (목록으로 버튼) */
.board-actions {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

/* ==========================================================================
   3. Responsive
   ========================================================================== */
@media screen and (max-width: 1024px) {
    /* Table */
    .board-table-header .table-col,
    .board-item .col-title {
        font-size: 16px;
    }

    .board-item .col-author,
    .board-item .col-date {
        font-size: 16px;
    }

    /* Detail */
    .board-title {
        font-size: 36px;
    }

    .board-image {
        width: 100%;
        max-width: 700px;
        height: auto;
    }

    .board-text {
        width: 100%;
        max-width: 700px;
    }
}

@media screen and (max-width: 768px) {
    /* Table */
    .board-table-header {
        padding: 16px 0;
    }

    .board-table-header .table-col {
        font-size: 13px;
        padding: 0 8px;
    }

    .board-item {
        min-height: auto;
    }

    .board-item .table-col {
        padding: 16px 8px;
    }

    /* 모바일 컬럼 너비 최적화 */
    .col-number {
        width: 40px;
        font-size: 13px;
    }

    .col-author {
        display: none; /* 모바일에서 작성자 숨김 */
    }

    .col-date {
        width: 90px;
        font-size: 12px;
    }

    .col-file {
        width: 70px;
    }

    /* 모바일에서 작성자 헤더도 숨김 */
    .board-table-header .col-author {
        display: none;
    }

    .board-item .col-number {
        font-size: 13px;
    }

    .board-item .col-title {
        font-size: 14px;
        padding-right: 4px;
        display: block; /* flex 대신 block으로 변경 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .board-item .col-date {
        font-size: 12px;
    }

    .btn-file-download {
        font-size: 11px;
        padding: 5px 8px 4px;
        border-width: 0.5px;
    }

    /* Detail */
    .board-detail-section {
        padding: 60px 0 80px;
    }

    .board-title {
        font-size: 28px;
    }

    .board-meta {
        gap: 30px;
        flex-wrap: wrap;
    }

    .board-body {
        gap: 40px;
        padding: 40px 0;
    }

    .board-attachments {
        padding: 30px 0;
    }

    .attachments-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .attachments-list {
        gap: 10px;
    }

    .attachment-link {
        font-size: 14px;
    }

    .board-nav-item {
        padding: 16px 20px;
        gap: 16px;
    }

    .nav-label {
        font-size: 16px;
    }

    .nav-title {
        font-size: 15px;
    }

    .board-actions {
        margin-top: 40px;
    }
}
