/* ==========================================================================
   TrustHost.ir — Complete Modern Documentation Center Stylesheet
   Direction: RTL | Scoped: .th-doc-page, .single-post, .th-doc-modal
   ========================================================================== */

.page-id-679 #content > .page-header,
.post-679 #content > .page-header,
.page-id-679 .entry-header,
.post-679 .entry-header {
    display: none !important;
}

.th-doc-page {
    --th-primary: #0066cc;
    --th-primary-dark: #01274d;
    --th-primary-light: #0284c7;
    --th-accent: #0ea5e9;
    --th-accent-subtle: #f0f7ff;
    --th-text-main: #1e293b;
    --th-text-muted: #64748b;
    --th-text-heading: #0f172a;
    --th-bg-white: #ffffff;
    --th-bg-slate: #f8fafc;
    --th-border: #e2e8f0;
    --th-border-hover: #cbd5e1;
    --th-radius-sm: 8px;
    --th-radius-md: 14px;
    --th-radius-lg: 20px;
    --th-radius-xl: 28px;
    --th-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --th-shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
    --th-shadow-lg: 0 16px 36px -6px rgba(1, 39, 77, 0.12);
    --th-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    direction: rtl !important;
    text-align: right !important;
    font-family: Vazirmatn, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, sans-serif;
    color: var(--th-text-main);
    line-height: 1.85;
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 16px 60px;
    box-sizing: border-box;
}

.th-doc-page *,
.th-doc-page *::before,
.th-doc-page *::after {
    box-sizing: border-box;
}

/* 1. Hero Section */
.th-doc-hero {
    position: relative;
    background: radial-gradient(circle at 80% 20%, #033c75 0%, #01274d 60%, #001730 100%);
    color: #ffffff;
    border-radius: var(--th-radius-xl);
    padding: 56px 36px 44px;
    margin-bottom: 36px;
    box-shadow: var(--th-shadow-lg);
    overflow: hidden;
    text-align: center;
}

.th-doc-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.th-doc-hero-content {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto;
}

.th-doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #bae6fd;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.th-doc-badge-dot {
    width: 8px;
    height: 8px;
    background-color: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 10px #38bdf8;
}

.th-doc-hero h1 {
    color: #ffffff !important;
    font-size: clamp(1.85rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.th-doc-hero-lead {
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    color: #e2e8f0;
    line-height: 1.9;
    margin: 0 auto 30px;
    max-width: 760px;
    text-align: justify;
    text-align-last: center;
}

/* Search Bar in Hero */
.th-doc-search-wrapper {
    position: relative;
    max-width: 660px;
    margin: 0 auto 20px;
}

.th-doc-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px 12px 6px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--th-transition);
    cursor: text;
}

.th-doc-search-box:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.th-doc-search-icon {
    color: #0066cc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 12px;
    flex-shrink: 0;
}

.th-doc-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1.02rem;
    color: #0f172a;
    background: transparent;
    padding: 8px 4px;
}

.th-doc-search-input::placeholder {
    color: #94a3b8;
    font-size: 0.92rem;
}

.th-doc-search-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.76rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    flex-shrink: 0;
}

/* Quick Search Suggestions Container */
.th-doc-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-md);
    box-shadow: var(--th-shadow-lg);
    max-height: 380px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    text-align: right;
}

.th-doc-search-item {
    display: block;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--th-text-heading);
    text-decoration: none;
    transition: var(--th-transition);
}

.th-doc-search-item:last-child {
    border-bottom: none;
}

.th-doc-search-item:hover {
    background: var(--th-accent-subtle);
    color: var(--th-primary);
}

.th-doc-search-item-title {
    font-size: 0.96rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.th-doc-search-item-category {
    font-size: 0.8rem;
    color: #64748b;
}

/* Quick Pills */
.th-doc-quick-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: #cbd5e1;
}

.th-doc-pill-tag {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--th-transition);
}

.th-doc-pill-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #38bdf8;
}

/* 2. Onboarding / Getting Started Box */
.th-doc-onboarding-box {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--th-radius-xl);
    padding: 36px 32px;
    margin-bottom: 48px;
    box-shadow: var(--th-shadow-sm);
}

.th-doc-onboarding-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.th-doc-onboarding-header h2 {
    color: var(--th-text-heading);
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
}

.th-doc-onboarding-header p {
    color: var(--th-text-muted);
    font-size: 0.95rem;
    margin: 4px 0 0;
}

.th-doc-onboarding-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 18px;
}

.th-doc-step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--th-radius-md);
    padding: 20px 18px;
    transition: var(--th-transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
}

.th-doc-step-card:hover {
    border-color: var(--th-primary-light);
    box-shadow: var(--th-shadow-md);
    transform: translateY(-2px);
}

.th-doc-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #dbeafe;
    color: var(--th-primary);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.th-doc-step-title {
    color: var(--th-text-heading);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.45;
}

.th-doc-step-desc {
    color: var(--th-text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

/* 3. Categories Grid */
.th-doc-section {
    margin-bottom: 48px;
}

.th-doc-section-header {
    margin-bottom: 24px;
    text-align: right;
}

.th-doc-section-label {
    display: inline-block;
    color: var(--th-primary);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.th-doc-section-title {
    color: var(--th-text-heading);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.4;
}

.th-doc-section-subtitle {
    color: var(--th-text-muted);
    font-size: 0.98rem;
    margin: 0;
}

.th-doc-categories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 22px;
}

.th-doc-cat-card {
    background: var(--th-bg-white);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-lg);
    padding: 28px 24px;
    box-shadow: var(--th-shadow-sm);
    transition: var(--th-transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.th-doc-cat-card:hover {
    border-color: var(--th-primary-light);
    box-shadow: var(--th-shadow-md);
    transform: translateY(-2px);
}

.th-doc-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--th-accent-subtle);
    color: var(--th-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.th-doc-cat-title {
    color: var(--th-text-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.th-doc-cat-desc {
    color: var(--th-text-muted);
    font-size: 0.92rem;
    line-height: 1.85;
    margin: 0 0 16px;
    text-align: justify;
}

.th-doc-cat-links {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--th-border);
    padding-top: 14px;
}

.th-doc-cat-links li {
    margin-bottom: 8px;
}

.th-doc-cat-links li:last-child {
    margin-bottom: 0;
}

.th-doc-cat-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--th-transition);
}

.th-doc-cat-links a:hover {
    color: var(--th-primary);
    transform: translateX(-3px);
}

.th-doc-cat-links a svg {
    color: var(--th-primary-light);
    flex-shrink: 0;
}

/* 4. Featured Articles Grid */
.th-doc-featured-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
}

.th-doc-article-card {
    background: var(--th-bg-white);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-md);
    padding: 24px;
    box-shadow: var(--th-shadow-sm);
    transition: var(--th-transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.th-doc-article-card:hover {
    border-color: var(--th-primary-light);
    box-shadow: var(--th-shadow-md);
    transform: translateY(-2px);
}

.th-doc-article-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.th-doc-article-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
}

.th-doc-article-time {
    color: var(--th-text-muted);
    font-size: 0.8rem;
}

.th-doc-article-title {
    color: var(--th-text-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.5;
}

.th-doc-article-desc {
    color: var(--th-text-muted);
    font-size: 0.91rem;
    line-height: 1.8;
    margin: 0 0 16px;
    text-align: justify;
}

.th-doc-article-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--th-primary);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: var(--th-transition);
    margin-top: auto;
}

.th-doc-article-link:hover {
    color: #004080;
    gap: 10px;
}

/* 5. Support Escalation CTA */
.th-doc-support-banner {
    background: linear-gradient(135deg, #01274d 0%, #034586 100%);
    color: #ffffff;
    border-radius: var(--th-radius-lg);
    padding: 36px 32px;
    margin-top: 40px;
    box-shadow: var(--th-shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.th-doc-support-text h2 {
    color: #ffffff !important;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.th-doc-support-text p {
    color: #e2e8f0;
    font-size: 0.98rem;
    line-height: 1.8;
    margin: 0;
    max-width: 620px;
}

.th-doc-support-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.th-btn-ticket {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--th-primary-dark) !important;
    padding: 12px 24px;
    border-radius: var(--th-radius-md);
    font-weight: 700;
    font-size: 0.96rem;
    text-decoration: none;
    transition: var(--th-transition);
}

.th-btn-ticket:hover {
    background: #f0f7ff;
    color: var(--th-primary) !important;
    transform: translateY(-2px);
}

.th-btn-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: var(--th-radius-md);
    font-weight: 700;
    font-size: 0.96rem;
    text-decoration: none;
    transition: var(--th-transition);
}

.th-btn-phone:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ==========================================================================
   Article Single Page Enhancements (Code Blocks, Copy Button, Callouts)
   ========================================================================== */

/* Code Blocks */
pre,
.wp-block-code,
pre.wp-block-code {
    position: relative;
    background: #0f172a !important;
    color: #e2e8f0 !important;
    padding: 18px 20px !important;
    border-radius: var(--th-radius-sm) !important;
    direction: ltr !important;
    text-align: left !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
    overflow-x: auto !important;
    margin: 20px 0 !important;
    border: 1px solid #1e293b !important;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

p code,
li code {
    background: #f1f5f9;
    color: #0369a1;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.9em;
    border: 1px solid #e2e8f0;
}

.th-code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.75rem;
    font-family: Vazirmatn, sans-serif;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.th-code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.th-code-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

/* Callouts in Articles */
.th-callout-note {
    background: #f0f9ff;
    border-right: 4px solid #0284c7;
    padding: 16px 20px;
    border-radius: var(--th-radius-sm);
    margin: 20px 0;
    color: #0369a1;
}

.th-callout-warning {
    background: #fffbeb;
    border-right: 4px solid #f59e0b;
    padding: 16px 20px;
    border-radius: var(--th-radius-sm);
    margin: 20px 0;
    color: #92400e;
}

.th-callout-danger {
    background: #fef2f2;
    border-right: 4px solid #ef4444;
    padding: 16px 20px;
    border-radius: var(--th-radius-sm);
    margin: 20px 0;
    color: #991b1b;
}

/* Feedback Widget */
.th-doc-feedback {
    background: #f8fafc;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-md);
    padding: 20px 24px;
    margin: 36px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.th-doc-feedback-question {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--th-text-heading);
}

.th-doc-feedback-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.th-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid var(--th-border);
    background: #ffffff;
    border-radius: var(--th-radius-sm);
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--th-transition);
    color: var(--th-text-main);
}

.th-feedback-btn:hover {
    border-color: var(--th-primary);
    color: var(--th-primary);
}

.th-feedback-btn.active {
    background: var(--th-primary);
    color: #ffffff;
    border-color: var(--th-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .th-doc-onboarding-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .th-doc-categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .th-doc-page {
        padding: 6px 12px 40px;
    }
    .th-doc-hero {
        padding: 40px 20px 32px;
        border-radius: var(--th-radius-lg);
    }
    .th-doc-hero-lead {
        text-align: right;
        text-align-last: right;
    }
    .th-doc-onboarding-grid,
    .th-doc-categories-grid,
    .th-doc-featured-grid {
        grid-template-columns: 1fr !important;
    }
    .th-doc-support-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px;
    }
    .th-doc-support-actions {
        flex-direction: column;
        width: 100%;
    }
    .th-btn-ticket,
    .th-btn-phone {
        width: 100%;
        justify-content: center;
    }
}
