/* ========== Help Layout ========== */
.help-layout {
    display: flex;
    min-height: calc(100vh - 120px);
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== Sidebar ========== */
.help-sidebar {
    width: 280px;
    min-width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-category {
    margin-bottom: 2px;
}

.sidebar-cat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #495057;
    text-align: left;
    transition: background 0.2s;
}

.sidebar-cat-btn:hover {
    background: #e9ecef;
}

.sidebar-cat-btn.active {
    background: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

.sidebar-cat-btn .arrow {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.sidebar-cat-btn.active .arrow {
    transform: rotate(180deg);
}

.sidebar-articles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.sidebar-articles.open {
    display: block;
}

.sidebar-articles li a {
    display: block;
    padding: 8px 20px 8px 45px;
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.sidebar-articles li a:hover {
    color: #0d6efd;
    background: #f1f3f5;
}

.sidebar-articles li a.active {
    color: #0d6efd;
    background: #e7f1ff;
    border-left-color: #0d6efd;
    font-weight: 500;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

.switch-link {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.switch-link:hover {
    text-decoration: underline;
}

/* ========== Content Area ========== */
.help-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    max-width: 900px;
}

/* ========== Search Hero ========== */
.help-hero {
    text-align: center;
    padding: 20px 0 30px;
}

.help-hero h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
}

.hero-sub {
    color: #6c757d;
    margin-bottom: 20px;
}

.help-search-form .input-group {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.help-search-form .form-control {
    border: 1px solid #dee2e6;
    border-right: none;
}

.help-search-form .form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
}

/* ========== Sections ========== */
.content-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #343a40;
}

/* ========== Popular Grid ========== */
.popular-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.popular-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.popular-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13,110,253,0.1);
}

.popular-icon {
    width: 44px;
    height: 44px;
    background: #e7f1ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #0d6efd;
    flex-shrink: 0;
}

.popular-cat {
    font-size: 0.75rem;
    color: #0d6efd;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.popular-title {
    font-size: 0.9rem;
    color: #212529;
    font-weight: 500;
}

/* ========== Category Overview ========== */
.category-overview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.overview-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.overview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.overview-header i {
    font-size: 1.2rem;
    color: #0d6efd;
}

.overview-header h5 {
    margin: 0;
    font-size: 1.05rem;
    flex: 1;
}

.overview-header .badge {
    background: #e9ecef;
    color: #6c757d;
    font-weight: 500;
}

.overview-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.overview-links {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 20px;
}

.overview-links li {
    margin-bottom: 6px;
    break-inside: avoid;
}

.overview-links li a {
    font-size: 0.85rem;
    color: #495057;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.overview-links li a i {
    font-size: 0.6rem;
    color: #adb5bd;
}

.overview-links li a:hover {
    color: #0d6efd;
}

/* ========== Quick Links (Author) ========== */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.quick-link-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13,110,253,0.1);
    transform: translateY(-2px);
}

.quick-link-card i {
    font-size: 1.5rem;
    color: #0d6efd;
}

.quick-link-card span {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
}

/* ========== Search Results ========== */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.result-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13,110,253,0.08);
}

.result-icon {
    font-size: 1.2rem;
    color: #0d6efd;
    flex-shrink: 0;
}

.result-body {
    flex: 1;
}

.result-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.result-meta {
    font-size: 0.8rem;
    color: #adb5bd;
    margin-bottom: 4px;
    display: flex;
    gap: 12px;
}

.result-preview {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.result-arrow {
    color: #adb5bd;
    flex-shrink: 0;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #adb5bd;
}

.empty-state i {
    margin-bottom: 15px;
}

.empty-state h5 {
    color: #6c757d;
}

/* ========== Article Detail ========== */
.help-article {
    max-width: 780px;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: #6c757d;
}

.article-breadcrumb a {
    color: #0d6efd;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.article-breadcrumb i {
    font-size: 0.6rem;
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.article-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #adb5bd;
}

.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #343a40;
}

.article-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.article-content th, .article-content td {
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.article-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* ========== Article Feedback ========== */
.article-feedback {
    margin-top: 40px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.article-feedback h5 {
    margin-bottom: 14px;
}

.feedback-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========== Article Contact ========== */
.article-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    color: #6c757d;
}

/* ========== Contact Footer ========== */
.contact-footer {
    margin-top: 40px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #e7f1ff, #f0f4ff);
    border-radius: 12px;
}

.contact-icon {
    font-size: 2rem;
}

.contact-text {
    flex: 1;
}

.contact-text h5 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.contact-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.help-screenshot {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .help-sidebar {
        display: none;
    }
    
    .help-content {
        padding: 20px;
    }
    
    .popular-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .overview-links {
        columns: 1;
    }
}