/* ================================================================
   style.css — کامل و یکپارچه (فاز ۵A.۲ + فاز ۵C)
   سایت خبرگزاری ایثارپرس | isarplus.ir
   ================================================================ */

/* ================================================================
   ۱. ریست و پایه
   ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Segoe UI', 'B Nazanin', sans-serif;
    background: var(--cream, #f5f0e8);
    color: #2d2d2d;
    line-height: 1.8;
    direction: rtl;
}
a {
    text-decoration: none;
    color: var(--primary-color, #2d5016);
    transition: all 0.3s ease;
}
a:hover {
    color: var(--secondary-color, #c9a84c);
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
ul, ol {
    list-style: none;
}

/* ================================================================
   ۲. هدر (فاز ۵A.۲ — متغیرهای داینامیک)
   ================================================================ */
.header {
    background: var(--header-bg, var(--primary-color, #2d5016)) !important;
    color: var(--header-text, #ffffff) !important;
    padding: 15px 0;
    border-bottom: 4px solid var(--header-border, var(--secondary-color, #c9a84c)) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.header-container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    gap: 10px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-logo {
    display: flex;
    align-items: center;
}
.header-logo img {
    max-height: 65px !important;
    max-width: 220px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}
.header-logo h1 {
    font-size: 26px;
    font-weight: 800;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
    color: var(--header-text, #ffffff);
}
.header-logo h1 span {
    color: var(--header-logo-span, var(--secondary-color, #c9a84c)) !important;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.header .date {
    font-size: 13px;
    background: var(--header-date-bg, rgba(255, 255, 255, 0.12));
    color: var(--header-date-text, #ffffff);
    padding: 5px 16px;
    border-radius: 30px;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
}
.header .date i {
    margin-left: 5px;
}

/* ================================================================
   ۳. جستجو (فاز ۵A.۲ — متغیرهای داینامیک)
   ================================================================ */
.search-form {
    display: flex;
    align-items: center;
    background: var(--search-input-bg, rgba(255, 255, 255, 0.15));
    border-radius: 30px;
    padding: 3px 3px 3px 12px;
}
.search-form input {
    background: transparent;
    border: none;
    padding: 6px 10px;
    color: var(--search-input-text, #ffffff);
    font-size: 13px;
    width: 160px;
    outline: none;
}
.search-form input::placeholder {
    color: var(--search-input-text, #ffffff);
    opacity: 0.55;
}
.search-form button {
    background: var(--search-btn-bg, var(--secondary-color, #c9a84c));
    color: var(--search-btn-text, var(--accent-color, #1a3c34));
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    font-weight: 600;
}
.search-form button:hover {
    background: var(--search-btn-hover-bg, #ffffff);
    color: var(--search-btn-hover-text, var(--accent-color, #1a3c34));
    transform: scale(1.03);
}

/* ================================================================
   ۴. منوی ناوبری (فاز ۵A.۲ — متغیرهای داینامیک)
   ================================================================ */
.navbar {
    background: var(--navbar-bg, var(--accent-color, #1a3c34)) !important;
    border-bottom: 3px solid var(--navbar-border, var(--secondary-color, #c9a84c)) !important;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
}
.navbar .nav-container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar ul {
    list-style: none;
    display: flex;
    gap: 5px;
    padding: 0;
    margin: 0;
}
.navbar ul li {
    position: relative;
}
.navbar ul li a {
    display: block;
    color: var(--navbar-text, #e8e0d0) !important;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
    white-space: nowrap;
}
.navbar ul li a i {
    margin-left: 8px;
    width: 16px;
    text-align: center;
}
.navbar ul li a:hover,
.navbar ul li a.active {
    background: var(--navbar-hover-bg, var(--secondary-color, #c9a84c)) !important;
    color: var(--navbar-hover-text, var(--accent-color, #1a3c34)) !important;
}
.navbar ul li .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--navbar-bg, var(--accent-color, #1a3c34));
    min-width: 220px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 6px 0;
    border-top: 3px solid var(--navbar-border, var(--secondary-color, #c9a84c));
    z-index: 1000;
}
.navbar ul li:hover .dropdown-menu {
    display: block;
}
.navbar ul li .dropdown-menu li a {
    padding: 10px 22px;
    font-weight: 400;
    font-size: 13px;
    border-radius: 0;
    color: var(--navbar-text, #e8e0d0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.navbar ul li .dropdown-menu li a:hover {
    background: var(--navbar-hover-bg, var(--secondary-color, #c9a84c));
    color: var(--navbar-hover-text, var(--accent-color, #1a3c34));
    padding-right: 28px;
}
.navbar ul li .dropdown-menu li:last-child a {
    border-bottom: none;
}
.navbar ul li.has-dropdown > a::after {
    content: ' ▾';
    font-size: 10px;
}

/* ===== اسکرول زیرمنوهای طولانی ===== */
.navbar ul li .dropdown-menu-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color, #c9a84c) transparent;
}
.navbar ul li .dropdown-menu-scroll::-webkit-scrollbar {
    width: 4px;
}
.navbar ul li .dropdown-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.navbar ul li .dropdown-menu-scroll::-webkit-scrollbar-thumb {
    background: var(--secondary-color, #c9a84c);
    border-radius: 10px;
}

/* ===== دکمه همبرگر ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--navbar-text, #e8e0d0);
    font-size: 26px;
    cursor: pointer;
    padding: 5px 10px;
}
.hamburger:hover {
    color: var(--navbar-hover-text, var(--secondary-color, #c9a84c));
    background: rgba(255, 255, 255, 0.1);
}

/* ================================================================
   ۵. منوی موبایل (شکیل و راست‌چین)
   ================================================================ */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navbar-bg, var(--accent-color, #1a3c34));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 60px 24px 30px;
    overflow-y: auto;
    z-index: 9999;
    flex-direction: column;
    align-items: stretch;
    direction: rtl;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
}
.mobile-menu.open {
    display: flex !important;
}
.mobile-close-btn {
    position: absolute;
    top: 16px;
    left: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.mobile-close-btn:hover {
    color: var(--secondary-color, #c9a84c);
    transform: rotate(90deg);
}
.mobile-menu > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin: 4px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu > a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--secondary-color, #c9a84c);
    padding-right: 24px;
}
.mobile-menu > a i {
    width: 24px;
    text-align: center;
    color: var(--secondary-color, #c9a84c);
    font-size: 16px;
}
.mobile-dropdown {
    margin: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: default;
}
.mobile-dropdown-header:hover {
    background: rgba(255, 255, 255, 0.05);
}
.mobile-dropdown-header a {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}
.mobile-dropdown-header a:hover {
    color: var(--secondary-color, #c9a84c);
}
.mobile-dropdown-header a i {
    width: 24px;
    text-align: center;
    color: var(--secondary-color, #c9a84c);
    font-size: 16px;
}
.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.mobile-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--secondary-color, #c9a84c);
}
.mobile-dropdown-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}
.mobile-dropdown-toggle.open i {
    transform: rotate(180deg);
}
.mobile-submenu {
    display: none;
    flex-direction: column;
    padding: 0 18px 12px 18px;
    gap: 6px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 0 0 10px 10px;
    margin-top: -6px;
}
.mobile-submenu.open {
    display: flex;
}
.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.mobile-submenu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--secondary-color, #c9a84c);
    padding-right: 26px;
}
.mobile-submenu a i {
    width: 20px;
    text-align: center;
    color: var(--secondary-color, #c9a84c);
    font-size: 13px;
}

/* ================================================================
   ۶. تیکر
   ================================================================ */
.ticker-wrapper {
    width: 100%;
    background: var(--accent-color, #1a3c34);
    border-bottom: 2px solid var(--secondary-color, #c9a84c);
    padding: 5px 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    height: 45px;
}
.ticker-label {
    flex-shrink: 0;
    background: var(--secondary-color, #c9a84c);
    color: var(--accent-color, #1a3c34);
    font-weight: 800;
    font-size: 14px;
    padding: 6px 20px;
    margin-right: 15px;
    border-radius: 30px;
    z-index: 2;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    direction: ltr;
    display: flex;
    align-items: center;
}
.ticker-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: ticker-scroll-left-to-right var(--ticker-speed, 30s) linear infinite;
}
@keyframes ticker-scroll-left-to-right {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
}
.ticker-group {
    display: flex;
    flex-shrink: 0;
}
.ticker-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #e8e0d0;
    font-size: 14px;
    padding: 0 15px;
    direction: rtl;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
}
.ticker-item a {
    color: #e8e0d0;
    text-decoration: none;
    transition: 0.3s;
}
.ticker-item a:hover {
    color: var(--secondary-color, #c9a84c);
}
.ticker-separator {
    color: var(--secondary-color, #c9a84c);
    font-weight: bold;
    font-size: 18px;
    padding: 0 5px;
    opacity: 0.8;
}

/* ================================================================
   ۷. اسلایدر اصلی
   ================================================================ */
.slider-container {
    position: relative;
    width: 100%;
    height: 460px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    background: var(--primary-color, #2d5016);
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.9s ease-in-out, transform 0.8s ease;
    background-size: cover;
    background-position: center;
    transform: scale(1);
}
.slide.active {
    opacity: 1;
    transform: scale(1.03);
    z-index: 2;
}
.slider-container:hover .slide.active {
    transform: scale(1.08);
    transition: transform 0.8s ease;
}
.slide::after {
    display: none !important;
}
.slide-content {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 750px;
    padding: 22px 32px;
    z-index: 3;
    color: #fff;
    direction: rtl;
    text-align: right;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    border-right: 4px solid var(--secondary-color, #c9a84c);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
.slide-content h2 {
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin: 6px 0 0 0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
}
.slide-content h2 a {
    color: #fff;
    text-decoration: none;
}
.slide-content h2 a:hover {
    color: var(--secondary-color, #c9a84c);
}
.dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
}
.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.dot.active {
    background: var(--secondary-color, #c9a84c);
    transform: scale(1.25);
}

/* ================================================================
   ۷-۱. اسلایدر — ریسپانسیو
   ================================================================ */
@media (max-width: 768px) {
    .slider-container {
        height: 280px;
    }
    .slide-content {
        max-width: 90%;
        bottom: 35px;
        padding: 12px 18px 30px 18px;
    }
    .slide-content h2 {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px;
    }
    .dots {
        bottom: 10px;
        gap: 8px;
        padding: 4px 12px;
    }
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .slider-container {
        height: 200px;
    }
    .slide-content {
        max-width: 95%;
        bottom: 25px;
        padding: 8px 12px 25px 12px;
    }
    .slide-content h2 {
        font-size: 12px !important;
        line-height: 1.2 !important;
        margin-bottom: 6px;
    }
    .dots {
        bottom: 6px;
        gap: 6px;
        padding: 3px 10px;
    }
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* ================================================================
   ۸. ساختار اصلی (پشتیبانی از ۰، ۱ یا ۲ سایدبار)
   ================================================================ */
.main-container {
    width: 90%;
    max-width: 1400px;
    margin: 25px auto;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.content {
    flex: 1;
    min-width: 300px;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.main-container.layout-none .content {
    width: 100%;
}

@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }
    .content {
        order: -1;
        width: 100%;
    }
    .sidebar {
        width: 100%;
    }
    .sidebar-right { order: 0; }
    .sidebar-left { order: 1; }
}

/* ================================================================
   ۹. سایدبار (فاز ۵A.۲ — پشتیبانی از گرادینت تیتر)
   ================================================================ */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 0 0 15px 0;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border-right: 4px solid var(--widget-border-color, #c9a84c);
}
.sidebar-widget h3 {
    background: var(--widget-title-bg-gradient) !important;
    color: var(--widget-title-text, #ffffff) !important;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
}
.sidebar-widget h3 i {
    margin-left: 8px;
    color: var(--widget-title-icon, #c9a84c) !important;
}
.sidebar-widget ul {
    list-style: none;
    padding: 0 15px;
}
.sidebar-widget ul li {
    border-bottom: 1px solid #f0ece4;
    padding: 10px 0;
}
.sidebar-widget ul li:last-child {
    border-bottom: none;
}
.sidebar-widget ul li a {
    color: var(--widget-link-color, #2d2d2d);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.sidebar-widget ul li a:hover {
    color: var(--widget-link-hover, #c9a84c);
    background: rgba(201, 168, 76, 0.12);
    padding-right: 14px;
    transform: translateX(-4px);
}
.sidebar-widget .badge {
    background: var(--secondary-color, #c9a84c);
    color: var(--accent-color, #1a3c34);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 12px;
    border-radius: 30px;
    margin-right: 6px;
}
.sidebar-widget ul li a img {
    width: 55px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8e0d0;
    flex-shrink: 0;
    background: #f0ece4;
}
.sidebar-widget ul li a .no-thumb-icon {
    width: 55px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0ece4;
    border-radius: 6px;
    color: #b5b0a0;
    font-size: 18px;
    flex-shrink: 0;
}

/* ================================================================
   ۱۰. کارت‌های اخبار و تحلیل‌ها
   ================================================================ */
.news-grid {
    display: grid;
    gap: 25px;
}
@media (min-width: 993px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 992px) and (min-width: 577px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.news-card {
    background: var(--box-bg-color, #ffffff);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.13);
}
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.news-card:hover img {
    transform: scale(1.03);
}
.news-card .no-img {
    width: 100%;
    height: 200px;
    background: #f5f3f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5b0a0;
    font-size: 32px;
}
.news-card .card-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-card .card-body h4 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.5;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
}
.news-card .card-body h4 a {
    color: var(--card-title-color, #1a3c34);
    text-decoration: none;
}
.news-card .card-body h4 a:hover {
    color: var(--card-title-hover-color, #c9a84c);
}
.news-card .card-body .news-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--card-summary-color, #6b6b7b);
    margin-bottom: 14px;
    flex: 1;
    text-align: justify;
}
.news-card .card-body .meta {
    font-size: 12px;
    color: var(--card-meta-text-color, #6b6b7b);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-card .card-body .meta i {
    color: var(--card-meta-icon-color, #c9a84c);
    margin-left: 4px;
}

/* ================================================================
   🎬 فاز ۵C: نشانگر ویدئو روی کارت خبر
   ================================================================ */
.news-card .video-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    background: var(--video-play-bg, var(--primary-color, #2d5016));
    color: var(--video-play-icon, #ffffff);
    border: 2px solid var(--video-play-border, var(--secondary-color, #c9a84c));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    z-index: 2;
    transition: all 0.3s ease;
}
.news-card:hover .video-badge {
    background: var(--video-play-hover-bg, var(--secondary-color, #c9a84c));
    color: var(--video-play-hover-icon, var(--accent-color, #1a3c34));
    border-color: var(--video-play-hover-bg, var(--secondary-color, #c9a84c));
    transform: scale(1.1);
}

/* ================================================================
   ۱۱. کاروسل گالری و ویدئو
   ================================================================ */
.carousel-section-wrapper {
    margin-top: 50px;
    position: relative;
}
.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden !important;
}
.carousel-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
    display: flex;
    gap: 18px;
    width: 100%;
}
.carousel-scroll-wrapper::-webkit-scrollbar {
    display: none;
}
.carousel-track {
    display: flex;
    gap: 18px;
    flex-wrap: nowrap;
}
.carousel-item {
    flex: 0 0 auto;
    width: 270px;
    background: var(--box-bg-color, #ffffff);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.carousel-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--heading-color, #1a3c34);
}
.carousel-item a {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
}
.carousel-item img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.carousel-item:hover img {
    transform: scale(1.03);
}
.carousel-item .no-img {
    width: 100%;
    height: 170px;
    background: #f5f3f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5b0a0;
    font-size: 28px;
}
.carousel-item h4 {
    font-size: 15px;
    font-weight: 700;
    padding: 14px 18px 18px;
    margin: 0;
    line-height: 1.5;
    color: var(--heading-color, #1a3c34);
    transition: none;
}
.carousel-item:hover h4 {
    color: var(--heading-color, #1a3c34);
}

/* ================================================================
   دکمه‌های کاروسل
   ================================================================ */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: var(--primary-color, #2d5016);
    color: var(--sidebar-title-color, #ffffff);
    border: 2px solid var(--secondary-color, #c9a84c);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
}
.carousel-btn:hover {
    background: var(--secondary-color, #c9a84c);
    color: var(--accent-color, #1a3c34);
    border-color: var(--secondary-color, #c9a84c);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}
.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
    box-shadow: none;
}
.carousel-btn-right { right: -20px; }
.carousel-btn-left { left: -20px; }

/* ================================================================
   ۱۲. دکمه پلی ویدئو (فاز ۵A.۲ — یکسان در همه صفحات)
   ================================================================ */
.video-play-overlay {
    position: relative;
    overflow: hidden;
}

.video-item .play-icon,
.video-play-overlay .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: var(--video-play-bg, var(--primary-color, #2d5016)) !important;
    color: var(--video-play-icon, #ffffff) !important;
    border: 2px solid var(--video-play-border, var(--secondary-color, #c9a84c)) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    z-index: 2;
}
.carousel-item:hover .video-play-overlay .play-icon,
.video-item:hover .play-icon {
    background: var(--video-play-hover-bg, var(--secondary-color, #c9a84c)) !important;
    color: var(--video-play-hover-icon, var(--accent-color, #1a3c34)) !important;
    border-color: var(--video-play-hover-bg, var(--secondary-color, #c9a84c)) !important;
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
}

/* ================================================================
   ۱۳. صفحه‌بندی
   ================================================================ */
.pagination-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 30px;
    margin-bottom: 10px;
    gap: 5px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid var(--primary-color, #2d5016);
    color: var(--primary-color, #2d5016);
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}
.page-link:hover {
    background: var(--primary-color, #2d5016);
    color: #fff;
    transform: translateY(-2px);
}
.page-link.active {
    background: var(--secondary-color, #c9a84c);
    color: var(--accent-color, #1a3c34);
    border-color: var(--secondary-color, #c9a84c);
    pointer-events: none;
}
.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ================================================================
   ۱۴. جزئیات مقاله
   ================================================================ */
.article-detail {
    background: #fff;
    padding: 35px 40px;
    border-radius: 16px;
    box-shadow: 0 3px 25px rgba(0, 0, 0, 0.05);
    border-right: 4px solid var(--secondary-color, #c9a84c);
}
.article-detail .category-tag {
    display: inline-block;
    background: var(--secondary-color, #c9a84c);
    color: var(--accent-color, #1a3c34);
    padding: 4px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}
.article-detail .category-tag i {
    margin-left: 5px;
}
.article-detail h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 12px 0 10px;
    line-height: 1.3;
    color: var(--detail-title-color, #1a3c34) !important;
}
.article-detail .meta-info {
    color: var(--detail-meta-color, #7a7a6a);
    font-size: 13px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0ece4;
    padding-bottom: 15px;
}
.article-detail .meta-info i {
    margin-left: 4px;
}
.article-detail img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 3px solid var(--cream, #f5f0e8);
}
.article-detail .body-text {
    font-size: 16px;
    line-height: 2.2;
    color: var(--detail-body-text-color, #2d2d2d);
    text-align: justify;
}

/* ================================================================
   ۱۵. فوتر
   ================================================================ */
.footer {
    background: var(--footer-bg, #1a3c34);
    color: var(--footer-text, #c5c0b0);
    padding: 40px 0 25px;
    margin-top: 40px;
    border-top: 5px solid var(--footer-border, #c9a84c);
}
.footer-container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 50px;
}
.footer-col {
    flex: 1;
    min-width: 200px;
}
.footer-col h4 {
    color: var(--footer-title, #c9a84c) !important;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(201, 168, 76, 0.3);
    padding-bottom: 8px;
    display: inline-block;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
    transition: color 0.3s ease;
}
.footer-col h4 i {
    margin-left: 8px;
    color: var(--footer-title, #c9a84c) !important;
    transition: color 0.3s ease;
}
.footer-col p {
    color: var(--footer-text, #c5c0b0);
    font-size: 14px;
    line-height: 1.8;
    transition: color 0.3s ease;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    padding: 5px 0;
}
.footer-col ul li a {
    color: var(--footer-text, #c5c0b0);
    font-size: 14px;
    transition: all 0.3s ease;
}
.footer-col ul li a i {
    margin-left: 6px;
    width: 18px;
    color: var(--footer-title, #c9a84c);
    transition: color 0.3s ease;
}
.footer-col ul li a:hover {
    color: var(--footer-link-hover, #c9a84c);
    padding-right: 5px;
}
.footer-col ul li a:hover i {
    color: var(--footer-link-hover, #c9a84c);
}

.footer-social {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    justify-items: center;
    margin-top: 10px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--footer-social-bg, #1a3c34);
    color: var(--footer-social-icon, #c5c0b0);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--footer-social-icon, #c5c0b0);
    text-decoration: none;
    font-size: 18px;
}
.footer-social a:hover {
    transform: translateY(-5px) scale(1.08);
    background: var(--footer-social-hover-bg, #c9a84c);
    color: var(--footer-social-hover-icon, #1a3c34);
    border-color: var(--footer-social-hover-bg, #c9a84c);
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4);
}
.footer-social a img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
}
.footer-social a:hover img {
    filter: brightness(0) invert(0.15);
}

.footer-bottom {
    text-align: center;
    padding: 25px 20px 15px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 14px;
    color: var(--footer-bottom-text, #b5b0a0);
    background: var(--footer-bottom-bg, #0d1f1a);
    transition: all 0.3s ease;
}
.footer-bottom p {
    margin: 0;
    color: var(--footer-bottom-text, #b5b0a0);
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    .footer-col {
        width: 100%;
        max-width: 400px;
        text-align: center;
    }
    .footer-col h4 {
        display: inline-block;
    }
    .footer-col ul {
        padding: 0;
        text-align: center;
    }
    .footer-col ul li {
        text-align: center;
    }
    .footer-social {
        justify-content: center;
        margin: 0 auto;
    }
}

/* ================================================================
   ۱۶. هدر دسته‌بندی
   ================================================================ */
.category-header {
    background: linear-gradient(135deg,
        var(--inner-header-bg-start, #2d5016) 0%,
        var(--inner-header-bg-end, #1a3c34) 100%);
    color: #fff;
    padding: 25px 30px;
    border-radius: 14px;
    margin-bottom: 25px;
    border-right: 6px solid var(--inner-header-border, #c9a84c);
}
.category-header h2 {
    font-size: 26px;
    font-weight: 800;
    font-family: 'B Nazanin', 'Tahoma', sans-serif;
    color: var(--inner-page-title-color, #ffffff) !important;
}
.category-header h2 i {
    margin-left: 10px;
    color: var(--inner-header-border, #c9a84c) !important;
}
.category-header p {
    color: var(--inner-header-subtitle, #ffffff);
    opacity: 0.85;
    font-size: 14px;
}

/* ================================================================
   ۱۷. گالری و ویدئو گرید
   ================================================================ */
.gallery-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.gallery-item,
.video-item {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}
.gallery-item:hover,
.video-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.gallery-item img,
.video-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-item .info,
.video-item .info {
    padding: 15px 20px;
}
.gallery-item .info h4,
.video-item .info h4 {
    font-size: 16px;
    font-weight: 700;
}
.gallery-item .info h4 a,
.video-item .info h4 a {
    color: #2d2d2d;
}
.gallery-item .info h4 a:hover,
.video-item .info h4 a:hover {
    color: var(--secondary-color, #c9a84c);
}
.gallery-item .info p,
.video-item .info p {
    color: #6c7065;
    font-size: 13px;
    line-height: 1.8;
}
.gallery-item .info .meta,
.video-item .info .meta {
    color: #b5b0a0;
    font-size: 12px;
}

/* ================================================================
   ۱۸. جستجو
   ================================================================ */
.search-result-item {
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-right: 4px solid var(--secondary-color, #c9a84c);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    transition: 0.3s;
}
.search-result-item:hover {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}
.search-result-item h3 {
    font-size: 18px;
    font-weight: 700;
}
.search-result-item h3 a {
    color: var(--accent-color, #1a3c34);
}
.search-result-item h3 a:hover {
    color: var(--secondary-color, #c9a84c);
}
.search-result-item p {
    color: #6c7065;
    font-size: 14px;
    margin-top: 5px;
}
.search-result-item .meta {
    color: #b5b0a0;
    font-size: 12px;
    margin-top: 8px;
}

/* ================================================================
   ۱۹. باکس خلاصه خبر
   ================================================================ */
.summary-box {
    background: var(--box-bg-color, #ffffff);
    color: var(--text-color, #2c3e50);
    border-right: 6px solid var(--primary-color, #c0392b);
    padding: 20px 25px;
    margin: 20px 0 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    line-height: 2;
    text-align: justify;
}
.summary-box .summary-icon {
    background: var(--primary-color, #c0392b);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
    font-size: 15px;
}
.summary-box .summary-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-color, #f1c40f);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}
.summary-box .summary-text {
    font-weight: 300;
    color: var(--text-color, #2c3e50);
    opacity: 0.95;
}

/* ================================================================
   ۲۰. استایل‌های اختصاصی صفحه اصلی
   ================================================================ */
.home-section-title {
    color: var(--home-heading-color, #da9e26) !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    font-size: 24px;
    letter-spacing: 0.5px;
}
.home-section-title i {
    color: var(--home-heading-color, #da9e26);
    background: var(--section-title-icon-bg, #f5ead1);
    padding: 10px;
    border-radius: 50%;
    font-size: 18px;
}
.home-section-btn {
    background: var(--home-btn-bg, #da9e26);
    color: var(--home-btn-text, #ffffff);
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}
.home-section-btn:hover {
    background: var(--home-btn-hover-bg, #305530);
    color: var(--home-btn-hover-text, #da9e26);
    transform: translateX(-3px);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--section-header-border, #1a3c34);
    flex-wrap: wrap;
    gap: 10px;
}

/* ================================================================
   بخش‌های صفحه اصلی — زیرعنوان و بلوک‌بندی
   ================================================================ */
.section-block {
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 14px;
    color: #6b6b7b;
    margin-top: -15px;
    margin-bottom: 20px;
    padding-right: 12px;
    border-right: 3px solid var(--secondary-color, #c9a84c);
    line-height: 1.6;
}

@media (max-width: 576px) {
    .section-subtitle {
        font-size: 12px;
        margin-top: -10px;
        margin-bottom: 15px;
        padding-right: 8px;
    }
    .section-block {
        margin-bottom: 10px;
    }
}

/* ================================================================
   ۲۱. واکنش‌گرا (Responsive)
   ================================================================ */

@media (max-width: 768px) {
    .header-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 10px 0;
    }

    .header-left {
        width: 100%;
        display: flex;
        justify-content: center;
        order: 1;
    }

    .header-logo img {
        max-height: 50px !important;
        max-width: 160px !important;
    }

    .header-right {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        order: 2;
    }

    .header .date {
        font-size: 12px;
        padding: 4px 12px;
        border-radius: 20px;
    }

    .search-form {
        width: auto;
        max-width: 200px;
        padding: 2px 2px 2px 10px;
    }

    .search-form input {
        width: 120px;
        font-size: 12px;
        padding: 4px 8px;
    }

    .search-form button {
        padding: 4px 10px;
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .navbar ul {
        display: none !important;
    }

    .hamburger {
        display: block !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        font-size: 28px;
        padding: 8px 12px;
        order: 2;
    }

    .navbar .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-col {
        width: 100%;
        max-width: 400px;
        text-align: center;
    }

    .footer-col h4 {
        display: inline-block;
    }

    .footer-col ul {
        padding: 0;
        text-align: center;
    }

    .footer-col ul li {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
        margin: 0 auto;
    }
}

@media (max-width: 992px) {
    .news-grid,
    .gallery-grid,
    .video-grid {
        grid-template-columns: 1fr 1fr;
    }
    .slider-container {
        height: 340px;
    }
}

@media (max-width: 576px) {
    .news-grid,
    .gallery-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }
    .slider-container {
        height: 260px;
    }
    .article-detail {
        padding: 20px;
    }
    .article-detail h1 {
        font-size: 22px;
    }
    .section-header {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 15px;
    }
    .home-section-title {
        font-size: 18px !important;
    }
    .home-section-title i {
        padding: 6px !important;
        font-size: 14px !important;
    }
    .home-section-btn {
        padding: 4px 12px !important;
        font-size: 11px !important;
    }
}

/* ================================================================
   map.css — استایل‌های نقشه استان‌ها
   ================================================================ */

.svg-wrapper {
    background: var(--box-bg-color, #ffffff);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    text-align: center;
    overflow: hidden;
    margin-bottom: 20px;
}

.svg-wrapper svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.map-border { fill: #2a3a4a !important; }
.map-sea { fill: #4a8ba0 !important; }
.map-island { fill: #5a7a6a !important; }
.map-sea-names { fill: #d4dbe5 !important; }
.map-province-names { fill: #e8e0d0 !important; }

.map-province {
    transition: fill 0.3s ease;
    cursor: pointer;
}

.map-province.azarbaijan-sh { fill: #2980b9 !important; }
.map-province.azarbaijan-gh { fill: #3498db !important; }
.map-province.ardebil { fill: #1abc9c !important; }
.map-province.zanjan { fill: #16a085 !important; }
.map-province.gilan { fill: #27ae60 !important; }
.map-province.mazandaran { fill: #2ecc71 !important; }
.map-province.golestan { fill: #f39c12 !important; }
.map-province.tehran { fill: #e74c3c !important; }
.map-province.alborz { fill: #e67e22 !important; }
.map-province.ghazvin { fill: #d35400 !important; }
.map-province.ghom { fill: #8e44ad !important; }
.map-province.markazi { fill: #f1c40f !important; }
.map-province.isfahan { fill: #2c3e50 !important; }
.map-province.semnan { fill: #16a085 !important; }
.map-province.yazd { fill: #9b59b6 !important; }
.map-province.kermanshah { fill: #2c3e50 !important; }
.map-province.kordestan { fill: #27ae60 !important; }
.map-province.lorestan { fill: #f1c40f !important; }
.map-province.hamedan { fill: #e67e22 !important; }
.map-province.ilam { fill: #d35400 !important; }
.map-province.khoozestan { fill: #c0392b !important; }
.map-province.booshehr { fill: #e74c3c !important; }
.map-province.hormozgan { fill: #2980b9 !important; }
.map-province.fars { fill: #27ae60 !important; }
.map-province.kohkilooyeh { fill: #16a085 !important; }
.map-province.charmahal { fill: #2ecc71 !important; }
.map-province.khorasan-r { fill: #e74c3c !important; }
.map-province.khorasan-j { fill: #f39c12 !important; }
.map-province.khorasan-sh { fill: #e67e22 !important; }
.map-province.kerman { fill: #9b59b6 !important; }
.map-province.sistan { fill: #d35400 !important; }

.map-province.azarbaijan-sh:hover { fill: #5dade2 !important; }
.map-province.azarbaijan-gh:hover { fill: #6cb4ee !important; }
.map-province.ardebil:hover { fill: #48c9b0 !important; }
.map-province.zanjan:hover { fill: #45b39d !important; }
.map-province.gilan:hover { fill: #58d68d !important; }
.map-province.mazandaran:hover { fill: #48c9b0 !important; }
.map-province.golestan:hover { fill: #f5b041 !important; }
.map-province.tehran:hover { fill: #ff6b6b !important; }
.map-province.alborz:hover { fill: #f39c12 !important; }
.map-province.ghazvin:hover { fill: #e67e22 !important; }
.map-province.ghom:hover { fill: #a569bd !important; }
.map-province.markazi:hover { fill: #f4d03f !important; }
.map-province.isfahan:hover { fill: #5d6d7e !important; }
.map-province.semnan:hover { fill: #45b39d !important; }
.map-province.yazd:hover { fill: #af7ac5 !important; }
.map-province.kermanshah:hover { fill: #5d6d7e !important; }
.map-province.kordestan:hover { fill: #58d68d !important; }
.map-province.lorestan:hover { fill: #f4d03f !important; }
.map-province.hamedan:hover { fill: #f39c12 !important; }
.map-province.ilam:hover { fill: #e67e22 !important; }
.map-province.khoozestan:hover { fill: #e74c3c !important; }
.map-province.booshehr:hover { fill: #ff6b6b !important; }
.map-province.hormozgan:hover { fill: #5dade2 !important; }
.map-province.fars:hover { fill: #58d68d !important; }
.map-province.kohkilooyeh:hover { fill: #45b39d !important; }
.map-province.charmahal:hover { fill: #48c9b0 !important; }
.map-province.khorasan-r:hover { fill: #ff6b6b !important; }
.map-province.khorasan-j:hover { fill: #f5b041 !important; }
.map-province.khorasan-sh:hover { fill: #f39c12 !important; }
.map-province.kerman:hover { fill: #af7ac5 !important; }
.map-province.sistan:hover { fill: #e67e22 !important; }

.map-link {
    display: inline-block;
    cursor: pointer;
}

@media (max-width: 992px) {
    .svg-wrapper { padding: 12px; }
}
@media (max-width: 576px) {
    .svg-wrapper { padding: 8px; border-radius: 10px; }
}

/* ================================================================
   استایل‌های اسلایدر گالری
   ================================================================ */
.gallery-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin: 20px 0;
    background: var(--box-bg-color, #f5f0e8);
}
.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: var(--box-bg-color, #f5f0e8) !important;
}
.gallery-slide.gallery-active {
    opacity: 1;
}
.gallery-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
}
.gallery-caption h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    z-index: 5;
}
.gallery-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.gallery-dot.gallery-active {
    background: var(--secondary-color, #c9a84c);
    transform: scale(1.25);
}

@media (max-width: 768px) {
    .gallery-slider-container {
        height: 250px;
    }
    .gallery-caption {
        font-size: 13px;
        padding: 4px 16px;
        bottom: 20px;
    }
    .gallery-caption h3 {
        font-size: 13px;
    }
    .gallery-dots {
        bottom: 10px;
        gap: 6px;
        padding: 4px 10px;
    }
    .gallery-dot {
        width: 10px;
        height: 10px;
    }
}
@media (max-width: 576px) {
    .gallery-slider-container {
        height: 180px;
    }
    .gallery-caption {
        font-size: 11px;
        padding: 2px 12px;
        bottom: 12px;
    }
    .gallery-caption h3 {
        font-size: 11px;
    }
    .gallery-dots {
        bottom: 6px;
        gap: 4px;
        padding: 3px 8px;
    }
    .gallery-dot {
        width: 8px;
        height: 8px;
    }
}

/* ================================================================
   گرید تصاویر گالری
   ================================================================ */
.gallery-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}
@media (max-width: 992px) {
    .gallery-thumbs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 576px) {
    .gallery-thumbs-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.gallery-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--box-bg-color, #ffffff);
    display: flex;
    flex-direction: column;
}
.gallery-thumb:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-thumb-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f0e8;
    border-radius: 12px 12px 0 0;
}
.gallery-thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.gallery-thumb:hover .gallery-thumb-image img {
    transform: scale(1.08);
}

.gallery-thumb-caption {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: var(--heading-color, #1a3c34) !important;
    background: var(--box-bg-color, #fff);
    direction: rtl;
    line-height: 1.5;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid var(--secondary-color, #c9a84c);
    border-radius: 0 0 12px 12px;
    transition: none;
}
.gallery-thumb:hover .gallery-thumb-caption {
    color: var(--heading-color, #1a3c34) !important;
}

@media (max-width: 768px) {
    .gallery-thumb-image { height: 150px; }
    .gallery-thumb-caption { font-size: 12px; padding: 8px 8px; }
}

/* ================================================================
   لایت‌باکس
   ================================================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightboxImg {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
    background: #111;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
}
.lightbox-close:hover {
    background: #c9a84c;
    border-color: #c9a84c;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
}
.lightbox-nav:hover {
    background: #c9a84c;
    border-color: #c9a84c;
    transform: translateY(-50%) scale(1.1);
}
.lightbox-prev {
    left: 20px;
}
.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100001;
    direction: ltr;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
@media (max-width: 576px) {
    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    .lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}

/* ================================================================
   دسته‌بندی‌های سایدبار
   ================================================================ */
.sidebar-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-category-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 5px 0;
}
.sidebar-category-item:last-child {
    border-bottom: none;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--heading-color, #1a3c34);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.sidebar-category-link:hover {
    background: rgba(201, 168, 76, 0.1);
    color: var(--secondary-color, #c9a84c);
    padding-right: 18px;
}

.cat-icon-wrapper {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(201, 168, 76, 0.12);
    color: var(--secondary-color, #c9a84c);
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}
.cat-sidebar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-category-html {
    padding: 8px 0;
}

/* ================================================================
   کاروسل کوچک دسته‌بندی‌های سایدبار
   ================================================================ */
.cat-mini-carousel {
    position: relative;
    margin: 6px 4px 10px;
    padding: 0 22px;
    overflow: hidden;
}

.cat-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 3px 2px;
}
.cat-carousel-track::-webkit-scrollbar { display: none; }

.cat-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(201, 168, 76, 0.18);
}
.cat-carousel-slide:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color, #c9a84c);
}

.cat-carousel-slide a {
    display: flex;
    text-decoration: none;
    color: inherit;
    align-items: center;
    gap: 10px;
    padding: 6px;
}

.cat-carousel-img {
    position: relative;
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
}
.cat-carousel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.cat-carousel-slide:hover .cat-carousel-img img {
    transform: scale(1.1);
}
.cat-carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 60, 52, 0.35), transparent 70%);
    pointer-events: none;
}

.cat-carousel-slide .no-img-mini {
    width: 70px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f3f0, #ebe7e0);
    color: #b5b0a0;
    font-size: 18px;
    border-radius: 8px;
    flex-shrink: 0;
}

.cat-carousel-title {
    flex: 1;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--heading-color, #1a3c34) !important;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
    padding: 0 4px;
}
.cat-carousel-slide:hover .cat-carousel-title {
    color: var(--secondary-color, #c9a84c) !important;
}

.cat-carousel-prev,
.cat-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color, #2d5016);
    color: #fff;
    border: 1.5px solid var(--secondary-color, #c9a84c);
    border-radius: 50%;
    cursor: pointer;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}
.cat-carousel-prev:hover,
.cat-carousel-next:hover {
    background: var(--secondary-color, #c9a84c);
    color: var(--accent-color, #1a3c34);
    transform: translateY(-50%) scale(1.15);
}
.cat-carousel-prev { left: 0; }
.cat-carousel-next { right: 0; }

/* ================================================================
   اطمینان از رنگ تیترها در همه جا
   ================================================================ */
.gallery-thumb-caption,
.carousel-item h4,
.news-card .card-body h4,
.news-card .card-body h4 a,
.carousel-item h4 a,
.cat-carousel-title,
.article-detail h1,
.category-header h2,
.home-section-title,
.home-section-title i {
    color: var(--heading-color, #1a3c34);
}

/* ================================================================
   تیترهای صفحات داخلی (گالری، ویدئو، دسته‌بندی)
   ================================================================ */
.category-header h2,
.gallery-item .info h4 a,
.video-item .info h4 a,
.article-detail h1,
.page-title,
.search-result-item h3 a {
    color: var(--inner-page-title-color, #1a3c34) !important;
}
.category-header h2 i {
    color: var(--inner-page-title-color, #1a3c34) !important;
}
.gallery-item .info h4 a:hover,
.video-item .info h4 a:hover,
.search-result-item h3 a:hover {
    color: var(--secondary-color, #c9a84c) !important;
}