/* ===========================
   MODULE SPECIFIC STYLES
   =========================== */

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-light);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb .separator {
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Module Header */
.module-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
}

.module-title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.module-icon-large {
    font-size: 4rem;
}

.module-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.module-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.module-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .stat-icon {
    font-size: 2rem;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Content Grid */
.module-content {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
}

.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

/* Sidebar */
.sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 2rem;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.section-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-icon {
    font-size: 1.2rem;
}

.lesson-list {
    list-style: none;
    padding: 0;
}

.lesson-list li {
    margin-bottom: 0.5rem;
}

.lesson-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.lesson-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.lesson-link.active {
    background: var(--primary-color);
    color: white;
}

.lesson-link .lesson-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lesson-link.quiz {
    border-left: 3px solid var(--warning-color);
}

.lesson-link.flashcard {
    border-left: 3px solid #8b5cf6;
}

.lesson-link.case {
    border-left: 3px solid var(--success-color);
}

.lesson-link.download {
    border-left: 3px solid #06b6d4;
}

/* Main Section */
.main-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.welcome-card {
    max-width: 900px;
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.welcome-card > p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Objectives */
.objectives {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.objectives h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.objectives ul {
    list-style: none;
    padding: 0;
}

.objectives li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-dark);
}

.objectives li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Getting Started */
.getting-started {
    margin-bottom: 2rem;
}

.getting-started h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.start-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.start-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-md);
}

.start-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.start-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.start-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.start-card p {
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Tips Section */
.tips-section {
    margin-bottom: 2rem;
}

.tips-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tip-card {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
}

.tip-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.tip-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.tip-card strong {
    color: var(--text-dark);
}

/* Progress Section */
.progress-section {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
}

.progress-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #34d399);
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Module Footer */
.module-footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.module-footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.module-footer a:hover {
    opacity: 0.8;
}

.module-footer p {
    opacity: 0.8;
    margin: 0.5rem 0;
}

/* Lesson Page Styles */
.lesson-content {
    max-width: 800px;
    margin: 0 auto;
}

.lesson-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.lesson-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.lesson-body h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.lesson-body h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.lesson-body p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.lesson-body ul,
.lesson-body ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.lesson-body li {
    margin-bottom: 0.5rem;
}

.lesson-body strong {
    color: var(--primary-color);
    font-weight: 600;
}

.lesson-body code {
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.lesson-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

/* Navigation buttons */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-button:hover {
    background: var(--secondary-color);
}

.nav-button.prev {
    margin-right: auto;
}

.nav-button.next {
    margin-left: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-sticky {
        position: relative;
        top: 0;
    }
    
    .module-title-section {
        flex-direction: column;
        text-align: center;
    }
    
    .module-header h1 {
        font-size: 2rem;
    }
    
    .module-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .start-cards {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}
