/* Learn Page Styles - Minimalist */

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

/* Learn Page Body */
.learn-page {
    background: #ffffff;
}

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

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

/* Sidebar */
.learn-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 */
.learn-main {
    flex: 1;
    margin-left: 280px;
    min-width: 0;
}

.learn-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;
}

/* Simple Table */
.simple-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
}

.simple-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 0.95rem;
}

.simple-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #222;
}

.simple-table tr.highlight {
    background: #111;
}

.simple-table tr.highlight td {
    color: #fff;
    border-bottom-color: #333;
    font-weight: 600;
}

.simple-table tr.highlight td:last-child {
    color: #3b82f6;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 1.5rem;
    margin: 1.25rem 0;
    flex-wrap: wrap;
}

.stats-row > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    font-weight: 600;
}

.stat-val {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #3b82f6;
}

/* Content CTA */
.content-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: #111;
    border-radius: 12px;
    color: white;
    margin-top: 2rem;
}

.content-cta h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.content-cta p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.content-cta .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.content-cta .store-badge img {
    height: 44px;
}

/* Learn Footer */
.learn-footer {
    margin-left: 280px;
}

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

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

    .learn-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;
    }

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

    .sidebar-header {
        display: flex;
    }

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

    .sidebar-toggle {
        display: flex;
    }

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

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

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

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

    .stats-row {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .learn-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;
    }

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

    .content-cta h2 {
        font-size: 1.3rem;
    }

    .stats-row {
        flex-direction: column;
        gap: 0.75rem;
    }
}
