/* Learning Path Details - Enhanced Design */
.paths-section {
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Path Parts with Enhanced Visual Hierarchy */
.path-part {
    margin-bottom: 4rem;
    position: relative;
}

.path-part::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        var(--primary-color),
        var(--primary-dark)
    );
    border-radius: 2px;
}

.part-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2rem;
    padding-left: 1rem;
    position: relative;
}

.part-title::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 1rem;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Enhanced Lessons Grid */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    padding-left: 1rem;
}

.lesson-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.lesson-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.lesson-card.available::before {
    /* background: var(--primary-color); */
}

.lesson-card.coming-soon::before {
    /* background: #cbd5e0; */
}

.lesson-card.available {
    border-color: #e2e8f0;
}

.lesson-card.available:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.lesson-card.coming-soon {
    opacity: 0.7;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

/* Enhanced Lesson Header */
.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.lesson-number {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.lesson-status {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.available .lesson-status {
    background: #c6f6d5;
    color: #22543d;
    box-shadow: 0 2px 4px rgba(34, 84, 61, 0.1);
}

.coming-soon .lesson-status {
    background: #fed7d7;
    color: #742a2a;
    box-shadow: 0 2px 4px rgba(116, 42, 42, 0.1);
}

/* Enhanced Content */
.lesson-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.lesson-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lesson-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Actions */
.lesson-actions {
    margin-top: auto;
}

.btn-read,
.btn-coming-soon {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-read {
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-read:hover {
    border: 1px solid var(--primary-dark);
    background: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.btn-read:active {
    transform: translateY(0);
}

.btn-coming-soon {
    background: #e2e8f0;
    color: #718096;
    cursor: not-allowed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Progress Indicator */
.path-progress-indicator {
    position: sticky;
    top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Enhanced Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    min-height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    line-height: 1.3;
    flex: 1;
    margin-right: 1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.btn-prev,
.btn-next {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-prev:hover,
.btn-next:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .path-part {
        margin-bottom: 3rem;
    }

    .path-part::before {
        display: none;
    }

    .part-title {
        padding-left: 0;
        font-size: 1.5rem;
    }

    .part-title::after {
        left: 0;
    }

    .lessons-grid {
        grid-template-columns: 1fr;
        padding-left: 0;
        gap: 1rem;
    }

    .lesson-card {
        padding: 1.25rem;
    }

    .progress-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.25rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .btn-prev,
    .btn-next {
        min-width: 100px;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .lesson-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .lesson-status {
        align-self: flex-start;
    }
}
