/* Help Page Styles - Mirrors Learn page layout */

/* Active nav link */
.nav-links a.active {
    color: #FFFFFF;
    font-weight: 600;
}

/* Help Page Body */
.help-page {
    background: #ffffff;
}

.help-page .nav {
    background: #0F172A;
}

/* Main Layout */
.help-layout {
    display: flex;
    min-height: calc(100vh - 72px);
    padding-top: 72px;
}

/* Sidebar */
.help-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fafafa;
    border-right: 1px solid #eee;
    position: fixed;
    top: 72px;
    left: 0;
    height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 40;
}

/* Sidebar Header (mobile) */
.sidebar-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.sidebar-close:hover {
    background: #eee;
    color: #111;
}

.sidebar-content {
    padding: 2rem 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.125rem;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #eee;
    color: #111;
}

.sidebar-link.active {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    border-left-color: #3b82f6;
    font-weight: 600;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 50;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.sidebar-toggle:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 39;
}

.sidebar-overlay.active {
    display: block;
}

/* Main Content */
.help-main {
    flex: 1;
    margin-left: 280px;
    min-width: 0;
}

.help-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* Content Sections */
.content-section {
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

.content-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

/* Typography */
.content-section h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.content-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin: 2rem 0 0.75rem;
}

.content-section p {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-section p strong {
    color: #111;
    font-weight: 600;
}

/* Lists */
.content-section ul {
    padding-left: 1.25rem;
    margin: 0.75rem 0 1.5rem;
}

.content-section ul li {
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.4rem;
}

.content-section ul li strong {
    color: #111;
}

/* Formula Card */
.formula-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    background: #111;
    border-radius: 10px;
    flex-wrap: wrap;
}

.formula-result {
    color: #3b82f6;
    font-size: 1.25rem;
    font-weight: 700;
}

.formula-eq {
    color: #666;
    font-size: 1.25rem;
}

.formula-input {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Help Footer */
.help-footer {
    margin-left: 280px;
}

/* Responsive */
@media (max-width: 1100px) {
    .help-sidebar {
        width: 240px;
    }
    .help-main {
        margin-left: 240px;
    }
    .help-footer {
        margin-left: 240px;
    }
}

@media (max-width: 968px) {
    .help-layout {
        padding-top: 72px;
    }

    .help-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 300px;
        max-width: 85vw;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
        background: #ffffff;
        top: 0;
        height: 100vh;
        padding-top: 72px;
    }

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

    .sidebar-header {
        display: flex;
    }

    .sidebar-content {
        padding: 1rem 1.5rem 2rem;
    }

    .sidebar-toggle {
        display: flex;
    }

    .help-main {
        margin-left: 0;
    }

    .help-content {
        padding: 2rem 1.25rem;
    }

    .help-footer {
        margin-left: 0;
    }

    .content-section h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 640px) {
    .help-content {
        padding: 1.5rem 1rem;
    }

    .content-section h1 {
        font-size: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.15rem;
    }

    .formula-card {
        flex-direction: column;
        gap: 0.25rem;
        padding: 1.25rem;
    }

    .formula-result,
    .formula-eq,
    .formula-input {
        font-size: 1.1rem;
    }
}
