/* 메인 컨테이너 - Figma Frame 기반 */
.main-container {
    width: 100%;
    max-width: var(--size-container-max);
    margin: 0 auto;
    padding: var(--space-32) 0;
    min-height: 100vh;
}

/* 카테고리 탭 영역 - Frame 165261 */
.category-tabs-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    isolation: isolate;
    overflow: hidden;
    background: var(--color-neutral-230);
    width: 100%;
}

/* 카테고리 탭 버튼 */
.category-tab {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 100px;
    height: 55px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-weight: var(--font-regular);
    font-size: var(--text-lg);
    color: var(--color-neutral-700);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 24px;
}

/* 활성 탭 - main-hover */
.category-tab.active {
    color: var(--color-primary);
    font-weight: var(--font-bold);
}

.category-tab:hover:not(.active) {
    color: var(--color-primary);
}

/* 검색 영역 */
.search-section {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 79px;
    padding: 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 전체 건수 */
.total-count {
    width: 106px;
    height: 69px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 18px;
    line-height: 26px;
    color: var(--color-neutral-700);
    text-align: center;
}

.total-count span {
    color: var(--color-primary);
    margin: 0 0.3em;
}

/* 검색 바 커스텀 */
.search-bar {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 390px;
    height: 52px;
    background: var(--color-white);
    border: 1px solid #BEBBBB;
    border-radius: 5px;
    position: relative;
}

.search-type {
    display: flex;
    align-items: center;
    position: relative;
    width: 95px;
    height: 100%;
    border-right: 1px solid var(--color-border-form);
    cursor: pointer;
    justify-content: center;
    gap: 8px;
}

.search-type-text {
    font-weight: 400;
    font-size: 18px;
    color: #B3B3B3;
}

.search-type-arrow {
    width: 15px;
    height: 15px;
    background: #B3B3B3;
    clip-path: polygon(50% 60%, 0% 0%, 100% 0%);
    display: inline-block;
    transition: transform 0.3s;
}

.search-type.open .search-type-arrow {
    transform: rotate(180deg);
}

.search-type-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-white);
    border: 1px solid #BEBBBB;
    border-radius: 0 0 5px 5px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.search-type.open .search-type-dropdown {
    display: block;
}

.search-type-option {
    padding: 12px 0;
    font-size: 16px;
    text-align: center;
    color: #666;
    cursor: pointer;
    transition: background 0.2s;
}
.search-type-option.active {
    background: var(--color-primary);
    color: var(--color-white);
}
.search-type-option:hover {
    background: #f5f5f5;
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    flex: 1;
    margin-left: 20px;
    margin-right: 10px;
}

.search-input::placeholder {
    color: #C3C3C3;
}

.search-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 5px;
}

/* 테이블 영역 */
.table-section {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
}

/* 테이블 */
.board-table {
    width: 100%;
    background: var(--color-white);
    border-top: 2px solid var(--color-primary);
    border-collapse: collapse;
}

/* 테이블 헤더 */
.board-table thead tr {
    height: 55px;
    background: #FEFAF0;
}

.board-table th {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 18px;
    line-height: 26px;
    color: var(--color-neutral-700);
    text-align: center;
    padding: 10px 12px;
    border-bottom: 1px solid #E2E2E2;
}

/* ===========================게시판 테이블 수정=========================== */


/* 공지사항 & 데이터 테이블 셀 너비 */
.board-table-notice th:nth-child(1) { width: 80px; } /* 번호 */
.board-table-notice th:nth-child(2) { width: 706px; } /* 제목 */
.board-table-notice th:nth-child(3) { width: 146px; } /* 작성자 */
.board-table-notice th:nth-child(4) { width: 172px; } /* 날짜 */
.board-table-notice th:nth-child(5) { width: 96px; } /* 조회수 */

/* 공지사항 & 데이터 테이블 제목 컬럼 */
.board-table-notice td:nth-child(2) {
    text-align: left;
}

/* 이웃소리함 테이블 셀 너비 */
.board-table-voice th:nth-child(1) { width: 80px; }   /* 번호 */
.board-table-voice th:nth-child(2) { width: 94px; }   /* 답변상태 */
.board-table-voice th:nth-child(3) { width: 40px; }   /* 자물쇠 */
.board-table-voice th:nth-child(4) { width: 480px; }  /* 제목 */
.board-table-voice th:nth-child(5) { width: 146px; }  /* 작성자 */
.board-table-voice th:nth-child(6) { width: 172px; }  /* 날짜 */
.board-table-voice th:nth-child(7) { width: 94px; }   /* 조회수 */

/* 이웃소리함 테이블 답변상태 컬럼 */
.board-table-voice td:nth-child(2) {
    text-align: center;
    font-size: 15px;
    line-height: 1.73;
}

/* 이웃소리함 테이블 자물쇠 컬럼 */
.board-table-voice td:nth-child(3) {
    text-align: center;
}

/* 이웃소리함 테이블 제목 컬럼 */
.board-table-voice td:nth-child(4) {
    text-align: left;
}

/* 테이블 바디 */
.board-table tbody tr {
    height: 50px;
    transition: background-color 0.2s ease;
}

.board-table tbody tr:hover {
    background: #F8F9FA;
}

.board-table td {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 18px;
    line-height: 21px;
    color: var(--color-neutral-700);
    text-align: center;
    padding: 10px 12px;
    border-bottom: 1px solid #E2E2E2;
}


.board-table .status-completed {
    background: transparent;
    border: none;
    color: var(--color-neutral-700);
}

.board-table .status-pending {
    background: transparent;
    border: none;
    color: var(--color-neutral-400);
}


/* 게시글 제목 링크 */
.post-title {
    color: var(--color-neutral-700);
    text-decoration: none;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-title:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.reply-title {
    padding-left: 20px;
    color: var(--color-neutral-700);
    font-size: 16px;
}

.reply-title:hover {
    color: var(--color-primary) !important;
}

/* 답글 행 스타일 */
.reply-row {
    background-color: var(--color-white);
}

.reply-row:hover {
    background-color: var(--color-white) !important;
}

.reply-row td {
    color: var(--color-neutral-700);
    font-size: 16px;
}

/* 하단 액션 영역 */
.bottom-section {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-end;
    margin-top: 40px;
}

/* 글쓰기 버튼 */
.write-button {
    width: 100px;
    height: 50px;
    background: var(--color-primary);
    border-radius: 5px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.write-button:hover {
    background: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 133, 58, 0.3);
}

.write-button-text {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
    color: var(--color-white);
    text-align: center;
}

/* 페이지네이션 */
.pagination {
    width: 380px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 0 auto;
}

.pagination-nav {
    display: flex;
    gap: 16px;
}

.pagination-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.pagination-btn:hover {
    opacity: 0.7;
}

.pagination-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-neutral-700);
    stroke-width: 1.2px;
    fill: none;
}

.pagination-numbers {
    display: flex;
    gap: 12px;
}

.page-number {
    width: 28px;
    height: 28px;
    background: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: var(--color-neutral-700);
    text-align: center;
    transition: all 0.2s ease;
}

.page-number.active {
    font-weight: 800;
    color: var(--color-primary);
}

.page-number:hover:not(.active) {
    background: #F8F9FA;
}

/* 빈 상태 */
.empty-state {
    height: 80px;
    text-align: center !important;
    vertical-align: middle;
    color: var(--color-neutral-400);
    font-size: 16px;
    font-family: var(--font-primary);
    font-weight: 400;
    border-bottom: 1px solid #E2E2E2;
    padding: 30px 0;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .main-container {
        padding: var(--space-16) 0;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: var(--space-10) 0;
    }

    .search-section {
    flex-direction: column;
        height: auto;
        align-items: stretch;
        margin-bottom: var(--space-4);
    }

    .search-bar {
        width: 100%;
        min-width: 0;
        padding: 10px 10px;
    }

    .category-tabs-section {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }

    .category-tab {
        min-width: 80px;
        height: 45px;
        padding: 0 15px;
    }

    .search-type {
        width: 70px;
    }

    .search-input {
        margin-left: 10px;
    }

    .board-table-notice th:nth-child(3), .board-table-notice td:nth-child(3),
    .board-table-notice th:nth-child(4), .board-table-notice td:nth-child(4),
    .board-table-notice th:nth-child(5), .board-table-notice td:nth-child(5) {
        display: none;
    }

    .board-table-notice th:nth-child(2), .board-table-notice td:nth-child(2) {
        width: auto;
    }

    .board-table-voice th:nth-child(3), .board-table-voice td:nth-child(3),
    .board-table-voice th:nth-child(5), .board-table-voice td:nth-child(5),
    .board-table-voice th:nth-child(6), .board-table-voice td:nth-child(6),
    .board-table-voice th:nth-child(7), .board-table-voice td:nth-child(7) {
        display: none;
    }

    .board-table-voice th:nth-child(4), .board-table-voice td:nth-child(4) {
        width: auto;
    }

    .pagination {
        width: 100%;
        gap: 12px;
    }

    .pagination-nav {
        gap: 8px;
    }

    .pagination-numbers {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .board-table th,
    .board-table td {
        padding: 8px 4px;
    }

    .total-count {
        font-size: 16px;
    }

    .write-button-text {
        font-size: 16px;
    }

    /* 이웃소리함 전용 */
    /* 답변상태 뱃지 */
    .status-badge {
        display: inline-block;
        padding: 2px 6px;
        border-radius: 3px;
        min-width: 36px;
        font-family: var(--font-primary);
        font-weight: 400;
        font-size: 15px;
        line-height: 1.73;
        color: var(--color-white);
        text-align: center;
    }
}