/*
Theme Name: Bia2Host Blog
Theme URI: https://bia2host.com/blog/
Author: Bia2Host Technical Team
Author URI: https://bia2host.com
Description: پوسته اختصاصی، مدرن و فوق سریع وبلاگ بیا تو هاست، کاملاً منطبق بر هویت بصری سایت اصلی، تایپوگرافی اصیل پیدا، انیمیشن‌های سبک و بهینه‌سازی حداکثری برای سئو و استانداردهای گوگل Core Web Vitals.
Version: 2.1.0
License: GNU General Public License v2 or later
Text Domain: bia2host-blog
Domain Path: /languages
*/

/* ==========================================================================
   1. CSS Variables & Design Tokens (Harmonious with HostLand Theme)
   ========================================================================== */
:root {
    --b2h-primary: #2B44FF;
    --b2h-primary-dark: #1E34D4;
    --b2h-primary-deep: #1726A8;
    --b2h-primary-50: #F2F5FF;
    --b2h-primary-100: #E4EAFF;
    --b2h-primary-gradient: linear-gradient(135deg, #2B44FF 0%, #16249E 100%);
    --b2h-accent: #00D285;
    --b2h-accent-gradient: linear-gradient(135deg, #00D285 0%, #009E64 100%);
    --b2h-amber: #FF9800;
    --b2h-rose: #FF3366;

    --b2h-bg-body: #F8FAFC;
    --b2h-bg-card: #FFFFFF;
    --b2h-bg-subtle: #F1F5F9;

    --b2h-text-main: #1E293B;
    --b2h-text-muted: #64748B;
    --b2h-text-light: #94A3B8;

    --b2h-border: #E2E8F0;
    --b2h-border-subtle: #EDF2F7;
    --b2h-border-focus: #2B44FF;

    --b2h-navy: #121828;
    --b2h-navy-surface: #1A2238;
    --b2h-navy-border: #242E4A;

    --b2h-radius-xs: 6px;
    --b2h-radius-sm: 10px;
    --b2h-radius-md: 16px;
    --b2h-radius-lg: 24px;
    --b2h-radius-full: 9999px;

    --b2h-shadow-xs: 0 1px 3px rgba(18, 24, 40, 0.05);
    --b2h-shadow-sm: 0 4px 12px rgba(18, 24, 40, 0.05);
    --b2h-shadow-md: 0 10px 25px -5px rgba(33, 51, 104, 0.08), 0 8px 10px -6px rgba(33, 51, 104, 0.04);
    --b2h-shadow-lg: 0 20px 35px -10px rgba(43, 68, 255, 0.12);
    --b2h-shadow-glow: 0 0 25px rgba(43, 68, 255, 0.25);

    --b2h-font-family: 'peyda', system-ui, -apple-system, Tahoma, sans-serif;
    --b2h-transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --b2h-transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. Base & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    direction: rtl;
    text-align: right;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--b2h-font-family);
    background-color: var(--b2h-bg-body);
    color: var(--b2h-text-main);
    line-height: 1.8;
}


img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--b2h-primary);
    text-decoration: none;
    transition: var(--b2h-transition-fast);
}

a:hover {
    color: var(--b2h-primary-dark);
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

/* Container */
.b2h-container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   3. Keyframe Animations & Micro-Interactions
   ========================================================================== */
@keyframes b2h-pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(43, 68, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(43, 68, 255, 0);
    }
}

@keyframes b2h-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes b2h-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Reading Progress Bar at Top of Page */
.b2h-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2B44FF, #00D285);
    z-index: 99999;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 8px rgba(43, 68, 255, 0.4);
}

/* ==========================================================================
   4. Header & Navigation (Identical to Bia2Host Brand)
   ========================================================================== */
.b2h-top-banner {
    background: linear-gradient(90deg, #1726A8, #2B44FF, #1726A8);
    background-size: 200% auto;
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 0;
    text-align: center;
    position: relative;
    z-index: 1001;
}

.b2h-top-banner a {
    color: #FFEA79;
    text-decoration: underline;
    margin-right: 6px;
    font-weight: 700;
}

.b2h-top-banner-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: var(--b2h-radius-full);
    margin-left: 8px;
    font-size: 0.75rem;
    animation: b2h-pulse-glow 2.5s infinite;
}

.b2h-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--b2h-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(18, 24, 40, 0.04);
    transition: var(--b2h-transition-fast);
}

.b2h-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.b2h-brand-logo img {
    height: 44px;
    width: auto;
    transition: transform 0.25s ease;
}

.b2h-brand-logo:hover img {
    transform: scale(1.02);
}

.b2h-nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.b2h-nav-item a {
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: var(--b2h-radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--b2h-transition-fast);
}

.b2h-nav-item a:hover,
.b2h-nav-item.active a {
    color: var(--b2h-primary);
    background-color: var(--b2h-primary-50);
}

.b2h-nav-item.b2h-nav-blog a {
    color: var(--b2h-primary);
    background-color: var(--b2h-primary-50);
    font-weight: 700;
}

.b2h-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.b2h-btn-portal {
    background: var(--b2h-primary-gradient);
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--b2h-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(43, 68, 255, 0.25);
    transition: var(--b2h-transition-smooth);
}

.b2h-btn-portal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 68, 255, 0.35);
}

.b2h-mobile-toggle {
    display: none;
    background: transparent;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: var(--b2h-radius-sm);
    border: 1px solid var(--b2h-border);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
}

.b2h-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #334155;
    border-radius: 2px;
    transition: var(--b2h-transition-fast);
}

/* ==========================================================================
   5. Mobile Drawer Menu
   ========================================================================== */
.b2h-mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    background: #FFFFFF;
    z-index: 10000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    padding: 24px 20px;
}

.b2h-mobile-drawer.open {
    display: flex;
    animation: b2h-drawer-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes b2h-drawer-slide {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}



.b2h-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 24, 40, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--b2h-transition-fast);
}

.b2h-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.b2h-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--b2h-border);
}

.b2h-drawer-close {
    background: var(--b2h-bg-subtle);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--b2h-radius-xs);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--b2h-text-muted);
}

.b2h-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.b2h-drawer-nav a {
    color: #334155;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--b2h-radius-sm);
    display: block;
    background: var(--b2h-primary-50);
}

.b2h-drawer-nav a:hover {
    color: var(--b2h-primary);
    background: var(--b2h-primary-100);
}

/* ==========================================================================
   6. Blog Hero Banner (Archive & Home)
   ========================================================================== */
.b2h-blog-hero {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 60%, #F1F5F9 100%);
    padding: 55px 0 45px;
    border-bottom: 1px solid var(--b2h-border);
    position: relative;
    overflow: hidden;
}

/* Floating Ambient Glow Orbs */
.b2h-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

.b2h-hero-orb-1 {
    top: -60px;
    right: 5%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(43, 68, 255, 0.12) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
    filter: blur(40px);
    animation: b2h-blob-drift-1 14s ease-in-out infinite alternate;
}

.b2h-hero-orb-2 {
    bottom: -80px;
    left: 8%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 210, 133, 0.10) 0%, rgba(14, 165, 233, 0.06) 50%, transparent 70%);
    filter: blur(45px);
    animation: b2h-blob-drift-2 18s ease-in-out infinite alternate;
}

@keyframes b2h-blob-drift-1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-30px, 25px, 0) scale(1.08); }
    100% { transform: translate3d(20px, -15px, 0) scale(0.95); }
}

@keyframes b2h-blob-drift-2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(35px, -30px, 0) scale(1.1); }
    100% { transform: translate3d(-20px, 20px, 0) scale(0.92); }
}

.b2h-hero-content {
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.b2h-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: var(--b2h-primary);
    padding: 6px 18px;
    border-radius: var(--b2h-radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 18px;
    border: 1px solid rgba(43, 68, 255, 0.18);
    box-shadow: 0 2px 8px rgba(43, 68, 255, 0.08);
}

/* Radar Beacon Dot */
.b2h-badge-radar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 10px;
    height: 10px;
    margin-left: 4px;
}

.b2h-radar-core {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--b2h-accent);
}

.b2h-radar-wave {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--b2h-accent);
    animation: b2h-radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes b2h-radar-ping {
    0% { transform: scale(0.8); opacity: 1; }
    75%, 100% { transform: scale(2.3); opacity: 0; }
}

.b2h-hero-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--b2h-navy);
    line-height: 1.35;
    margin-bottom: 14px;
}

/* Animated Gradient Accent Text */
.b2h-gradient-text {
    background: linear-gradient(135deg, var(--b2h-primary) 0%, #4F46E5 40%, #00B4D8 70%, var(--b2h-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: b2h-gradient-flow 6s ease infinite;
}

@keyframes b2h-gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.b2h-hero-desc {
    font-size: 1.05rem;
    color: var(--b2h-text-muted);
    margin-bottom: 24px;
    line-height: 1.75;
}

/* Feature Highlights */
.b2h-hero-features {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.b2h-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--b2h-border);
    padding: 5px 14px;
    border-radius: var(--b2h-radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--b2h-text-main);
    box-shadow: 0 2px 6px rgba(18, 24, 40, 0.03);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.b2h-feature-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(43, 68, 255, 0.3);
    box-shadow: 0 4px 12px rgba(43, 68, 255, 0.1);
}

.b2h-feature-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--b2h-primary);
}

/* Search Bar in Hero */
.b2h-search-wrapper {
    max-width: 580px;
    margin: 0 auto 24px;
    position: relative;
}

.b2h-search-form {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 2px solid var(--b2h-border);
    border-radius: var(--b2h-radius-full);
    padding: 6px 8px 6px 18px;
    box-shadow: var(--b2h-shadow-sm);
    transition: var(--b2h-transition-smooth);
}

.b2h-search-form:focus-within {
    border-color: var(--b2h-primary);
    box-shadow: 0 0 0 4px rgba(43, 68, 255, 0.12), var(--b2h-shadow-md);
}

.b2h-search-input {
    flex: 1;
    background: transparent;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--b2h-text-main);
}

.b2h-search-btn {
    background: var(--b2h-primary-gradient);
    color: #FFFFFF;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--b2h-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(43, 68, 255, 0.2);
    transition: var(--b2h-transition-fast);
}

.b2h-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(43, 68, 255, 0.35);
}

/* Category Filter Pills */
.b2h-cat-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.b2h-cat-pill {
    background: #FFFFFF;
    color: #475569;
    border: 1px solid var(--b2h-border);
    padding: 6px 16px;
    border-radius: var(--b2h-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--b2h-transition-fast);
}

.b2h-cat-pill:hover,
.b2h-cat-pill.active {
    background: var(--b2h-primary);
    color: #FFFFFF;
    border-color: var(--b2h-primary);
    box-shadow: 0 4px 12px rgba(43, 68, 255, 0.25);
    transform: translateY(-2px);
}

/* ==========================================================================
   7. Post Cards & Grid Layout
   ========================================================================== */
.b2h-main-section {
    padding: 50px 0 70px;
}

.b2h-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    width: 100%;
}

.b2h-card {
    background: var(--b2h-bg-card);
    border-radius: var(--b2h-radius-md);
    border: 1px solid var(--b2h-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--b2h-shadow-xs);
    position: relative;
    min-width: 0;
    max-width: 100%;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.b2h-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.b2h-card:hover {
    transform: translateY(-8px);
    border-color: rgba(43, 68, 255, 0.28);
    box-shadow: 0 20px 32px -8px rgba(18, 24, 40, 0.12), 0 0 0 1px rgba(43, 68, 255, 0.08);
}

.b2h-card-thumb-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #E2E8F0;
}

/* Diagonal Light Sweep Shimmer on Card Hover */
.b2h-card-thumb-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transform: skewX(-24deg);
    transition: left 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 3;
}

.b2h-card:hover .b2h-card-thumb-link::after {
    left: 170%;
}

.b2h-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.b2h-card:hover .b2h-card-thumb {
    transform: scale(1.06);
}

.b2h-card-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(43, 68, 255, 0.9);
    backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--b2h-radius-full);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.b2h-card-reading-time {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: rgba(18, 24, 40, 0.75);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--b2h-radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.b2h-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.b2h-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--b2h-text-muted);
    margin-bottom: 12px;
}

.b2h-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.b2h-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
}

.b2h-card-title a {
    color: var(--b2h-navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--b2h-transition-fast);
}

.b2h-card-title a:hover {
    color: var(--b2h-primary);
}

.b2h-card-excerpt {
    font-size: 0.9rem;
    color: var(--b2h-text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.b2h-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--b2h-border-subtle);
    margin-top: auto;
}

.b2h-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.b2h-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--b2h-radius-full);
}

.b2h-card-readmore {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--b2h-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--b2h-transition-fast);
}

.b2h-card-readmore svg {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.b2h-card:hover .b2h-card-readmore svg {
    transform: translateX(-5px);
}

/* ==========================================================================
   8. Pagination
   ========================================================================== */
.b2h-pagination {
    margin-top: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.b2h-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--b2h-radius-sm);
    background: #FFFFFF;
    border: 1px solid var(--b2h-border);
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--b2h-transition-fast);
}

.b2h-pagination .page-numbers:hover,
.b2h-pagination .page-numbers.current {
    background: var(--b2h-primary);
    color: #FFFFFF;
    border-color: var(--b2h-primary);
    box-shadow: 0 4px 12px rgba(43, 68, 255, 0.25);
}

/* ==========================================================================
   9. Single Article Page (High Readability & Principles of SEO)
   ========================================================================== */
.b2h-single-wrapper {
    padding: 35px 0 70px;
}

/* Breadcrumbs */
.b2h-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--b2h-text-muted);
    margin-bottom: 22px;
}

.b2h-breadcrumbs a {
    color: #64748B;
    transition: var(--b2h-transition-fast);
}

.b2h-breadcrumbs a:hover {
    color: var(--b2h-primary);
}

.b2h-breadcrumbs-sep {
    color: #CBD5E1;
}

/* Single Header */
.b2h-single-header {
    margin-bottom: 30px;
}

.b2h-single-cat-badge {
    display: inline-block;
    background: var(--b2h-primary-50);
    color: var(--b2h-primary);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: var(--b2h-radius-full);
    margin-bottom: 14px;
    border: 1px solid rgba(43, 68, 255, 0.15);
}

.b2h-single-title {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    font-weight: 800;
    line-height: 1.4;
    color: var(--b2h-navy);
    margin-bottom: 18px;
}

.b2h-single-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.85rem;
    color: var(--b2h-text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--b2h-border);
}

.b2h-single-author-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--b2h-text-main);
}

/* Layout Grid: 72% Article + 28% Sidebar */
.b2h-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
    width: 100%;
}

.b2h-article-body {
    background: #FFFFFF;
    border-radius: var(--b2h-radius-md);
    border: 1px solid var(--b2h-border);
    padding: 36px 40px;
    box-shadow: var(--b2h-shadow-xs);
    min-width: 0;
}


.b2h-single-featured-image {
    margin-bottom: 32px;
    border-radius: var(--b2h-radius-sm);
    overflow: hidden;
    box-shadow: var(--b2h-shadow-sm);
}

.b2h-single-featured-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

/* Table of Contents (فهرست مطالب خودکار) */
.b2h-toc-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-right: 4px solid var(--b2h-primary);
    border-radius: var(--b2h-radius-sm);
    padding: 22px 24px;
    margin: 28px 0 35px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.b2h-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    cursor: pointer;
}

.b2h-toc-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--b2h-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.b2h-toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    list-style: none;
    counter-reset: b2h-toc-counter;
}

.b2h-toc-list > li:not(.toc-h3) {
    counter-increment: b2h-toc-counter;
}

.b2h-toc-list li a {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--b2h-transition-fast);
}

.b2h-toc-list > li:not(.toc-h3) > a::before {
    content: counter(b2h-toc-counter, decimal) ".";
    font-weight: 700;
    color: var(--b2h-primary);
    margin-left: 6px;
}

.b2h-toc-list li a:hover {
    color: var(--b2h-primary);
    padding-right: 6px;
}

.b2h-toc-list li.toc-h3 {
    margin-right: 20px;
    font-size: 0.88rem;
    list-style-type: disc;
    list-style-position: inside;
}


/* Article Content Typography */
.b2h-content {
    font-size: 1.1rem;
    line-height: 2.05;
    color: #334155;
}

.b2h-content p {
    margin-bottom: 22px;
}

.b2h-content h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--b2h-navy);
    margin: 40px 0 18px;
    padding-right: 14px;
    border-right: 4px solid var(--b2h-primary);
    line-height: 1.4;
    scroll-margin-top: 100px;
}

.b2h-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1E293B;
    margin: 30px 0 14px;
    line-height: 1.45;
    scroll-margin-top: 100px;
}

.b2h-content ul, 
.b2h-content ol {
    margin: 18px 0 24px;
    padding-right: 24px;
}

.b2h-content ul {
    list-style: disc;
}

.b2h-content ol {
    list-style: decimal;
}

.b2h-content li {
    margin-bottom: 10px;
}

.b2h-content blockquote {
    background: #F2F5FF;
    border-right: 4px solid var(--b2h-primary);
    border-radius: var(--b2h-radius-xs);
    padding: 18px 24px;
    margin: 26px 0;
    font-style: normal;
    color: #1E34D4;
    font-weight: 500;
}

.b2h-content img {
    border-radius: var(--b2h-radius-sm);
    margin: 28px auto;
    box-shadow: var(--b2h-shadow-sm);
}

.b2h-content pre, 
.b2h-content code {
    font-family: Consolas, Monaco, monospace;
    direction: ltr;
    text-align: left;
}

.b2h-content pre {
    background: #1E293B;
    color: #E2E8F0;
    padding: 20px;
    border-radius: var(--b2h-radius-sm);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.b2h-content :not(pre) > code {
    background: #F1F5F9;
    color: #E11D48;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.88em;
}

/* Helpful Rating Box */
.b2h-helpful-box {
    background: #F8FAFC;
    border: 1px solid var(--b2h-border);
    border-radius: var(--b2h-radius-md);
    padding: 20px 24px;
    margin: 36px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--b2h-shadow-xs);
    transition: var(--b2h-transition-smooth);
}

.b2h-helpful-box:hover {
    border-color: rgba(43, 68, 255, 0.25);
}

.b2h-helpful-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--b2h-navy);
}

.b2h-helpful-title svg {
    color: var(--b2h-primary);
}

.b2h-helpful-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2h-helpful-btn {
    background: #FFFFFF;
    border: 1px solid var(--b2h-border);
    padding: 8px 16px;
    border-radius: var(--b2h-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    transition: var(--b2h-transition-fast);
}

.b2h-helpful-btn:hover {
    transform: translateY(-2px);
}

.b2h-helpful-btn.yes:hover {
    background: #ECFDF5;
    border-color: #10B981;
    color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.b2h-helpful-btn.no:hover {
    background: #FEF2F2;
    border-color: #EF4444;
    color: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.b2h-helpful-thankyou {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #059669;
    font-weight: 700;
    font-size: 0.95rem;
    animation: b2h-pop-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes b2h-pop-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Article Footer: Tags & Social Share */
.b2h-article-footer {
    margin-top: 25px;
    padding-top: 24px;
    border-top: 1px solid var(--b2h-border);
}

.b2h-tags-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.b2h-tag-item {
    background: var(--b2h-bg-subtle);
    color: #475569;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: var(--b2h-radius-full);
    transition: var(--b2h-transition-fast);
}

.b2h-tag-item:hover {
    background: var(--b2h-primary);
    color: #FFFFFF;
}

.b2h-share-box {
    background: var(--b2h-primary-50);
    border-radius: var(--b2h-radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.b2h-share-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--b2h-navy);
}

.b2h-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2h-share-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--b2h-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF !important;
    transition: var(--b2h-transition-fast);
}

.b2h-share-btn.telegram { background: #229ED9; }
.b2h-share-btn.whatsapp { background: #25D366; }
.b2h-share-btn.twitter { background: #1DA1F2; }
.b2h-share-btn.copy { background: #475569; cursor: pointer; }

.b2h-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Related Posts */
.b2h-related-section {
    margin-top: 45px;
}

.b2h-section-heading {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--b2h-navy);
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}

.b2h-section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--b2h-primary);
    border-radius: 2px;
}

.b2h-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ==========================================================================
   10. Sidebar & Widgets
   ========================================================================== */
.b2h-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.b2h-widget {
    background: #FFFFFF;
    border: 1px solid var(--b2h-border);
    border-radius: var(--b2h-radius-md);
    padding: 24px;
    box-shadow: var(--b2h-shadow-xs);
}

.b2h-widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--b2h-navy);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--b2h-border-subtle);
    position: relative;
}

.b2h-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 35px;
    height: 2px;
    background: var(--b2h-primary);
}

/* Promo CTA Widget */
.b2h-widget-promo {
    background: linear-gradient(135deg, #1E34D4 0%, #121828 100%);
    color: #FFFFFF;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.b2h-widget-promo h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.b2h-widget-promo p {
    font-size: 0.88rem;
    color: #CBD5E1;
    margin-bottom: 20px;
    line-height: 1.6;
}

.b2h-btn-promo {
    background: #00D285;
    color: #121828 !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 22px;
    border-radius: var(--b2h-radius-full);
    display: inline-block;
    transition: var(--b2h-transition-fast);
    box-shadow: 0 4px 14px rgba(0, 210, 133, 0.4);
}

.b2h-btn-promo:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.3);
}

/* Sidebar Recent Posts */
.b2h-widget-post-item {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--b2h-border-subtle);
}

.b2h-widget-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.b2h-widget-post-thumb {
    width: 68px;
    height: 52px;
    border-radius: var(--b2h-radius-xs);
    object-fit: cover;
    flex-shrink: 0;
}

.b2h-widget-post-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}

.b2h-widget-post-title a {
    color: #334155;
}

.b2h-widget-post-title a:hover {
    color: var(--b2h-primary);
}

.b2h-widget-post-date {
    font-size: 0.75rem;
    color: var(--b2h-text-light);
    margin-top: 4px;
}

/* ==========================================================================
   11. Footer (Harmonious with Main Site)
   ========================================================================== */
.b2h-footer {
    background: var(--b2h-navy);
    color: #94A3B8;
    padding: 60px 0 20px;
    border-top: 1px solid var(--b2h-navy-border);
}

.b2h-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.b2h-footer-col h4 {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.b2h-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--b2h-primary);
}

.b2h-footer-links li {
    margin-bottom: 10px;
}

.b2h-footer-links a {
    color: #94A3B8;
    font-size: 0.9rem;
    transition: var(--b2h-transition-fast);
}

.b2h-footer-links a:hover {
    color: #FFFFFF;
    padding-right: 6px;
}

.b2h-footer-trust-badges {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.b2h-footer-trust-badges img {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 6px;
    height: 60px;
    width: auto;
}

.b2h-footer-bottom {
    border-top: 1px solid var(--b2h-navy-border);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748B;
}

/* Floating Back to Top Button */
.b2h-back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 46px;
    height: 46px;
    border-radius: var(--b2h-radius-full);
    background: var(--b2h-primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(43, 68, 255, 0.35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--b2h-transition-smooth);
    z-index: 999;
}

.b2h-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: b2h-backtop-pulse 3.5s ease-in-out infinite;
}

@keyframes b2h-backtop-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.b2h-back-to-top:hover {
    background: var(--b2h-primary-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 28px rgba(43, 68, 255, 0.45);
}

/* Floating Toast Notification */
.b2h-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translate(-50%, 40px) scale(0.9);
    background: #1E293B;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: var(--b2h-radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s;
    font-size: 0.92rem;
    font-weight: 600;
}

.b2h-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
}

.b2h-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--b2h-accent);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   12. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .b2h-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .b2h-single-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .b2h-sidebar {
        margin-top: 30px;
    }
    .b2h-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .b2h-container {
        padding-left: 14px;
        padding-right: 14px;
    }
    .b2h-header-inner {
        height: 64px;
    }
    .b2h-brand-logo img {
        height: 36px;
        max-width: 140px;
        object-fit: contain;
    }
    .b2h-nav-list,
    .b2h-header-actions .b2h-btn-portal {
        display: none;
    }
    .b2h-mobile-toggle {
        display: flex;
    }
    .b2h-hero-title {
        font-size: 1.55rem;
    }
    .b2h-search-form {
        padding: 4px 6px 4px 14px;
    }
    .b2h-search-input {
        font-size: 0.88rem;
        padding: 8px 6px;
        min-width: 0;
    }
    .b2h-search-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    .b2h-posts-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .b2h-related-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .b2h-article-body {
        padding: 24px 16px;
    }
    .b2h-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


