/* Digital Heroes SOP & Training Styles - Classic Sales Edition */

:root {
    --primary: #14B8A6;
    --primary-dark: #0F766E;
    --secondary: #06B6D4;
    --background: #0F172A;
    --surface: #1E293B;
    --surface-hover: #334155;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --danger: #EF4444;
    --success: #22C55E;
    --warning: #F59E0B;
}

/* Animation for auto-advance progress */
@keyframes progressAnim {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--surface-hover);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-top: 1.5rem;
}

p,
li {
    color: #CBD5E1;
}

ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Content Sections */
.content-section {
    background: var(--surface);
    border: 1px solid var(--surface-hover);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Feature Boxes */
.highlight-box {
    background: rgba(20, 184, 166, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.warning-box strong,
.highlight-box strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--surface-hover);
    margin: 1rem 0;
}

/* Buttons */
.nav-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    font-weight: 600;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

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

.back-btn {
    background: transparent;
    border: 1px solid var(--surface-hover);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.back-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

/* Quiz Styles */
.option-btn {
    width: 100%;
    text-align: left;
    background: var(--surface-hover);
    border: 1px solid transparent;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: #475569;
}

.option-btn.selected {
    background: rgba(20, 184, 166, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Study Guide */
.study-guide {
    background: linear-gradient(to right, rgba(15, 23, 42, 1), rgba(30, 41, 59, 1));
    border: 1px solid var(--surface-hover);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.study-guide h4 {
    color: var(--secondary);
    margin-top: 0;
}

.study-guide ul {
    margin-bottom: 0;
}

.study-guide li {
    color: var(--text-muted);
}

/* ==================== */
/* LAYOUT SYSTEM        */
/* ==================== */

.training-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.training-header {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-hover);
    flex-shrink: 0;
    gap: 12px;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(20, 184, 166, 0.3);
    transition: all 0.2s;
    flex-shrink: 0;
}

.home-link:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: var(--primary);
}

.training-header h1 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.training-header h1::before {
    content: '🎓 ';
}

.header-right {
    flex-shrink: 0;
}

.header-right p {
    margin: 0;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--surface-hover);
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Brand Logo - hidden on mobile, we use Home text instead */
.brand-logo {
    display: none;
}

/* Layout Container */
.layout-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ==================== */
/* SIDEBAR              */
/* ==================== */

.sidebar {
    width: 300px;
    min-width: 300px;
    background: var(--surface);
    border-right: 1px solid var(--surface-hover);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Progress Bar */
.progress-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--surface-hover);
    border-radius: 12px;
    padding: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Task Cards */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-card {
    padding: 12px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.task-card:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--surface-hover);
}

.task-card.current {
    background: rgba(20, 184, 166, 0.1);
    border-color: var(--primary);
}

.task-card.completed {
    opacity: 0.75;
}

.task-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.task-number {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8em;
    color: var(--text-muted);
    flex-shrink: 0;
}

.task-card.current .task-number,
.task-card.completed .task-number {
    background: var(--primary);
    color: var(--background);
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-info h3 {
    margin: 0;
    font-size: 0.85em;
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-info p {
    margin: 2px 0 0 0;
    font-size: 0.7em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-status {
    font-size: 0.9em;
    color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px 48px;
    overflow-y: auto;
    max-width: none;
}

.task-view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Sidebar Overlay (for mobile) */
.sidebar-overlay {
    display: none;
}

/* ==================== */
/* RESPONSIVE / MOBILE  */
/* ==================== */

/* Medium screens - hide certification text */
@media (max-width: 1100px) {
    .header-right {
        display: none;
    }

    .training-header h1 {
        font-size: 1.1rem;
    }
}

@media (max-width: 900px) {
    .training-header {
        padding: 0 16px;
        height: 60px;
    }

    .mobile-menu-btn {
        display: block !important;
    }

    .training-header h1 {
        font-size: 1rem;
    }

    .header-right {
        display: none;
    }

    .layout-container {
        position: relative;
    }

    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 85%;
        max-width: 320px;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 900;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .sidebar.active~.sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        padding: 20px;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 500px) {
    .training-header h1 {
        display: none;
    }

    .home-link span:last-child {
        display: none;
    }
}