/* board.css - 게시판 페이지 스타일 */

.text-anim span.invisible {
    opacity: 0;
    transform: translateX(-6px);
    display: inline-block;
}
.text-anim span.fade-in {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

/* Page Header */
.page-header {
    /* background: linear-gradient(135deg, #3498db, #2c3e50); */
    background: linear-gradient(135deg, #b6e2ff, #f39c12);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filter Section */
.filter-section {
    padding: 2rem 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.category-filter {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    /* background: #3498db; */
    background: #f39c12;
    color: white;
}

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

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    /* border-color: #3498db; */
    border-color: #f39c12;
    /* background: #3498db; */
    background: #f39c12;
    color: white;
}

.search-box {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
}

.search-box input {
    padding: 0.8rem 1rem;
    border: none;
    outline: none;
    width: 200px;
}

.search-box button {
    padding: 0.8rem 1rem;
    border: none;
    /* background: #3498db; */
    background: #f39c12;
    color: white;
    cursor: pointer;
}

/* Board Content */
.board-content {
    padding: 3rem 0;
    min-height: 60vh;
}

/* Card View */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.board-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.board-item:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 15px 30px rgba(0,0,0,0.15); */
    box-shadow: 0 15px 30px rgb(243 156 18 / 50%);
}

.board-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #6c757d;
}

.board-content-inner {
    padding: 1.5rem;
}

.board-category {
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

/* 카테고리별 색상 */
.board-item[data-category="remodeling"] .board-category {
    background: #3498db;
}

.board-item[data-category="repair"] .board-category {
    background: #e74c3c;
}

.board-item[data-category="emergency"] .board-category {
    background: #f39c12;
}

.board-item[data-category="commercial"] .board-category {
    background: #9b59b6;
}

.board-content-inner h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.board-content-inner p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.board-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

/* List View */
.board-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.list-header {
    display: grid;
    grid-template-columns: 150px 1fr 120px 100px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e9ecef;
}

.list-item {
    display: grid;
    grid-template-columns: 150px 1fr 120px 100px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
    cursor: pointer;
}

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

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

.category-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.category-badge.remodeling { background: #3498db; }
.category-badge.repair { background: #e74c3c; }
.category-badge.emergency { background: #f39c12; }
.category-badge.commercial { background: #9b59b6; }

.col-title {
    font-weight: 500;
    color: #2c3e50;
}

.col-location,
.col-date {
    color: #666;
    font-size: 0.9rem;
}

/* Pagination */
.pagination-section {
    padding: 2rem 0;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 0.5rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    /* border-color: #3498db; */
    border-color: #f39c12;
    /* color: #3498db; */
    color: #f39c12;
}

.page-btn.active {
    /* background: #3498db; */
    background: #f39c12;
    /* border-color: #3498db; */
    border-color: #f39c12;
    color: white;
}

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

/* 관리자 영역 스타일 */
.admin-section {
    margin-top: 2rem;
    padding: 1.5rem;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* background: linear-gradient(135deg, #0000004a 0%, #00000091 100%); */
    background: #00000033;
    border-radius: 10px;
    color: white;
    /* box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); */
    box-shadow: 0 5px 15px rgb(255 255 255 / 30%);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.admin-logout-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.admin-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-btn {
    /* background: rgba(255, 255, 255, 0.9); */
    background: rgba(255, 255, 255, 0%);
    /* color: #667eea; */
    color: #FFF;
    /* border: none; */
    border: 1px solid #ffffff7d;
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-btn:hover {
    /* background: white; */
    background: #ffffff14;
    transform: translateY(-2px);
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); */
    box-shadow: 0 5px 15px rgb(255 255 255 / 20%);
}

.admin-btn:active {
    transform: translateY(0);
}

/* 편집 모드 스타일 */
.board-item.edit-mode {
    position: relative;
    border: 2px dashed #667eea;
}

.board-item.edit-mode::before {
    content: '편집 모드';
    position: absolute;
    top: -10px;
    left: 10px;
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    z-index: 10;
}

.edit-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 0.5rem;
    z-index: 10;
}

.board-item.edit-mode .edit-controls {
    display: flex;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.3rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: white;
    transform: scale(1.1);
}

.edit-btn.delete {
    color: #e74c3c;
}

.edit-btn.edit {
    color: #f39c12;
}

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

    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

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

    .search-box input { width: 150px; }

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

    .list-header,
    .list-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .list-header {
        display: none;
    }

    .list-item {
        padding: 1rem;
        text-align: center;
    }
    
    /* 관리자 영역 반응형 */
    .admin-section {
        padding: 1rem;
    }
    
    .admin-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .admin-logout-btn {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .admin-controls {
        justify-content: center;
    }
    
    .admin-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}