/* list-matters.css */

/* Compact Filter Section */
.card-header .btn-link {
    color: #333;
    font-weight: 500;
}

.card-header .btn-link:hover {
    color: #007bff;
    text-decoration: none;
}

.card-header .fa-chevron-down {
    transition: transform 0.2s ease;
}

.card-header .btn-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.form-control-sm {
    font-size: 0.875rem;
}

/* Collapse functionality */
.collapse {
    display: none;
}

.collapse.show {
    display: block;
}

/* Featured Matters Carousel */
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
}

.featured-matter-slide {
    flex: 0 0 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
    overflow: hidden;
}

.featured-matter-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.featured-matter-banner {
    height: 150px;
    position: relative;
    overflow: hidden;
}

.featured-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-banner-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 2rem;
}

.featured-matter-info {
    padding: 1rem;
}

.featured-matter-info h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #333;
}

.featured-matter-info p {
    margin: 0;
    font-size: 0.9rem;
}

/* Matters Grid */
.matters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.matter-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.matter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.matter-banner {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.matter-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.matter-banner-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2rem;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.matter-content {
    padding: 1rem;
}

.matter-title {
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.matter-ngo {
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0;
}

.matter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.matter-stats {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.stat-label {
    color: #6c757d;
}

.stat-value {
    font-weight: 600;
}

/* Filter Badges */
.filter-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.btn-close {
    padding: 0;
    margin-left: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Pagination */
.pagination {
    margin: 0;
}

.page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.page-link:hover {
    color: #0056b3;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Results Info */
#resultsInfo {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .matters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-matter-slide {
        flex: 0 0 250px;
    }
    
    .carousel-container {
        padding: 0.5rem 0;
    }
    
    .matter-card {
        margin-bottom: 1rem;
    }
    
    /* Stack filter form on mobile */
    .row .col-lg-3,
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .featured-matter-slide {
        flex: 0 0 200px;
    }
    
    .matter-banner {
        height: 120px;
    }
    
    .featured-matter-banner {
        height: 100px;
    }
    
    .matter-content {
        padding: 0.75rem;
    }
    
    .featured-matter-info {
        padding: 0.75rem;
    }
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Scrollbar Styling for Carousel */
.carousel-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus States for Accessibility */
.matter-card:focus,
.featured-matter-slide:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Hover Effect for Tooltips */
.matter-card[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    max-width: 300px;
    z-index: 1000;
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
}
