/* ============================================================
   board.css - 게시판 전용 스타일
   ============================================================ */

/* ══ 페이지 타이틀 ══ */
.board-page-header {
    padding-bottom: 14px;
    margin-bottom: 0;
}
.board-page-title {
    display: inline-block;
    font-family: 'Paperlogy', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-gray1);
    border-bottom: 6px solid var(--color-main);
    padding-bottom: 6px;
}

/* ══ 검색 바 (건수 + 검색폼) ══ */
.board-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}
.board-total-info {
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-gray3);
}
.board-total-info strong {
    color: var(--color-gray1);
    font-weight: 500;
}
.board-search-form {
    display: flex;
    align-items: center;
    gap: 0;
}
.board-search-select {
    height: 46px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px 0 0 4px;
    border-right: none;
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--color-gray1);
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.board-search-input {
    height: 46px;
    width: 280px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--color-gray1);
    outline: none;
}
.board-search-input:focus { border-color: var(--color-main); }
.board-search-btn {
    height: 46px;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-main);
    border: none;
    border-radius: 0 4px 4px 0;
    color: #fff;
    cursor: pointer;
}
.board-search-btn svg { width: 20px; height: 20px; }
.board-search-btn:hover { opacity: 0.9; }

/* ══ 목록 테이블 ══ */
.board-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
}
.board-table th {
    padding: 11px 14px;
    background: #f9f9f9;
    border-top: 2px solid var(--color-main);
    border-bottom: 1px solid var(--color-border);
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-gray2);
    text-align: center;
    white-space: nowrap;
}
.board-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-gray1);
    text-align: center;
}
.board-title-cell {
    text-align: left !important;
}
.board-title-cell a {
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-gray1);
}
.board-title-cell a:hover { color: var(--color-main); }

/* 일반 게시글 — 폰트 weight 400 */
.board-row td {
    font-weight: 400;
}
.board-row .board-title-cell a {
    font-weight: 400;
}

.board-row,
.board-row-notice { cursor: pointer; }

.board-row:hover td,
.board-row-notice:hover td { background: #fafafa; }

.board-row:hover .board-title-cell a,
.board-row-notice:hover .board-title-cell a { color: var(--color-main); }

/* 공지 텍스트 */
.notice-badge {
    font-family: 'Paperlogy', sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-gray1);
}
.board-row-notice .board-title-cell a {
    font-weight: 600;
}

/* 빈 목록 */
.board-no-data {
    text-align: center !important;
    padding: 40px 0 !important;
    color: var(--color-gray3);
    font-size: 14px;
}

/* ══ 페이지네이션 ══ */
.board-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 28px 0 10px;
}
.board-pagination .pg-nav,
.board-pagination .pg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 13px;
    color: var(--color-gray2);
    background: #fff;
    text-decoration: none;
    transition: all 0.15s;
}
.board-pagination .pg-nav:hover,
.board-pagination .pg-num:hover { border-color: var(--color-main); color: var(--color-main); }
.board-pagination .pg-num.active {
    background: var(--color-main);
    border-color: var(--color-main);
    color: #fff;
    font-weight: 700;
}
.board-pagination .pg-nav.disabled {
    color: #ccc;
    border-color: #eee;
    pointer-events: none;
}

/* ══ 상세 화면 ══ */
.board-detail {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}
.detail-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.detail-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-gray1);
    margin-bottom: 12px;
    line-height: 1.4;
}
.detail-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--color-gray3);
}
.detail-meta span { display: flex; align-items: center; gap: 4px; }
.detail-content {
    padding: 28px;
    line-height: 1.9;
    font-size: 14px;
    color: var(--color-gray1);
    min-height: 200px;
    white-space: pre-wrap;
}

/* ════════════════════════════════
   동영상앨범 — 그리드
════════════════════════════════ */
.board-page-subtitle {
    font-family: 'Paperlogy', sans-serif;
    font-size: 25px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #000000;
    margin: 5px 0 0;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 20px;
    padding: 24px 0 32px;
}
.video-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.video-item:hover .video-thumb img { opacity: 0.85; }
.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.video-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
}
.video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.2s;
}
.video-item:hover .video-play-icon { opacity: 1; }
.video-title {
    font-family: 'Paperlogy', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    letter-spacing: -0.02em;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.video-no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    font-family: 'Paperlogy', sans-serif;
    font-size: 16px;
    color: #aaa;
}

/* ── 반응형 ── */
@media (max-width: 700px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .video-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .board-page-title { font-size: 24px; }
    .board-page-subtitle { font-size: 19px; }
    /* 검색 바: 건수 위 / 검색폼 아래로 세로 전환 + 유동폭 */
    .board-search-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .board-total-info { font-size: 16px; }
    .board-search-form { width: 100%; }
    .board-search-select { font-size: 15px; height: 42px; padding: 0 30px 0 10px; }
    .board-search-input { flex: 1; width: auto; min-width: 0; font-size: 15px; height: 42px; }
    .board-search-btn { height: 42px; width: 42px; flex-shrink: 0; }
    /* 목록 테이블: 고정 열 폭 축소 + 한 줄 말줄임 → 제목·작성자 칸 겹침 방지 */
    .board-table { font-size: 13px; }
    .board-table colgroup col:nth-child(1) { width: 36px !important; }  /* 번호 */
    .board-table colgroup col:nth-child(3) { width: 48px !important; }  /* 작성자 */
    .board-table colgroup col:nth-child(4) { width: 48px !important; }  /* 조회수 */
    .board-table colgroup col:nth-child(5) { width: 78px !important; }  /* 등록일 */
    .board-table th,
    .board-table td {
        font-size: 13px;
        padding: 9px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .board-title-cell a,
    .notice-badge { font-size: 13px; }
    .board-title-cell a {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 상세 */
    .detail-title { font-size: 18px; }
    .detail-meta { flex-wrap: wrap; gap: 8px 16px; }
}

/* ══ 비회원 수정/삭제 ══ */
.guest-controls { display: flex; gap: 10px; margin: 16px 0; }

/* ══ 작성 폼 ══ */
.write-form {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 32px;
}

/* 비밀번호 모달 */
#pw-modal { display: none; }
