/* Courses Page Styles */
.courses-page {
    background-color: #fff;
}

.courses-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    color: white;
    padding: 4rem 0;
}

.courses-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.125rem;
    text-align: center;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

.courses-content {
    padding: 3rem 0 4rem;
}

/* Filters Section */
.filters-section {
    background: white;
    border: 1px solid #d1d7dc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid #d1d7dc;
    border-radius: 50px;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #5624d0;
    box-shadow: 0 0 0 3px rgba(86, 36, 208, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6a6f73;
    pointer-events: none;
}

.btn-search {
    padding: 0.875rem 2rem;
    background: #5624d0;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-search:hover {
    background: #4119a3;
}

.filters-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1c1d1f;
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d7dc;
    border-radius: 4px;
    font-size: 0.9375rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #5624d0;
    box-shadow: 0 0 0 3px rgba(86, 36, 208, 0.1);
}

.btn-clear {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #6a6f73;
    border: 1px solid #d1d7dc;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: #f7f9fa;
    border-color: #b4b4b4;
}

/* Courses Header */
.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.courses-count {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1c1d1f;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-size: 0.9375rem;
    color: #6a6f73;
}

/* Course Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.course-card {
    background: white;
    border: 1px solid #d1d7dc;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    display: block;
    text-decoration: none;
}

.course-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.course-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #5f259f 0%, #8e44ad 100%);
    overflow: hidden;
}

.course-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.course-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #ecfdf5;
    color: #065f46;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.course-content {
    padding: 1.25rem;
}

.course-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1c1d1f;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.course-description {
    font-size: 0.875rem;
    color: #6a6f73;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.625em;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6a6f73;
}

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

.course-meta-item i {
    width: 14px;
    text-align: center;
}

.course-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #d1d7dc;
}

.course-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.course-price {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1c1d1f;
}

.course-original-price {
    font-size: 0.875rem;
    color: #6a6f73;
    text-decoration: line-through;
}

.course-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-buy-now {
    flex: 1;
    background: linear-gradient(135deg, #5f259f 0%, #8e44ad 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(95, 37, 159, 0.3);
    color: white;
}

.btn-view-course {
    flex: 1;
    background: white;
    color: #5624d0;
    border: 2px solid #5624d0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-view-course:hover {
    background: #5624d0;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #d1d7dc;
    margin-bottom: 1.5rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1c1d1f;
    margin-bottom: 0.5rem;
}

.empty-text {
    font-size: 1rem;
    color: #6a6f73;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .courses-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .hero-title {
        font-size: 2rem;
    }
}