/* Courses Page Specific Styles */
.courses-hero {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 10rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.courses-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&auto=format&fit=crop&w=2850&q=80') center/cover;
    opacity: 0.1;
}

.courses-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.courses-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.courses-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Enhanced Filter Styles */
.courses-filters {
    margin: 2rem 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 80px;
    z-index: 100;
}

.filters-wrapper {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-group label i {
    color: #6366f1;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1f2937;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.filter-group select:hover {
    border-color: #6366f1;
}

.filter-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Active Filter Tags */
.active-filters {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e0e7ff;
    color: #6366f1;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-tag i {
    font-size: 0.75rem;
}

/* Courses Grid */
#courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
    will-change: transform;
    contain: content;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.course-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.course-tag {
    padding: 0.25rem 0.75rem;
    background: #e0e7ff;
    color: #6366f1;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.course-description {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.course-price {
    font-weight: 600;
    color: #059669;
}

.course-price.free {
    color: #059669;
}

.course-price.paid {
    color: #dc2626;
}

.course-level {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.course-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto;
    transition: all 0.2s ease;
}

.course-link:hover {
    color: #4f46e5;
    gap: 0.75rem;
}

/* Loading and No Results States */
.loading, .no-results {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.loading i, .no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #6366f1;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-hero h1 {
        font-size: 2.5rem;
    }

    .courses-filters {
        margin: 1rem 0;
        position: static;
    }

    .filters-wrapper {
        flex-direction: column;
        padding: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    #courses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .course-meta {
        flex-wrap: wrap;
    }

    .course-link {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}