/* Course Catalog Styles */

/* Search and Filter Controls */
.catalog-controls {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.search-section {
    margin-bottom: 1.5rem;
}

.search-container {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2D60EC;
}

.search-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #2D60EC 0%, #010334 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
}

.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-group select {
    padding: 0.75rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 150px;
    cursor: pointer;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-btn:hover {
    background: #5a67d8;
}

/* Featured Courses */
.featured-section {
    margin-bottom: 3rem;
}

.featured-section h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.featured-courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.featured-course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.featured-course-card::before {
    content: '⭐';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.featured-course-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, #2D60EC 0%, #667eea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.featured-course-info {
    padding: 1.5rem;
}

.featured-course-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.featured-course-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skill-tag {
    background: #f8f9ff;
    color: #2D60EC;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Categories Section */
.categories-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.categories-section h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, var(--category-color, #2D60EC) 0%, var(--category-color-light, #667eea) 100%);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-description {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* All Courses Section */
.courses-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin: 0;
}

.results-info {
    color: #666;
    font-size: 0.9rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.course-card:hover {
    border-color: #2D60EC;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(45, 96, 236, 0.15);
}

.course-thumbnail {
    height: 160px;
    background: linear-gradient(135deg, #2D60EC 0%, #667eea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    position: relative;
}

.course-level-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.course-info {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.course-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-instructor {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
}

.course-actions {
    display: flex;
    gap: 0.75rem;
}

.course-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.course-btn.primary {
    background: linear-gradient(135deg, #2D60EC 0%, #010334 100%);
    color: white;
}

.course-btn.secondary {
    background: transparent;
    color: #2D60EC;
    border: 2px solid #2D60EC;
}

.course-btn:hover {
    transform: translateY(-1px);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.clear-filters-btn {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: #2D60EC;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-filters-btn:hover {
    background: #1e4bb8;
}

/* Learning Paths */
.paths-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.paths-section h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.path-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.path-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
}

.path-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.path-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.path-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.path-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Course Details Modal */
.course-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.course-details {
    padding: 1rem;
}

.course-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.course-detail-thumbnail {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2D60EC 0%, #667eea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1rem;
}

.course-detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.course-detail-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail-sections {
    display: grid;
    gap: 2rem;
}

.detail-section {
    background: #f8f9ff;
    padding: 1.5rem;
    border-radius: 10px;
}

.detail-section h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #2D60EC;
    padding-bottom: 0.5rem;
}

.objectives-list, .skills-list {
    list-style: none;
    padding: 0;
}

.objectives-list li, .skills-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.objectives-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2D60EC;
    font-weight: bold;
}

.skills-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2D60EC;
    font-weight: bold;
}

/* Enrollment Modal */
.enroll-modal .modal-content {
    max-width: 500px;
}

.enroll-content {
    text-align: center;
    padding: 2rem;
}

.enroll-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.enroll-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.enroll-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enroll-btn.primary {
    background: linear-gradient(135deg, #2D60EC 0%, #010334 100%);
    color: white;
}

.enroll-btn.secondary {
    background: transparent;
    color: #666;
    border: 2px solid #e1e1e1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .catalog-controls {
        padding: 1rem;
    }
    
    .filter-section {
        justify-content: flex-start;
        gap: 0.75rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .filter-group select {
        min-width: 120px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .featured-courses,
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid,
    .paths-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .course-detail-meta {
        gap: 1rem;
    }
    
    .dashboard-main {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .search-container {
        max-width: 100%;
    }
    
    .course-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .enroll-actions {
        flex-direction: column;
    }
}