/* 게시판 전용 CSS - v1.0.0 */

/* 메인 섹션 */
.board-section {
    padding: 60px 0 100px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important;
    min-height: calc(100vh - 200px) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.board-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 페이지 헤더 */
.board-header {
    margin-bottom: 40px;
    text-align: center;
}

.board-title {
    font-size: 42px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 15px !important;
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    display: block !important;
}

.board-subtitle {
    font-size: 18px;
    color: #64748b;
    font-weight: 400;
}

/* 검색 및 필터 섹션 */
.board-toolbar {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.board-search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.board-search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.board-search-box input:focus {
    outline: none;
    border-color: #0058a3;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 88, 163, 0.1);
}

.board-search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.board-filter-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: white;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.board-filter-select:focus {
    outline: none;
    border-color: #0058a3;
    box-shadow: 0 0 0 4px rgba(0, 88, 163, 0.1);
}

/* 게시판 목록 */
.board-list {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.board-list-header {
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    color: white;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 140px;
    gap: 20px;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}

.board-list-item {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 140px;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

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

.board-list-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.board-item-number {
    font-weight: 600;
    color: #64748b;
    text-align: center;
    font-size: 15px;
}

.board-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-item-title .category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}

.board-item-author {
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.board-item-views {
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.board-item-date {
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

/* 빈 게시판 */
.board-empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.board-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    display: block;
}

.board-empty p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* 게시판 상세 */
.board-detail {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.board-detail-header {
    padding: 40px;
    border-bottom: 2px solid #e2e8f0;
}

.board-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    line-height: 1.4;
}

.board-detail-meta {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 14px;
}

.board-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-detail-meta-item i {
    font-size: 16px;
    color: #94a3b8;
}

.board-detail-content {
    padding: 40px;
    line-height: 1.8;
    color: #334155;
    font-size: 16px;
}

.board-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

.board-detail-content p {
    margin-bottom: 20px;
}

.board-detail-content h1,
.board-detail-content h2,
.board-detail-content h3,
.board-detail-content h4,
.board-detail-content h5,
.board-detail-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1e293b;
    font-weight: 700;
}

.board-detail-content h1 { font-size: 28px; }
.board-detail-content h2 { font-size: 24px; }
.board-detail-content h3 { font-size: 20px; }

.board-detail-footer {
    padding: 30px 40px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.board-detail-actions {
    display: flex;
    gap: 12px;
}

.btn-board {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-board-primary {
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    color: white;
}

.btn-board-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 88, 163, 0.3);
}

.btn-board-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-board-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-board-outline-danger {
    background: white;
    color: #dc2626;
    border: 2px solid #dc2626;
}

.btn-board-outline-danger:hover {
    background: #fef2f2;
    border-color: #b91c1c;
    color: #b91c1c;
}

/* 글쓰기 버튼 (목록 하단) */
.board-write-action {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.board-write-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 페이지네이션 */
.board-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    background: white;
    border: 2px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.pagination-item:hover:not(.disabled):not(.active) {
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 88, 163, 0.3);
}

.pagination-item.active {
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 88, 163, 0.3);
    font-weight: 700;
}

.pagination-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.pagination-item.pagination-number {
    min-width: 44px;
}

.pagination-item.pagination-first,
.pagination-item.pagination-prev,
.pagination-item.pagination-next,
.pagination-item.pagination-last {
    min-width: 44px;
    padding: 0 12px;
}

.pagination-item.pagination-first i,
.pagination-item.pagination-prev i,
.pagination-item.pagination-next i,
.pagination-item.pagination-last i {
    font-size: 18px;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 600;
    user-select: none;
}

/* 페이지 정보 */
.pagination-info {
    margin-top: 20px;
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pagination-info-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

.pagination-info-text strong {
    color: #0058a3;
    font-weight: 700;
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    .board-list-header {
        display: none;
    }
    
    .board-list-item {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
        align-items: center;
        padding: 16px;
    }
    
    /* 1줄: 번호(왼쪽) + 제목(오른쪽) */
    .board-item-number {
        flex: 0 0 36px;
        order: 1;
        text-align: left;
        font-size: 14px;
        color: #64748b;
        font-weight: 600;
    }
    
    .board-item-number::before {
        content: '';
    }
    
    .board-item-title {
        flex: 1 1 calc(100% - 48px);
        min-width: 0;
        order: 2;
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
    
    /* 2줄: 작성자·조회수·작성일 3등분 (왼쪽·가운데·오른쪽 정렬) */
    .board-item-author,
    .board-item-views,
    .board-item-date {
        flex: 1 1 0;
        min-width: 0;
        order: 3;
        font-size: 12px;
        color: #94a3b8;
    }
    
    .board-item-author {
        text-align: left;
    }
    
    .board-item-views {
        order: 4;
        text-align: center;
    }
    
    .board-item-date {
        order: 5;
        text-align: right;
    }
    
    .board-item-author::before {
        content: '작성자: ';
    }
    
    .board-item-views::before {
        content: '조회수: ';
    }
    
    .board-item-date::before {
        content: '작성일: ';
    }
    
    .board-item-author::after,
    .board-item-views::after {
        content: none;
    }
    
    .board-title {
        font-size: 32px;
    }
    
    .board-detail-title {
        font-size: 24px;
    }
    
    .board-detail-header,
    .board-detail-content,
    .board-detail-footer {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .board-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .board-search-box {
        min-width: 100%;
    }
    
    .board-title {
        font-size: 28px;
    }
    
    .board-detail-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-board {
        width: 100%;
        justify-content: center;
    }
}

