/* ========== COURSES PAGE STYLES ========== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #000080, #0000b3);
    padding: 60px 0 50px;
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.breadcrumb {
    font-size: 1rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffd700;
}

.breadcrumb i {
    margin: 0 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.course-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.course-stats span {
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
}

.course-stats span i {
    margin-right: 8px;
    color: #ffd700;
}

/* Search Section */
.search-section {
    padding: 40px 0 20px;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #000080;
    font-size: 1.2rem;
}

.search-wrapper input {
    width: 100%;
    padding: 16px 55px 16px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 60px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-wrapper input:focus {
    border-color: #000080;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,0,128,0.1);
}

.clear-search {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.clear-search:hover {
    color: #ff6b6b;
}

/* Filter Section */
.filter-section {
    padding: 20px 0;
}

.filter-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    background: #f8f9ff;
    padding: 30px;
    border-radius: 25px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.filter-group label i {
    color: #000080;
    font-size: 1rem;
}

.filter-group select {
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-group select:focus {
    border-color: #000080;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,128,0.1);
}

.filter-actions {
    text-align: center;
}

.clear-filters-btn {
    background: none;
    border: 2px solid #000080;
    color: #000080;
    padding: 10px 30px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.clear-filters-btn:hover {
    background: #000080;
    color: white;
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    padding: 20px 0;
}

.results-header {
    background: #f8f9ff;
    padding: 15px 25px;
    border-radius: 20px;
}

.results-count {
    font-size: 1rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.results-count span {
    font-weight: 800;
    color: #000080;
    font-size: 1.2rem;
}

/* Courses Grid */
.courses-section {
    padding: 20px 0 80px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Course Card */
.course-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,128,0.08);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid rgba(0,0,128,0.05);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(0,0,128,0.15);
}

/* Badges */
.course-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
}

.course-badge.trending { background: linear-gradient(135deg, #ff9800, #ff5722); color: white; }
.course-badge.new { background: linear-gradient(135deg, #4caf50, #2e7d32); color: white; }
.course-badge.bestseller { background: linear-gradient(135deg, #9c27b0, #6a1b9a); color: white; }
.course-badge.popular { background: linear-gradient(135deg, #ff6b6b, #e74c3c); color: white; }

/* Course Image */
.course-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(transparent, white);
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.08);
}

/* Course Content */
.course-content {
    padding: 22px;
}

.course-content h3 {
    font-size: 1.25rem;
    color: #000080;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.4;
}

/* Course Meta */
.course-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.duration, .level {
    background: #f0f0ff;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    color: #000080;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.duration i, .level i {
    font-size: 0.75rem;
}

/* Learn More Button */
.view-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #000080;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    border: 2px solid #000080;
}

.view-details:hover {
    background: transparent;
    color: #000080;
    gap: 15px;
    transform: translateY(-2px);
    text-decoration: none;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9ff;
    border-radius: 35px;
    margin: 40px 0;
    display: none;
}

.no-results i {
    font-size: 5rem;
    color: #000080;
    opacity: 0.4;
    margin-bottom: 20px;
}

.no-results p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 500;
}

.no-results button {
    background: #000080;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.no-results button:hover {
    background: #ffd700;
    color: #000080;
    transform: translateY(-2px);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 70px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.2rem;
    color: #000080;
    margin-bottom: 15px;
    font-weight: 800;
}

.cta-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #000080;
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: 2px solid #000080;
}

.cta-button:hover {
    background: transparent;
    color: #000080;
    transform: translateY(-3px);
    gap: 18px;
    text-decoration: none;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .course-stats {
        gap: 12px;
    }
    
    .course-stats span {
        padding: 5px 15px;
        font-size: 0.8rem;
    }
    
    .filter-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 25px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .course-image {
        height: 180px;
    }
    
    .cta-content h2 {
        font-size: 1.6rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 40px 0 30px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    .course-stats {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .search-wrapper input {
        padding: 13px 50px 13px 45px;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 18px;
        font-size: 1rem;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
    
    .filter-group select {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .results-count {
        font-size: 0.9rem;
    }
    
    .course-content h3 {
        font-size: 1.1rem;
    }
    
    .duration, .level {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .view-details {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .cta-content h2 {
        font-size: 1.3rem;
    }
    
    .cta-content p {
        font-size: 0.9rem;
    }
    
    .no-results i {
        font-size: 3.5rem;
    }
    
    .no-results p {
        font-size: 1rem;
    }
}

/* Animation for cards */
.course-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.course-card:nth-child(1) { animation-delay: 0.05s; }
.course-card:nth-child(2) { animation-delay: 0.1s; }
.course-card:nth-child(3) { animation-delay: 0.15s; }
.course-card:nth-child(4) { animation-delay: 0.2s; }
.course-card:nth-child(5) { animation-delay: 0.25s; }
.course-card:nth-child(6) { animation-delay: 0.3s; }
.course-card:nth-child(7) { animation-delay: 0.35s; }
.course-card:nth-child(8) { animation-delay: 0.4s; }
.course-card:nth-child(9) { animation-delay: 0.45s; }
.course-card:nth-child(10) { animation-delay: 0.5s; }
.course-card:nth-child(11) { animation-delay: 0.55s; }
.course-card:nth-child(12) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}