/* Courses Page Specific Styles */
.courses-hero {
    background: linear-gradient(rgba(10, 10, 26, 0.9), rgba(10, 10, 26, 0.9)), 
                url('https://images.unsplash.com/photo-1446776653964-20c1d3a81b06?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    padding: 150px 0 80px;
    text-align: center;
    color: white;
}

.courses-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffd700, #6a11cb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.courses-hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #b0b0d0;
}

.courses-content {
    padding: 80px 0;
}

/* Courses Filters */
.courses-filters {
    background: rgba(30, 30, 60, 0.7);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid rgba(106, 17, 203, 0.3);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .courses-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(106, 17, 203, 0.3);
    border-radius: 30px;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b0d0;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(106, 17, 203, 0.3);
    border-radius: 25px;
    color: #b0b0d0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(106, 17, 203, 0.2);
    color: #6a11cb;
    border-color: #6a11cb;
}

/* Course Categories */
.course-categories {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0 30px;
    margin-bottom: 40px;
    scrollbar-width: thin;
    scrollbar-color: #6a11cb rgba(255, 255, 255, 0.1);
}

.course-categories::-webkit-scrollbar {
    height: 8px;
}

.course-categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.course-categories::-webkit-scrollbar-thumb {
    background: #6a11cb;
    border-radius: 10px;
}

.category-card {
    min-width: 200px;
    background: rgba(30, 30, 60, 0.7);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.category-card:hover,
.category-card.active {
    border-color: #6a11cb;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(106, 17, 203, 0.2);
}

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(106, 17, 203, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    color: #6a11cb;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
    background: #6a11cb;
    color: white;
    transform: scale(1.1);
}

.category-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.category-count {
    color: #b0b0d0;
    font-size: 0.9rem;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
}

.course-card {
    background: rgba(30, 30, 60, 0.7);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(106, 17, 203, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(106, 17, 203, 0.3);
    border-color: #6a11cb;
}

.course-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.badge-featured {
    background: rgba(255, 215, 0, 0.9);
    color: #000;
}

.badge-popular {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

.badge-free {
    background: rgba(0, 200, 0, 0.9);
    color: white;
}

.badge-new {
    background: rgba(33, 150, 243, 0.9);
    color: white;
}

.course-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-header {
    margin-bottom: 15px;
}

.course-category {
    color: #6a11cb;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.course-title {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.course-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.course-title a:hover {
    color: #6a11cb;
}

.course-description {
    color: #b0b0d0;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.9rem;
}

.meta-item i {
    color: #6a11cb;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

.course-price.free {
    color: #00ff00;
}

.course-price.discount {
    display: flex;
    align-items: center;
    gap: 10px;
}

.original-price {
    font-size: 1rem;
    color: #888;
    text-decoration: line-through;
}

.btn-enroll {
    padding: 10px 25px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
}

.btn-enroll:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(106, 17, 203, 0.4);
}

/* Featured Course */
.featured-course {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-color: #ffd700;
}

@media (max-width: 992px) {
    .featured-course {
        grid-template-columns: 1fr;
    }
}

.featured-course .course-image {
    height: 100%;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content .course-title {
    font-size: 1.8rem;
}

.featured-content .course-description {
    font-size: 1.1rem;
}

/* Course Stats */
.course-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #b0b0d0;
    font-size: 0.9rem;
}

.stat-item i {
    color: #ffd700;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px;
    color: #b0b0d0;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 4rem;
    color: #6a11cb;
    margin-bottom: 20px;
    display: block;
}

/* Pagination */
.courses-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
}

.pagination-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 60, 0.7);
    border: 1px solid rgba(106, 17, 203, 0.3);
    color: #b0b0d0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(106, 17, 203, 0.2);
    color: #6a11cb;
    border-color: #6a11cb;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 60, 0.7);
    border: 1px solid rgba(106, 17, 203, 0.3);
    color: #b0b0d0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-number:hover,
.pagination-number.active {
    background: rgba(106, 17, 203, 0.2);
    color: #6a11cb;
    border-color: #6a11cb;
}

/* Call to Action */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1) 0%, rgba(37, 117, 252, 0.1) 100%);
    text-align: center;
    margin-top: 80px;
    border-radius: 30px;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    color: #b0b0d0;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Certificate Preview */
.certificate-preview {
    background: rgba(10, 10, 20, 0.8);
    padding: 80px 0;
    margin-top: 80px;
}

.certificate-container {
    background: rgba(30, 30, 60, 0.7);
    border-radius: 20px;
    padding: 40px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.certificate-container h2 {
    color: #ffd700;
    margin-bottom: 30px;
    font-size: 2rem;
}

.certificate-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.certificate-image img {
    width: 100%;
    height: auto;
    display: block;
}

.certificate-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.certificate-feature {
    text-align: center;
    padding: 20px;
}

.certificate-feature i {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 15px;
    display: block;
}

.certificate-feature h4 {
    color: #fff;
    margin-bottom: 10px;
}

.certificate-feature p {
    color: #b0b0d0;
    font-size: 0.9rem;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    color: #b0b0d0;
    grid-column: 1 / -1;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(106, 17, 203, 0.3);
    border-top: 3px solid #6a11cb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .courses-hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .courses-hero h1 {
        font-size: 2.5rem;
    }
    
    .courses-hero p {
        font-size: 1.1rem;
    }
    
    .course-categories {
        padding-bottom: 20px;
    }
    
    .category-card {
        min-width: 180px;
        padding: 20px;
    }
    
    .pagination-numbers {
        display: none;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .courses-hero h1 {
        font-size: 2rem;
    }
    
    .course-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .course-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .btn-enroll {
        text-align: center;
    }
    
    .certificate-container {
        padding: 25px;
    }
    
    .certificate-features {
        grid-template-columns: 1fr;
    }
}