/* Courses Page - Modern & Appealing */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: white;
}

.page-header p {
    font-size: 1.1rem;
    color: white;
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-card.enrolled::before { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.stat-card.completed::before { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.progress::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.score::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-card.enrolled .stat-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-card.completed .stat-icon { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.progress .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.score .stat-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

/* Section Headers */
.courses-section,
.learning-path-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #1f2937;
    font-weight: 700;
}

.section-header p {
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.course-header {
    background: #f8fafc;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.course-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-badge.in-progress {
    background: #fef3c7;
    color: #d97706;
}

.course-badge.completed {
    background: #d1fae5;
    color: #059669;
}

.course-badge.not-started {
    background: #e5e7eb;
    color: #6b7280;
}

.course-content {
    padding: 2rem;
}

.course-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.course-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-meta i {
    color: #3b82f6;
}

/* Progress */
.course-progress {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.course-completion,
.course-schedule {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.completion-info,
.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.completion-date,
.completion-score {
    color: #059669;
    font-weight: 600;
}

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

.course-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.02);
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* Learning Path */
.learning-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.path-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 150px;
    text-align: center;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
}

.path-step.completed .step-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.path-step.current .step-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    animation: pulse 2s ease-in-out infinite;
}

.path-step:not(.completed):not(.current) .step-icon {
    background: #e5e7eb;
    color: #9ca3af;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.875rem;
    color: #6b7280;
}

.path-connector {
    width: 50px;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
}

.path-connector.completed {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .course-actions {
        flex-direction: column;
    }
    
    .learning-path {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .path-connector {
        width: 3px;
        height: 30px;
    }
}

/* Enhanced Course Cards - Database Fields */
.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    background: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
}

.course-meta i {
    color: var(--primary-color, #3b82f6);
    font-size: 0.875rem;
}

.course-price {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    font-weight: 600 !important;
}

.course-price i {
    color: white !important;
}

/* Course Schedule */
.course-schedule {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.schedule-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
}

.schedule-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    font-weight: 500;
}

.schedule-info i {
    color: #3b82f6;
}

/* Progress Details */
.progress-details {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.progress-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Course Completion */
.course-completion {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    border-left: 4px solid #10b981;
}

.completion-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.completion-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #065f46;
    font-weight: 500;
}

.certificate-ready {
    color: #059669 !important;
    font-weight: 600 !important;
}

.certificate-ready i {
    color: #10b981;
}

/* Course Info for Available Courses */
.course-info {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #fefce8, #fef3c7);
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.course-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #92400e;
    font-weight: 500;
}

.course-available i,
.course-capacity i {
    color: #f59e0b;
}

/* Enhanced Course Icons */
.course-image i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--primary-dark, #1d4ed8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

/* Course Status Badges Enhanced */
.course-badge.in-progress {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    animation: pulse-glow 2s ease-in-out infinite;
}

.course-badge.completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

.course-badge.not-started {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
        transform: scale(1.02);
    }
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .course-meta {
        gap: 0.5rem;
    }
    
    .course-meta span {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .schedule-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .progress-details {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}