/* Help Center Styles */
:root {
    --help-primary: #6d28d9;
    --help-secondary: #2ecc71;
    --help-text: #1f2937;
    --help-bg: #ffffff;
    --help-border: #e5e7eb;
}

body.dark-mode {
    --help-text: #e5e7eb;
    --help-bg: #1e293b;
    --help-border: #334155;
}

/* Hero Section */
.help-hero {
    background: linear-gradient(135deg, var(--help-primary) 0%, #5b21b6 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.help-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.help-search-box {
    max-width: 600px;
    margin: 30px auto 0;
    position: relative;
}

.help-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.help-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--help-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

/* Search Results */
.help-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--help-bg);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

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

.help-search-result {
    padding: 15px 20px;
    border-bottom: 1px solid var(--help-border);
    cursor: pointer;
    transition: background 0.2s;
}

.help-search-result:hover {
    background: rgba(109, 40, 217, 0.05);
}

.help-search-result h4 {
    margin: 0 0 5px;
    color: var(--help-text);
    font-size: 1rem;
}

.help-search-result p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.help-search-result .category-badge {
    display: inline-block;
    background: var(--help-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 5px;
}

/* Category Grid */
.help-categories {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.help-category-card {
    background: var(--help-bg);
    border: 2px solid var(--help-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.help-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(109, 40, 217, 0.15);
    border-color: var(--help-primary);
}

.help-category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.help-category-card h3 {
    margin: 0 0 10px;
    color: var(--help-text);
    font-size: 1.25rem;
}

.help-category-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Article List */
.help-articles {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.help-article-item {
    background: var(--help-bg);
    border: 1px solid var(--help-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.help-article-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.help-article-item h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.help-article-item h3 a {
    color: var(--help-text);
    text-decoration: none;
}

.help-article-item h3 a:hover {
    color: var(--help-primary);
}

.help-article-excerpt {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Single Article */
.help-article-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--help-bg);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.help-article-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--help-text);
}

.help-article-content h2 {
    font-size: 1.75rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--help-text);
    border-bottom: 2px solid var(--help-primary);
    padding-bottom: 10px;
}

.help-article-content h3 {
    font-size: 1.25rem;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--help-text);
}

.help-article-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--help-text);
}

.help-article-content ul,
.help-article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.help-article-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Table of Contents */
.help-toc {
    background: rgba(109, 40, 217, 0.05);
    border-left: 4px solid var(--help-primary);
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
}

.help-toc h4 {
    margin: 0 0 15px;
    color: var(--help-text);
}

.help-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-toc li {
    margin-bottom: 8px;
}

.help-toc a {
    color: var(--help-primary);
    text-decoration: none;
    font-weight: 500;
}

.help-toc a:hover {
    text-decoration: underline;
}

/* Terms Page */
.terms-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: var(--help-bg);
    border-radius: 16px;
    line-height: 1.8;
}

.terms-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--help-text);
}

.terms-updated {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 30px;
}

.terms-content h2 {
    font-size: 1.75rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--help-text);
}

.terms-content h3 {
    font-size: 1.25rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--help-text);
}

/* Responsive */
@media (max-width: 1400px) {

    .help-categories,
    .help-articles {
        max-width: 95%;
    }
}

@media (max-width: 1366px) {
    .help-categories {
        grid-template-columns: repeat(3, 1fr);
        max-width: 90%;
    }
}

@media (max-width: 1024px) {
    .help-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .help-hero h1 {
        font-size: 2rem;
    }

    .help-categories {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .help-articles {
        padding: 0 15px;
    }

    .help-article-content,
    .terms-content {
        padding: 20px;
        margin: 20px 15px;
    }
}

/* Hide WordPress default author/date metadata */
.help-article-item .entry-meta,
.help-article-content .entry-meta,
.single-td_help_article .entry-meta,
.archive .entry-meta,
.posted-on,
.byline,
.entry-footer {
    display: none !important;
}