/* ═══════════ Listing Index (News / Procurements) ═══════════ */

.listing-card .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.month-filter-item, .year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #4b5563;
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 500;
}

.month-filter-item:hover,
.year-header:hover,
.month-filter-item.active {
    color: #00309E;
    background-color: rgba(0, 48, 158, 0.06);
}

.month-filter-item.active {
    background-color: rgba(0, 48, 158, 0.1) !important;
}

.year-group {
    margin-bottom: 0.25rem;
}

.month-sub-list {
    padding-left: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.month-sub-item {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #4b5563;
    transition: all 0.2s;
    text-decoration: none;
}

.month-sub-item:hover {
    color: #00309E;
    background-color: rgba(0, 48, 158, 0.04);
}

.month-sub-item.active {
    color: #00309E;
    background-color: rgba(0, 48, 158, 0.1);
    font-weight: 600;
}

.filter-hidden {
    display: none !important;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Mobile specific */
@media (max-width: 1023px) {
    #monthFilterList {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem !important;
        margin-bottom: 2rem;
    }
    
    .year-header {
        background-color: #f9fafb;
        border: 1px solid #e5e7eb;
    }

    .month-sub-list {
        background-color: white;
        border: 1px solid #f3f4f6;
        border-radius: 0.5rem;
        padding: 0.5rem;
        margin-left: 0;
        display: grid;
        grid-template-cols: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.25rem;
    }

    .month-sub-item {
        text-align: center;
        border: 1px solid #f3f4f6;
    }
}

/* ── Pagination ── */
.listing-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.listing-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.listing-pagination .page-btn:hover {
    border-color: #00309E;
    color: #00309E;
    background: #f0f4ff;
}

.listing-pagination .page-btn.active {
    background: linear-gradient(135deg, #00309E, #0045D9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 48, 158, 0.3);
}

.listing-pagination .page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.listing-pagination .page-ellipsis {
    color: #94a3b8;
    font-size: 14px;
    padding: 0 4px;
}

@media (max-width: 640px) {
    .listing-pagination .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}
