/* Course Categories & Filtering */
.categories-container {
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.categories-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(67, 97, 238, 0.5) transparent;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(67, 97, 238, 0.5);
    border-radius: 10px;
}

.category-btn {
    flex: 0 0 auto;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    background: white;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

.category-btn.active {
    background: #4361ee;
    border-color: #4361ee;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(67, 97, 238, 0.1), 0 2px 4px -1px rgba(67, 97, 238, 0.06);
}

.category-btn i {
    margin-right: 0.5rem;
    font-size: 0.9em;
}

/* Course count badge */
.category-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* Active state for category filter */
.category-btn.active .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Scroll buttons for categories */
.categories-scroll-container {
    position: relative;
    width: 100%;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 20;
    transition: all 0.2s ease;
}

.scroll-btn:hover {
    background: #f7fafc;
    color: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scroll-btn.scroll-left {
    left: -18px;
}

.scroll-btn.scroll-right {
    right: -18px;
}

.scroll-btn i {
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .category-count {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
        margin-left: 0.3rem;
    }
    
    .scroll-btn {
        width: 30px;
        height: 30px;
    }
    
    .scroll-btn i {
        font-size: 0.8rem;
    }
}

/* No results message */
.no-courses-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
}

.no-courses-message i {
    font-size: 2.5rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.no-courses-message h4 {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.no-courses-message p {
    color: #a0aec0;
    margin-bottom: 1.5rem;
}

/* Loading state */
.courses-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
}

.courses-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.2em;
}

.courses-loading p {
    color: #718096;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Category icons */
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 6px;
    color: #4361ee;
    font-size: 0.9rem;
}

.category-btn.active .category-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Filter controls */
.course-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.filter-group label {
    margin: 0 0.5rem 0 0;
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    border: none;
    background: transparent;
    color: #2d3748;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.filter-select:focus {
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

/* Responsive adjustments for filters */
@media (max-width: 767.98px) {
    .course-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select {
        text-align: right;
    }
}
