/* ==================== 페이지 헤더 ==================== */
.page-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(135deg, #af865a 0%, #f39c12 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(255,255,255,0.05)" width="50" height="50"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin: 0 0 2rem 0;
}

/* ==================== 관리자 영역 ==================== */
.admin-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-name {
    font-weight: 500;
}

.admin-logout-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.admin-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-btn {
    background: white;
    color: #f39c12;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==================== 필터 영역 ==================== */
.filter-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}
.category-filter {
    display: flex;
    gap: 5px;
}
.filter_btn {
    padding: 0.45rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
    color: #374151;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    backdrop-filter: blur(2px);
}

.filter_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.filter_btn:focus {
    outline: none;
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12);
}

.filter_btn.all {
    background: rgba(245, 158, 11, 0.06);
    color: #7c2d00;
    border-color: rgba(245, 158, 11, 0.12);
}
.filter_btn.all.active {
    background-color: #f39c12;
    color: white;
    border-color: #f39c12;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12);
}

.filter_btn.bg-1 {
    background: rgba(139, 92, 246, 0.06);
    color: #5b21a1;
    border-color: rgba(139, 92, 246, 0.12);
}
.filter_btn.bg-1.active {
    background-color: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12);
}

.filter_btn.bg-2 {
    background: rgba(59, 130, 246, 0.06);
    color: #0b4da8;
    border-color: rgba(59, 130, 246, 0.12);
}
.filter_btn.bg-2.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.12);
}

.filter_btn.bg-3 {
    background: rgba(239, 68, 68, 0.06);
    color: #7f1d1d;
    border-color: rgba(239, 68, 68, 0.12);
}
.filter_btn.bg-3.active {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.12);
}

.filter_btn.bg-4 {
    background: rgba(16, 185, 129, 0.06);
    color: #0b6b47;
    border-color: rgba(16, 185, 129, 0.12);
}
.filter_btn.bg-4.active {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
}

.filter_btn.active {
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

.filter_btn.all:hover,
.filter_btn.all:focus {
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12);
}

.filter_btn.bg-1:hover,
.filter_btn.bg-1:focus {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12);
}
.filter_btn.bg-2:hover,
.filter_btn.bg-2:focus {
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.12);
}
.filter_btn.bg-3:hover,
.filter_btn.bg-3:focus {
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.12);
}
.filter_btn.bg-4:hover,
.filter_btn.bg-4:focus {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
}
.filter_btn.bg-5:hover,
.filter_btn.bg-5:focus {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12);
}
.filter_btn.bg-6:hover,
.filter_btn.bg-6:focus {
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.12);
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
}

.view-btn:hover {
    /* border-color: #667eea; */
    /* color: #667eea; */
    border-color: #f39c12;
    color: #f39c12;
}

.view-btn.active {
    /* background: #667eea; */
    background: #f39c12;
    color: white;
    /* border-color: #667eea; */
    border-color: #f39c12;
}


.search-box {
    display: flex;
    gap: 0.5rem;
}

#searchInput {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9375rem;
    width: 200px;
    transition: all 0.2s;
}

#searchInput:focus {
    outline: none;
    /* border-color: #667eea; */
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#searchBtn {
    padding: 0.5rem 1.25rem;
    /* background: #667eea; */
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#searchBtn:hover {
    /* background: #5568d3; */
    background: #f39c12;
}

/* ==================== 게시판 컨텐츠 ==================== */
.board-content {
    padding: 3rem 0;
    min-height: 60vh;
}

/* ==================== 카드 그리드 ==================== */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.board-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.board-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* 관리자 삭제 버튼 (카드뷰) */
.admin-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    color: #fff;
}

.admin-delete-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

/* 썸네일 이미지 영역 - 4:3 비율 */
.board-image {
    width: 100%;
    padding-bottom: 75%; /* 4:3 비율 */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.board-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 이미지가 없을 때 아이콘 */
.board-image span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.3;
}

/* 카드 내용 영역 */
.board-content-inner {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.board-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    width: fit-content;
    letter-spacing: 0.5px;
}

.board-category.bg-1 {
    background: rgba(139, 92, 246, 0.06);
    color: #5b21a1;
    border: 1px solid rgba(139, 92, 246, 0.12);
}
.board-category.bg-2 {
    background: rgba(59, 130, 246, 0.06);
    color: #0b4da8;
    border: 1px solid rgba(59, 130, 246, 0.12);
}
.board-category.bg-3 {
    background: rgba(239, 68, 68, 0.06);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.12);
}
.board-category.bg-4 {
    background: rgba(16, 185, 129, 0.06);
    color: #0b6b47;
    border: 1px solid rgba(16, 185, 129, 0.12);
}


.board-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-item p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.board-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==================== 리스트 뷰 ==================== */
.board-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.list-header {
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.list-item {
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
    align-items: center;
}

.list-item:hover {
    background: #f9fafb;
}

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

.col-no {
    text-align: center;
    color: #9ca3af;
    font-weight: 500;
    cursor: pointer;
}

.col-title {
    font-weight: 500;
    color: #111827;
    cursor: pointer;
}

.col-date {
    text-align: right;
    color: #6b7280;
    font-size: 0.9375rem;
    cursor: pointer;
}

.col-action {
    text-align: center;
}

/* 리스트 삭제 버튼 */
.list-delete-btn {
    padding: 0.375rem 0.875rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.list-delete-btn:hover {
    background: #dc2626;
}

/* ==================== 빈 상태 ==================== */
.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.empty-message p {
    font-size: 1.125rem;
    margin: 0;
}

/* ==================== 페이지네이션 ==================== */
.pagination-section {
    padding: 3rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

.page-btn:hover:not(:disabled):not(.active) {
    border-color: #f39c12;
    color: #f39c12;
}

.page-btn.active {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 반응형 디자인 ==================== */
@media (max-width: 1024px) {
    .board-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .category-filter {
        justify-content: center;
    }

    .view-controls {
        justify-content: center;
    }

    #searchInput {
        width: 100%;
    }

    .board-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .list-header {
        grid-template-columns: 60px 1fr 100px 80px;
        font-size: 0.875rem;
    }

    .list-item {
        grid-template-columns: 60px 1fr 100px 80px;
    }

    .admin-controls {
        flex-direction: column;
    }

    .admin-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2.5rem 0 2rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .filter-section {
        padding: 1rem 0;
    }

    .board-content {
        padding: 2rem 0;
    }

    .board-item h3 {
        font-size: 1.125rem;
    }

    .board-item p {
        font-size: 0.875rem;
    }

    .list-header {
        grid-template-columns: 50px 1fr 80px;
        gap: 0.75rem;
        padding: 1rem;
    }

    .list-item {
        grid-template-columns: 50px 1fr 80px;
        gap: 0.75rem;
        padding: 1rem;
    }

    .col-date {
        display: none;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}