/* =============================================================================
   게시판 페이지 전용 스타일 - 반응형 강화 버전
   ============================================================================= */

/* CSS 변수 정의 */
:root {
    --board-max-width: none;
    --board-detail-max-width: none;
    --board-padding: 40px;
    --board-gap: 24px;
    --board-radius: 12px;
    --board-radius-sm: 8px;
    --board-transition: 0.3s ease;
}

/* =============================================================================
   Board Page Container (공통)
   ============================================================================= */
.board-page {
    max-width: var(--board-max-width);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) var(--board-padding);
}

.board-header {
    margin-bottom: clamp(20px, 4vw, 30px);
    text-align: center;
}

.board-title {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 10px;
    word-break: keep-all;
}

.board-desc {
    color: var(--text-muted, #666);
    font-size: clamp(13px, 2vw, 14px);
    line-height: 1.6;
}

/* =============================================================================
   검색 영역
   ============================================================================= */
.board-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color, #eee);
    flex-wrap: wrap;
    gap: 15px;
}

.board-info {
    font-size: 14px;
    color: var(--text-muted, #666);
}

.board-info strong {
    color: var(--primary-color, #007bff);
    font-weight: 600;
}

.search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    background: #fff;
    min-height: 44px; /* 터치 타겟 */
}

.search-input {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--board-radius-sm);
    width: 180px;
    font-size: 14px;
    min-height: 44px; /* 터치 타겟 */
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* =============================================================================
   게시판 테이블
   ============================================================================= */
.board-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid var(--text-primary, #333);
    margin-bottom: 20px;
}

.board-table th,
.board-table td {
    padding: clamp(12px, 2vw, 15px) clamp(8px, 1.5vw, 10px);
    border-bottom: 1px solid var(--border-color, #eee);
    text-align: center;
    font-size: clamp(13px, 2vw, 14px);
}

.board-table th {
    background: var(--bg-secondary, #f8f9fa);
    font-weight: 600;
    color: var(--text-primary, #333);
    white-space: nowrap;
}

.board-table .col-num { width: 80px; }
.board-table .col-title { text-align: left; }
.board-table .col-author { width: 120px; }
.board-table .col-date { width: 100px; }
.board-table .col-views { width: 80px; }

.board-table .post-title {
    color: var(--text-primary, #333);
    text-decoration: none;
    display: inline-block;
    word-break: keep-all;
    transition: color var(--board-transition);
}

.board-table .post-title:hover {
    color: var(--primary-color, #007bff);
}

.board-table .post-title i {
    margin-left: 5px;
    color: var(--text-muted, #999);
    font-size: 12px;
}

.board-table tr.notice {
    background: #fffef0;
}

.board-table .notice-label {
    display: inline-block;
    padding: 4px 10px;
    background: var(--danger-color, #dc3545);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

.board-table .empty-row {
    text-align: center;
    color: var(--text-muted, #999);
    padding: clamp(50px, 10vw, 80px) 0;
}

/* =============================================================================
   모바일 테이블 - 카드 형태로 변환
   ============================================================================= */
@media (max-width: 767px) {
    .board-table {
        border-top: none;
    }

    .board-table thead {
        display: none;
    }

    .board-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .board-table tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid var(--border-color, #e2e8f0);
        border-radius: var(--board-radius);
        padding: 16px;
        position: relative;
    }

    .board-table tr.notice {
        border-left: 4px solid var(--danger-color, #dc3545);
    }

    .board-table td {
        padding: 4px 0;
        border-bottom: none;
        text-align: left;
    }

    .board-table .col-num {
        width: auto;
        position: absolute;
        top: 16px;
        right: 16px;
        font-size: 13px;
        color: var(--text-muted, #94a3b8);
    }

    .board-table .col-num .notice-label {
        position: static;
    }

    .board-table .col-title {
        order: 1;
        font-size: 15px;
        font-weight: 500;
        padding-right: 60px;
        margin-bottom: 8px;
    }

    .board-table .col-author,
    .board-table .col-date,
    .board-table .col-views {
        display: inline;
        width: auto;
        font-size: 13px;
        color: var(--text-muted, #64748b);
    }

    /* 메타 정보 한 줄로 */
    .board-table tr::after {
        content: '';
        display: block;
        order: 2;
    }

    .board-table .col-author { order: 3; }
    .board-table .col-date { order: 4; }
    .board-table .col-views { order: 5; }

    .board-table .col-author::after,
    .board-table .col-date::after {
        content: ' · ';
        color: var(--text-muted, #94a3b8);
    }
}

/* =============================================================================
   페이지네이션
   ============================================================================= */
.board-pagination,
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: clamp(20px, 4vw, 30px) 0;
}

.page-btn,
.pagination__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--board-radius-sm);
    color: var(--text-primary, #333);
    text-decoration: none;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all var(--board-transition);
}

.page-btn:hover,
.pagination__button:hover {
    background: var(--bg-secondary, #f5f5f5);
    border-color: var(--text-muted, #ccc);
}

.page-btn.active,
.pagination__button--active {
    background: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
    color: #fff;
}

.pagination__info {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.pagination__info strong {
    color: var(--primary-color, #6366f1);
}

/* 모바일 페이지네이션 */
@media (max-width: 480px) {
    .page-btn,
    .pagination__button {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* =============================================================================
   게시판 액션 버튼
   ============================================================================= */
.board-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .board-actions {
        justify-content: center;
    }

    .board-actions .btn {
        flex: 1;
        max-width: 200px;
    }
}

/* =============================================================================
   Board List (BEM 스타일)
   ============================================================================= */
.board-list {
    max-width: var(--board-max-width);
    margin: clamp(20px, 5vw, 40px) auto;
    padding: 0 var(--board-padding);
}

.board-list__header {
    margin-bottom: clamp(20px, 4vw, 30px);
}

.board-list__title {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary, #333);
}

.board-list__subtitle {
    font-size: clamp(13px, 2vw, 14px);
    color: var(--text-muted, #666);
}

.board-list__toolbar {
    background: #fff;
    padding: clamp(12px, 2vw, 16px) clamp(16px, 2.5vw, 20px);
    margin-bottom: 20px;
    border-radius: var(--board-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 16px;
}

.board-list__search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.board-list__search-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    min-height: 44px;
}

.board-list__search-input {
    padding: 10px 16px;
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    min-width: 200px;
    min-height: 44px;
}

.board-list__search-btn {
    padding: 10px 20px;
    background: var(--primary-color, #ff6600);
    color: #fff;
    border: none;
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    cursor: pointer;
    min-height: 44px;
    transition: background var(--board-transition);
}

.board-list__search-btn:hover {
    opacity: 0.9;
}

.board-list__actions {
    display: flex;
    gap: 10px;
}

/* 반응형 - 검색 툴바 */
@media (max-width: 767px) {
    .board-search {
        flex-direction: column;
        align-items: stretch;
    }

    .board-info {
        text-align: center;
    }

    .search-form {
        width: 100%;
        justify-content: center;
    }

    .search-input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .board-list__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .board-list__search {
        width: 100%;
    }

    .board-list__search-input {
        flex: 1;
        min-width: 0;
    }

    .board-list__actions {
        justify-content: center;
    }
}

/* =============================================================================
   게시판 상세
   ============================================================================= */
.board-detail {
    max-width: var(--board-detail-max-width);
    margin: clamp(20px, 5vw, 40px) auto;
    padding: 0 var(--board-padding);
}

.board-detail__container {
    background: #fff;
    border-radius: var(--board-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.board-detail__header {
    padding: clamp(20px, 4vw, 30px);
    border-bottom: 2px solid var(--primary-color, #ff6600);
}

.board-detail__category {
    display: inline-block;
    background: var(--primary-color, #ff6600);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--board-radius-sm);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.board-detail__title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--text-primary, #333);
    line-height: 1.4;
    word-break: keep-all;
}

.board-detail__meta {
    display: flex;
    gap: clamp(12px, 2vw, 20px);
    font-size: clamp(13px, 2vw, 14px);
    color: var(--text-muted, #666);
    flex-wrap: wrap;
}

.board-detail__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.board-detail__content {
    padding: clamp(24px, 5vw, 40px) clamp(20px, 4vw, 30px);
    min-height: 200px;
    color: var(--text-secondary, #666);
    line-height: 1.8;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.board-detail__content h3 {
    font-size: clamp(18px, 3vw, 20px);
    margin: 30px 0 16px;
    color: var(--text-primary, #333);
}

.board-detail__content p {
    margin-bottom: 16px;
}

.board-detail__content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: var(--board-radius-sm);
}

.board-detail__content ul,
.board-detail__content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.board-detail__content li {
    margin-bottom: 8px;
}

/* 첨부파일 */
.board-detail__attachments {
    padding: clamp(16px, 3vw, 20px) clamp(20px, 4vw, 30px);
    background: var(--bg-secondary, #f8f8f8);
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.board-detail__attachments-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary, #333);
}

.board-detail__attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.board-detail__attachment-item {
    padding: 8px 0;
}

.board-detail__attachment-link {
    color: var(--text-secondary, #666);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--board-transition);
}

.board-detail__attachment-link:hover {
    color: var(--primary-color, #ff6600);
}

.board-detail__footer {
    padding: clamp(16px, 3vw, 20px) clamp(20px, 4vw, 30px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.board-detail__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 반응형 - 상세 페이지 */
@media (max-width: 767px) {
    .board-detail__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .board-detail__actions {
        justify-content: center;
    }

    .board-detail__actions .btn {
        flex: 1;
        text-align: center;
    }
}

/* =============================================================================
   이전/다음 글 네비게이션
   ============================================================================= */
.board-navigation {
    background: #fff;
    border-radius: var(--board-radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.board-navigation__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(14px, 2vw, 16px) clamp(16px, 3vw, 20px);
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    text-decoration: none;
    transition: background var(--board-transition);
    gap: 12px;
}

.board-navigation__item:last-child {
    border-bottom: none;
}

.board-navigation__item:hover {
    background: var(--bg-secondary, #f8f8f8);
}

.board-navigation__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted, #666);
    min-width: 60px;
    flex-shrink: 0;
}

.board-navigation__title {
    flex: 1;
    color: var(--text-primary, #333);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-navigation__date {
    font-size: 12px;
    color: var(--text-muted, #999);
    flex-shrink: 0;
}

/* 반응형 - 네비게이션 */
@media (max-width: 767px) {
    .board-navigation__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .board-navigation__title {
        white-space: normal;
        line-height: 1.4;
    }

    .board-navigation__date {
        align-self: flex-end;
    }
}

/* =============================================================================
   댓글 섹션
   ============================================================================= */
.board-comments {
    background: #fff;
    border-radius: var(--board-radius);
    padding: clamp(20px, 4vw, 30px);
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.board-comments__title {
    font-size: clamp(16px, 3vw, 18px);
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-primary, #333);
}

.board-comments__count {
    color: var(--primary-color, #ff6600);
}

.board-comments__form {
    margin-bottom: 30px;
    padding: clamp(16px, 3vw, 20px);
    background: var(--bg-secondary, #f8f8f8);
    border-radius: var(--board-radius);
}

.board-comments__textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 12px;
    resize: vertical;
    transition: border-color var(--board-transition);
}

.board-comments__textarea:focus {
    outline: none;
    border-color: var(--primary-color, #ff6600);
}

.board-comments__submit {
    background: var(--primary-color, #ff6600);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: opacity var(--board-transition);
}

.board-comments__submit:hover {
    opacity: 0.9;
}

.board-comments__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    padding: clamp(16px, 3vw, 20px) 0;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-item__author {
    font-weight: 600;
    color: var(--text-primary, #333);
}

.comment-item__date {
    font-size: 12px;
    color: var(--text-muted, #999);
}

.comment-item__content {
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin-bottom: 12px;
    word-break: break-word;
}

.comment-item__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-item__action {
    background: none;
    border: none;
    color: var(--text-muted, #999);
    font-size: 12px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all var(--board-transition);
}

.comment-item__action:hover {
    color: var(--primary-color, #ff6600);
    background: var(--bg-secondary, #f8f8f8);
}

/* 대댓글 */
.comment-reply {
    margin-left: clamp(20px, 4vw, 40px);
    padding-left: clamp(12px, 2vw, 20px);
    border-left: 2px solid var(--border-color, #e5e5e5);
}

/* =============================================================================
   게시글 작성
   ============================================================================= */
.board-write {
    max-width: 1000px;
    margin: clamp(20px, 5vw, 40px) auto;
    padding: 0 var(--board-padding);
}

.board-write__container {
    background: #fff;
    border-radius: var(--board-radius);
    padding: clamp(20px, 4vw, 30px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.board-write__title {
    font-size: clamp(20px, 4vw, 24px);
    font-weight: bold;
    margin-bottom: clamp(20px, 4vw, 30px);
    color: var(--text-primary, #333);
}

.board-write__footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: clamp(20px, 4vw, 30px);
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e5e5e5);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .board-write__footer .btn {
        flex: 1;
        text-align: center;
    }
}

/* =============================================================================
   갤러리 게시판
   ============================================================================= */
.gallery-board {
    max-width: var(--board-max-width);
    margin: 0 auto;
    padding: var(--board-padding);
}

.gallery-board__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 4vw, 30px);
    flex-wrap: wrap;
    gap: 16px;
}

.gallery-board__title {
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 4px;
}

.gallery-board__subtitle {
    font-size: clamp(13px, 2vw, 14px);
    color: var(--text-muted, #64748b);
}

/* 갤러리 그리드 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--board-gap);
}

.gallery-item {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--board-transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.gallery-item__image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-secondary, #f1f5f9);
    overflow: hidden;
}

.gallery-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--board-transition);
}

.gallery-item:hover .gallery-item__image img {
    transform: scale(1.05);
}

.gallery-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(36px, 6vw, 48px);
    color: var(--border-color, #cbd5e1);
}

.gallery-item__count {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    border-radius: 20px;
}

.gallery-item__info {
    padding: clamp(12px, 2vw, 16px);
}

.gallery-item__title {
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item__meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-bottom: 10px;
}

.gallery-item__stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted, #94a3b8);
}

.gallery-item__stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: clamp(50px, 10vw, 80px) 20px;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 16px;
}

.gallery-empty__icon {
    font-size: clamp(48px, 8vw, 64px);
    color: var(--text-muted, #cbd5e1);
    margin-bottom: 20px;
}

.gallery-empty__message {
    font-size: 16px;
    color: var(--text-muted, #64748b);
    margin-bottom: 24px;
}

/* 반응형 - 갤러리 그리드 */
@media (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .gallery-board__header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .gallery-board__header .btn {
        align-self: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-item__image {
        aspect-ratio: 16/9;
    }
}

/* =============================================================================
   FAQ 게시판
   ============================================================================= */
.faq-board {
    max-width: var(--board-detail-max-width);
    margin: 0 auto;
    padding: var(--board-padding);
}

.faq-board__header {
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 40px);
}

.faq-board__title {
    font-size: clamp(24px, 4vw, 28px);
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 8px;
}

.faq-board__subtitle {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-muted, #64748b);
}

.faq-board__search {
    display: flex;
    max-width: 500px;
    margin: 0 auto clamp(30px, 5vw, 40px);
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color var(--board-transition);
}

.faq-board__search:focus-within {
    border-color: var(--primary-color, #6366f1);
}

.faq-board__search-input {
    flex: 1;
    padding: clamp(12px, 2vw, 14px) clamp(18px, 3vw, 24px);
    border: none;
    font-size: 15px;
    outline: none;
    min-width: 0;
}

.faq-board__search-btn {
    padding: 14px clamp(18px, 3vw, 24px);
    background: var(--primary-color, #6366f1);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity var(--board-transition);
    flex-shrink: 0;
}

.faq-board__search-btn:hover {
    opacity: 0.9;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--board-radius);
    overflow: hidden;
    transition: box-shadow var(--board-transition);
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item__question {
    display: flex;
    align-items: center;
    padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 20px);
    cursor: pointer;
    background: #fff;
    gap: clamp(10px, 2vw, 14px);
}

.faq-item__badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--board-radius-sm);
    flex-shrink: 0;
}

.faq-item__badge--answer {
    background: #10b981;
}

.faq-item__title {
    flex: 1;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 500;
    color: var(--text-primary, #334155);
    word-break: keep-all;
}

.faq-item__toggle {
    color: var(--text-muted, #94a3b8);
    transition: transform var(--board-transition);
    flex-shrink: 0;
}

.faq-item.active .faq-item__toggle {
    transform: rotate(180deg);
}

.faq-item__answer {
    display: none;
    padding: 0 clamp(16px, 2.5vw, 20px) clamp(16px, 2.5vw, 20px);
    background: var(--bg-secondary, #f8fafc);
}

.faq-item.active .faq-item__answer {
    display: flex;
    gap: clamp(10px, 2vw, 14px);
    padding-top: clamp(16px, 2.5vw, 20px);
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.faq-item__content {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary, #475569);
    word-break: keep-all;
}

.faq-empty {
    text-align: center;
    padding: clamp(50px, 8vw, 60px) 20px;
    color: var(--text-muted, #94a3b8);
}

.faq-empty__icon {
    font-size: clamp(40px, 6vw, 48px);
    margin-bottom: 16px;
}

.faq-empty__message {
    font-size: 16px;
}

/* =============================================================================
   QnA 게시판
   ============================================================================= */
.qna-board {
    max-width: var(--board-detail-max-width);
    margin: 0 auto;
    padding: var(--board-padding);
}

.qna-board__header {
    margin-bottom: clamp(20px, 4vw, 30px);
}

.qna-board__title {
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 6px;
}

.qna-board__subtitle {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.qna-board__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.qna-board__search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qna-board__select {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    min-height: 44px;
}

.qna-board__input {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    width: 200px;
    min-height: 44px;
}

.qna-board__search-btn {
    padding: 10px 20px;
    background: var(--text-primary, #334155);
    color: #fff;
    border: none;
    border-radius: var(--board-radius-sm);
    font-size: 14px;
    cursor: pointer;
    min-height: 44px;
    transition: opacity var(--board-transition);
}

.qna-board__search-btn:hover {
    opacity: 0.9;
}

.qna-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qna-item {
    display: flex;
    align-items: center;
    padding: clamp(16px, 3vw, 20px);
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--board-radius);
    cursor: pointer;
    transition: all var(--board-transition);
    gap: clamp(12px, 2vw, 16px);
}

.qna-item:hover {
    border-color: var(--primary-color, #6366f1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.qna-item__status {
    flex-shrink: 0;
}

.qna-status {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.qna-status--answered {
    background: #dcfce7;
    color: #166534;
}

.qna-status--waiting {
    background: #fef3c7;
    color: #92400e;
}

.qna-item__content {
    flex: 1;
    min-width: 0;
}

.qna-item__title {
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 500;
    color: var(--text-primary, #1e293b);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qna-item__title i {
    color: var(--text-muted, #94a3b8);
    margin-right: 6px;
}

.qna-item__meta {
    display: flex;
    gap: clamp(12px, 2vw, 16px);
    font-size: 13px;
    color: var(--text-muted, #64748b);
    flex-wrap: wrap;
}

.qna-item__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qna-item__arrow {
    color: var(--text-muted, #94a3b8);
    flex-shrink: 0;
}

.qna-empty {
    text-align: center;
    padding: clamp(60px, 10vw, 80px) 20px;
    background: var(--bg-secondary, #f8fafc);
    border-radius: var(--board-radius);
}

.qna-empty__icon {
    font-size: clamp(40px, 6vw, 48px);
    color: var(--text-muted, #94a3b8);
    margin-bottom: 16px;
}

.qna-empty__message {
    font-size: 16px;
    color: var(--text-muted, #64748b);
    margin-bottom: 20px;
}

/* 반응형 - QnA */
@media (max-width: 767px) {
    .qna-board__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .qna-board__search {
        width: 100%;
    }

    .qna-board__input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .qna-board__toolbar .btn {
        align-self: center;
    }

    .qna-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .qna-item__arrow {
        display: none;
    }

    .qna-item__title {
        white-space: normal;
    }
}

/* =============================================================================
   게시글 상세 - 인라인 스타일 보강
   ============================================================================= */
.board-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.badge-notice {
    background: #fef3c7;
    color: #92400e;
}

.badge-secret {
    background: #fee2e2;
    color: #991b1b;
}

.badge-category {
    background: #e0e7ff;
    color: #3730a3;
}

.board-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-left,
.meta-right {
    display: flex;
    gap: clamp(12px, 2vw, 16px);
    align-items: center;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(13px, 2vw, 14px);
    color: var(--text-muted, #64748b);
}

.meta-item i {
    font-size: 13px;
}

.board-content {
    min-height: 200px;
    padding: clamp(20px, 4vw, 24px) 0;
}

.content-body {
    font-size: clamp(15px, 2vw, 16px);
    line-height: 1.8;
    color: var(--text-primary, #334155);
    word-break: break-word;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--board-radius-sm);
}

/* 첨부파일 영역 */
.board-attachments {
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--board-radius);
    padding: clamp(16px, 3vw, 20px);
    margin-bottom: 24px;
}

.attachment-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #334155);
    margin-bottom: 12px;
}

.attachment-header i {
    color: var(--text-muted, #64748b);
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(10px, 2vw, 14px);
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--board-radius-sm);
    transition: all var(--board-transition);
    flex-wrap: wrap;
}

.attachment-item:hover {
    border-color: var(--primary-color, #6366f1);
    background: #fafafa;
}

.attachment-item .file-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: var(--board-radius-sm);
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}

.attachment-item .file-icon.IMAGE { color: #10b981; }
.attachment-item .file-icon.DOCUMENT { color: #3b82f6; }
.attachment-item .file-icon.VIDEO { color: #f59e0b; }

.attachment-item .file-info {
    flex: 1;
    min-width: 0;
}

.attachment-item .file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #334155);
    word-break: break-all;
}

.attachment-item .file-size {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.attachment-item .file-download {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--primary-color, #6366f1);
    text-decoration: none;
    border: 1px solid currentColor;
    border-radius: 6px;
    transition: all var(--board-transition);
    flex-shrink: 0;
}

.attachment-item .file-download:hover {
    background: var(--primary-color, #6366f1);
    color: #fff;
}

/* 스크랩 버튼 */
.btn-bookmark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all var(--board-transition);
    min-height: 36px;
}

.btn-bookmark:hover {
    border-color: var(--primary-color, #6366f1);
    color: var(--primary-color, #6366f1);
}

.btn-bookmark.active {
    background: var(--primary-color, #6366f1);
    border-color: var(--primary-color, #6366f1);
    color: #fff;
}

.btn-bookmark.active i {
    font-weight: 900;
}

.btn-bookmark i {
    font-size: 14px;
}

/* 액션 영역 */
.action-left,
.action-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .board-meta {
        flex-direction: column;
        gap: 16px;
    }

    .meta-left,
    .meta-right {
        justify-content: flex-start;
    }

    .attachment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .attachment-item .file-download {
        align-self: flex-end;
    }
}

/* =============================================================================
   터치 디바이스 최적화
   ============================================================================= */
@media (hover: none) {
    .gallery-item:hover {
        transform: none;
    }

    .gallery-item:hover .gallery-item__image img {
        transform: none;
    }

    .faq-item:hover,
    .qna-item:hover {
        box-shadow: none;
    }

    /* 터치 피드백 */
    .gallery-item:active,
    .faq-item__question:active,
    .qna-item:active {
        opacity: 0.7;
    }
}

/* =============================================================================
   다크 모드 지원
   ============================================================================= */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --bg-secondary: #1e293b;
        --border-color: #334155;
    }

    .board-table th {
        background: var(--bg-secondary);
    }

    .board-table tr {
        background: #0f172a;
    }

    .board-table tr.notice {
        background: rgba(250, 204, 21, 0.1);
    }

    .gallery-item,
    .faq-item,
    .qna-item,
    .board-list__toolbar,
    .board-detail__container,
    .board-navigation,
    .board-comments,
    .board-write__container {
        background: #1e293b;
    }

    .gallery-item__image {
        background: #0f172a;
    }

    .faq-item__question,
    .qna-empty,
    .gallery-empty,
    .faq-empty {
        background: #1e293b;
    }

    .faq-item__answer {
        background: #0f172a;
    }

    .board-comments__form {
        background: #0f172a;
    }

    .search-input,
    .search-select,
    .board-list__search-input,
    .board-list__search-select,
    .faq-board__search-input,
    .qna-board__select,
    .qna-board__input,
    .board-comments__textarea {
        background: #0f172a;
        color: var(--text-primary);
    }

    .page-btn,
    .pagination__button {
        background: #1e293b;
        border-color: #334155;
        color: var(--text-primary);
    }

    .page-btn:hover,
    .pagination__button:hover {
        background: #334155;
    }

    .attachment-item {
        background: #0f172a;
    }

    .attachment-item:hover {
        background: #1e293b;
    }
}

/* =============================================================================
   인쇄 스타일
   ============================================================================= */
@media print {
    .board-page,
    .board-list,
    .board-detail,
    .gallery-board,
    .faq-board,
    .qna-board {
        max-width: none;
        padding: 0;
    }

    .board-search,
    .board-list__toolbar,
    .board-actions,
    .board-detail__footer,
    .board-navigation,
    .board-comments__form,
    .board-pagination,
    .pagination,
    .gallery-board__header button,
    .qna-board__toolbar,
    .faq-board__search,
    .btn-bookmark {
        display: none !important;
    }

    .board-table {
        font-size: 12px;
    }

    .board-table th,
    .board-table td {
        padding: 8px 5px;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .gallery-item {
        break-inside: avoid;
    }

    .gallery-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* =============================================================================
   접근성 강화
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item__image img,
    .faq-item,
    .faq-item__toggle,
    .qna-item,
    .page-btn,
    .pagination__button,
    .btn-bookmark,
    .attachment-item,
    .search-input,
    .search-select {
        transition: none;
    }
}

/* 포커스 스타일 */
.post-title:focus,
.page-btn:focus,
.pagination__button:focus,
.btn:focus,
.btn-bookmark:focus,
.gallery-item:focus,
.faq-item__question:focus,
.qna-item:focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}

/* 고대비 모드 */
@media (prefers-contrast: high) {
    .board-table {
        border: 2px solid;
    }

    .board-table th,
    .board-table td {
        border: 1px solid;
    }

    .gallery-item,
    .faq-item,
    .qna-item {
        border-width: 2px;
    }

    .badge,
    .notice-label,
    .qna-status {
        border: 1px solid currentColor;
    }
}
