/* ===================================
   게시판 카드형 스타일 CSS
   style-board-card.css
   =================================== */

/* ===================================
   기본 카드형 게시판
   =================================== */
.board-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.card-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.card-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
    transform: translateX(5px);
}

/* 카드 이미지 */
.card-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-item:hover .card-image img {
    transform: scale(1.1);
}

.card-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 2.5rem;
}

/* 카드 콘텐츠 */
.card-content {
    flex: 1;
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    text-decoration: none;
}

.card-title:hover {
    color: var(--color-primary);
}

/* 카드 배지 */
.card-badges {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.card-badge {
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-badge.notice {
    background: #fee;
    color: #dc3545;
}

.card-badge.new {
    background: #e7f3ff;
    color: #0066cc;
}

.card-badge.hot {
    background: #ffe7e7;
    color: #dc3545;
}

/* 카드 내용 미리보기 */
.card-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 카드 메타 정보 */
.card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.card-meta-item i {
    font-size: 0.9rem;
}

/* ===================================
   Bootstrap 스타일 카드형
   =================================== */
.board-cards.bootstrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.board-cards.bootstrap .card-item {
    display: block;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.board-cards.bootstrap .card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.board-cards.bootstrap .card-image {
    width: 100%;
    height: 200px;
    border-radius: 0;
    border-bottom: 1px solid #e9ecef;
}

.board-cards.bootstrap .card-body {
    padding: 1.25rem;
}

.board-cards.bootstrap .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
}

/* ===================================
   리스트 카드형
   =================================== */
.board-cards.list-style .card-item {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.25rem;
}

.board-cards.list-style .card-item:hover {
    border-left-color: #c73030;
    background: #fafafa;
}

.board-cards.list-style .card-image {
    width: 80px;
    height: 80px;
}

/* ===================================
   미니멀 카드형
   =================================== */
.board-cards.minimal .card-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
    padding: 1.25rem 0;
}

.board-cards.minimal .card-item:last-child {
    border-bottom: none;
}

.board-cards.minimal .card-item:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: none;
}

.board-cards.minimal .card-badges {
    order: -1;
    margin-bottom: 0.5rem;
}

/* ===================================
   카드형 반응형
   =================================== */
@media (max-width: 992px) {
    .card-item {
        flex-direction: column;
        text-align: center;
    }
    
    .card-image {
        width: 100%;
        height: 200px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .card-meta {
        justify-content: center;
    }
    
    .board-cards.bootstrap {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .board-cards {
        gap: 0.75rem;
    }
    
    .card-item {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-excerpt {
        -webkit-line-clamp: 1;
    }
    
    .card-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .board-cards.bootstrap {
        grid-template-columns: 1fr;
    }
    
    /* 모바일에서 리스트 스타일 조정 */
    .board-cards.list-style .card-item {
        flex-direction: row;
        text-align: left;
    }
    
    .board-cards.list-style .card-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .card-item {
        padding: 0.875rem;
    }
    
    .card-image {
        height: 150px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-badges {
        gap: 0.25rem;
    }
    
    .card-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .card-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .card-meta-item i {
        font-size: 0.8rem;
    }
}