@media (max-width: 768px) {

    body {
        padding: 10px !important;
    }

.site-branding-container .site-title a {
    font-size: small;
    display: flex;
}
    
        .main-navigation .nav-menu {
        display: none !important;
    }

    .main-navigation .nav-menu.active {
        display: flex !important;
    }


  .site-wrapper {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 70px !important;
    }

    /* اصلاح چیدمان اصلی: ستون‌ها زیر هم قرار بگیرند */
    .content-sidebar-wrapper {
        flex-direction: column;
    }

    .main-content {
        padding-left: 0;
        width: 100%;
    }

    .sidebar {
        min-width: 100%;
        margin-top: 20px;
    }

    /* هدر جمع‌وجور */
    .site-header.minimal-style-header {
        min-height: 56px;
        padding: 6px 10px;
        height: auto;
        place-content: center;
        top: 0;
        right: 0;
        width: 100%;
        transform: none;
        border-radius: 0;
    }

    .site-branding-container img {
        max-height: 32px;
    }

    .site-description {
        display: none;
    }

    /* دکمه همبرگری */
    .mobile-menu-toggle {
        display: block;
        font-size: 1.6rem;
        background: none;
        border: none;
        cursor: pointer;
    }

    /* منوی موبایل */
    .main-navigation .nav-menu {
        display: none;
        flex-direction: column;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.4);
    }

    .main-navigation .nav-menu.active {
        display: flex;
    }

    .main-navigation .nav-menu li a {
        padding: 10px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* کارت پست‌ها */
    .post-card.list-item {
        flex-direction: column;
    }

    .post-card.list-item .post-thumbnail {
        width: 100%;
        height: 150px;
    }

    .post-card.list-item .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* محتوای پست – فیکس طلایی */
    .single-post img,
    .single-post iframe,
    .single-post video,
    .single-post table {
        max-width: 100%;
        height: auto;
    }

    /* --- استایل مطالب مرتبط (اسلایدر افقی باکس‌باکس) --- */
    .related-posts-section {
        margin-top: 30px;
        position: relative;
    }

    .related-posts-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 15px;
        padding: 10px 5px 25px 5px; /* فضای پایین برای اسکرول راحت */
        margin: 0 -10px; /* بیرون زدن از حاشیه برای تمام عرض شدن */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    /* مخفی کردن اسکرول‌بار مزاحم */
    .related-posts-list::-webkit-scrollbar {
        display: none;
    }

    .related-post {
        flex: 0 0 75%; /* عرض هر کارت: ۷۵ درصد صفحه */
        scroll-snap-align: center; /* وسط چین شدن هنگام اسکرول */
        margin-bottom: 0;
        background: rgba(255, 255, 255, 0.5) !important; /* پس‌زمینه مشخص‌تر */
        border: 1px solid rgba(255, 255, 255, 0.6) !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05); /* سایه برای حالت جعبه‌ای */
        display: flex;
        flex-direction: column;
    }

    .related-post .post-thumbnail {
        height: 150px;
        width: 100%;
        margin-bottom: 10px;
    }

    /* --- استایل نتایج جستجو در موبایل --- */
    .search-result .result-content {
        flex-direction: column;
    }

    .search-result .result-thumbnail {
        width: 100%;
        height: 160px;
        margin-bottom: 15px;
    }
    
    .search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* --- استایل فوتر در موبایل --- */
    .site-footer {
        width: 100%;
        margin: 30px 0 0 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .footer-widgets-area {
        grid-template-columns: 1fr; /* ویجت‌ها زیر هم */
    }

    .site-info {
        flex-direction: column; /* کپی‌رایت وسط‌چین و زیر هم */
        text-align: center;
    }
}




/*////////////////////////////////////////*/
.related-posts-wrapper {
    position: relative;
    margin-top: 40px;
}

.related-posts-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 20px;
    scroll-snap-type: x mandatory;
}

.related-posts-list::-webkit-scrollbar {
    display: none;
}

.related-post {
    flex: 0 0 260px;
    background: rgba(255, 255, 255, 0.22); /* شیشه‌ای سبک */
    backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.related-post img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.related-post .post-title a {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 12px 0 8px 0;
    display: block;
    text-decoration: none;
    padding: 0 10px;
}

.related-post .post-title a:hover {
    color: var(--color-accent);
}

.related-post .post-date {
    font-size: 0.8rem;
    color: #555;
    padding: 0 10px 10px 10px;
}

.related-post:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 35px rgba(0,115,240,0.15);
    border-color: rgba(0,115,240,0.35);
}

/* عنوان مطالب مرتبط */
.related-posts-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--color-primary);
    padding-right: 10px;
    border-right: 4px solid var(--color-accent);
}

/* دکمه‌های عقب و جلو */
.rel-nav {
    position: absolute;
    top: 45%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.3);
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.3s ease;
}

.rel-nav:hover {
    background: rgba(255,255,255,0.45);
    transform: scale(1.1);
}

.rel-prev { left: 0; }
.rel-next { right: 0; }

.rel-nav i {
    font-size: 1.2rem;
    color: var(--color-primary);
}

/* موبایل */
@media (max-width: 768px) {
    .related-post {
        flex: 0 0 75%;
    }

    .rel-nav {
        width: 40px;
        height: 40px;
    }

    .rel-nav i {
        font-size: 1rem;
    }
}
