/* Course System Styles */

:root {
    --primary-color: #071A3D;
    --secondary-color: #0d6efd;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f7f8fc;
    --dark-color: #2c3e50;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(7, 26, 61, 0.1);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashboard-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.stat-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, var(--info-color), #00bcd4);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.stat-content p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* Course Card in Dashboard */
.enrolled-course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.enrolled-course-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Newly enrolled course highlight */
.enrolled-course-card.newly-enrolled {
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
    animation: pulse-border 2s ease-in-out 3;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(13, 110, 253, 0.6);
    }
}

.enrolled-course-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.enrolled-course-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.enrolled-course-header p {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.enrolled-course-body {
    padding: 20px;
    flex-grow: 1;
}

.enrolled-course-body p {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.course-description-summary {
    color: #556171 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

/* Course Details Grid */
.course-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.course-detail-item {
    text-align: center;
    padding: 10px 0;
}

.course-detail-item small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.course-detail-item strong {
    display: block;
    font-size: 16px;
    color: var(--primary-color);
    margin-top: 5px;
}

.progress-section {
    margin-bottom: 15px;
}

.progress-section label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    display: block;
}

.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

.enrolled-course-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.enrolled-course-footer button {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue {
    background: var(--secondary-color);
    color: white;
    flex: 1.5;
}

.btn-continue:hover {
    background: #0b5ed7;
}

.btn-view-certificate {
    background: var(--success-color);
    color: white;
}

.btn-view-certificate:hover {
    background: #218838;
}

.btn-withdraw {
    background: var(--danger-color);
    color: white;
}

.btn-withdraw:hover {
    background: #c82333;
}

/* Enrollment Success Alert */
.enrollment-success-alert {
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #d4edda 0%, #e8f5e9 100%);
    border-left: 4px solid var(--success-color);
    margin-bottom: 24px;
    animation: slideDown 0.4s ease;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.enrollment-success-alert strong {
    color: var(--success-color);
}

/* Enrollment Success Card */
.enrollment-success-card {
    background: linear-gradient(135deg, #e7f5ff 0%, #f0f9ff 100%);
    border: 2px solid var(--secondary-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.15);
    animation: slideDown 0.5s ease;
}

.enrollment-success-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.enrollment-success-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), #0b5ed7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.enrollment-success-text {
    flex: 1;
}

.enrollment-success-text h4 {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.enrollment-success-text h4 strong {
    color: var(--secondary-color);
}

.enrollment-success-text p {
    color: #556171;
    font-size: 14px;
    margin-bottom: 10px;
}

.course-name-highlighted {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.course-meta-success {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.course-meta-success i {
    color: var(--secondary-color);
    font-weight: 600;
}

.course-description-highlight {
    background: white;
    padding: 12px;
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 13px;
    font-style: italic;
    margin: 15px 0;
}

.tips-text {
    background: #fff9e6;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
    border-left: 3px solid #ffc107;
    margin: 0;
}

.tips-text i {
    color: #ffc107;
}

/* Certificate Card */
.certificate-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid #ffc107;
}

.certificate-card h3 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.certificate-card p {
    color: #6b7280;
    font-size: 14px;
    margin: 5px 0;
}

.certificate-badge {
    display: inline-block;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 50px;
    margin-bottom: 20px;
}

/* Lesson Item */
.lesson-item {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item:hover {
    background: #f7f8fc;
}

.lesson-item.completed {
    background: #f0fdf4;
}

.lesson-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lesson-item.completed .lesson-checkbox {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.lesson-item:not(.completed):hover .lesson-checkbox {
    border-color: var(--secondary-color);
}

.lesson-content h6 {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 4px 0;
    font-size: 15px;
}

.lesson-content p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.lesson-content {
    flex-grow: 1;
}

/* Task Item Styles */
.task-item {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background: #fff9e6;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.task-title {
    flex: 1;
}

.task-title h6 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.task-title small {
    line-height: 1.5;
}

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    min-width: 200px;
}

.task-meta .badge {
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
}

/* Quiz Section */
.quiz-question {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
}

.quiz-question h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

.quiz-option {
    background: #f7f8fc;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option input[type="radio"] {
    margin-right: 10px;
}

.quiz-option:hover {
    background: #e9ecef;
    border-color: var(--secondary-color);
}

.quiz-option.selected {
    background: #e7f3ff;
    border-color: var(--secondary-color);
}

.quiz-option.correct {
    background: #dcfce7;
    border-color: var(--success-color);
}

.quiz-option.incorrect {
    background: #fee2e2;
    border-color: var(--danger-color);
}

/* Quiz Results */
.quiz-result {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.quiz-result.passed {
    border-top: 4px solid var(--success-color);
}

.quiz-result.failed {
    border-top: 4px solid var(--danger-color);
}

.quiz-result h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.quiz-result p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 20px;
}

.quiz-result-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 20px 0;
}

.quiz-result-details {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    flex-wrap: wrap;
}

.quiz-result-detail {
    text-align: center;
    margin: 10px;
}

.quiz-result-detail-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.quiz-result-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 5px;
}

/* Certificate Display */
.certificate-display {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe8cc 100%);
    border: 3px solid #ffc107;
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certificate-display::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
}

.certificate-display h2 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.certificate-display h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
    font-family: 'Georgia', serif;
}

.certificate-line {
    width: 200px;
    height: 2px;
    background: #ffc107;
    margin: 20px auto;
}

.certificate-info {
    margin: 30px 0;
    font-size: 16px;
    color: #333;
}

.certificate-footer {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #ffc107;
}

.certificate-signature {
    text-align: center;
}

.certificate-signature-line {
    width: 150px;
    height: 2px;
    background: #333;
    margin: 10px auto;
}

.certificate-signature-label {
    font-size: 12px;
    color: #666;
}

/* Enrollment Modal */
.enrollment-modal {
    backdrop-filter: blur(2px);
}

.enrollment-modal-content {
    border-radius: 12px;
    border: none;
}

.enrollment-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px 12px 0 0;
}

.enrollment-modal-header .modal-title {
    font-weight: 700;
    font-size: 20px;
}

.btn-enroll-modal {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-enroll-modal:hover {
    background: #0b5ed7;
    color: white;
}

/* Status Badges */
.badge-completed {
    background: var(--success-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-in-progress {
    background: var(--info-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-not-started {
    background: #6b7280;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Requirement Item */
.requirement-item {
    padding: 12px 16px;
    border-left: 4px solid var(--secondary-color);
    background: #f0f4ff;
    margin-bottom: 10px;
    border-radius: 4px;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.requirement-item p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* Learning Objectives */
.learning-objective-item {
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.learning-objective-icon {
    width: 24px;
    height: 24px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
}

.learning-objective-text {
    flex: 1;
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    gap: 0;
}

.nav-tabs .nav-link {
    border: none;
    color: #6b7280;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: #e9ecef;
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.tab-content {
    padding: 0;
}

.tab-pane {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Learning Objectives Container */
.learning-objectives {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Requirements List */
.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.requirement-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.requirement-item:last-child {
    border-bottom: none;
}

.requirement-item i {
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 30px 20px;
    }

    .dashboard-header h1 {
        font-size: 1.8rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }

    .certificate-display {
        padding: 30px 20px;
    }

    .certificate-display h1 {
        font-size: 32px;
    }

    .enrolled-course-footer {
        flex-direction: column;
    }

    .enrolled-course-footer button {
        width: 100%;
    }

    .quiz-result-details {
        flex-direction: column;
    }

    .quiz-result-score {
        font-size: 36px;
    }

    /* Enrollment Success Card Mobile */
    .enrollment-success-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .enrollment-success-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .enrollment-success-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin: 0 auto;
    }

    .course-meta-success {
        justify-content: center;
    }

    .enrollment-success-text h4 {
        font-size: 18px;
    }

    .course-name-highlighted {
        font-size: 16px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lesson-item {
    animation: slideIn 0.3s ease forwards;
}

.lesson-item:nth-child(1) {
    animation-delay: 0.05s;
}

.lesson-item:nth-child(2) {
    animation-delay: 0.1s;
}

.lesson-item:nth-child(3) {
    animation-delay: 0.15s;
}

.lesson-item:nth-child(4) {
    animation-delay: 0.2s;
}

.lesson-item:nth-child(5) {
    animation-delay: 0.25s;
}
