/* Help Center Styles */

/* ========== Public layout chrome (shared by portfolio + article pages) ========== */
.public-help-header {
    background: linear-gradient(135deg, #0a1f33 0%, #1a4a7a 100%);
    color: #fff;
    padding: 14px 0;
    box-shadow: 0 2px 12px rgba(10, 31, 51, 0.25);
}
.public-help-header .inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.public-help-header a {
    color: #fff;
    text-decoration: none;
}
.public-help-header .logo {
    font-size: 1.25rem;
    font-weight: 700;
}
.public-help-header .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
}
.public-help-header .brand-logo__icon {
    flex-shrink: 0;
    display: block;
}
.public-help-header .brand-logo__subtitle {
    background: rgba(255, 255, 255, 0.14);
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
}
.public-help-nav {
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
    align-items: center;
}
.public-help-nav a {
    font-size: 0.92rem;
    opacity: 0.92;
    padding: 4px 2px;
}
.public-help-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.public-help-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    box-sizing: border-box;
}

/* Logged-in master layout: constrain article shell */
.main-content .help-article-shell {
    max-width: 1100px;
    margin: 0 auto;
}

/* Nested .container from article view — keep full width of public-help-body */
.public-help-body > .container,
.help-page.container,
.public-help-body .help-page {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.help-page .guide-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 36px 28px;
    color: white;
    margin-bottom: 28px;
    text-align: center;
    box-sizing: border-box;
}
.help-page .guide-header h1 {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    margin: 0 0 12px;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.help-page .guide-header p {
    font-size: 1.05rem;
    opacity: 0.95;
    margin: 0 auto;
    max-width: 42rem;
    line-height: 1.7;
}
.help-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 30px;
}
.help-search-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
}
.help-search-wrap i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.help-search-wrap input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.help-search-wrap input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.help-category { margin-bottom: 36px; }
.help-category-title {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}
.help-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.help-article-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}
.help-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    color: inherit;
}
.help-article-card-static { cursor: default; }
.help-article-card-static:hover { transform: none; }
.help-article-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 14px;
}
.help-article-card h3 {
    font-size: 1.1rem;
    margin: 0 0 8px;
    color: #1e293b;
}
.help-article-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}
.help-article-preview {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}
.help-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.help-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}
.help-breadcrumb a:hover { text-decoration: underline; }

/* Article body — self-contained card (no Bootstrap required) */
.help-article-body,
.card.help-article-body {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
    line-height: 1.85;
    color: #334155;
    font-size: 1.02rem;
    box-sizing: border-box;
    width: 100%;
}
.help-article-body h2,
.help-article-body h3 {
    color: #1e293b;
    margin: 1.4em 0 0.6em;
    line-height: 1.4;
}
.help-article-body h2:first-child,
.help-article-body h3:first-child,
.help-article-body p:first-child,
.help-article-body ul:first-child {
    margin-top: 0;
}
.help-article-body p {
    margin: 0 0 1em;
}
.help-article-body ul,
.help-article-body ol {
    margin: 12px 0 1.1em;
    padding-right: 1.4rem;
    padding-left: 0;
}
.help-article-body li {
    margin-bottom: 10px;
    padding-right: 4px;
}
.help-article-body strong {
    color: #1e293b;
}
.help-article-body a {
    color: #2563eb;
}
.help-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.95rem;
}
.help-article-body th,
.help-article-body td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: right;
}
.help-article-body th {
    background: #f8fafc;
}

.help-article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 28px;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e2e8f0;
    color: #1e293b;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}
.btn-back:hover {
    background: #cbd5e1;
    color: #0f172a;
}
.help-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.help-empty i { font-size: 3rem; margin-bottom: 16px; display: block; }
.help-video-wrap { margin-top: 24px; }
.help-video-wrap video { width: 100%; border-radius: 12px; }

/* Help Tip Component */
.help-tip {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    vertical-align: middle;
}
.help-tip-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    font-family: inherit;
}
.help-tip-btn:hover { background: #dbeafe; }
.help-tip-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1100;
    min-width: 260px;
    max-width: 360px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 16px;
}
.help-tip.open .help-tip-panel { display: block; }
.help-tip-panel h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #1e293b;
}
.help-tip-panel p {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}
.help-tip-panel a {
    font-size: 0.85rem;
    color: #3b82f6;
}

/* Help FAB — fixed to viewport; keep outside transformed parents */
.help-fab-wrap {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important;
    top: auto !important;
    z-index: 10050 !important;
    margin: 0 !important;
}
.help-fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.help-fab-btn:hover { transform: scale(1.05); }
.help-fab-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 200px;
    overflow: hidden;
}
.help-fab-wrap.open .help-fab-menu { display: block; }
.help-fab-menu a,
.help-fab-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: right;
    font-family: inherit;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
}
.help-fab-menu a:hover,
.help-fab-menu button:hover { background: #f1f5f9; }

/* Welcome modal — full-viewport layer above page chrome */
.help-welcome-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.5);
    z-index: 10060 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0 !important;
}
.help-welcome-overlay.active { display: flex !important; }
.help-welcome-modal {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.help-welcome-modal h2 {
    margin: 0 0 12px;
    color: #1e293b;
}
.help-welcome-modal p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 24px;
}
.help-welcome-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Driver.js RTL tweaks */
.nok-help-driver-popover,
.driver-popover {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Vazir', Tahoma, sans-serif;
}

/* ========== Public help footer ========== */
.footer {
    background: linear-gradient(160deg, #0a1f33 0%, #132f4c 55%, #1a3a5c 100%);
    color: #cbd5e1;
    padding: 48px 24px 24px;
    margin-top: 48px;
}
.footer .container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 28px;
}
.footer h4 {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 14px;
    position: relative;
    padding-bottom: 10px;
}
.footer h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: #fbbf24;
    border-radius: 2px;
}
.footer p {
    margin: 0;
    line-height: 1.7;
    font-size: 0.92rem;
    opacity: 0.85;
}
.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer ul li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer ul li a {
    color: #cbd5e1;
    text-decoration: none;
}
.footer ul li a:hover {
    color: #fbbf24;
}
.footer .social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    margin-left: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.footer .social a:hover {
    background: #3b82f6;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    opacity: 0.75;
}
.footer-bottom p {
    margin: 0;
}

.main-footer {
    background: linear-gradient(160deg, #0a1f33 0%, #1a3a5c 100%);
    color: #cbd5e1;
    padding: 40px 5% 20px;
    margin-top: 48px;
}
.main-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}
.main-footer .footer-col h4 {
    color: #fff;
    margin-bottom: 14px;
    padding-bottom: 10px;
    position: relative;
}
.main-footer .footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: #fbbf24;
}
.main-footer .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-footer .footer-col ul li {
    margin-bottom: 8px;
}
.main-footer .footer-col a {
    color: #cbd5e1;
    text-decoration: none;
}
.main-footer .footer-col a:hover {
    color: #fbbf24;
}
.main-footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    margin-left: 8px;
    text-decoration: none;
}
.main-footer .footer-bottom {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .public-help-body {
        padding: 20px 16px 48px;
    }
    .help-page .guide-header {
        padding: 28px 18px;
        border-radius: 16px;
    }
    .help-page .guide-header h1 { font-size: 1.35rem; }
    .help-article-body,
    .card.help-article-body {
        padding: 20px 18px;
        border-radius: 14px;
    }
    .public-help-nav {
        gap: 10px 14px;
        width: 100%;
    }
    .help-fab-wrap { bottom: 16px !important; left: 16px !important; }
}

@media (max-width: 640px) {
    .footer-grid,
    .main-footer .footer-container {
        grid-template-columns: 1fr;
    }
}
