/* ==================================================
   E-LEARNING COURSE CONTENT STYLES FOR MARKED.JS
   Color Scheme: Teal/Turquoise (#49BBBD, #2E8B8B)
   ================================================== */

/* Base Typography and Container */
.course-content {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}

/* Headings */
.course-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #49BBBD;
    position: relative;
}

.course-content h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #2E8B8B;
    border-radius: 2px;
}

.course-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 40px 0 20px 0;
    padding-left: 20px;
    position: relative;
    border-left: 4px solid #49BBBD;
}

.course-content h2::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #49BBBD 0%, #2E8B8B 100%);
    border-radius: 2px;
}

.course-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 30px 0 15px 0;
    position: relative;
    padding-left: 15px;
}

.course-content h3::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #49BBBD;
    font-weight: bold;
}

.course-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #34495e;
    margin: 25px 0 12px 0;
}

.course-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin: 20px 0 10px 0;
}

.course-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #7f8c8d;
    margin: 15px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraphs */
.course-content p {
    margin: 0 0 18px 0;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

.course-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.course-content ul, 
.course-content ol {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.course-content ul li, 
.course-content ol li {
    margin: 12px 0;
    padding-left: 35px;
    position: relative;
    line-height: 1.6;
    color: #555;
}

/* First Level Unordered Lists */
.course-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #49BBBD;
    font-weight: bold;
    font-size: 14px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(73, 187, 189, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #49BBBD;
}

/* First Level Ordered Lists */
.course-content ol {
    counter-reset: custom-counter;
}

.course-content ol li {
    counter-increment: custom-counter;
}

.course-content ol li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: 5px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #49BBBD 0%, #2E8B8B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(73, 187, 189, 0.3);
}

/* Nested Lists */
.course-content ul ul, 
.course-content ol ol,
.course-content ul ol,
.course-content ol ul {
    margin: 10px 0;
    padding-left: 25px;
}

/* Second Level Lists - No Numbers/Counters */
.course-content ul ul li::before,
.course-content ol ol li::before,
.course-content ul ol li::before,
.course-content ol ul li::before {
    content: '→';
    background: rgba(73, 187, 189, 0.05);
    border: 1px solid #49BBBD;
    color: #2E8B8B;
    width: 16px;
    height: 16px;
    font-size: 12px;
    counter-increment: none;
}

/* Reset counter behavior for nested ordered lists */
.course-content ol ol {
    counter-reset: none;
}

.course-content ol ol li {
    counter-increment: none;
}

/* Third Level and Beyond */
.course-content ul ul ul li::before,
.course-content ol ol ol li::before,
.course-content ul ol ul li::before,
.course-content ol ul ol li::before,
.course-content ul ul ol li::before,
.course-content ol ol ul li::before {
    content: '•';
    background: rgba(73, 187, 189, 0.03);
    border: 1px solid rgba(73, 187, 189, 0.3);
    color: #7f8c8d;
    width: 14px;
    height: 14px;
    font-size: 10px;
}

/* Fourth Level and Beyond */
.course-content ul ul ul ul li::before,
.course-content ol ol ol ol li::before {
    content: '◦';
    background: transparent;
    border: 1px solid rgba(73, 187, 189, 0.2);
    color: #bdc3c7;
    width: 12px;
    height: 12px;
    font-size: 8px;
}

/* Links */
.course-content a {
    color: #49BBBD;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.course-content a:hover {
    color: #2E8B8B;
    border-bottom-color: #2E8B8B;
    text-decoration: none;
}

.course-content a:active {
    transform: translateY(1px);
}

/* Emphasis and Strong */
.course-content em {
    font-style: italic;
    color: #34495e;
    background: rgba(73, 187, 189, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

.course-content strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Code Elements */
.course-content code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background: #f8f9fa;
    color: #e74c3c;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.course-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
    border-left: 4px solid #49BBBD;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.course-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.5;
}

/* Blockquotes */
.course-content blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(73, 187, 189, 0.05) 0%, rgba(46, 139, 139, 0.05) 100%);
    border-left: 4px solid #49BBBD;
    border-radius: 0 8px 8px 0;
    position: relative;
    font-style: italic;
    color: #34495e;
}

.course-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: #49BBBD;
    opacity: 0.3;
    font-family: serif;
}

.course-content blockquote p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.course-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.course-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.course-content table thead {
    background: linear-gradient(135deg, #49BBBD 0%, #2E8B8B 100%);
    color: white;
}

.course-content table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-content table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    color: #555;
}

.course-content table tbody tr:hover {
    background: rgba(73, 187, 189, 0.05);
}

.course-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Horizontal Rules */
.course-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #49BBBD 50%, transparent 100%);
    margin: 40px 0;
    border-radius: 1px;
}

/* Images */
.course-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.course-content img:hover {
    transform: scale(1.02);
}

/* Task Lists (GitHub-style) */
.course-content ul.task-list {
    list-style: none;
    padding-left: 0;
}

.course-content .task-list-item {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
    padding-left: 0;
}

.course-content .task-list-item::before {
    display: none;
}

.course-content .task-list-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #49BBBD;
}

/* Definition Lists */
.course-content dl {
    margin: 20px 0;
}

.course-content dt {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.course-content dd {
    margin: 0 0 15px 20px;
    color: #555;
    padding-left: 15px;
    border-left: 2px solid #49BBBD;
}

/* Special Content Boxes */
.course-content .info-box,
.course-content .warning-box,
.course-content .success-box,
.course-content .error-box {
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
    border-left: 4px solid;
    position: relative;
}

.course-content .info-box {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: #3498db;
    color: #2c3e50;
}

.course-content .warning-box {
    background: rgba(243, 156, 18, 0.1);
    border-left-color: #f39c12;
    color: #2c3e50;
}

.course-content .success-box {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: #27ae60;
    color: #2c3e50;
}

.course-content .error-box {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: #e74c3c;
    color: #2c3e50;
}

/* Keyboard Shortcuts */
.course-content kbd {
    background: #34495e;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid #2c3e50;
}

/* Abbreviations */
.course-content abbr {
    text-decoration: underline dotted;
    cursor: help;
    color: #49BBBD;
}

/* Subscript and Superscript */
.course-content sub,
.course-content sup {
    font-size: 0.8em;
    color: #7f8c8d;
}

/* Print Styles */
@media print {
    .course-content {
        box-shadow: none;
        border-radius: 0;
    }
    
    .course-content a {
        color: #2c3e50 !important;
        text-decoration: underline !important;
    }
    
    .course-content blockquote {
        page-break-inside: avoid;
    }
    
    .course-content table {
        page-break-inside: avoid;
    }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .course-content {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .course-content h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .course-content h2 {
        font-size: 1.5rem;
        margin: 30px 0 15px 0;
        padding-left: 15px;
    }
    
    .course-content h3 {
        font-size: 1.2rem;
    }
    
    .course-content ul li,
    .course-content ol li {
        padding-left: 30px;
    }
    
    .course-content table {
        font-size: 14px;
    }
    
    .course-content table th,
    .course-content table td {
        padding: 10px 8px;
    }
    
    .course-content pre {
        padding: 15px;
        font-size: 13px;
        overflow-x: auto;
    }
    
    .course-content blockquote {
        padding: 15px 20px;
        margin: 20px 0;
    }
}

@media screen and (max-width: 480px) {
    .course-content {
        padding: 12px;
    }
    
    .course-content h1 {
        font-size: 1.7rem;
    }
    
    .course-content h2 {
        font-size: 1.3rem;
    }
    
    .course-content table {
        font-size: 12px;
    }
    
    .course-content ul li,
    .course-content ol li {
        padding-left: 25px;
    }
}