/* Help Center Styles */

/* Help Header */
.help-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.help-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.help-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.help-tagline {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Search */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

#help-search {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#help-search:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

#help-search::placeholder {
    color: var(--text-light);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-alt);
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-category {
    font-size: 0.85rem;
    color: var(--text-light);
}

.search-result-snippet {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.search-result-snippet mark {
    background: rgba(230, 81, 0, 0.2);
    color: var(--text);
    padding: 0 2px;
    border-radius: 2px;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.category-card {
    display: block;
    padding: 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-accent);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.category-card h2 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* Help Content */
.help-content {
    padding-bottom: 3rem;
}

/* Help Categories */
.help-category {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
}

.help-category > h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    position: relative;
    padding-left: 0;
}

.help-category > h2::before {
    content: none;
}

/* Articles */
.help-article {
    margin-bottom: 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.help-article h3 {
    font-size: 1rem;
    padding: 1rem 1.25rem;
    margin: 0;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}

.help-article h3:hover {
    background: rgba(0, 0, 0, 0.03);
}

.help-article h3::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
    transition: transform 0.2s;
}

.help-article.expanded h3::after {
    content: '−';
}

.article-content {
    display: none;
    padding: 0 1.25rem 1.25rem;
    color: var(--text-light);
    line-height: 1.7;
}

.help-article.expanded .article-content {
    display: block;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: var(--text);
}

.article-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.article-content em {
    color: var(--text-light);
}

/* CTA Section */
.help-cta {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.help-cta h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.help-cta p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--brand-dark);
    color: var(--text-on-dark);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 600px) {
    .help-page {
        padding: 0 1.5rem;
    }

    .help-header {
        padding: 2rem 0 1.5rem;
    }

    .help-header h1 {
        font-size: 1.5rem;
    }

    .help-tagline {
        font-size: 1rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .category-card {
        padding: 1.25rem;
    }

    .category-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .help-category {
        padding: 2rem 0 1.5rem;
    }

    .help-category > h2 {
        font-size: 1.25rem;
    }

    .help-article h3 {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .article-content {
        padding: 0 1rem 1rem;
    }

    .search-results {
        max-height: 300px;
    }
}

/* Print styles */
@media print {
    .search-container,
    .categories-grid,
    .back-to-top,
    header,
    footer {
        display: none !important;
    }

    .help-article {
        break-inside: avoid;
    }

    .help-article.expanded .article-content {
        display: block;
    }

    .help-article h3::after {
        display: none;
    }
}
