/**
 * EduDigital LMS Frontend Styles
 */

.edudigital-course {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.course-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.course-header h1 {
    margin: 0 0 15px 0;
    font-size: 32px;
}

.course-header p {
    font-size: 18px;
    opacity: 0.9;
}

.course-progress-bar {
    background: #e0e0e0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.course-progress-fill {
    background: #4caf50;
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.lessons-container {
    display: grid;
    gap: 20px;
}

.lesson-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
}

.lesson-card.locked {
    opacity: 0.6;
    background: #f5f5f5;
}

.lesson-card.unlocked {
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.lesson-card.completed {
    border-color: #4caf50;
    background: #f1f8f4;
}

.lesson-card:hover:not(.locked) {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.lesson-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.lesson-title {
    font-size: 22px;
    margin: 0;
    display: flex;
    align-items: center;
}

.lesson-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.lesson-status.locked {
    background: #ccc;
    color: #666;
}

.lesson-status.unlocked {
    background: #ffc107;
    color: #333;
}

.lesson-status.completed {
    background: #4caf50;
    color: #fff;
}

.lesson-content {
    margin: 20px 0;
    line-height: 1.8;
}

.lesson-video {
    margin: 20px 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.lesson-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.lesson-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.lesson-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lesson-btn-primary {
    background: #2271b1;
    color: #fff;
}

.lesson-btn-primary:hover:not(:disabled) {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(34, 113, 177, 0.3);
}

.lesson-btn-success {
    background: #4caf50;
    color: #fff;
}

.lesson-btn-success:hover:not(:disabled) {
    background: #388e3c;
}

/* Test Section */
.lesson-test {
    background: #f9f9f9;
    border: 2px solid #2271b1;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.test-question {
    margin: 20px 0;
}

.test-question h4 {
    margin-bottom: 10px;
}

.test-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-option {
    padding: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.test-option:hover {
    border-color: #2271b1;
    background: #f0f7ff;
}

.test-option input[type="radio"] {
    margin-right: 10px;
}

/* Certificate */
.certificate-section {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 10px;
    color: #fff;
    margin: 30px 0;
}

.certificate-section h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
}

.download-certificate-btn {
    padding: 15px 40px;
    background: #fff;
    color: #19547b;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.download-certificate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* My Courses Page */
.my-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.course-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

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

.course-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
}

.course-card-body {
    padding: 20px;
}

.course-card-footer {
    padding: 15px 20px;
    background: #f5f5f5;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .course-header {
        padding: 25px;
    }
    
    .course-header h1 {
        font-size: 24px;
    }
    
    .lesson-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .lesson-actions {
        flex-direction: column;
    }
    
    .lesson-btn {
        width: 100%;
    }
    
    .my-courses-grid {
        grid-template-columns: 1fr;
    }
}
