/* Help Center Styles */
.help-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
main.help-container {
    margin-top: 80px;  /* Add space below the fixed header */
}
h1 {
    margin-bottom: 1rem;
    color: #333;
}
.help-section {
    margin: 3rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.help-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #007AFF;
}
.help-section img:not(.inline-icon) {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #eee;
    display: block;
}
.step {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.step h3 {
    color: #333;
    margin-bottom: 1rem;
}
.note {
    background: #f8f9fa;
    padding: 1rem;
    border-left: 4px solid #007AFF;
    margin: 1rem 0;
}
.note ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.note li {
    position: relative;
    padding-left: 1.2em;
    margin: 0.5rem 0;
}
.note li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #007AFF;
}

/* TOC Styling */
.toc {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.toc h2 {
    margin-top: 0;
    border-bottom-color: #007AFF;
}
.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc li {
    margin: 0.75rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 122, 255, 0.1);
}
.toc li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.toc a {
    color: #007AFF;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 1.1rem;
    font-weight: 500;
}
.toc a:hover {
    background-color: rgba(0, 122, 255, 0.1);
    text-decoration: none;
}
.toc p {
    margin: 0.5rem 0 0 0;
    padding-left: 0.5rem;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Method sections */
.method-section {
    margin-bottom: 3rem;
    padding-top: 1rem;
}
.method-section h2 {
    margin-top: 1rem;
    padding-top: 2rem;
    position: relative;
}
.method-section h2::before {
    content: "";
    display: block;
    height: 80px; /* Fixed header height offset */
    margin-top: -80px;
    visibility: hidden;
    pointer-events: none;
}
.method-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.method-section ul li {
    margin-bottom: 0.5rem;
}

/* Help content area */
.help-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    line-height: 1.6;
}
.help-content p {
    margin: 1rem 0;
}
.help-content a {
    color: #007AFF;
    text-decoration: none;
}
.help-content a:hover {
    text-decoration: underline;
}

.inline-icon {
    width: 50px;
    height: 50px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #007AFF;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}
.back-to-top:hover {
    background-color: #0062cc;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Help topics list - keeping for reference but not using on index */
.help-topics {
    list-style: none;
    padding: 0;
}
.help-topics li {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}
.help-topics li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.help-topics h3 {
    margin-bottom: 0.5rem;
}
.help-topics h3 a {
    color: #007AFF;
    text-decoration: none;
}
.help-topics h3 a:hover {
    text-decoration: underline;
}
.help-topics p {
    color: #666;
    margin: 0;
} 

/* Responsive adjustments for small screens */
@media (max-width: 640px) {
    .help-container {
        max-width: none;
        margin: 0;
        padding: 0; /* Use full width */
    }

    main.help-container {
        margin-top: 74px; /* match global header height */
    }

    /* Ensure top-level title/intro have breathing room */
    main.help-container > h1,
    main.help-container > p {
        padding: 0 1rem;
    }

    .help-section {
        margin: 0; /* remove outer spacing */
        padding: 0; /* let content decide spacing */
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    /* Text inside help sections should not touch edges */
    .help-section > p,
    .help-section > h2,
    .help-section > h3 {
        padding: 0 1rem;
    }

    .toc {
        border-radius: 0;
        margin: 0;
        padding: 1rem;
    }

    .step {
        margin: 1.25rem 0;
        padding: 0 1rem 1rem; /* comfortable text padding */
        background: transparent;
        border-radius: 0;
    }

    /* Method section headings and text */
    .method-section h2,
    .method-section h3,
    .method-section > p,
    .method-section > ul,
    .method-section > ol {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Full-bleed screenshots on phones (exclude small inline icons) */
    .help-section img:not(.inline-icon) {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        margin: 0.75rem 0;
        margin-left: calc(50% - 50vw);
        border: none;
        border-radius: 0;
    }

    .inline-icon {
        width: 20px;
        height: 20px;
    }

    /* Anchor offset for fixed header on small screens */
    .method-section h2::before {
        height: 74px;
        margin-top: -74px;
    }
}