/* 게시판 공통 스타일 */

/* 게시판 컨테이너 */
.board-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: auto;
}

/* 게시판 헤더 */
.board-header {
    margin-bottom: 2rem;
    text-align: center;
    padding: 2rem 1rem;
}

.board-title {
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.board-desc {
    color: #7f8c8d;
    font-size: 1rem;
}

/* 카테고리 탭 */
.board-categories,
.category-tabs {
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.category-tab-list,
.board-categories {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.category-tab-list::-webkit-scrollbar,
.board-categories::-webkit-scrollbar {
    height: 6px;
}

.category-tab-list::-webkit-scrollbar-thumb,
.board-categories::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.category-tab,
.category-item {
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    background: white;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    margin: 4px;
    border-radius: 5px;
}

.category-tab:hover,
.category-item:hover {
    color: #2c5aa0;
    background: rgba(44, 90, 160, 0.05);
    border-color: #2c5aa0;
}

.category-tab.active,
.category-item.active {
    color: white;
    background: #2c5aa0;
    border-color: #2c5aa0;
    font-weight: 600;
}

/* 게시판 컨트롤 (통계, 검색) */
.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 1rem;
    border-bottom: 1px solid #e9ecef;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.board-stats,
.total-count {
    color: #666;
    font-size: 14px;
}

/* 검색 폼 */
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-type,
.search-input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-type:focus,
.search-input:focus {
    outline: none;
    border-color: #2c5aa0;
}

.search-input {
    width: 250px;
}

.search-btn {
    padding: 10px 16px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-btn:hover {
    background: #1e3d6f;
}

/* 게시판 테이블 */
.board-table,
.post-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    overflow: hidden;
}

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

.board-table th,
.post-table th {
    background: #ededed;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.board-table tbody tr,
.post-table tbody tr {
    transition: all 0.2s ease;
}

.board-table tbody tr:hover,
.post-table tbody tr:hover {
    background: #f8f9fa;
}

.board-table .notice,
.post-table .notice-row {
    background: #fff9e6;
    border-left: 3px solid #ffc107;
}

.board-table .notice:hover,
.post-table .notice-row:hover {
    background: #fff9e6;
}

/* 컬럼 스타일 */
.col-num {
    width: 80px;
    font-size: 14px;
    color: #888;
}

.col-title,
.post-title {
    text-align: left !important;
    font-weight: 600;
}

.col-author {
    width: 120px;
}

.col-date {
    width: 120px;
    font-size: 14px;
    color: #888;
}

.col-views {
    width: 80px;
    font-size: 14px;
    color: #888;
}

/* 제목 래퍼 */
.title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 카테고리 배지 */
.post-category,
.badge-category {
    background: #e4eef2;
    color: #264c5c;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* 게시물 제목 링크 */
.post-title-link,
.post-title a {
    color: #333;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 16px !important;
    line-height: 1.5;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-title i {font-size:14px !important;color:#999;}

.post-date, .post-num {font-size:15px !important;color:#666;}

.post-title-link:hover,
.post-title a:hover {
    color: #2c5aa0;
    text-decoration: none !important;
}

/* 아이콘들 */
.notice-icon {
    color: #ffc107;
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.secret-icon {
    color: #e74c3c;
    font-size: 14px;
    margin-right: 4px;
}

.comment-count {
    color: #e74c3c;
    font-size: 12px;
    font-weight: 600;
    background: #fff5f5;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.new-icon {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: bold;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

.file-icon {
    color: #6c757d;
    margin-left: 5px;
    font-size: 14px;
    opacity: 0.8;
}

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

.badge-notice {
    background: #e74c3c;
    color: white;
}

.badge-new {
    background: #27ae60;
    color: white;
}

/* 빈 게시물 */
.no-posts,
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: none;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin: 2rem 0;
    padding: 0 6px;
}

.page-link {
    min-width: 24px;
    height: 24px;
    padding: 6px 6px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px !important;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-link i {
    font-size: 12px !important;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #2c5aa0;
    color: #2c5aa0;
}

.page-link.active {
    background: #2c5aa0;
    color: white;
    border-color: #2c5aa0;
    font-weight: 500;
}



/* 게시판 액션 버튼 */
.board-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 0 1rem;
}

.actions-left,
.actions-right {
    display: flex;
    gap: 8px;
}

/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3d6f;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid #2c5aa0;
    color: #2c5aa0;
}

.btn-outline-primary:hover {
    background: #2c5aa0;
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

/* 로딩 애니메이션 */
.board-table tbody tr,
.post-table tbody tr {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.board-table tbody tr:nth-child(1),
.post-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.board-table tbody tr:nth-child(2),
.post-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.board-table tbody tr:nth-child(3),
.post-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.board-table tbody tr:nth-child(4),
.post-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.board-table tbody tr:nth-child(5),
.post-table tbody tr:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형: 태블릿 */
@media (max-width: 1024px) {
    .board-container {
        padding: 0 1rem;
    }
    
    .board-table th,
    .board-table td,
    .post-table th,
    .post-table td {
        padding: 10px 6px;
        font-size: 14px;
    }
}

/* 반응형: 모바일 */
@media (max-width: 768px) {
    /* 모바일에서 좌우 여백 최소화 */
    .board-container {
        padding: 0;
        margin: 0;
    }
    
    .board-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .board-title {
        font-size: 1.5rem;
    }
    
    .board-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 12px 1rem;
    }
    
    .list-header {
        padding: 0 1rem;
    }
    
    .search-form {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        max-width: 250px;
    }
    
    .category-tab-list,
    .board-categories {
        justify-content: flex-start;
        padding: 1rem;
    }
    
    .category-tab,
    .category-item {
        padding: 8px 14px;
        font-size: 14px;
    }
    
    .board-table,
    .post-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 0;
    }
    
    .board-table th,
    .board-table td,
    .post-table th,
    .post-table td {
        padding: 10px 6px;
        font-size: 14px;
    }
    
    /* 모바일에서 번호와 작성자 숨기기 */
    .board-table th:nth-child(1),
    .board-table td:nth-child(1),
    .post-table th:nth-child(1),
    .post-table td:nth-child(1) {
        width: 60px;
    }
    
    .col-author {
        display: none;
    }
    
    .col-title,
    .post-title {
        min-width: 200px;
        max-width: 300px;
        white-space: normal;
    }
    
    .title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .post-category,
    .badge-category {
        order: -1;
    }
    
    .pagination {
        gap: 4px;
        padding: 0 1rem;
    }
    
    .page-link {
        min-width: 18px;
        height: 18px;
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .board-actions {
        flex-direction: column;
        gap: 6px;
        padding: 0 1rem;
    }
    
    .actions-left,
    .actions-right {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* 반응형: 작은 모바일 */
@media (max-width: 480px) {
    .board-title {
        font-size: 1.3rem;
    }
    
    .board-table th,
    .board-table td,
    .post-table th,
    .post-table td {
        font-size: 12px;
        padding: 8px 4px;
    }
    
    .col-num {
        width: 50px;
    }
    
    .col-date,
    .col-views {
        width: 60px;
        font-size: 11px;
    }
    
    .post-title-link,
    .post-title a {
        font-size: 13px;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }
    
    .category-tab,
    .category-item {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-input {
        max-width: 200px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* 스크롤바 스타일 */
.board-table::-webkit-scrollbar,
.post-table::-webkit-scrollbar {
    height: 6px;
}

.board-table::-webkit-scrollbar-track,
.post-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.board-table::-webkit-scrollbar-thumb,
.post-table::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.board-table::-webkit-scrollbar-thumb:hover,
.post-table::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 텍스트 정렬 유틸리티 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

