/*
Theme Name: قالب اختصاصی بلاگ مبیت
Theme URI: https://mobit.ir
Author: علی حسن پور
Author URI: https://ali-hasanpour.ir/
Description: قالب اختصاصی طراحی و کد نویسی شده صرفاً برای بلاگ مبیت زیر مجموعه شرکت آواپرداز با امکانات و ویجت های اختصاصی به همراه تنظیمات مجزا در پیشخوان 
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, custom-background, custom-logo, portfolio
Text Domain: your-theme-text-domain
*/
@font-face {
    font-family: 'Estedad-FD';
    src: url('./assets/fonts/Estedad-FD.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap; /* برای سئو و جلوگیری از کندی لود متن */
}


/* ==========================================================================
   1. Base & Reset
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Estedad-FD', Tahoma, Arial, sans-serif; /* نام فونت تغییر کرد */
    background: #f5f5f5;
    direction: rtl;
    color: #333;
    line-height: 1.6;
}


img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: #034694;
    transition: all 0.3s ease;
}

a:hover {
    color: #E8C774;
}

/* ==========================================================================
   2. Layout & Containers
   ========================================================================== */
.default-container,
.single-container {
    max-width: 1320px;
    margin: 40px auto;
    padding: 0 20px;
}

.single-container {
    max-width: 900px; /* عرض کمتر برای خوانایی بهتر متن مقاله */
    background: #fff;
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.main-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px !important;
    padding: 0 20px;
    position: relative;
    z-index: 999;
}

.header-box {
    width: 100%;
    max-width: 1320px;
    height: 64px;
    background: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
}

.header-logo img {
    height: 34px;
}

.header-menu {
    flex: 1;
}

.header-menu ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-menu a {
    color: #222;
    font-size: 15px;
    font-weight: 500;
}

.header-menu a:hover {
    color: #034694;
}

.header-search {
    position: relative;
    width: 229px;
    height: 37px;
}

.header-search input {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: #DCDDDE;
    border: 0.5px solid #7F8185;
    padding: 0 35px 0 10px;
    outline: none;
    font-family: 'Estedad-FD';
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #555;
    background: none;
    border: none;
    cursor: pointer;
}

.shop-button {
    width: 88px;
    height: 37px;
    background: #034694;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 6px 14px rgba(3,70,148,0.25);
}

.shop-button:hover {
    background: #E8C774;
    color: #000;
}

/* ==========================================================================
   4. Index & Archive (Posts List)
   ========================================================================== */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-title {
    font-size: 28px;
    color: #034694;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.archive-post-item {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.archive-post-item:hover {
    transform: translateY(-5px);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-content .post-title {
    font-size: 18px;
    margin: 0 0 10px 0;
}

.post-content .post-title a {
    color: #222;
}

.post-content .post-title a:hover {
    color: #034694;
}

.post-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.read-more-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #034694;
    font-weight: 500;
}

.read-more-btn:hover {
    background: #034694;
    color: #fff;
}

/* صفحه‌بندی */
.pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination .page-numbers {
    padding: 8px 16px;
    background: #fff;
    border-radius: 6px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination .current {
    background: #034694;
    color: #fff;
}

/* ==========================================================================
   5. Single Post Page
   ========================================================================== */
.single-post .post-header {
    text-align: center;
    margin-bottom: 30px;
}

.single-post .post-title {
    font-size:22px;
    color: #034694;
    margin-bottom: 15px;
}

.post-meta {
    font-size: 13px;
    color: #777;
    display: flex;
    justify-content: center;
    gap: 20px;
    
}

.post-meta a {
    color: #034694;
}

.single-post .post-thumb {
    margin-bottom: 30px;
    border-radius: 14px;
    overflow: hidden;
}

.single-post .post-content {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
}

.single-post .post-content h2, 
.single-post .post-content h3 {
    color: #222;
    margin-top: 30px;
}

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.post-tags a {
    display: inline-block;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 4px;
    margin-left: 5px;
    color: #555;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-navigation a {
    font-weight: bold;
    color: #034694;
}

.post-comments {
    margin-top: 50px;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer {
    background: #034694;
    padding: 40px 20px 20px;
    margin-top: 60px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
    color: white;
}

.footer-widgets {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 18px;
    color: #034694;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #555;
}

.footer-widget ul li a:hover {
    color: #034694;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #777;
}

/* ==========================================================================
   7. Responsive Design (Mobile & Tablet)
   ========================================================================== */
@media screen and (max-width: 992px) {
    .header-box {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
        gap: 15px;
        justify-content: space-between;
    }
    

    
    .header-search {
        order: 2;
        width: auto;
        flex: 1;
        margin: 0 15px;
    }
}

@media screen and (max-width: 768px) {
    .single-container {
        padding: 20px;
    }

    .single-post .post-title {
        font-size: 24px;
    }

    .header-menu ul {
        gap: 15px;
    }

    .header-menu a {
        font-size: 13px;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
/* =========================================
   استایل‌های زیرمنو (Dropdown)
   ========================================= */

/* نیاز است والد پوزیشن نسبی داشته باشد تا زیرمنو زیر آن قرار بگیرد */
.header-menu ul li {
    position: relative;
}

/* ظاهر اولیه زیرمنوها (مخفی) */
.header-menu ul ul.sub-menu {
    position: absolute;
    top: 100%;
    right: 0; /* راست‌چین بودن زیرمنو */
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 10px 0;
    margin-top: 20px; /* فاصله اولیه برای انیمیشن */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    
    /* لغو کردن حالت فلکسِ منوی اصلی برای زیرمنوها */
    display: block;
}

/* نمایش زیرمنو هنگام هاور روی آیتم والد */
.header-menu ul li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 15px; /* حرکت نرم به سمت بالا هنگام نمایش */
}

/* استایل آیتم‌های داخل زیرمنو */
.header-menu ul.sub-menu li {
    display: block;
    width: 100%;
}

/* استایل لینک‌های زیرمنو */
.header-menu ul.sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 400;
    color: #444;
    transition: all 0.2s ease;
}

/* هاور روی لینک‌های زیرمنو */
.header-menu ul.sub-menu li a:hover {
    color: #034694;
    background-color: #f8f9fa; /* یک پس‌زمینه خیلی ملایم هنگام هاور */
    padding-right: 25px; /* یک افکت حرکت ریز به سمت چپ برای زیبایی */
}

/* -----------------------------------------
   زیرمنوهای تو در تو (سطح ۳ به بعد)
   ----------------------------------------- */
.header-menu ul.sub-menu ul.sub-menu {
    top: 0;
    right: 100%; /* باز شدن زیرمنوی سطح سوم به سمت چپِ زیرمنوی قبلی */
    margin-top: 0;
    margin-right: 15px;
}

.header-menu ul.sub-menu li:hover > ul.sub-menu {
    margin-right: 0;
}
/* =========================================
   فلش متحرک برای منوهای دارای زیرمجموعه
   ========================================= */

/* استایل‌دهی به لینک‌هایی که زیرمنو دارند برای تنظیم فاصله فلش */
.header-menu ul li.menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 6px; /* فاصله بین متن و فلش */
}

/* ایجاد شکل فلش رو به پایین (Chevron) با استفاده از border */
.header-menu ul li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-bottom: 2px solid currentColor; /* استفاده از رنگ خود متن */
    border-left: 2px solid currentColor;
    transform: rotate(-45deg); /* چرخاندن برای ایجاد فلش رو به پایین */
    transition: transform 0.3s ease; /* انیمیشن نرم ۳۰۰ میلی‌ثانیه‌ای */
    margin-top: -4px; /* تنظیم تراز عمودی فلش با متن */
}

/* چرخش فلش رو به بالا هنگام هاور شدن ماوس */
.header-menu ul li.menu-item-has-children:hover > a::after {
    transform: rotate(135deg); /* چرخش به سمت بالا */
}
/* =========================================
   نوار ترندهای هفته
   ========================================= */

/* استایل کادر اصلی نوار ترندها */
.trend-bar {
    width: 1157px;
    height: 45px;
    margin: 0 auto; /* وسط‌چین کردن کادر */
    background-color: #034694; /* رنگ پس‌زمینه آبی */
    border-radius: 0 0 19px 19px; /* گرد کردن فقط دو گوشه پایین */
    display: flex;
    align-items: center;
    padding: 10px 20px;
    box-sizing: border-box;
    overflow: hidden; /* جلوگیری از بیرون زدن هشتگ‌ها */
    position: relative;
    top: -10px; /* برای اینکه کاملاً به زیر باکس هدر بچسبد (بسته به مارجین هدر ممکن است نیاز به تنظیم داشته باشد) */
    z-index: 1;
    padding-top: 15px;
}

/* عنوان ترندهای هفته */
.trend-box {
    display: flex;
    align-items: center;
    width: 100%;
}

.trend-title {
    display: flex; /* اضافه شده: برای کنار هم قرار دادن آیکن و متن در یک خط */
    align-items: center; /* اضافه شده: هم‌تراز کردن دقیق آیکن و متن از وسط */
    color: #E8C774; /* رنگ طلایی */
    font-weight: bold;
    white-space: nowrap; /* جلوگیری از شکستن خط */
    margin-left: 20px; /* فاصله از هشتگ‌های متحرک */
    z-index: 2; /* قرار گرفتن روی انیمیشن در صورت تداخل */
    background-color: #034694; /* برای جلوگیری از دیده شدن متن‌های زیر آن */
    padding-left: 10px;
}

/* استایل اختصاصی فقط برای آیکن آتش در بخش ترندها */
.trend-title img {
    width: 25px !important;  /* برای تغییر سایز، این عدد را کم یا زیاد کنید */
    height: 25px !important; /* برای تغییر سایز، این عدد را کم یا زیاد کنید */
    opacity: 1 !important;
    filter: none !important; /* برای اطمینان از اینکه فیلتر کم‌رنگ کننده‌ای روش نیست */
}


/* کادر دربرگیرنده انیمیشن هشتگ‌ها */
.trend-scroll {
    flex-grow: 1;
    overflow: hidden; /* مخفی کردن هشتگ‌های بیرون از کادر */
    white-space: nowrap;
    position: relative;
}

/* مسیر حرکت هشتگ‌ها */
.trend-track {
    display: inline-flex;
    gap: 30px; /* فاصله بین هشتگ‌ها */
    animation: scrollHashtags 25s linear infinite; /* انیمیشن ۲۵ ثانیه‌ای پیوسته */
}

/* توقف انیمیشن با رفتن ماوس روی مسیر (هاور) */
.trend-scroll:hover .trend-track {
    animation-play-state: paused;
}

/* استایل خود هشتگ‌ها (تگ‌ها) */
.trend-track a {
    color: #ffffff; /* رنگ سفید */
    font-weight: 300; /* وزن نازک (Thin) */
    text-decoration: none;
    font-size: 14px;
    transition: text-shadow 0.2s ease;
}

/* بولد شدن هشتگ در زمان هاور */
.trend-track a:hover {
    text-shadow: 0 0 1px #ffffff, 0 0 1px #ffffff;
}


/* تعریف انیمیشن حرکت از راست به چپ */
@keyframes scrollHashtags {
    0% {
        transform: translateX(-100%); /* شروع از بیرون کادر در سمت راست */
    }
    100% {
        transform: translateX(100%); /* پایان در بیرون کادر در سمت چپ */
    }
}
/* ==========================================================================
   استایل‌های هدر در دسکتاپ (تنظیمات ساختار جدید)
   ========================================================================== */
/* در دسکتاپ کلاس nav-and-search-wrapper باید فضای بین لوگو و فروشگاه را پر کند */
@media screen and (min-width: 993px) {
    .nav-and-search-wrapper {
        display: flex;
        align-items: center;
        flex: 1;
        justify-content: space-between; /* فاصله انداختن بین منو (سمت راست) و جستجو (سمت چپ) */
        padding: 0 30px;
    }
}

.mobile-menu-btn, .close-menu-btn, .nav-overlay {
    display: none; /* مخفی در دسکتاپ */
}

/* ==========================================================================
   نسخه موبایل هدر و منو
   ========================================================================== */
@media screen and (max-width: 992px) {
    /* ۱. مخفی کردن نوار ترندها */
    .trend-bar {
        display: none !important;
    }

    /* ۲. چیدمان هدر: همبرگری راست، لوگو وسط، فروشگاه چپ */
    .header-box {
        justify-content: space-between;
        padding: 0 15px;
        height: 70px;
    }
    .header-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%); /* وسط چین کردن دقیق لوگو */
    }

    /* ۳. ظاهر دکمه همبرگری */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 100;
    }
    .mobile-menu-btn span {
        width: 25px;
        height: 3px;
        background-color: #034694;
        border-radius: 2px;
    }

    /* ۴. استایل پنجره کشویی منو */
    .nav-and-search-wrapper {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -300px; /* خارج از کادر در حالت پیش‌فرض */
        width: 280px;
        height: 100dvh !important;
        background: #fff;
        display: flex; /* <--- اضافه شد: برای فعال شدن قابلیت مرتب‌سازی */
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    /* ۵. نمایش منو هنگام باز شدن */
    .nav-and-search-wrapper.active {
        right: 0;
    }

    /* ۶. دکمه بستن منو */
    .close-menu-btn {
        display: block;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        margin-bottom: 20px;
        align-self: flex-end;
        order: 1; /* <--- اضافه شد: دکمه بستن در جایگاه اول */
    }

    /* ۷. کادر جستجو در منوی موبایل (بالای منو) */
    .header-search {
        width: 100%;
        height: 40px !important; 
        min-height: 40px !important;
        max-height: 40px !important;
        flex: 0 0 40px !important; /* <--- این دستور جلوی کش آمدن فلکس‌باکس را کاملاً می‌گیرد */
        margin: 0 0 20px 0;
        order: 2; 
    }

    /* هماهنگ کردن کادر تایپ (اینپوت) با عرض موبایل */
    .header-search input {
        width: 100% !important;
        height: 100% !important;
        box-sizing: border-box !important; /* جلوگیری از اضافه شدن پدینگ به ارتفاع کل */
        padding-right: 35px; /* ایجاد فضای خالی که متن روی آیکن ذره‌بین نرود */
    }

    /* تنظیم دقیق جایگاه آیکن جستجو در موبایل */
    .header-search .search-icon {
        top: 50% !important;
        transform: translateY(-50%) !important;
        right: 10px !important;
    }

    /* ۸. لیست منوها در موبایل (زیر هم) */
    .header-menu {
        order: 3; /* <--- اضافه شد: منوها در جایگاه سوم */
    }
    .header-menu, .header-menu ul {
        width: 100%;
        flex-direction: column;
        gap: 15px;
    }
    .header-menu ul.sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none; /* مخفی تا زمان کلیک */
        margin-right: 15px;
        border-right: 2px solid #eee;
        border-radius: 0;
    }

    /* ۹. کلاسی که با جاوااسکریپت اضافه می‌شود برای نمایش زیرمنو */
    .header-menu ul li.submenu-open > ul.sub-menu {
        display: block !important; /* <--- اضافه شد: باز کردن زیرمنو */
    }
    
    /* پرده تاریک پس‌زمینه */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh !important;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }
    .nav-overlay.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

/* =========================================
   ساختار گرید صفحه اصلی (پازل ابعاد دقیق)
   ========================================= */

.home-container {
    width: 1157px; /* دقیقاً هم‌عرض نوار ترندها */
    margin: 30px auto;
}

.home-grid {
    display: flex;
    gap: 23px; /* فاصله ۲۳ پیکسلی بین ستون راست و چپ */
}

/* --- ستون سمت راست (اسلایدر اصلی) --- */
.home-right {
    width: 556px;
    height: 527px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.main-slider, .slide, .slide-img, .slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide {
    position: absolute;
    top: 0; right: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.slide.active-slide { opacity: 1; z-index: 2; }

/* --- ستون سمت چپ --- */
.home-left {
    width: 578px;
    display: flex;
    flex-direction: column;
    gap: 23px; /* فاصله ۲۳ پیکسلی بین بالا (پربحث) و پایین (بنرها) */
}

/* مستطیل پربحث‌ترین‌ها */
.popular-slider-box {
    width: 100%;
    height: 263px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.pop-slide, .pop-img, .pop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; right: 0;
}
.pop-slide { opacity: 0; transition: opacity 0.5s ease; }
.pop-slide.active-slide { opacity: 1; z-index: 2; }

/* ردیف دو بنر کوچک */
.small-banners-row {
    display: flex;
    gap: 23px; /* فاصله ۲۳ پیکسلی بین دو بنر */
    height: 243px;
    width: 100%;
}

.banner-box {
    flex: 1; /* عرض را به طور مساوی بین دو بنر تقسیم می‌کند */
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background-color: #e0e0e0;
    display: block;
}

.banner-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* استایل کاور روی عکس‌ها (تاریکی و متن برای اسلایدرها و بنرها) */
.slide-overlay, 
.pop-overlay, 
.banner-title {
    position: absolute;
    bottom: 0; 
    left: 0; 
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px;
    margin: 0;
    display: block; 
    box-sizing: border-box;
    z-index: 5;
}

/* تنظیم رنگ سفید و وزن یکسان برای تمام عنوان‌ها */
.slide-overlay .slide-title, 
.pop-overlay h3, 
.banner-title {
    margin: 0;
    font-size: 15px;
    color: #ffffff; /* رنگ سفید */
    font-weight: 400; /* وزن یکسان و ضخیم برای همه */
    line-height: 1.5;
}
/* ==========================================================================
   نسخه موبایل: بخش اسلایدرها و بنرها (Responsive Slider)
   ========================================================================== */
@media screen and (max-width: 992px) {
    
    /* ۱. آزاد کردن عرض کانتینر اصلی در موبایل */
    .home-container {
        width: 100%;
        margin: 15px auto;
        padding: 0 15px; /* فاصله از لبه‌های گوشی */
        box-sizing: border-box;
    }

    /* ۲. تغییر گرید دسکتاپ به حالت ستونی (زیر هم) */
    .home-grid {
        flex-direction: column;
        gap: 15px; /* فاصله بین اسلایدر اصلی و بنرها */
    }

    /* ۳. سطر اول: اسلایدر اصلی (تمام عرض) */
    .home-right {
        width: 100%;
        height: 220px; /* ارتفاع مناسب برای اسلایدر موبایل */
        border-radius: 12px;
    }

    /* ۴. کانتینر سمت چپ دسکتاپ (حالا می‌آید زیر اسلایدر اصلی) */
    .home-left {
        width: 100%;
        gap: 15px;
    }

    /* ۵. مخفی کردن بخش پربحث‌ترین‌ها در موبایل */
    .popular-slider-box {
        display: none !important;
    }

    /* ۶. سطر دوم: دو بنر کوچک (در یک ردیف کنار هم) */
    .small-banners-row {
        height: 110px; /* ارتفاع مناسب برای بنرهای موبایل */
        gap: 10px; /* فاصله کمتر بین دو بنر در گوشی */
    }

    .banner-box {
        border-radius: 10px; /* گوشه‌های کمی گردتر در موبایل */
    }

    /* ۷. کوچک‌تر کردن فونت و پدینگ کادرهای تیره روی عکس‌ها در موبایل */
    .slide-overlay, 
    .banner-title {
        padding: 10px 15px;
    }

    .slide-overlay .slide-title, 
    .banner-title {
        font-size: 13px; /* فونت خواناتر برای صفحات کوچک */
        line-height: 1.4;
    }
}


/* =========================================
   استایل بخش پیشنهاد سردبیر
   ========================================= */
.editor-choice-section {
    position: relative; /* این خط بسیار مهم است */
    
    width: 1157px;
    margin: 40px auto;
}

/* هدر: عنوان سمت راست، دکمه‌ها سمت چپ */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.editor-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* مستطیل نازک عمودی */
.editor-line {
    width: 5px;
    height: 27px;
    background-color: #034694; /* آبی درخواستی شما */
    border-radius: 3px;
}

.editor-title-box h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* دکمه‌های اسلایدر */
.editor-nav {
    position: absolute;
    left: 15px; /* فاصله از لبه چپ کادر سفید */
    top: 50%; /* وسط‌چین عمودی در کادر */
    transform: translateY(-50%);
    display: flex;
    gap: 8px; /* فاصله بین دو دکمه */
    z-index: 10;
}

.ed-btn {
    width: 40px;
    height: 40px;
    background-color: #034694;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
    box-shadow: 0 6px 14px rgba(3,70,148,0.25);
}

.ed-btn:hover {
    background-color: #022d61; /* کمی تیره‌تر در حالت هاور */
}

/* کادر اصلی سفید */
.editor-box {
    width: 1157px;
    height: 116px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    /* پدینگ سمت چپ را 110 پیکسل کردیم تا دکمه‌ها آنجا جا بشوند */
    padding: 8px 8px 8px 110px; 
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    direction: ltr;
}

.editor-track {
    display: flex;
    gap: 20px; /* فاصله بین ۳ پست */
    height: 100px;
    direction: rtl; /* برگرداندن محتوا به راست‌چین */
    transition: transform 0.4s ease-in-out; /* انیمیشن نرم حرکت */
}

/* فرمول محاسبه عرض ۳ پست: 1157 (عرض کل) - 16 (پدینگ) = 1141 فضای مفید. 
   دو تا فاصله 20 پیکسلی داریم (مجموعا 40). 1141-40 = 1101. 
   1101 تقسیم بر 3 = دقیقاً 367 پیکسل عرض هر پست */
.editor-item {
    flex: 0 0 333px; /* عرض پست‌ها از 367 به 333 پیکسل کاهش یافت */
    width: 333px;
    height: 100px;
    display: flex;
    gap: 15px;
}

/* مربع ۱۰۰ در ۱۰۰ عکس */
.ed-thumb {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: solid 1px #e7e7e7;
}

.ed-thumb img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* محتوای متنی */
.ed-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* پخش کردن دسته، عنوان و زمان بالا و وسط و پایین */
    padding: 2px 0;
    flex-grow: 1;
}

/* دسته‌بندی مستطیل گرد طلایی */
.ed-cat {
    background-color: #E8C774;
    color: #000;
    font-size: 13px;
    font-weight: 300;
    padding: 3px 10px;
    border-radius: 7px;
    align-self: flex-start; /* فقط به اندازه متن عرض بگیرد */
}

.ed-title {
    margin: 0;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
}

.ed-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.ed-title a:hover {
    color: #034694;
}

/* زمان و آیکن ساعت */
.ed-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #888;
}

.ed-time svg {
    margin-bottom: 2px;
}
/* دکمه سمت راست */
#ed-prev {
    right: 15px; /* فاصله از لبه راست کادر */
}

/* دکمه سمت چپ */
#ed-next {
    left: 15px; /* فاصله از لبه چپ کادر */
}
/* ایجاد یک دیواره سفید سمت چپ برای مخفی شدن پست‌ها هنگام اسکرول */
.editor-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 110px; /* دقیقاً به اندازه فضایی که برای دکمه‌ها در نظر گرفتیم */
    height: 100%;
    background-color: #ffffff;
    z-index: 5; /* قرار گرفتن روی پست‌ها */
}

/* مطمئن می‌شویم دکمه‌ها روی این دیواره سفید قرار می‌گیرند */
.editor-nav {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    z-index: 10; /* قرار گرفتن روی دیواره سفید */
}

/* پست‌ها زیر دیواره سفید حرکت کنند */
.editor-track {
    position: relative;
    z-index: 1; 
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease-in-out;
}

/* =========================================
   ریسپانسیو بخش پیشنهاد سردبیر (موبایل و تبلت)
   ========================================= */
@media (max-width: 992px) {
    /* اصلاح کادر اصلی برای هم‌ترازی دقیق با اسلایدر */
    .editor-choice-section {
        width: 100%; /* تغییر به ۱۰۰ درصد */
        padding: 0; /* تنظیم پدینگ دقیقا مشابه home-container */
        box-sizing: border-box;
        margin: 15px auto 30px auto; 
    }

    /* کادر سفید رنگ محتوا */
    .editor-box {
        width: 100%;
        height: auto;
        padding: 15px; 
        box-sizing: border-box; 
    }

    /* حذف دیواره سفید زائد */
    .editor-box::before {
        display: none; 
    }

    /* تنظیمات اسلایدر برای نمایش ۱ پست */
    .editor-item {
        flex: 0 0 100%;
        width: 100%;
        height: auto;
    }

    /* دکمه‌ها در گوشه بالا سمت چپ */
    .editor-nav {
        top: 15px; 
        left: 15px; 
        bottom: auto;
        transform: none; 
        display: flex;
        gap: 5px; 
        z-index: 10; 
    }

    /* ابعاد دکمه‌ها */
    .ed-btn {
        width: 30px;
        height: 30px;
    }

    /* تنظیمات داخلی پست */
    .ed-thumb {
        width: 90px;
        height: 90px;
    }
    .ed-thumb img {
        width: 90px;
        height: 90px;
    }
    .ed-title {
        font-size: 13px;
    }
}

/* ==================================
   بخش بهترین ها از دید شما
=================================== */
.best-view-section {
    margin: 50px auto 0 auto; /* فاصله از بالا و وسط‌چین کردن کل بخش */
    width: 100%;
    max-width: 1157px; /* محدود کردن دقیق عرض به 1157 پیکسل */
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}



.best-view-grid {
    display: flex;
    justify-content: space-between; /* پخش منظم کارت‌ها */
    gap: 15px; /* فاصله بین کارت‌ها */
    flex-wrap: nowrap; /* جلوگیری از رفتن کارت‌ها به خط بعد */
}

.best-card {
    /* محاسبه عرض دقیق: 100 درصد منهای 45 پیکسل (3 تا فاصله 15 پیکسلی) تقسیم بر 4 */
    width: calc((100% - 45px) / 4); 
    height: 307px;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.best-img-wrap {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.best-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.best-title {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1; 
}

.best-title a {
    color: #222;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- تنظیمات اختصاصی متای کارت (لایک، زمان، کامنت) --- */
.best-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #888;
    margin-top: 10px;
    direction: rtl;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px; /* فاصله بین آیکن و عدد */
}

/* استایل آیکن‌های اختصاصی SVG شما */
.custom-icon {
    width: 16px;
    height: 16px;
    object-fit: contain; /* برای جلوگیری از دفرمه شدن آیکن */
    opacity: 0.8;
}

/* تغییر رنگ آیکن هنگام قرار گرفتن ماوس روی کارت (اختیاری) */
.best-card:hover .custom-icon {
    opacity: 1;
}
/* ==================================
   ریسپانسیو بخش بهترین ها از دید شما
=================================== */

/* تبلت‌ها (زیر 992 پیکسل) - نمایش ۴ کارت به صورت ۲ ردیف ۲ تایی */
@media (max-width: 992px) {
    .best-view-section {
        padding: 0 15px; 
        box-sizing: border-box;
    }
    .best-view-grid {
        flex-wrap: wrap; 
    }
    .best-card {
        width: calc((100% - 15px) / 2);
        height: auto;
        min-height: 280px; 
    }
}

/* موبایل‌ها (زیر 768 پیکسل) - نمایش فقط ۲ کارت کنار هم */
@media (max-width: 768px) {
    /* مخفی کردن کارت‌های سوم و چهارم به بعد در موبایل */
    .best-card:nth-child(n+3) {
        display: none;
    }
    
    .best-view-grid {
        gap: 10px; /* کاهش فاصله بین دو کارت برای موبایل */
        flex-wrap: nowrap; /* نگه داشتن در یک خط */
    }
    
    .best-card {
        width: calc((100% - 10px) / 2); /* محاسبه عرض برای قرارگیری ۲ کارت */
        padding: 8px; /* پدینگ کمتر برای استفاده بهتر از فضا */
        min-height: auto;
    }
    
    .best-img-wrap {
        height: 120px; /* ارتفاع عکس متناسب با عرض کارت در موبایل */
        margin-bottom: 8px;
    }
    
    .best-title {
        font-size: 12px; /* فونت تیتر کمی کوچکتر شود */
    }
    
    .best-meta {
        gap: 6px; /* کاهش فاصله بین آیکن‌ها */
        font-size: 10px; /* فونت لایک و کامنت کوچکتر شود */
        flex-wrap: wrap; /* در صورت کمبود جا، آیکن‌ها بشکنند */
    }
    
    .custom-icon {
        width: 14px;
        height: 14px;
    }
    
    .section-title {
        font-size: 15px; /* تیتر اصلی بخش */
    }
}
/* ==================================
بنر اصلی وبسایت
=================================== */
/* --- Full Width Banner Section --- */
.full-width-banner-section {
    margin: 40px 0;
    width: 100%;
    display: flex;
    justify-content: center; 
}

.full-width-banner-link {
    display: block;
    width: 100%;
    max-width: 1157px; 
    margin: 0 auto;
    border-radius: 15px; 
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.full-width-banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.full-width-banner-link img {
    width: 100%;
    height: auto; /* در دسکتاپ ارتفاع متناسب با عرض تغییر می‌کند */
    display: block;
    object-fit: cover;
    object-position: center; /* همیشه مرکز عکس را نمایش می‌دهد */
}

/* --- استایل‌های مخصوص موبایل (صفحه‌های کوچکتر از 768 پیکسل) --- */
@media (max-width: 768px) {
    .full-width-banner-section {
        margin: 25px 0; 
    }

    .full-width-banner-link {
        width: 95%; 
        border-radius: 10px; 
    }
    
    .full-width-banner-link img {
        height: 80px; /* 🟢 اینجا ارتفاع را برای موبایل ثابت کردیم */
  
    }
}

/* ==================================
   استایل دکمه لایک و انیمیشن قلب (طرح جدید کادردار)
=================================== */

/* کادر اصلی دربرگیرنده بخش لایک */
.post-like-wrapper {
    margin: 40px 0;
    width: 100%;
}

/* استایل کادر مستطیلی با لبه‌های گرد ۱۵ پیکسلی */
.post-like-container {
    display: flex;
    justify-content: space-between; /* متن رو می‌بره سمت راست و قلب رو می‌بره سمت چپ */
    align-items: center;
    background-color: #fff0f2; 
    border: 1px solid #ffe0e6;
    padding: 15px 25px; /* فاصله داخلی (از لبه‌ها) */
    border-radius: 15px; /* لبه‌های گرد ۱۵ پیکسلی که خواستید */
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.08);
    box-sizing: border-box; /* جلوگیری از بیرون زدن کادر از صفحه */
}

/* استایل متن داخل کادر */
.like-text {
    font-family: 'Estedad-FD', sans-serif;
    font-size: 16px; /* کمی فونت رو بزرگتر کردم که توی کادر عریض قشنگ‌تر بشینه */
    color: #000000;
    font-weight: 500;
}

/* --- استایل خود دکمه قلب و انیمیشن‌ها (کدهای قبلی خودتان) --- */
.like-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Estedad-FD', sans-serif;
    font-size: 18px;
    color: #ff4757;
    outline: none;
    padding: 0;
}

.heart-icon {
    width: 28px;
    height: 28px;
    stroke: #ff4757; 
    stroke-width: 2;
    transition: all 0.3s ease;
}

/* حالتی که کلیک شده: قلب توپر، سایه دار و اجرای انیمیشن */
.like-btn.liked .heart-icon {
    fill: #ff4757; 
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.6));
    animation: heartBeat 0.5s ease-in-out forwards;
}

.like-btn.liked .like-count {
    color: #ff4757;
    font-weight: bold;
}

/* انیمیشن تپش قلب موقع کلیک */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); } 
    100% { transform: scale(1); } 
}

/* ==================================
   بخش جدیدترین  خبرها (کدهای پایه و دسکتاپ)
=================================== */
.latest-news-section {
    max-width: 1157px;
    margin: 40px auto;
}

.section-title {
    font-size: 22px;
    font-weight: bold;
    color: #222;
    margin-bottom: 25px;
    position: relative;
    padding-right: 15px;
}

.section-title::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 27px;
    background-color: #034694;
    border-radius: 3px;
}

.news-columns {
    display: flex;
    gap: 23px; 
    align-items: flex-start;
}

.news-right-col {
    width: 857px;
    display: flex;
    flex-direction: column;
    gap: 23px; 
}

/* =========================================
   ستون سمت چپ و ویجت‌ها (دسکتاپ)
========================================= */
.news-left-col {
    width: 277px !important;
    box-sizing: border-box;
    flex-shrink: 0; 
}

.left-banner-container {
    width: 277px;
    height: 277px;
    overflow: hidden;
    border-radius: 12px; 
    margin-bottom: 20px; 
}

.left-banner-container a {
    display: block;
    width: 100%;
    height: 100%;
}

.left-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.3s ease; 
}

.left-banner-container:hover img {
    transform: scale(1.05);
}

.left-col-placeholder {
    width: 100%;
    min-height: 500px;
    background: #fff;
    border-radius: 10px;
    border: 2px dashed #ddd; 
}

.left-scrolling-products-wrapper {
    width: 277px !important; 
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    padding: 12px; 
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    height: 525px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.latest-reviews-widget {
    width: 277px !important;
    height: 371px; 
    background: #fff;
    border-radius: 10px; 
    padding: 12px;
    margin-top: 15px;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.social-networks-widget {
    width: 277px !important;
    height: auto; 
    background: #fff;
    border-radius: 10px;
    padding: 15px 4px; 
    margin-top: 15px;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* --- بقیه استایل‌های داخلی ویجت‌ها --- */
.custom-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.custom-title-line {
    display: inline-block;
    width: 4px;                
    height: 18px;              
    background-color: #034694;
    border-radius: 4px;        
    margin-left: 8px;          
}

.custom-title-text {
    font-size: 15px;           
    font-weight: 800;          
    color: #333;              
    margin: 0;                 
    line-height: 1;
}

.scrolling-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
}

.scrolling-content {
    animation: scrollUp 100s linear infinite;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scrolling-container:hover .scrolling-content {
    animation-play-state: paused;
}

@keyframes scrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); } 
}

.mini-product-card {
    display: flex;
    align-items: center;
    width: 100%; 
    box-sizing: border-box;
    height: 73px;
    background: #ffffff; 
    border-radius: 8px;
    padding: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); 
}

.mini-product-card:hover {
    background: #fcfcfc;
    border-color: rgba(0, 0, 0, 0.08); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); 
}

.mp-image {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    margin-left: 10px; 
    background: #fff;
    border-radius: 6px;
    padding: 2px;
}

.mp-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    font-size: 10px;
    color: #999;
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
}

.mp-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow: hidden;
}

.mp-title {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-badge {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    height: 24px;
    border-radius: 50px;
    background: linear-gradient(110deg, #034694 56%, #E8C774 44%); 
    padding: 0; 
    margin-top: 5px;
}

.product-price-badge .old-price {
    color: #555;
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px; 
    width: max-content; 
}

.product-price-badge .new-price {
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px; 
    width: max-content; 
}

.reviews-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px; 
    margin-top: 8px;
}

.review-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s ease;
}

.review-mini-card:hover .review-post-title {
    color: #034694; 
}

.review-image {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.review-image img, .review-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.review-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.review-post-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rpm-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #888;
    font-weight: 500;
}

.rpm-item svg {
    color: #aaa;
}

.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 10px; 
    margin-top: 12px;
    padding: 0 4px; 
}

.social-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 269px;
    height: 45px;
    margin: 0 auto;
    border-radius: 15px;
    text-decoration: none;
    color: #fff !important;
    padding: 0 12px;
    box-sizing: border-box;
    position: relative; 
    transition: all 0.3s ease; 
}

.social-links-container:hover .social-btn {
    filter: blur(5px) opacity(0.6);
    transform: scale(0.98); 
}

.social-links-container .social-btn:hover {
    filter: blur(0) opacity(1) brightness(1.05); 
    transform: scale(1.08) translateY(-2px); 
    box-shadow:0 12px 20px rgba(0, 0, 0, 0.46); 
    z-index: 10; 
}

.social-btn-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1); 
}

.social-name {
    font-size: 13px;
    font-weight: 400;
    font-family: 'Estedad-FD', Tahoma, Arial, sans-serif; 
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.social-follow {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.95;
}

/* --- استایل کارت مقالات --- */
.news-card {
    width: 857px;
    height: 227px;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    padding: 15px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
}

.news-card-thumb {
    width: 280px; 
    height: 100%;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-left: 20px;
    flex-shrink: 0;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-cat {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #034694;
    color: #ffffff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}

.news-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.news-card-title {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 12px 0;
    line-height: 1.5;
    position: relative;
}

.news-card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.news-card-title a:hover {
    color: #034694;
}

.news-card-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 25px;
    background-color: #034694;
    border-radius: 2px;
    margin-left: 8px;
    vertical-align: middle;
}

.news-card-excerpt {
    font-size: 13px; 
    color: #666; 
    line-height: 1.8;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 5; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-footer {
    display: flex;
    align-items: center;
    align-self: flex-end; 
    margin-top: auto; 
}

.news-card-author img {
    width: 31px;
    height: 31px;
    border-radius: 7px;
    object-fit: cover;
    margin-left: 15px; 
    vertical-align: middle;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 15px; 
    height: 31px;
    border: 1px solid #eaeaea; 
    border-radius: 8px;
    padding: 0 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
}

.meta-item svg {
    width: 14px;
    height: 14px;
    fill: #aaa;
}

/* ==========================================
   استایل‌های صفحه‌بندی
========================================== */
.latest-news-pagination-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 0px;
}

.latest-news-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0px;
}

.latest-news-pagination a.page-numbers,
.latest-news-pagination span.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: #ffffff;
    color: #444444;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.latest-news-pagination a.page-numbers:hover {
    background-color: #f9f9f9;
}

.latest-news-pagination span.page-numbers.current {
    background-color: #E8C774;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(232, 199, 116, 0.6);
}

.ajax-loading {
    opacity: 0.5;
    pointer-events: none;
}

#latest-news-wrapper {
    display: flex;
    flex-direction: column;
    gap: 23px;
    width: 100%;
}


/* ==================================
   *** ریسپانسیو *** (باید همیشه پایین باشد)
=================================== */

/* تبلت‌ها و مانیتورهای کوچک (زیر 1024 پیکسل) */
@media (max-width: 1024px) {
    /* ۱. ستون‌ها و خبرها */
    .news-columns {
        flex-direction: column; 
    }
    
    .news-right-col {
        width: 100%; 
    }
    
    .news-card {
        width: 100%; 
    }

    .latest-news-section .container {
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* ۲. کانتینر اصلی ستون چپ */
    .news-left-col {
        width: 100% !important; 
        display: flex;
        flex-direction: column;
        margin-top: 40px; 
    }

    /* ۳. بنر تبلیغاتی */
    .left-banner-container {
        width: 100% !important; 
        height: auto !important; 
        max-width: 100%;
        aspect-ratio: auto; 
    }

    .left-banner-container img {
        width: 100%;
        height: auto; 
        object-fit: contain; 
    }

    .left-col-placeholder {
        width: 100% !important;
        min-height: 250px;
    }

    /* ۴. ویجت محصولات */
    .left-scrolling-products-wrapper {
        width: 100% !important; 
        height: 400px; 
    }

    .mini-product-card {
        width: 100%; 
    }

    /* ۵. ویجت جدیدترین نقد و بررسی */
    .latest-reviews-widget {
        width: 100% !important; 
        height: auto !important; 
        padding-bottom: 20px;
    }

    .review-mini-card {
        width: 100%;
    }

    /* ۶. ویجت شبکه‌های اجتماعی */
    .social-networks-widget {
        width: 100% !important; 
    }

    .social-btn {
        max-width: 100% !important; 
    }
}

/* موبایل‌ها (زیر 768 پیکسل) */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column; 
        height: auto; 
        padding: 12px;
    }

    .news-card-thumb {
        width: 100%; 
        height: 180px; 
        margin-left: 0; 
        margin-bottom: 15px; 
    }

    .news-card-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .news-card-title::before {
        height: 18px; 
    }

    .news-card-excerpt {
        -webkit-line-clamp: 3; 
        font-size: 12px;
        margin-bottom: 15px;
    }

    .news-card-footer {
        width: 100%;
        justify-content: space-between; 
        align-self: center;
        margin-top: 10px;
    }

    .news-card-author img {
        margin-left: 0; 
    }

    .news-card-meta {
        padding: 0 8px;
        gap: 8px; 
        height: 28px;
    }

    .meta-item {
        font-size: 11px;
    }
    
    .meta-item img.custom-icon {
        width: 12px;
        height: 12px;
    }

    /* === تغییرات جدید برای کارت محصولات فقط در موبایل === */
    .mini-product-card {
        height: 100px !important; 
        padding: 10px !important; 
    }

    .product-price-badge {
        height: 32px !important; 
        padding: 0 10px !important; 
        margin-top: 8px !important; 
    }

    .product-price-badge .old-price {
        font-size: 15px !important; 
    }

    .product-price-badge .new-price {
        font-size: 15px !important; 
    }

    .mp-title {
    font-size: 14px;
    }

    .mp-image{
        height: 90px;
        width: 90px;
    }

}

/* =====================
   بازگشت به بالا
   ===================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px; /* قرارگیری در پایین سمت چپ */
    width: 45px;
    height: 45px;
    background-color: #034694;
    color: #ffffff; /* رنگ آیکون */
    border: none;
    border-radius: 12px; /* لبه‌های گرد */
    box-shadow: 0 4px 15px rgba(3, 70, 148, 0.4); /* سایه نرم هم‌رنگ */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* تنظیمات انیمیشن و مخفی بودن اولیه */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    z-index: 9999; /* قرارگیری روی تمام المان‌های صفحه */
}

/* کلاسی که توسط جاوااسکریپت برای نمایش دکمه اضافه می‌شود */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* افکت هاور (رفتن ماوس روی دکمه) */
.back-to-top:hover {
    background-color: #02336e; /* کمی تیره‌تر شدن */
    box-shadow: 0 6px 20px rgba(3, 70, 148, 0.6); /* پررنگ‌تر شدن سایه */
    transform: translateY(-3px); /* دکمه کمی به سمت بالا حرکت می‌کند */
}

/* =======================================
   استایل بخش کروسل محصولات (چی لازم داری)
   ======================================= */
.category-carousel-section {
    margin: -30px auto 20px auto; /* وسط‌چین کردن کل سکشن */
    width: 100%;
    max-width: 1157px;
}

.carousel-outer-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 1250px;
    margin: 0 auto;
}

/* کادر مستطیل اصلی */
.carousel-main-box {
    width: 1157px;
    height: 265px;
    border-radius: 10px;
    border: 1px solid #e0e0e0; /* حاشیه نازک */
    background: #fff;
    overflow: hidden; /* پنهان کردن کارت های اضافه */
    position: relative;
}

/* ریلی که کارت ها در آن حرکت میکنند */
.carousel-track {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 15px;
    padding: 0 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* مخفی کردن اسکرول بار فایرفاکس */
    -ms-overflow-style: none;
    will-change: transform;
}
.carousel-track::-webkit-scrollbar {
    display: none; /* مخفی کردن اسکرول بار کروم و سافاری */
}

/* مربع های فلش دار بیرون مستطیل */
/* مربع های فلش دار بیرون مستطیل */
.carousel-btn {
    width: 40px;
    height: 40px;
    background-color: #034694;
    color: #fff;
    border-radius: 8px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    transition: 0.3s;
    z-index: 10;
    /* اضافه شدن سایه نرم هم‌رنگ با خود دکمه */
    box-shadow: 0 4px 12px rgba(3, 70, 148, 0.35); 
}

.carousel-btn:hover {
    background-color: #02336d;
    /* سایه در حالت هاور کمی پررنگ‌تر و بزرگ‌تر می‌شود */
    box-shadow: 0 6px 16px rgba(3, 70, 148, 0.55);
}

/* فاصله 38 پیکسلی از مستطیل */
/* محاسبه: عرض دکمه (40) + فاصله دلخواه (38) = 78 */
.carousel-btn.prev-btn { 
    right: -78px; 
}

.carousel-btn.next-btn { 
    left: -78px; 
}


/* ---------------- کارت های داخل کروسل ---------------- */
.cat-card {
    min-width: 187px;
    width: 187px;
    height: 230px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.cat-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* مستطیل عکس محصول */
.cat-img-box {
    width: 100%;
    height: 160px;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}
.cat-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* دکمه نام دسته بندی */
.cat-btn-box {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.cat-btn {
    width: 171px;
    height: 36px;
    background-color: #034694;
    color: #fff;
    border-radius: 7px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}


/* =======================================
   نسخه موبایل: کروسل دسته‌بندی محصولات
   ======================================= */
@media screen and (max-width: 768px) {
    
    /* ۱. برداشتن عرض ثابت و تمام‌عرض کردن مستطیل اصلی */
    .carousel-main-box {
        width: 100%;
        height: auto; /* برای انعطاف‌پذیری بیشتر */
        min-height: 265px;
        border-radius: 8px; /* گوشه‌های نرم‌تر برای موبایل */
        margin: 0 15px; /* کمی فاصله از لبه‌های صفحه گوشی */
        width: calc(100% - 30px); /* محاسبه عرض دقیق با در نظر گرفتن فاصله */
    }

    /* ۲. مخفی کردن دکمه‌های چپ و راست در موبایل (کاربر با لمس اسکرول می‌کند) */
    .carousel-btn {
        display: none !important;
    }


    .carousel-track {
        padding: 0 10px; /* کاهش پدینگ داخلی برای نمایش بهتر در موبایل */
    }


}

/* =======================================
   استایل فوتر سایت
   ======================================= */
.site-footer {
    /* پس زمینه گرادیان رادیال طبق درخواست */
    background: radial-gradient(circle at center, #0077FF 0%, #034694 100%);
    color: #ffffff;
    /* فاصله 5 پیکسلی از راست، چپ و پایین */
    margin: 0 5px 5px 5px;
    /* لبه های گرد 10 پیکسلی */
    border-radius: 10px;
    padding-top: 50px;
    position: relative;
    overflow: hidden; /* جلوگیری از بیرون زدگی محتوا */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 ستون مساوی */
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

/* --- ستون اول: لوگو و توضیحات --- */
.footer-logo img {
    max-width: 160px;
    height: auto;
    margin-bottom: 15px;
}

.footer-site-title {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 800;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    text-align: justify;
}

/* --- استایل عناوین فوتر (مشترک در ستون ها) --- */
.footer-title {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* مستطیل نازک طلایی رنگ کنار عنوان */
.footer-title::before {
    content: "";
    display: block;
    width: 6px;
    height: 22px;
    background-color: #E8C774;
    border-radius: 4px;
}

/* --- ستون دوم: جدیدترین پست ها --- */
.footer-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-post-item {
    display: flex;
    align-items: center; /* قرارگیری تصویر و عنوان در یک ردیف */
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
}

.footer-post-item:hover {
    color: #E8C774;
}

.footer-post-thumb {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 8px; /* لبه گرد تصویر */
    overflow: hidden;
}

.footer-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-post-info {
    flex-grow: 1;
}

.footer-post-title {
    font-size: 13px;
    font-weight: normal;
    line-height: 1.6;
    margin: 0;
}

/* --- ستون سوم: دسته بندی ها --- */
.footer-categories {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-categories li {
    display: flex;
    justify-content: space-between; /* فاصله دادن نام و تعداد دسته */
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.footer-categories li:last-child {
    border-bottom: none;
}

.footer-categories a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s ease;
}

.footer-categories a:hover {
    color: #E8C774;
}

.cat-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #E8C774;
    font-weight: bold;
}

/* --- ستون چهارم: خبرنامه --- */
.newsletter-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-newsletter input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: 0.3s;
}

.footer-newsletter input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-newsletter input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #E8C774;
}

.footer-newsletter button {
    background-color: #E8C774;
    color: #034694; /* رنگ متن متضاد برای دکمه */
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    transition: 0.3s ease;
}

.footer-newsletter button:hover {
    background-color: #f7d98c;
    transform: translateY(-2px);
}

/* --- بخش کپی رایت --- */
.footer-bottom {
    background: rgba(0, 0, 0, 0.15); /* کمی تیره تر از گرادیان پس زمینه */
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
}

.footer-bottom p {
    margin: 0;
}

/* --- ریسپانسیو کردن فوتر --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* در تبلت 2 ستون شود */
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr; /* در موبایل 1 ستون شود */
    }
}
/* ==========================================================================
   Archive Page Specific Styles
   ========================================================================== */
.archive-container {
    max-width: 1157px;
    margin: 40px auto;
    padding: 0 15px; /* برای فاصله در موبایل */
}

/* بنر بالایی */
.archive-top-banner {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #f0f0f0; /* پس‌زمینه موقت در صورت لود نشدن عکس */
}

.archive-top-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* نوار عنوان و فیلتر */
.archive-filter-bar {
    width: 100%;
    height: 67px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.archive-title {
    font-size: 18px;
    font-weight: bold;
    color: #034694;
}

.archive-sort {
    display: flex;
    align-items: center;
}

.archive-sort label {
    font-size: 15px;
    color: #333;
    margin-left: 10px;
}

.archive-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    color: #555;
    background-color: #f9f9f9;
    outline: none;
    cursor: pointer;
}

/* باکس مربوط به کروسل بین مقالات */
.archive-middle-carousel {
    grid-column: 1 / -1; /* باعث می‌شود کروسل کل عرض را در گرید بگیرد */
    margin: 20px 0;
    width: 100%;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .archive-filter-bar {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .archive-top-banner {
        height: auto;
        min-height: 80px;
    }
    
    .posts-list {
        grid-template-columns: 1fr; /* یک ستونه شدن در موبایل */
    }
}
/* استایل بنر داینامیک در صفحه آرشیو */
.archive-banner-custom {
    margin-bottom: 20px;
}

.archive-banner-custom .container {
    padding: 0; /* اگر کانتینر پیش‌فرض پدینگ دارد، آن را صفر می‌کنیم */
}

.archive-banner-custom .full-width-banner-link {
    display: block;
    width: 100%;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
}

.archive-banner-custom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .archive-banner-custom .full-width-banner-link {
        height: auto;
        min-height: 80px;
    }
}
/* ایجاد فاصله برای کروسل فقط در صفحه آرشیو */
.archive-container .category-carousel-section {
    margin-top: 30px; /* فاصله از مقالات بالایی */
    margin-bottom: 30px; /* فاصله از مقالات پایینی */
}
/* ==================================
   استایل کارت‌های مقالات (طرح عمودی)
=================================== */
.archive-post-card {
    background: #ffffff;
    border-radius: 15px; /* گردی لبه‌های کل کارت */
    padding: 5px; /* این پدینگ باعث میشه تصویر و متن از لبه‌های کارت فاصله بگیرن */
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    height: 100%; /* برای هم‌ارتفاع شدن در گرید */
    box-sizing: border-box;
}

.archive-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* بخش تصویر */
.card-thumbnail-wrapper {
    width: 100%;
    border-radius: 10px; /* گردی لبه‌های تصویر هماهنگ با کارت */
    overflow: hidden;
    margin-bottom: 15px;
}

.card-thumbnail-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.card-thumbnail-wrapper img {
    width: 100%;
    height: 190px; /* ارتفاع ثابت برای تصاویر */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.archive-post-card:hover .card-thumbnail-wrapper img {
    transform: scale(1.05); /* زوم ملایم تصویر هنگام هاور */
}

/* بخش محتوای میانی (متن و عنوان) */
.card-content-body {
    flex-grow: 1; /* باعث میشه فوتر همیشه به پایین کارت بچسبه */
    padding: 0 5px;
}

.card-post-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.6;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* محدود کردن عنوان به ۲ خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-post-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-post-title a:hover {
    color: #034694; /* رنگ سازمانی شما هنگام هاور روی عنوان */
}

.card-post-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* محدود کردن متن خلاصه به ۳ خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
}

/* فوتر کارت */
.card-post-footer {
    display: flex;
    justify-content: space-between; /* فرستادن نویسنده به راست و متا به چپ */
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin: 0 5px;
}

/* راست: مشخصات نویسنده */
.card-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-author-info img {
    width: 30px;
    height: 30px;
    border-radius: 8px; /* کمی گرد کردن تصویر پروفایل */
    object-fit: cover;
}

.card-author-info .author-name {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

/* چپ: آیکون‌های متا */
.card-meta-info {
    display: flex;
    align-items: center;
    gap: 12px; /* فاصله بین آیکون‌ها */
}

.card-meta-info .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.card-meta-info .custom-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7; /* کمرنگ کردن ملایم آیکون‌ها */
}
