/* Help Center Styles - Refactored for Design System */

/* Layout */
.help-container {
    display: flex;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--section-padding) 20px;
    gap: 60px;
    /* Increased gap for "Air" */
    min-height: calc(100vh - 200px);
}

/* Sidebar */
/* Sidebar Wrapper (Layout) */
.help-sidebar-wrapper {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 120px;
    /* Adjusted for header */
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 20px;
    border-right: 1px solid var(--border);
}

/* Sidebar Scrollbar */
.help-sidebar-wrapper::-webkit-scrollbar {
    width: 4px;
}

.help-sidebar-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
}

/* Inner Sidebar (Content) */
.help-sidebar {
    width: 100%;
}

/* Scrollbar styling for sidebar */
/* Scrollbar styles moved to wrapper */

.help-category {
    margin-bottom: 32px;
}

.help-category h3 {
    font-family: var(--font-family-heading, 'Cal Sans');
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.help-subcategory {
    margin-bottom: 16px;
}

.help-subcategory h4 {
    font-family: var(--font-family-base, 'Inter');
    /* Inter for readability in small sizes */
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    opacity: 0.9;
}

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

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

.help-sidebar a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    line-height: 1.5;
}

.help-sidebar a:hover {
    color: var(--primary-black);
    background-color: var(--background);
}

.help-sidebar a.active {
    color: var(--primary-black);
    background-color: var(--badge-bg);
    font-weight: 500;
}

/* Content Area */
.help-content {
    flex-grow: 1;
    min-width: 0;
}

.breadcrumbs {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-content h1 {
    font-family: var(--font-family-heading, 'Cal Sans');
    font-size: 32px;
    /* Design System H1 size */
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Help Hero (Index) */
.help-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.help-intro {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 700px;
    text-align: center;
}

/* Search Bar - Premium Component */
.help-search-container {
    position: relative;
    width: 100%;
    /* Ensure it takes full width of parent */
    margin-bottom: 60px;
}

.help-search-input {
    width: 100%;
    padding: 20px 24px;
    /* Larger padding for premium feel */
    font-size: 16px;
    font-family: var(--font-family-base, 'Inter');
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    /* Rounded pill shape */
    background-color: var(--surface);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z" stroke="%239CA3AF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 24px center;
}

.help-search-input:focus {
    outline: none;
    border-color: var(--primary-black);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.help-search-input::placeholder {
    color: #9CA3AF;
}

/* Categories Grid */
.help-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    /* Widen cards */
    gap: 32px;
    margin-bottom: 100px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-card h2 {
    font-family: var(--font-family-heading, 'Cal Sans');
    font-size: 22px;
    /* Adjusted from Design System to fit card context */
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.subcategory-section {
    margin-bottom: 32px;
    padding-bottom: 20px;
}

.subcategory-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0px;
}

.subcategory-section h3 {
    font-family: var(--font-family-base, 'Inter');
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
}

.subcategory-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategory-section li {
    margin-bottom: 12px;
}

.subcategory-section a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.6;
    transition: color 0.15s ease;
    display: block;
    position: relative;
    padding-left: 16px;
}

/* Custom bullet for links */
.subcategory-section a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background-color: var(--border);
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.subcategory-section a:hover {
    color: var(--primary-black);
}

.subcategory-section a:hover::before {
    background-color: var(--primary-black);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    text-align: left;
    padding: 8px;
}

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

.search-result-item {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background-color 0.15s ease;
}

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

.search-result-title {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 15px;
}

.search-result-path {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Article Body Typography */
.article-body {
    max-width: 800px;
    font-size: 17px;
    line-height: 1.7;
    /* "Air" rule */
    color: var(--text-secondary);
}

.article-body h2 {
    font-family: var(--font-family-heading, 'Cal Sans');
    font-size: 24px;
    margin-top: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.article-body h3 {
    font-family: var(--font-family-heading, 'Cal Sans');
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 24px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 32px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 12px;
}

.article-body img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    /* Rounded corners */
    margin: 32px 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.article-body .callout {
    background-color: var(--background);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 32px 0;
    display: flex;
    gap: 16px;
    border: 1px solid var(--border);
}

.article-body pre {
    background-color: #111827;
    /* Dark theme for code */
    color: #E5E5E5;
    padding: 24px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 32px 0;
    font-family: 'SF Mono', Consolas, Menlo, monospace;
    font-size: 14px;
    border: 1px solid #374151;
}

/* Feedback Section */
.feedback-section {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.feedback-section p {
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.feedback-section button {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    margin: 0 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.feedback-section button:hover {
    background: var(--background);
    border-color: var(--primary-black);
    color: var(--primary-black);
}

/* Responsive */
@media (max-width: 1024px) {
    .help-container {
        padding: 40px 20px;
        gap: 40px;
    }

    .help-sidebar-wrapper {
        display: none;
        /* Sidebar hidden on smaller screens as per request or responsive design */
    }
}

@media (max-width: 768px) {
    .help-container {
        flex-direction: column;
        padding: 24px 16px;
    }

    .help-sidebar-wrapper {
        display: none;
    }

    .help-content h1 {
        font-size: 32px;
    }

    .help-categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 24px;
    }
}

/* --- New Styles for Features --- */

/* Sidebar Home Link */
.help-sidebar-home-link {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.help-sidebar-home-link a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

/* Breadcrumbs Links */
.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-black);
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: var(--text-tertiary, #9CA3AF);
    margin: 0 4px;
}

/* Article Meta Top */
.article-meta-top {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    background: var(--background);
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* Search Dropdown More Results */
.search-result-more {
    display: block;
    padding: 12px 20px;
    color: var(--primary-black);
    font-weight: 500;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    text-decoration: none;
    font-size: 14px;
}

.search-result-more:hover {
    background-color: var(--background);
}

/* Full Search Results Page */
#full-search-results {
    margin-top: 40px;
    max-width: 800px;
}

.search-result-full-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

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

.search-result-full-link {
    text-decoration: none;
    display: block;
}

.search-result-full-link h2 {
    font-family: var(--font-family-base, 'Inter');
    font-size: 20px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    /* Slight tightening */
    color: var(--primary-black);
    font-weight: 600;
    transition: color 0.2s ease;
}

.search-result-full-link:hover h2 {
    color: var(--primary-black);
    text-decoration: underline;
}

.search-result-breadcrumbs {
    font-size: 14px;
    color: var(--text-secondary);
}

.no-results {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 60px;
}