/*
Theme Name: Tasnim Style Theme
Author: mosalasenergy
Description: دی تمز تابناک وب
Version: 1.0
Text Domain: tasnim-style
*/

/* ======================================= */
/* فراخوانی فونت جدید (IRANSans) - بهینه شده */
/* ======================================= */











@font-face {
    font-family: 'IRANSans';
    font-style: normal;
    font-weight: bold;
    src: url('assets/fonts/sans/IRANSansWeb_Bold.eot');
    src: url('assets/fonts/sans/IRANSansWeb_Bold.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/sans/IRANSansWeb_Bold.woff2') format('woff2'),
         url('assets/fonts/sans/IRANSansWeb_Bold.woff') format('woff'),
         url('assets/fonts/sans/IRANSansWeb_Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'IRANSans';
    font-style: normal;
    font-weight: 500;
    src: url('assets/fonts/sans/IRANSansWeb_Medium.eot');
    src: url('assets/fonts/sans/IRANSansWeb_Medium.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/sans/IRANSansWeb_Medium.woff2') format('woff2'),
         url('assets/fonts/sans/IRANSansWeb_Medium.woff') format('woff'),
         url('assets/fonts/sans/IRANSansWeb_Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'IRANSans';
    font-style: normal;
    font-weight: 200; /* UltraLight */
    src: url('assets/fonts/sans/IRANSansWeb_UltraLight.eot');
    src: url('assets/fonts/sans/IRANSansWeb_UltraLight.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/sans/IRANSansWeb_UltraLight.woff2') format('woff2'),
         url('assets/fonts/sans/IRANSansWeb_UltraLight.woff') format('woff'),
         url('assets/fonts/sans/IRANSansWeb_UltraLight.ttf') format('truetype');
}

  :root {
            --main-red: #cc0000;
            --dark-red: #a00000;
            --text-dark: #222;
            --gray-text: #555;
            --border-color: #eee;
            --sidebar-width: 280px;
        }

        * { box-sizing: border-box; }

        body {
            font-family: 'IRANSans', sans-serif;
            background-color: #eee;
            color: var(--text-dark);
            margin: 0; padding: 0; line-height: 1.7;
            overflow-x: hidden;
        }

        a { text-decoration: none; color: inherit; transition: 0.3s; }
        ul { list-style: none; padding: 0; margin: 0; }

/* جلوگیری از خروج تصاویر از کادر در تمام سایت */
img {
    max-width: 100%;
    height: auto !important;
}
        .container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

        /* --- بخش چسبان (Header + Nav) --- */
  .sticky-top-wrapper {
    position: sticky;
    top: 0;
    z-index: 10000; /* این باید از لایه سیاه بیشتر باشد */
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

        /* هدر */
        header { 
            padding: 12px 0; 
            background: #fff;
        }

      .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search {
    position: relative;
    display: block;
}

.header-search form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px; /* گوشه‌های گرد متناسب با استایل مدرن */
    padding: 3px 3px 3px 12px;
    transition: all 0.3s ease;
}

.header-search form:focus-within {
    background: #fff;
    border-color: var(--main-red);
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.1);
}

.header-search input[type="search"] {
    border: none;
    background: transparent;
    padding: 5px 8px;
    font-family: 'IRANSans', sans-serif;
    font-size: 13px;
    width: 180px; /* اندازه در دسکتاپ */
    outline: none;
    color: #333;
}

.header-search button {
    background: var(--main-red);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}

.header-search button:hover {
    background: var(--dark-red);
}

.header-search button svg {
    width: 16px;
    height: 16px;
}
.mobile-menu-header, .menu-close {
    display: none !important;
}
/* --- واکنش‌گرایی (Responsive) --- */

@media (max-width: 768px) {
    .header-search input[type="search"] {
        width: 120px; /* کوچک‌تر شدن در تبلت */
    }
}

@media (max-width: 480px) {
    /* در موبایل‌های خیلی کوچک، اگر فضا کم بود، جستجو را مخفی یا تمام‌عرض می‌کنیم */
    .header-search {
        display: none; /* یا می‌توانید استایل متفاوتی برای موبایل بدهید */
    }
    
    /* اگر می‌خواهید در موبایل هم باشد، این کد را جایگزین display:none کنید:
    .header-search input[type="search"] { width: 80px; } 
    */
}
        .logo { font-size: 24px; font-weight: bold; color: var(--main-red); }
        .logo img {
    max-width: 100%;
    height: auto !important;
}
        .menu-toggle {
            display: none;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            background: none; border: none; padding: 5px;
        }


        .menu-toggle span { width: 25px; height: 3px; background: var(--dark-red); border-radius: 2px; }

        /* منوی اصلی قرمز */
        nav.main-nav { background: var(--main-red); color: #000; }
        .nav-container { display: flex; justify-content: space-between; align-items: center; }
        
        nav.main-nav ul { display: flex; }
        nav.main-nav ul li a { display: block; padding: 10px 15px; color: #fff; font-size: 13px; font-weight: bold; }
        nav.main-nav ul li a:hover { background:  var(--dark-red); }

        /* استایل تاریخ در منو */
        .today-date {
            font-size: 12px;
            padding-left: 15px;
            opacity: 0.9;
            font-weight: 100;
            color: #fff;
        }



/* =========================================== */
/* منوی چسبان (sticky) فقط برای دسکتاپ */
/* =========================================== */
@media (min-width: 993px) {
    .sticky-nav {
        position: relative;
        top: 0;
        width: 100%;
        z-index: 9999;
        transition: all 0.3s ease;
    }
    
    .sticky-nav.fixed {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        animation: slideDown 0.4s ease;
    }
    
    @keyframes slideDown {
        from { transform: translateY(-100%); }
        to { transform: translateY(0); }
    }
    
    /* لوگوی داخل منو که فقط در حالت sticky نشان داده می‌شود */
    .sticky-logo {
        display: none;
        margin-left: 20px; /* فاصله از سمت چپ (برای راست‌چین margin-right) */
    }
    
    .sticky-nav.fixed .sticky-logo {
        display: block;
    }
    
    .sticky-logo img {
        max-height: 40px;
        width: auto;
        vertical-align: middle;
    }
    
    /* تنظیم نوار منو در حالت sticky برای همراستایی */
    .sticky-nav.fixed .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .sticky-nav.fixed .nav-list {
        flex: 1;
    }
    
    /* برای سایت‌های راست‌چین */
    body.rtl .sticky-logo {
        margin-left: 0;
        margin-right: 20px;
    }
}

/* در موبایل همان رفتار قبلی را دارد (هیچ تغییری لازم نیست) */





        /* --- چیدمان محتوا --- */
        .main-wrapper { 
            display: flex; 
            gap: 20px; 
            margin-top: 16px;
            margin-bottom: 50px;
        }

        .col-main { flex: 0 0 65%; } 
        .col-side { flex: 0 0 35%; } 


.box {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    background: #fff;
    -webkit-box-shadow: 0 0 3px #ced4da;
    box-shadow: 0 0 3px #ced4da;
    padding: 10px;
}


/* ========== اسلایدر اصلی ========== */
.home-slider-container {
    position: relative;
    margin: 0 0 4px;
    overflow: hidden;
    border-radius: 4px;
        margin-bottom: 16px;
    
}

.home-slider {
    position: relative;
    width: 100%;
}

.slide-item {
    display: none;
    position: relative;
    width: 100%;
}

.slide-item.active {
    display: block;
}

.slide-bg {
    position: relative;
    width: 100%;
    height: 558px;
}

.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    
}

/* گرادیان روی تصویر (دقیقاً مطابق خواسته) */
.slide-item:after {
    position: absolute;
    top: 50%;
    right: 0;
    bottom: 50px;
    left: 0;
    z-index: 1;
    height: auto;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    content: "";
    border-radius: 0 0 4px 4px;
    pointer-events: none;
}

.slide-content {
    position: absolute;
    bottom: 8%;
    right: 5%;
    left: 5%;
    text-align: right;
    color: #fff;
    z-index: 2;
    padding: 20px 25px;
}



.slide-title {
    font-size: 26px;
    margin: 10px 0;
    line-height: 1.4;
}

.slide-title a {
    color: #fff;
    text-decoration: none;
    font-family: 'IRANSans', Tahoma, sans-serif !important;
}

.slide-title a:hover {
    color: #e38417;
}

.slide-excerpt {
    font-size: 14px;
    opacity: 0.9;
    margin: 15px 0;
    line-height: 1.6;
}

/* دکمه‌های فلش */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background: var(--main-red);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* نقاط پایین اسلایدر */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background: #b8b8b8;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active,
.dot:hover {
    background: var(--main-red);
    transform: scale(1.1);
}
/* =========================================== */
/* انتقال نقاط اسلایدر به پایین و سمت راست     */
/* =========================================== */

/* چیدمان container به صورت ستونی */
.home-slider-container {
    display: flex !important;
    flex-direction: column !important;
    /* overflow: hidden;  این خط را نگه دارید تا تصویر گوشه‌های گرد داشته باشد */
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

/* اسلایدر فضای بالایی را پر می‌کند */
.home-slider {
    flex: 1;
    position: relative;
}

/* نقاط اسلایدر را در جریان عادی (پایین تصویر) قرار می‌دهد */
.slider-dots {
    position: static !important; /* از حالت مطلق خارج می‌شود */
    display: flex !important;
    justify-content: flex-end !important; /* محتوا را به سمت راست می‌برد */
    width: 100% !important;
    padding: 8px 15px 12px !important; /* فاصله از لبه‌ها */
    box-sizing: border-box !important;
    z-index: 10 !important;
    text-align: right !important;
}

/* استایل هر نقطه (در صورت نیاز به تغییر سایز) */
.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background: #b8b8b8;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active, .dot:hover {
    background: var(--main-red);
    transform: scale(1.1);
}
/* واکنش‌گرایی */
@media (max-width: 768px) {
    .slide-bg {
        height: 270px;
    }
    .slide-content {
        padding: 12px 18px;
    }
    .slide-title {
        font-size: 20px;
    }
    .slide-excerpt {
        display: none;
    }
    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}



/* =========================================== */
/* نمایش دکمه‌های فلش اسلایدر فقط هنگام هاور   */
/* =========================================== */

/* دکمه‌ها را به طور پیش‌فرض مخفی کن */
.home-slider-container .slider-arrow {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* وقتی ماوس روی کل کانتینر اسلایدر رفت، دکمه‌ها را نشان بده */
.home-slider-container:hover .slider-arrow {
    opacity: 1;
    visibility: visible;
}

/* برای اطمینان از اینکه دکمه‌ها در حالت فوکوس با کیبورد هم دیده شوند (دسترسی‌پذیری) */
.home-slider-container .slider-arrow:focus {
    opacity: 1;
    visibility: visible;
    outline: 2px solid var(--main-red);
}
@media (max-width: 768px) {
    .home-slider-container .slider-arrow {
        opacity: 0.7;
        visibility: visible;
    }
    .home-slider-container:hover .slider-arrow {
        opacity: 0.7;
    }
}

/* =========================================== */
/* سه خبر زیر اسلایدر – بدون سایه، بدون هاور، بدون ارتفاع ثابت */
/* =========================================== */
.three-news-section {
    margin: 4px 0 4px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
        margin-bottom: 16px;
}

.three-news-header {
    margin-bottom: 20px;
    border-right: 4px solid var(--main-red);
    padding-right: 12px;
}

.three-news-title {
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 20px;
    margin: 0;
    color: #222;
}

.three-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.three-news-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    /* border حذف شد */
}

.three-news-link {
    display: block;
    text-decoration: none;
}

.three-news-img {
    width: 100%;
    /* ارتفاع حذف شد - تصویر با ارتفاع طبیعی خودش قرار می‌گیرد */
    overflow: hidden;
}

.three-news-img img {
    width: 100%;
    height: auto; /* نسبت ابعاد اصلی حفظ می‌شود */
    display: block;
    border-radius: 4px;
}

.three-news-content {
    padding: 8px 0 12px;
}

.three-news-item-title {
    font-size: 15px;
    font-weight: bold;
    margin: 0;
    line-height: 1.5;
    font-family: 'IRANSans', Tahoma, sans-serif;
    color: #000;
}

/* واکنش‌گرایی */
@media (max-width: 992px) {
    .three-news-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .three-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .three-news-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================== */
/* بخش چهار خبر (مشابه سه خبر اما ۴ ستونه)      */
/* =========================================== */
.four-news-section {
    margin: 16px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.four-news-header {
    margin-bottom: 20px;
    border-right: 4px solid var(--main-red);
    padding-right: 12px;
}

.four-news-title {
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 20px;
    margin: 0;
    color: #222;
}

.four-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.four-news-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.four-news-link {
    display: block;
    text-decoration: none;
}

.four-news-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.four-news-content {
    padding: 8px 0 12px;
}

.four-news-item-title {
    font-size: 15px;
    font-weight: bold;
    margin: 0;
    line-height: 1.5;
    font-family: 'IRANSans', Tahoma, sans-serif;
    color: #000;
}

/* واکنش‌گرایی */
@media (max-width: 992px) {
    .four-news-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .four-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 550px) {
 .four-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
/* =========================================== */
/* دو باکس مجزا (یادداشت و تحلیل / گزارش و گفت‌وگو) */
/* =========================================== */
.two-boxes-wrapper {
    margin: 20px 0 30px;
}

.two-boxes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* هر باکس به صورت مستقل با استایل box */
.standalone-box {
    background: #fff;
    border-radius: 4px;
    padding: 15px 15px 10px;
    box-shadow: 0 0 3px #ced4da;
    transition: all 0.3s ease;
}

.section-header {
    margin-bottom: 20px;
    border-right: 4px solid var(--main-red);
    padding-right: 12px;
}

.section-title {
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 20px;
    margin: 0;
    color: #222;
}

.section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-item {
    position: relative;
    padding: 8px 18px 8px 0;
    border-bottom: 1px dotted #eee;
    transition: all 0.2s ease;
}

.list-item::before {
    content: "";
    position: absolute;
    right: 0;
    top: 15px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 8px 4px 0;
    border-color: transparent var(--main-red) transparent transparent;
    transform: rotate(-10deg) skewX(-15deg);
}

.list-link {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}

.list-item:hover .list-link {
    color: var(--main-red);
}

.list-item:last-child {
    border-bottom: none;
}

/* واکنش‌گرایی: در موبایل هر باکس در یک ردیف جداگانه */
@media (max-width: 768px) {
    .two-boxes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
        /* تیتر یک */
        .featured-news {
            display: flex;
            gap: 20px;
            margin-bottom: 40px;
            padding-bottom: 25px;
            border-bottom: 3px solid var(--main-red);
        }
        .featured-img { flex: 0 0 50%; }
        .featured-img img { width: 100%; height: 280px; object-fit: cover; border-radius: 5px; }
        .featured-text { flex: 0 0 50%; }
        /* تنظیمات تیتر یک (بولد و خوانا) */
/* تنظیمات تیتر یک (تضمین لود شدن فایل بولد) */
.featured-text h1,
.featured-text h2 { 
    font-family: 'IRANSans', Tahoma, sans-serif !important; /* دستور مستقیم برای لود فایل ضخیم */
    font-size: 24px !important;
    margin: 0 0 15px 0; 
    color: #000; 
    line-height: 1.7; 
}

/* اعمال به لینک تیتر */
.featured-text h1 a,
.featured-text h2 a {
    font-family: 'IRANSans', Tahoma, sans-serif !important;
}
        .featured-text p { font-size: 14px; color: var(--gray-text); text-align: justify; }

        /* لیست اخبار */
        .news-item { display: flex; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px;}
        .news-item img { width: 160px; height: 100px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
        .news-item-content h3 { font-size: 15px; margin: 0 0 8px 0; color: var(--main-red); }
        .news-item-content p { font-size: 13px; color: var(--gray-text); margin: 0; }

        /* سایدبار */
        /* طرح جدید عناوین سایدبار (متن + هاشور) */
/* ===================================== */
/* طرح جدید عناوین سایدبار (الگوی نوار رنگی) */
/* ===================================== */

/* تنظیم پایه ویجت */
.widget {
    position: relative; /* برای قرارگیری نوار خاکستری درون این کادر */
    margin-bottom: 30px;
}

/* ایجاد نوار خاکستری در پس‌زمینه (تمام عرض) */
.widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px; /* هم‌ارتفاع با باکس رنگی */
    background: #f0f0f0; /* رنگ خاکستری ملایم */
    z-index: 0;
}

/* تنظیم باکس رنگی که فقط به اندازه متن باز می‌شود */
.widget-title {
    position: relative;
    z-index: 1; /* قرارگیری باکس رنگی روی نوار خاکستری */
    display: table; /* این ترفند باعث می‌شود عرض باکس فقط به اندازه متن باشد */
    height: 30px;
    line-height:30px; /* وسط‌چین کردن عمودی متن */
    background: var(--main-red); /* رنگ اصلی از تنظیمات قالب */
    color: #fff; /* رنگ سفید متن */
    padding: 0 15px 0 30px; /* فاصله متن از لبه‌ها (سمت چپ بیشتر برای زیبایی) */
    margin: 0 0 20px 0;
    border-right: 4px solid var(--dark-red); /* نوار عمودی تیره‌تر در سمت راست */
    font-family: 'IRANSans', Tahoma, sans-serif !important;
    font-size: 15px;
}

/* اطمینان از حذف هاشورهای قبلی */
.widget-title::after {
    display: none !important;
}
        .pol-news { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; border-bottom: 1px solid #f9f9f9; padding-bottom: 8px; }
        .pol-news img { 
    width: 60px !important; 
    height: 60px !important; 
    object-fit: cover; 
    border-radius: 4px; 
    flex-shrink: 0; /* این دستور جادویی از مچاله شدن تصویر جلوگیری می‌کند */
}
        .pol-news span { font-size: 13px; }

        /* تبلیغات */
        .ad-slot { background: #fdfdfd; border: 1px solid #eee; margin-bottom: 20px; text-align: center; position: relative; }
        .ad-slot img { width: 100%; display: block; }
        .ad-tag { font-size: 9px; color: #bbb; position: absolute; top: 0; right: 5px; }



.pagination { display: flex; gap: 10px; margin-top: 30px; }
.pagination .page-numbers { padding: 5px 12px; border: 1px solid #ddd; background: #f9f9f9; color: #333; }
.pagination .current { background: #cc0000; color: #fff; border-color: #cc0000; }

.post-tags a {
    display: inline-block;
    background: #f1f1f1;
    padding: 3px 10px;
    margin: 2px;
    font-size: 12px;
    color: #666;
    border-radius: 3px;
}
.post-tags a:hover { background: #cc0000; color: #fff; }


/* =========================================== */
/* اسکرول سمت چپ برای بخش آخرین اخبار (RTL)     */
/* =========================================== */

.latest-news-sidebar-wrapper {
    max-height: 320px;          /* ارتفاع دلخواه */
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 6px;          /* فاصله از اسکرول بار (برای LRT) */
    scroll-behavior: smooth;
    direction: rtl;             /* تغییر جهت کانتینر → اسکرول بار سمت چپ */
}

.latest-news-sidebar-wrapper ul {
    direction: rtl;             /* برگرداندن جهت متن به راست‌چین */
    padding-right: 0;           /* حذف پدینگ پیش‌فرض */
    margin: 0;
}

/* استایل اسکرول بار (کروم، سافاری، ادج) */
.latest-news-sidebar-wrapper::-webkit-scrollbar {
    width: 6px;
}
.latest-news-sidebar-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.latest-news-sidebar-wrapper::-webkit-scrollbar-thumb {
    background: #b0b0b0;
    border-radius: 4px;
}
.latest-news-sidebar-wrapper::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* فایرفاکس */
.latest-news-sidebar-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #b0b0b0 #f1f1f1;
}




/* ======================================= */
/* ویجت چندرسانه‌ای با الهام از اسلایدر اصلی */
/* ======================================= */
.multimedia-widget {
    overflow: hidden;
}

.multimedia-slider-container {
    position: relative;
}

.multimedia-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.multimedia-slide {
    display: none;
    width: 100%;
    text-align: center;
}

.multimedia-slide.active {
    display: block;
    animation: fadeEffect 0.5s ease;
}

@keyframes fadeEffect {
    from { opacity: 0; }
    to { opacity: 1; }
}

.multimedia-link {
    display: block;
    text-decoration: none;
}

.multimedia-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.multimedia-caption {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-top: 8px;
    padding: 0 5px;
    line-height: 1.5;
    font-family: 'IRANSans', Tahoma, sans-serif;
}

/* نقاط اسلایدر (دقیقاً مشابه اسلایدر اصلی) */
.multimedia-dots {
    text-align: center;
    margin-top: 15px;
}

.multimedia-dots .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.multimedia-dots .dot.active,
.multimedia-dots .dot:hover {
    background-color: var(--main-red);
    transform: scale(1.2);
}





/* استایل کلی لیست آخرین اخبار */
.latest-news-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-news-sidebar li {
    position: relative;
    padding: 10px 18px 10px 0; /* فاصله از راست برای قرارگیری مثلث */
    border-bottom: 1px dotted #ddd;
    transition: all 0.3s ease;
}

/* ساخت مثلث کوچک قرمز */
.latest-news-sidebar li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 18px; /* اگر فونت بزرگتر است این عدد را کمی زیاد کنید تا وسط بیاید */
    width: 0;
    height: 0;
    
    /* ابعاد مثلث: عدد 8px طول مثلث را بیشتر و آن را تیزتر می‌کند */
    border-style: solid;
    border-width: 4px 8px 4px 0; 
    border-color: transparent var(--main-red) transparent transparent;
    
    /* --- ایجاد حالت کج --- */
    /* rotate: چرخش به سمت بالا یا پایین */
    /* skewX: کشیدن مثلث برای کج دیده شدن */
    transform: rotate(-15deg) skewX(-20deg); 
    
    transition: all 0.3s ease;
}

.latest-news-sidebar li a {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    display: block;
    text-decoration: none;
}

/* افکت حرکت و تغییر رنگ در هنگام هاور */

.latest-news-sidebar li:hover::before {
    border-color: transparent var(--dark-red) transparent transparent;
}

.latest-news-sidebar li:hover a {
    color: var(--main-red);
}

/* حذف خط آخرین آیتم */
.latest-news-sidebar li:last-child {
    border-bottom: none;
}

/* =========================================== */
/* استایل خبر ویژه (عنوان قرمز)                */
/* =========================================== */
.special-news,
.special-news a {
    color: var(--main-red) !important;
    font-weight: bold;
}





/* اصلاح ستون اصلی برای جلوگیری از شکستگی در فلکس‌باکس */
.col-main {
    min-width: 0; /* این خط برای جلوگیری از بیرون زدگی محتوا در Flexbox حیاتی است */
    overflow-wrap: break-word;
    word-wrap: break-word;
}




/* =========================================== */
/* چیدمان تصویر و خلاصه در صفحه خبر (Single)   */
/* =========================================== */

.single-summary-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
}

.single-image-col {
    flex: 1;
}

.single-summary-col {
    flex: 1;
}

.post-summary-thumb {
    text-align: center;
}

.summary-featured-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}



/* حذف عنوان خلاصه - در صورت تمایل فاصله اول را کم کنید */
.summary-text {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    margin-top: 0;
}

/* در موبایل: ستون‌ها به ترتیب زیر هم قرار می‌گیرند */
@media (max-width: 768px) {
    .single-summary-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .single-image-col,
    .single-summary-col {
        flex: auto;
        width: 100%;
    }
    
    .summary-title {
        font-size: 18px;
    }
    
    .summary-text {
        font-size: 14px;
    }
}

/* =========================================== */
/* استایل‌های صفحه تک خبر (روتیتر، نشان ویژه، خلاصه) */
/* =========================================== */

/* روتیتر بالای تیتر */
.post-ro-titr {
    font-size: 14px;
    color: #555;

}

/* نشان خبر ویژه */
.special-badge {
    display: inline-block;
    background: #ff5722;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
    line-height: 1.4;
}

/* خلاصه خبر (جایگزین چکیده معمولی) */
.post-summary {
    font-size: 16px;
    color: #444;
    background: #f9f9f9;
    padding: 15px 10px;
    margin: 20px 0 25px;
    line-height: 1.8;
    border-radius: 4px;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .post-ro-titr {
        font-size: 16px;
    }
    .post-summary {
        font-size: 14px;
        padding: 12px 15px;
    }
    .special-badge {
        font-size: 10px;
        padding: 1px 6px;
    }
}


.post-content {
    text-align: justify;
    line-height: 1.9;
    font-size: 14px;
    color: #545454;
    padding: 0 20px;
}




/* مخصوص تصاویر داخل متن خبر (در صفحه Single) */
.post-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 15px auto; /* وسط‌چین کردن تصاویر داخل متن */
    border-radius: 5px;
}

/* اصلاح کلاس‌های پیش‌فرض وردپرس برای تصاویر */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: right;
    margin: 0 0 20px 20px;
}

.alignright {
    float: left;
    margin: 0 20px 0 0;
}

/* اگر از آی‌فریم یا ویدیو هم استفاده می‌کنید این کد لازم است */
.post-content iframe, 
.post-content embed, 
.post-content video {
    max-width: 100%;
    width: 100%;
    height: auto;
}
/* کانتینر کلی نظرات */
.comments-area {
    margin-top: 40px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 5px;
}

/* لیست نظرات */
.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.comment {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 4px;
}

.comment .children {
    list-style: none;
    margin-right: 30px; /* فاصله برای نظرات پاسخ داده شده */
    border-right: 2px solid var(--main-red);
    padding-right: 15px;
    margin-top: 10px;
}

/* هدر نظر (نام و تاریخ) */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
}

.comment-author b {
    color: var(--main-red);
}

.comment-metadata a {
    color: #999;
}

/* متن نظر */
.comment-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin: 5px 0;
}

/* دکمه پاسخ */
.reply a {
    display: inline-block;
    color: #fff;
    background: #888;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 3px;
    transition: 0.3s;
}

.reply a:hover {
    background: var(--main-red);
}

/* --- استایل فرم ارسال نظر --- */
.comment-respond {
    background: #f1f1f1;
    padding: 20px;
    border-radius: 5px;
}

#reply-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.comment-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-form-col {
    flex: 1;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
}

.comment-form textarea:focus {
    border-color: var(--main-red);
    outline: none;
}

/* دکمه ارسال نظر */
.submit-btn {
    background: var(--main-red);
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.submit-btn:hover {
    background: var(--dark-red);
}

/* واکنش‌گرا کردن فرم */
@media (max-width: 600px) {
    .comment-form-row {
        flex-direction: column;
    }
}




/* --- Styles for 404 Page --- */
.error-404-wrapper {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}

.error-code {
    font-size: clamp(80px, 10vw, 120px); /* اندازه متغیر برای موبایل و دسکتاپ */
    color: var(--main-red);
    margin: 0;
    line-height: 1;
    font-weight: 900;
}

.error-title {
    font-size: 24px;
    margin: 20px 0;
    color: #333;
    font-weight: 700;
}

.error-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.8;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* فرم جستجو در صفحه 404 */
.error-search-form {
    max-width: 450px;
    margin: 0 auto 40px;
}

.error-search-form form {
    display: flex;
    gap: 8px;
}

.error-search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'IRANSans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.error-search-form input[type="search"]:focus {
    border-color: var(--main-red);
}

.error-search-form button {
    background: var(--main-red);
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
    transition: background 0.3s;
}

.error-search-form button:hover {
    background: var(--dark-red);
}

/* دکمه بازگشت به خانه */
.back-to-home {
    display: inline-block;
    background: var(--main-red);
    color: #fff;
    padding: 12px 35px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.2);
}

.back-to-home:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.3);
    color: #fff;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 600px) {
    .error-404-wrapper {
        padding: 40px 15px;
    }
    .error-title {
        font-size: 20px;
    }
    .error-search-form form {
        flex-direction: column;
    }
    .error-search-form button {
        padding: 12px;
    }
}





/* =========================================== */
/* بخش دسته عکس‌ها (پایین قالب) - با آیکون SVG */
/* =========================================== */
.photo-gallery-section {
    background: #fafafa;
    padding: 40px 0;
    margin-top: 30px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.photo-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-red);
}

.photo-gallery-title {
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 20px;
    color: #222;
    margin: 0;
    padding-right: 12px;
    border-right: 4px solid var(--main-red);
}

.photo-gallery-more {
    font-size: 13px;
    color: var(--main-red);
    background: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--main-red);
    transition: 0.3s;
    text-decoration: none;
}

.photo-gallery-more:hover {
    background: var(--main-red);
    color: #fff;
}

/* گالری گرید */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.photo-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.photo-gallery-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.photo-gallery-link img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.photo-gallery-item:hover img {
    transform: scale(1.05);
}

/* آیکون SVG روی تصویر */
.photo-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    border-radius: 4px;
}

.photo-gallery-item:hover .photo-icon-overlay {
    opacity: 1;
}

.photo-icon-overlay svg {
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
    transition: transform 0.2s;
}

.photo-gallery-item:hover .photo-icon-overlay svg {
    transform: scale(1.1);
}

/* عنوان عکس */
.photo-gallery-caption {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    background: white;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .photo-gallery-link img {
        height: 150px;
    }
    .photo-gallery-caption {
        font-size: 12px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .photo-gallery-link img {
        height: 130px;
    }
    .photo-gallery-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* =========================================== */
/* بخش ویدئو (حرفه‌ای، متفاوت با گالری عکس)   */
/* =========================================== */
.video-gallery-section {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    padding: 50px 0;
    margin-top: 30px;
    border-top: 4px solid var(--main-red);
    border-bottom: none;
}

.video-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.video-gallery-title {
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 24px;
    color: #fff;
    margin: 0;
    padding-right: 15px;
    border-right: 4px solid var(--main-red);
    letter-spacing: -0.5px;
}

.video-gallery-more {
    font-size: 13px;
    color: var(--main-red);
    background: transparent;
    padding: 5px 15px;
    border-radius: 4px;
    border: 1.5px solid var(--main-red);
    transition: 0.3s;
    text-decoration: none;
    font-weight: bold;
}

.video-gallery-more:hover {
    background: var(--main-red);
    color: #fff;
    transform: translateY(-2px);
}

/* گرید ویدئو */
.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.video-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.4s;
}

.video-gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px rgba(0,0,0,0.6);
}

.video-gallery-link {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.video-gallery-link img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.video-gallery-item:hover img {
    transform: scale(1.1);
}

/* لایه تیره آیکون پلی */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(3px);
}

.video-gallery-item:hover .video-play-overlay {
    opacity: 1;
}

/* دایره آیکون پلی با افکت نبض */
.play-icon {
    width: 70px;
    height: 70px;
    background: rgba(204, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
    animation: pulse 2s infinite;
}

.play-icon svg {
    width: 35px;
    height: 35px;
    margin-right: 4px; /* برای تنظیم مرکز مثلث */
}

.video-gallery-item:hover .play-icon {
    transform: scale(1.15);
    background: var(--main-red);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(204, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0);
    }
}

/* اطلاعات ویدئو (عنوان و تاریخ) */
.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 15px 15px 10px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    text-align: right;
}

.video-gallery-item:hover .video-info {
    transform: translateY(0);
}

.video-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'IRANSans', Tahoma, sans-serif;
}

.video-date {
    font-size: 11px;
    color: #ddd;
    display: inline-block;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .video-gallery-link img {
        height: 200px;
    }
    .play-icon {
        width: 60px;
        height: 60px;
    }
    .play-icon svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 576px) {
    .video-gallery-section {
        padding: 35px 0;
    }
    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .video-gallery-link img {
        height: 180px;
    }
    .video-gallery-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .video-gallery-more {
        text-align: center;
    }
    .video-gallery-title {
        font-size: 22px;
    }
    .play-icon {
        width: 55px;
        height: 55px;
    }
    .play-icon svg {
        width: 28px;
        height: 28px;
    }
    .video-title {
        font-size: 14px;
    }
}
/* =========================================== */
/* اسکرول افقی برای گالری ویدئو در موبایل      */
/* =========================================== */
@media (max-width: 768px) {
    .video-gallery-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding-bottom: 15px; /* فضای اضافه برای دیده شدن سایه و اسکرول */
        scroll-snap-type: x mandatory;
    }

    .video-gallery-item {
        flex: 0 0 280px !important; /* عرض هر آیتم در موبایل */
        scroll-snap-align: start;
        margin-bottom: 5px;
    }

    .video-gallery-item:last-child {
        margin-left: 10px; /* فاصله انتهایی برای اسکرول راحت */
    }

    /* مخفی کردن اسکرول بار در کروم / سافاری (اختیاری) */
    .video-gallery-grid::-webkit-scrollbar {
        height: 5px;
    }
    .video-gallery-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    .video-gallery-grid::-webkit-scrollbar-thumb {
        background: var(--main-red);
        border-radius: 10px;
    }
}
/* =========================================== */
/* دکمه اسکرول به بالا (Back to Top)          */
/* =========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--main-red);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    line-height: 1;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-red);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.4);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

















        /* فوتر */
       /* --- استایل فوتر (نسخه دسکتاپ) --- */
.main-footer { 
    background: #1a1a1a; 
    color: #ccc; 
    padding: 50px 0 20px; 
    border-top: 5px solid var(--main-red); 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr; /* سه ستون: درباره ما پهن‌تر است */
    gap: 40px; 
}

.footer-col h4 { 
    color: #fff; 
    margin-bottom: 20px; 
    padding-bottom: 8px;
    border-bottom: 2px solid var(--main-red); 
    display: inline-block; 
    font-size: 18px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.8;
}
/* =========================================== */
/* شبکه‌های اجتماعی فوتر                       */
/* =========================================== */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icon img {
    width: 22px;
    height: 22px;
   
    transition: filter 0.3s;
}

.social-icon:hover {
    background: var(--main-red);
    transform: translateY(-3px);
    border-color: var(--main-red);
}

.social-icon:hover img {
    transform: scale(1.1);
}
/* استایل متن درباره ما در فوتر */
.about-us-text {
    font-size: 14px;
    line-height: 1.8;
    color: #ccc;
    text-align: justify;
}

.about-us-text p {
    margin: 0 0 10px;
}

.about-us-text a {
    color: var(--main-red);
    text-decoration: none;
}

.about-us-text a:hover {
    text-decoration: underline;
}
/* ریسپانسیو */
@media (max-width: 600px) {
    .social-icons {
        justify-content: center;
    }
    .social-icon {
        width: 36px;
        height: 36px;
    }
    .social-icon img {
        width: 18px;
        height: 18px;
    }
}
.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: var(--main-red);
}

.footer-bottom { 
    border-top: 1px solid #333; 
    margin-top: 40px; 
    padding-top: 20px; 
    text-align: center; 
    font-size: 12px; 
    color: #777;
}

/* --- ریسپانسیو کردن فوتر --- */

/* تبلت (زیر 992 پیکسل) */
@media (max-width: 992px) {
    .footer-grid { 
        grid-template-columns: 1fr 1fr; /* تبدیل به دو ستون */
        gap: 30px;
    }
    /* ستون اول (درباره ما) در تبلت تمام عرض شود */
    .footer-col:first-child {
        grid-column: span 2;
    }
}

/* موبایل (زیر 600 پیکسل) */
@media (max-width: 600px) {
    .main-footer {
        padding: 40px 0 20px;
        text-align: center; /* وسط‌چین شدن متون در موبایل */
    }
    
    .footer-grid { 
        grid-template-columns: 1fr; /* تبدیل به یک ستون */
        gap: 30px;
    }

    .footer-col:first-child {
        grid-column: span 1;
    }

    .footer-col h4 {
        display: table;
        margin: 0 auto 15px; /* وسط‌چین کردن تیترها */
    }
    
    .footer-links {
        padding: 0;
    }
}

        /* --- ریسپانسیو --- */
       @media (max-width: 992px) {
    /* نمایش دکمه همبرگری در هدر */
    .menu-toggle { 
        display: flex !important; 
    }

    /* نمایش هدرِ داخل منو فقط در موبایل */
    .mobile-menu-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: var(--main-red);
        color: #fff;
    }

    .menu-close {
        display: block !important;
        background: none;
        border: none;
        color: #fff;
        font-size: 30px;
        cursor: pointer;
    }

    /* استایل بدنه منوی کشویی */
 nav.main-nav {
        position: fixed; 
        top: 0; 
        right: -320px; 
        width: 300px; 
        height: 100vh;
        background: #ffffff !important;
        z-index: 10001; /* بالاتر از همه چیز */
        transition: 0.4s ease;
        display: flex;
        flex-direction: column;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    nav.main-nav.active { 
        right: 0; /* منو ظاهر می‌شود */
    }

    /* لیست لینک‌ها در موبایل */
    nav.main-nav ul { 
        flex-direction: column; 
        width: 100%;
        padding: 0;
    }

    nav.main-nav ul li {
        width: 100%;
    }

    nav.main-nav ul li a { 
        color: #333 !important; /* متن تیره روی زمینه سفید */
        border-bottom: 1px solid #f0f0f0; 
        padding: 15px 20px;
        font-size: 14px;
        display: block;
        font-weight: 500;
    }

    /* لایه تیره پشت منو */
 .overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    z-index: 9998; /* لایه سیاه (کمتر از ۱۰۰۰۰) */
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

    .overlay.active { 
        visibility: visible;
        opacity: 1; 
    }

    /* مخفی کردن تاریخ در موبایل اگر فضا کم بود (اختیاری) */
    .today-date {
        color: #666;
        padding: 15px 20px;
        border-top: 1px solid #eee;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

            

            .main-wrapper { flex-direction: column; }
            .featured-news { flex-direction: column; }
            .col-main, .col-side,  { flex: 0 0 100%; }
        }

        @media (max-width: 550px) {
            .news-item { flex-direction: row; }
            .news-item img { width: 100px; height: 70px; }
            .news-item-content p { display: none; }
        }