/**
 * Learning Pages Styles
 * iDempiere ERP Online Learning Curriculum
 */

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.idcert-breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.idcert-breadcrumb a {
    color: #006699;
    text-decoration: none;
}

.idcert-breadcrumb a:hover {
    text-decoration: underline;
}

.idcert-breadcrumb .separator {
    margin: 0 0.5rem;
    color: #999;
}

/* ==========================================================================
   Course Catalog (Archive Page)
   ========================================================================== */

.idcert-catalog-hero {
    background: linear-gradient(135deg, #004466 0%, #006699 50%, #0088bb 100%);
    color: #fff;
    text-align: center;
    padding: 3.5rem 1.5rem;
    margin-bottom: 2rem;
}

.idcert-catalog-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #fff;
}

.idcert-catalog-hero p {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.6;
}

.idcert-catalog-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.idcert-catalog-stat {
    font-size: 0.95rem;
    opacity: 0.9;
}

.idcert-catalog-stat strong {
    font-size: 1.5rem;
    display: block;
    font-weight: 700;
}

/* Level sections */
.idcert-level-section {
    margin-bottom: 3rem;
}

.idcert-level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.idcert-level-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.idcert-level-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.idcert-level-badge--beginner { background-color: #00a32a; }
.idcert-level-badge--intermediate { background-color: #0073aa; }
.idcert-level-badge--advanced { background-color: #d63638; }
.idcert-level-badge--expert { background-color: #8b5cf6; }

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

.idcert-lesson-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.idcert-lesson-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.idcert-lesson-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #006699;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.idcert-lesson-info {
    flex: 1;
}

.idcert-lesson-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: #222;
}

.idcert-lesson-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.idcert-lesson-meta {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.idcert-lesson-meta span {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

/* ==========================================================================
   Single Lesson Page
   ========================================================================== */

.idcert-lesson-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.idcert-lesson-main {
    min-width: 0;
}

.idcert-lesson-header {
    margin-bottom: 2rem;
}

.idcert-lesson-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.idcert-lesson-header-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
}

.idcert-lesson-header-meta a {
    color: #006699;
    text-decoration: none;
}

.idcert-lesson-header-meta a:hover {
    text-decoration: underline;
}

/* Lesson content typography */
.idcert-lesson-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.idcert-lesson-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #222;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8e8e8;
}

.idcert-lesson-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.idcert-lesson-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.idcert-lesson-content code {
    background: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.idcert-lesson-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.idcert-lesson-content blockquote {
    border-left: 4px solid #006699;
    background: #f0f6fa;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.idcert-lesson-content blockquote p {
    margin: 0;
}

.idcert-lesson-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.idcert-lesson-content th,
.idcert-lesson-content td {
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    text-align: left;
}

.idcert-lesson-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Prev/Next Navigation */
.idcert-lesson-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e8e8e8;
}

.idcert-lesson-nav a {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    transition: box-shadow 0.2s ease;
}

.idcert-lesson-nav a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #222;
}

.idcert-lesson-nav .prev {
    text-align: left;
}

.idcert-lesson-nav .next {
    text-align: right;
}

.idcert-lesson-nav .nav-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.idcert-lesson-nav .nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #006699;
}

/* Sidebar Table of Contents */
.idcert-lesson-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.idcert-toc {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #e8e8e8;
}

.idcert-toc h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 1rem;
}

.idcert-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.idcert-toc-list li {
    margin-bottom: 0.35rem;
}

.idcert-toc-list a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: #444;
    text-decoration: none;
    border-radius: 4px;
    border-left: 2px solid transparent;
    transition: background 0.15s ease;
}

.idcert-toc-list a:hover,
.idcert-toc-list a.active {
    background: #e8f0f6;
    border-left-color: #006699;
    color: #006699;
}

.idcert-toc-list .current a {
    background: #e8f0f6;
    border-left-color: #006699;
    color: #006699;
    font-weight: 600;
}

/* CTA box at bottom of sidebar */
.idcert-toc-cta {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0f6fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #d0dfe8;
}

.idcert-toc-cta p {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.idcert-toc-cta .idcert-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
}

/* ==========================================================================
   Taxonomy Archive (Level/Module Listing)
   ========================================================================== */

.idcert-taxonomy-header {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #f8f9fa;
    margin-bottom: 2rem;
    border-radius: 0 0 12px 12px;
}

.idcert-taxonomy-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 0.5rem;
}

.idcert-taxonomy-header p {
    font-size: 1.05rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .idcert-lesson-container {
        grid-template-columns: 1fr;
    }

    .idcert-lesson-sidebar {
        position: static;
        order: -1;
    }

    .idcert-lesson-nav {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .idcert-catalog-hero h1 {
        font-size: 1.75rem;
    }

    .idcert-lesson-header h1 {
        font-size: 1.5rem;
    }

    .idcert-lesson-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .idcert-lesson-meta {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
