/* Help Center Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f9fafb;
    color: #1f2937;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: #2563eb;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2563eb;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f3f4f6;
}

/* Main Content */
.help-center-main {
    min-height: calc(100vh - 80px);
    padding: 3rem 0;
}

.help-center-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.help-center-header {
    text-align: center;
    margin-bottom: 4rem;
}

.help-center-header h1 {
    font-size: 3rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.help-center-header p {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Search */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-btn {
    padding: 1rem 2rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #1d4ed8;
}

/* Categories */
.categories-section {
    margin-bottom: 4rem;
}

.categories-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Articles */
.articles-section {
    margin-bottom: 4rem;
}

.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.articles-header h2 {
    font-size: 2rem;
    color: #1f2937;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.article-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-excerpt {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.loading-message {
    text-align: center;
    color: #6b7280;
    padding: 3rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* Contact Section */
.contact-section {
    margin-bottom: 4rem;
}

.contact-card {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
}

.contact-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-card p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: #2563eb;
}

.btn-primary:hover {
    background: #f3f4f6;
}

/* Article Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.article-modal-content {
    background: white;
    margin: 2rem auto;
    padding: 3rem;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #1f2937;
}

#articleContent h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

#articleContent h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#articleContent p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

#articleContent ul, #articleContent ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

#articleContent li {
    margin-bottom: 0.5rem;
}

#articleContent code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

#articleContent pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .help-center-header h1 {
        font-size: 2rem;
    }

    .help-center-header p {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .articles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .article-modal-content {
        margin: 1rem;
        padding: 2rem;
    }

    .nav-menu {
        gap: 1rem;
    }
}