/* ===================================
   Courses Page Specific Styles
   =================================== */

/* Page Header */
.page-header {
    background: url('../images/course/LMS-Inner-Banner.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 200px 0 140px;
    margin-top: 0;
}

.page-title {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
}

.page-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Filter Section */
.filter-section {
    padding: 30px 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 76px;
    z-index: 100;
}

.filter-wrapper {
    background: var(--bg-light);
    padding: 20px 25px;
    border-radius: var(--border-radius);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.results-count {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.results-count span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Courses Grid Section */
.courses-grid-section {
    padding: 60px 0 100px;
    background: var(--bg-light);
}

/* Course Card Grid Style */
.course-card-grid {
    background: white;
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.course-card-grid:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Course Badge */
.course-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.course-badge.bestseller {
    background: #10b981;
}

.course-badge.new {
    background: #8b5cf6;
}

.course-badge.popular {
    background: var(--accent-color);
}

/* Course Icon Wrapper */
.course-icon-wrapper {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.08));
    padding: 40px 30px 30px;
    text-align: center;
}

.course-card-grid .course-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.course-card-grid .course-icon i {
    font-size: 2.2rem;
    color: white;
}

.course-card-grid:hover .course-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Course Content */
.course-content {
    padding: 25px 25px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-grid .course-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.course-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.course-meta span {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-meta span i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.course-card-grid .course-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

/* Course Features */
.course-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.course-features span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-features span i {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

/* Course Footer */
.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.course-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.course-footer .btn-primary {
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    padding: 0;
    background: var(--bg-light);
}

.cta-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 50px 40px;
    border-radius: var(--border-radius);
    margin-bottom: -60px;
    position: relative;
    z-index: 10;
}

.cta-wrapper h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.cta-wrapper p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.cta-wrapper .btn-light {
    padding: 12px 35px;
    border-radius: 25px;
    font-weight: 500;
    color: var(--primary-color);
}

.cta-wrapper .btn-light:hover {
    background: white;
    transform: translateY(-2px);
}

/* Animation for cards appearing */
.course-card-grid {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.col-lg-4:nth-child(1) .course-card-grid { animation-delay: 0.1s; }
.col-lg-4:nth-child(2) .course-card-grid { animation-delay: 0.2s; }
.col-lg-4:nth-child(3) .course-card-grid { animation-delay: 0.3s; }
.col-lg-4:nth-child(4) .course-card-grid { animation-delay: 0.15s; }
.col-lg-4:nth-child(5) .course-card-grid { animation-delay: 0.25s; }
.col-lg-4:nth-child(6) .course-card-grid { animation-delay: 0.35s; }
.col-lg-4:nth-child(7) .course-card-grid { animation-delay: 0.2s; }
.col-lg-4:nth-child(8) .course-card-grid { animation-delay: 0.3s; }
.col-lg-4:nth-child(9) .course-card-grid { animation-delay: 0.4s; }
.col-lg-4:nth-child(10) .course-card-grid { animation-delay: 0.25s; }
.col-lg-4:nth-child(11) .course-card-grid { animation-delay: 0.35s; }
.col-lg-4:nth-child(12) .course-card-grid { animation-delay: 0.45s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .page-header {
        padding: 120px 0 60px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .page-description {
        margin-top: 20px;
    }

    .filter-section {
        position: relative;
        top: 0;
    }

    .filter-buttons {
        margin-bottom: 15px;
    }

    .results-count {
        text-align: left;
        margin-top: 15px;
    }

    .cta-wrapper {
        text-align: center;
    }

    .cta-wrapper .btn-light {
        margin-top: 20px;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 100px 0 50px;
    }

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

    .courses-grid-section {
        padding: 40px 0 80px;
    }

    .course-card-grid .course-title {
        font-size: 1.1rem;
    }

    .course-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .course-footer .btn-primary {
        width: 100%;
        text-align: center;
    }

    .cta-wrapper {
        padding: 30px 25px;
    }

    .cta-wrapper h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 575.98px) {
    .filter-wrapper {
        padding: 15px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .course-content {
        padding: 20px;
    }

    .current-price {
        font-size: 1.2rem;
    }
}
