/* 공통 스타일 */
body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* 페이지 타이틀 */
.page-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #0d6efd;
}

/* 카드 스타일 */
.content-card {
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background-color: #fff;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* 게시판 통계 카드 */
.stats-card {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

.stats-card-body {
    padding: 1.5rem;
}

.stats-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stats-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stats-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.stats-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* 카테고리 필터 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.category-btn:hover {
    background-color: #e9ecef;
}

.category-btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.3);
}

.category-btn i {
    margin-right: 0.5rem;
}

/* 검색 필터 */
.search-filter {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* 게시글 테이블 */
.post-table {
    margin-bottom: 0;
}

.post-table th {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
    border-bottom: 2px solid #0d6efd;
    padding: 1rem 0.75rem;
}

.post-table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.post-table tr:hover {
    background-color: #f8f9fa;
}

.post-table tr:last-child td {
    border-bottom: none;
}

.post-link {
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.post-link:hover {
    color: #0d6efd;
}

/* 공지사항 스타일 */
.notice-row {
    background-color: #fff8e6 !important;
    border-left: 4px solid #ffc107;
    position: relative;
}

.notice-row:hover {
    background-color: #fff3d0 !important;
}

.notice-row td {
    font-weight: 500;
}

.notice-badge {
    background-color: #ffc107;
    color: #212529;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notice-badge i {
    margin-right: 0.25rem;
}

.notice-link {
    color: #212529 !important;
    font-weight: 600;
}

.notice-link:hover {
    color: #0d6efd !important;
}

/* 카테고리 배지 */
.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.category-badge.free {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.category-badge.question {
    background-color: #d1e7dd;
    color: #0f5132;
}

.category-badge.discussion {
    background-color: #f8d7da;
    color: #842029;
}

.category-badge.event {
    background-color: #cff4fc;
    color: #055160;
}

/* 페이지네이션 */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.page-btn {
    width: 40px;
    height: 40px;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #495057;
}

.page-btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.3);
}

.page-btn:hover:not(.active) {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

/* 버튼 스타일 */
.btn-write {
    background-color: #0d6efd;
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-write:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
    color: white;
}

.btn-search {
    background-color: #0d6efd;
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-search:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
    color: white;
}

/* 아이콘 스타일 */
.post-icon {
    color: #6c757d;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

/* 인기 게시글 */
.popular-posts {
    margin-bottom: 2rem;
}

.popular-post-card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.popular-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.popular-post-img {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.popular-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-post-card:hover .popular-post-img img {
    transform: scale(1.05);
}

.popular-post-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.popular-post-info {
    padding: 1rem;
}

.popular-post-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8rem;
}

.popular-post-meta {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.875rem;
}

/* 애니메이션 */
/* @keyframes fadeIn {
     from { opacity: 0; transform: translateY(10px); }
     to { opacity: 1; transform: translateY(0); }
 }

 .animate-fade-in {
     animation: fadeIn 0.3s ease forwards;
 }*/

/* 반응형 조정 */
@media (max-width: 992px) {
    .stats-row {
        flex-wrap: wrap;
    }

    .stats-col {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }

    .post-table th:nth-child(1),
    .post-table td:nth-child(1),
    .post-table th:nth-child(5),
    .post-table td:nth-child(5) {
        display: none;
    }

    .post-table th:nth-child(2),
    .post-table td:nth-child(2) {
        width: 25% !important;
    }

    .post-table th:nth-child(3),
    .post-table td:nth-child(3) {
        width: 50% !important;
    }

    .post-table th:nth-child(4),
    .post-table td:nth-child(4) {
        width: 25% !important;
    }

    .stats-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 서비스 아이콘 스타일 (home.jsp에서 가져옴) */
.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e7f1ff;
    color: #0d6efd;
    border-radius: 0.5rem;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
}

/* 게시글 없음 상태 */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    vertical-align: middle;
    height: 300px;
}

.empty-state-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    display: inline-block;
}

/* 로딩 상태 */
.loading-state {
    padding: 3rem 1rem;
    text-align: center;
    vertical-align: middle;
    height: 300px;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.25rem;
    display: inline-block;
}
