/* Learning Page Specific Styles */

.course-hero {
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.metrc-hero .hero-overlay {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    opacity: 0.9;
}

.oarrs-hero .hero-overlay {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    opacity: 0.9;
}

.orc-3796-hero .hero-overlay {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    opacity: 0.9;
}

.orc-3780-hero .hero-overlay {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    opacity: 0.9;
}

.best-practices-hero .hero-overlay {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    opacity: 0.9;
}

.dcc-updates-hero .hero-overlay {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    opacity: 0.9;
}

.audit-prep-hero .hero-overlay {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    opacity: 0.9;
}

.inventory-hero .hero-overlay {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    opacity: 0.9;
}

.security-hero .hero-overlay {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    opacity: 0.9;
}

.packaging-hero .hero-overlay {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    opacity: 0.9;
}

.record-keeping-hero .hero-overlay {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    opacity: 0.9;
}

.course-hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.course-hero .course-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 800px;
    margin-bottom: 2rem;
}

.breadcrumb {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.course-meta {
    display: flex;
    gap: 2rem;
    color: white;
}

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

/* Learning Content Layout */
.learning-content {
    padding: 3rem 0;
    background: var(--bg-light);
    min-height: 100vh;
}

.content-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    flex-shrink: 0;
}

.progress-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.progress-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

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

.module-nav {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.module-nav h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.module-nav ol {
    list-style: none;
    counter-reset: module-counter;
}

.module-nav li {
    counter-increment: module-counter;
    margin-bottom: 0.75rem;
}

.module-link {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 2rem;
}

.module-link::before {
    content: counter(module-counter);
    position: absolute;
    left: 0.5rem;
    width: 20px;
    height: 20px;
    background: var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.module-link:hover {
    background: var(--bg-light);
}

.module-link.active {
    background: var(--gradient-2);
    color: white;
}

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

.module-link.completed::before {
    content: '✓';
    background: var(--accent-color);
    color: white;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow-x: auto;
}

.module {
    margin-bottom: 4rem;
}

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

.module h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.module h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-dark);
}

.module-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.learning-objectives {
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(37, 99, 235, 0.05) 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.learning-objectives h3 {
    margin-top: 0;
}

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

.learning-objectives li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.learning-objectives li::before {
    content: '🎯';
    position: absolute;
    left: 0;
}

.module-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.module-content p {
    margin-bottom: 1.5rem;
}

.module-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

/* Content Boxes */
.info-box,
.warning-box,
.success-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.info-box {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
}

.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #dc2626;
}

.success-box {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-color);
}

.info-box h4,
.warning-box h4,
.success-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Interface Guide */
.interface-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.interface-section {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.interface-section:hover {
    transform: translateY(-3px);
}

.interface-section h4 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Terminology List */
.terminology-list {
    margin: 2rem 0;
}

.terminology-list dt {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1rem;
}

.terminology-list dd {
    margin-left: 0;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Practice Exercise */
.practice-exercise {
    background: var(--gradient-2);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.practice-exercise h3 {
    color: white;
    margin-top: 0;
}

.practice-exercise ol {
    margin-bottom: 0;
}

/* Tables - Apply to ALL tables in learning content */
.module-content table,
.permissions-table,
.adjustment-table,
.comparison-table,
.limits-table,
.products-table,
.feature-table,
.metrics-table,
.pitfalls-table,
.camera-coverage,
.scenario-responses,
.priority-table,
.issues-table,
.retention-schedule,
.audit-schedule,
.kpi-table,
.tax-table,
.reports-table,
.reporting-table,
.benchmark-table,
.raci-matrix {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

/* Table headers */
.module-content table th,
.permissions-table th,
.adjustment-table th {
    background: var(--bg-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

/* Table cells */
.module-content table td,
.permissions-table td,
.adjustment-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

/* Remove border from last row */
.module-content table tr:last-child td,
.permissions-table tr:last-child td,
.adjustment-table tr:last-child td {
    border-bottom: none;
}

/* Zebra striping for better readability */
.module-content table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Hover effect */
.module-content table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Responsive tables */
@media (max-width: 768px) {
    .module-content table {
        font-size: 0.875rem;
    }
    
    .module-content table th,
    .module-content table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Process Flow */
.process-flow {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.process-step {
    flex: 1;
    min-width: 200px;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.process-step::after {
    content: '→';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
}

.process-step:last-child::after {
    display: none;
}

.process-step h4 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Additional table styles for specific content */
.culture-metrics table,
.training-methods table,
.calendar table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

/* Do-Don't comparison tables */
.do-dont-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.do-column, .dont-column {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.do-column h5 {
    color: var(--accent-color);
    margin-top: 0;
}

.dont-column h5 {
    color: #dc2626;
    margin-top: 0;
}

/* Severity level styling */
.severity-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.level {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.level.critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: #dc2626;
}

.level.major {
    background: rgba(245, 158, 11, 0.1);
    border-color: #84cc16;
}

.level.minor {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist li::before {
    content: '☐';
    position: absolute;
    left: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.checklist li.completed::before {
    content: '☑';
    color: var(--accent-color);
}

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

/* Resources Section */
.resources-section {
    margin-top: 4rem;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.resource-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-3px);
}

.resource-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

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

.resource-card li {
    margin-bottom: 0.75rem;
}

.resource-card a {
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.resource-card a::before {
    content: '📄';
    margin-right: 0.5rem;
}

.resource-card a:hover {
    color: var(--primary-color);
}

/* Package Types Grid */
.package-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.package-type {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
}

.package-type h4 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Specific styling for nested content structures */
.culture-pillars,
.sop-categories,
.training-phases,
.security-layers,
.incident-types,
.qa-framework .component-grid,
.tech-stack,
.feedback-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pillar,
.sop-category,
.phase,
.layer,
.incident-category,
.component,
.tech-category,
.channel {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
}

/* Do/Don't styling for inline comparisons */
.do-dont {
    margin: 0.5rem 0;
}

.do-dont .do,
.do-dont .dont {
    display: block;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
}

.do-dont .do {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--accent-color);
}

.do-dont .dont {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #dc2626;
}

/* Case study styling */
.case-studies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.case-study {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.case-study h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.case-study p {
    margin: 0.5rem 0;
}

/* Final thoughts styling */
.final-thoughts {
    background: var(--gradient-2);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.final-thoughts h4 {
    color: white;
    margin-top: 0;
}

.final-thoughts p {
    color: rgba(255, 255, 255, 0.95);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .module-nav {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .course-hero h1 {
        font-size: 2rem;
    }
    
    .course-hero .course-description {
        font-size: 1.125rem;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .process-flow {
        flex-direction: column;
    }
    
    .process-step::after {
        content: '↓';
        right: 50%;
        top: auto;
        bottom: -1rem;
        transform: translateX(50%);
    }
    
    .interface-guide,
    .package-types {
        grid-template-columns: 1fr;
    }
}