/* =================== Animated Background Keyframes =================== */
@keyframes animated-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* ======================= General Styles ======================= */
:root {
    --primary-color: #0056b3; 
    --secondary-color: #007bff;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --header-total-height: 80px;
    --radius-default: 12px;
}
body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    line-height: 1.7;
    background-color: #fdfdfd;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    padding-top: var(--header-total-height);
}
.container { max-width: 99%; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: var(--secondary-color); transition: color 0.3s; }
a:hover { color: var(--primary-color); }
ul { list-style: none; padding: 0; }
.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 2rem; color: var(--dark-color); margin-bottom: 40px; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background-color: var(--primary-color); margin: 10px auto 0; }
.text-justify {
    text-align: justify;
    text-align-last: right; /* برای اطمینان از راست‌چین بودن در فارسی */
}
/* ================================================================
   HEADER شفاف و NAVIGATION (کامل و اصلاح شده)
================================================================ */
:root {
    --header-scrolled-bg: rgba(255, 255, 255, 0.85); 
    --header-scrolled-text: #212529;      
    --header-scrolled-border: var(--border-color);   
}
[data-theme="dark"] {
    --header-scrolled-bg: rgba(20, 25, 35, 0.85);
    --header-scrolled-text: var(--light-color);
    --header-scrolled-border: rgba(255, 255, 255, 0.1);
}
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-total-height);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-bottom: 1px solid transparent;
    background-color: transparent;
}
.main-nav.scrolled {
    background-color: var(--header-scrolled-bg);
    border-bottom-color: var(--header-scrolled-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.main-nav,
.main-nav .nav-logo-title,
.main-nav .action-btn {
    color: white;
}
.main-nav .nav-menu > li > a {
    color: white;
    font-weight: 600; 
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); 
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
}
.main-nav .nav-menu > li:hover > a {
    background-color: rgba(255, 255, 255, 0.15);
}
.main-nav.scrolled .nav-logo-title,
.main-nav.scrolled .action-btn {
    color: var(--header-scrolled-text);
}
.main-nav.scrolled .nav-menu > li > a {
    color: var(--header-scrolled-text);
    text-shadow: none;
}
.main-nav.scrolled .nav-menu > li:hover > a {
    color: var(--primary-color);
}
.main-nav.scrolled .login-btn {
    color: white !important;
}
.main-nav .nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 40px; margin-left: 10px; }
.nav-logo-title { font-weight: bold; display: none; }
@media (min-width: 1200px) { .nav-logo-title { display: block; } }
.nav-menu { flex-grow: 1; justify-content: flex-start; display: flex; align-items: center; margin: 0; padding: 0; gap: 20px; margin-right: 40px; }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.action-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; transition: all 0.2s; padding: 5px; }
.action-btn:hover { transform: scale(1.1); }
.lang-btn { font-weight: bold; font-size: 1rem; }
.login-btn { padding: 6px 15px !important; }
.main-nav .nav-toggle { display: none; }

/* --- استایل‌های مگامنو --- */
.has-megamenu { position: relative  !important; }
.mega-menu {
    top: 100%;
    right: 50%;
    transform: translateX(50%) translateY(10px);
    background: white;
    color: var(--dark-color);
    position: absolute;
    z-index: 999;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px 0;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: block;
    min-width: max-content;
}
.has-megamenu:hover .mega-menu {
    opacity: 1;
    transform: translateX(50%) translateY(0);
    pointer-events: auto;
}
.mega-menu-inner { display: grid; grid-template-columns: repeat(3, 1fr) 0.8fr; gap: 40px; max-width: 11400px; margin: 0 auto; padding: 0 20px; }
.mega-col h4 { color: var(--primary-color); font-size: 1.1rem; font-weight: 900; margin-top: 0; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #00acc1; display: inline-flex; align-items: center; gap: 10px; }
.mega-col ul li a { display: flex; align-items: center; padding: 10px 5px; font-size: 0.95rem; font-weight: 500; color: var(--text-color); height: auto; background: transparent !important; border-radius: 8px; transition: color 0.3s, transform 0.3s, background-color 0.3s; }
.mega-col ul li a i { color: #00acc1; width: 25px; text-align: center; transition: color 0.3s, text-shadow 0.3s; }
.mega-col ul li a:hover { color: #00acc1 !important; background-color: #f8f9fa !important; transform: translateX(-5px); }
.mega-promo-card { background-color: #f0f3f7; padding: 20px; border-radius: var(--radius-default); border-right: 4px solid #00acc1; display: flex; flex-direction: column; justify-content: center; height: 100%; text-align: center; transition: transform 0.3s, box-shadow 0.3s; }
.mega-promo-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.mega-promo-card .icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }
.mega-promo-card p { font-weight: bold; color: var(--dark-color); margin-bottom: 15px; }
.mega-promo-card a { display: inline-block; padding: 8px 20px; border-radius: 50px; background-color: var(--primary-color); color: white !important; font-weight: bold; transition: background-color 0.3s; }

/* ================================================================
   CAROUSEL با افکت زوم
================================================================ */
.hero-carousel { position: relative; width: 100%; height: 100vh; overflow: hidden; margin-top: calc(-1 * var(--header-total-height)); }
.hero-carousel .carousel-slides { height: 100%; }
.hero-carousel .carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; z-index: 1; pointer-events: none; transition: opacity 1.5s ease-in-out; display: flex; align-items: center; justify-content: center; padding: 0 5%; }
.hero-carousel .carousel-slide.active { opacity: 1; z-index: 2; pointer-events: auto; }
.slide-image-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: -1;  }
.slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to left, rgba(10, 30, 60, 0.7) 0%, transparent 80%); z-index: 0; }
.slide-content { position: relative; z-index: 1; color: white; max-width: 800px; text-align: center; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s; }
.carousel-slide.active .slide-content { opacity: 1; transform: translateY(0); }
.slide-content h1 { font-size: 3rem; font-weight: 900; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); margin-bottom: 1rem; }
.slide-content p { font-size: 1.2rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.5); }
.hero-carousel .carousel-control { color: white; position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); border: none; padding: 10px 15px; font-size: 1.5rem; cursor: pointer; z-index: 10; }
.hero-carousel .carousel-control.prev { right: 10px; }
.hero-carousel .carousel-control.next { left: 10px; }

/* ================================================================
   KEYFRAMES برای افکت Ken Burns (زوم-این و زوم-اوت)
================================================================ */
@keyframes kenburns-zoom-in { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }
@keyframes kenburns-zoom-out { 0% { transform: scale(1.15); } 100% { transform: scale(1); } }
.slide-image-bg { transform-origin: center center; }
.carousel-slide:nth-child(1).active .slide-image-bg { animation: kenburns-zoom-out 10s ease-out forwards; }
.carousel-slide:nth-child(2).active .slide-image-bg { animation: kenburns-zoom-in 10s ease-out forwards; }
.carousel-slide:nth-child(3).active .slide-image-bg { animation: kenburns-zoom-out 10s ease-out forwards; }

/* ================================================================
   STYLES FOR STATS BAR - اصلاحیه شماره 3 (موقعیت در موبایل)
================================================================ */
:root {
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-blur: 10px;
}
.hero-stats-bar-wrapper { margin-top: -250px; position: relative; z-index: 10; padding: 0 20px; }
.hero-stats-bar { 
    width: 100%; 
    max-width: 1100px; 
    backdrop-filter: blur(var(--glass-blur)); 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); 
    padding: 25px; 
    border-radius: var(--radius-default); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 30, 80, 0.3);
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap; 
    margin: 0 auto;
    gap: 20px; 
}
.stat-item-hero { 
    text-align: center; 
    padding: 0 10px; 
    position: relative; 
    flex-grow: 1;
    flex-basis: calc(12.5% - 20px);
}
.stat-item-hero .number { 
    font-size: 2.5rem; 
    font-weight: 900; 
    color: #fff; 
    text-shadow: 0 2px 6px rgba(0,0,0,0.5); 
    min-height: 48px; 
}
.stat-item-hero .text { 
    font-size: 1rem; 
    font-weight: 500; 
    color: #f0f0f0; 
    text-shadow: 0 1px 4px rgba(0,0,0,0.5); 
}

/* ریسپانسیو کردن نوار آمار */
@media (max-width: 1200px) {
    .hero-stats-bar { max-width: 90%; }
    .stat-item-hero { flex-basis: calc(25% - 20px); }
}

@media (max-width: 768px) {
    /* ===> تغییر شماره 3: نوار آمار زیر کاروسل در موبایل === */
    .hero-carousel {
        height: 65vh; /* ارتفاع کاروسل در موبایل کوتاه‌تر می‌شود */
    }
    .hero-stats-bar-wrapper {
        margin-top: 0; /* حذف فاصله منفی برای قرارگیری زیر کاروسل */
        padding: 40px 20px 0; /* ایجاد فاصله از بالا و حفظ پدینگ چپ و راست */
    }
    .hero-stats-bar {
        background: rgba(0, 30, 80, 0.8); /* پس زمینه را در موبایل کمی تیره‌تر میکنیم برای خوانایی بهتر */
    }
    .stat-item-hero { flex-basis: calc(50% - 20px); }
    .stat-item-hero .number { font-size: 2rem; }
    .stat-item-hero .text { font-size: 0.9rem; }
}

@media (max-width: 576px) {
    .stat-item-hero { flex-basis: calc(50% - 20px); }
}


/* ======================= NEWS & ANNOUNCEMENTS - اصلاحیه شماره 5 (هاور اطلاعیه‌ها) ======================= */
#news-announcements h4 { font-weight: 700; color: var(--primary-color); }
.news-card { border: none; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); transition: transform 0.3s; height: 100%; }
.news-card:hover { transform: translateY(-5px); }

/* ===> تغییر شماره 5: افکت هاور برای آیتم‌های اطلاعیه‌ها === */
.announcement-list .list-group-item { 
    border-right: 5px solid transparent; /* در حالت عادی، بردر شفاف است */
    border-left: none; 
    margin-bottom: 10px; 
    border-radius: 8px !important; 
    transition: background-color 0.3s, border-right-color 0.3s; 
}
.announcement-list .list-group-item:hover { 
    background-color: #ebf0f7; 
    border-right-color: var(--primary-color); /* رنگ بردر فقط در حالت هاور ظاهر می‌شود */
}
.announcement-list .countdown { font-weight: bold; color: #dc3545; }
.archive-link-v3 { color: var(--secondary-color); font-weight: 600; }
.scrollable-announcements-v2 { max-height: 595px; overflow-y: auto; padding-left: 10px; }
.scrollable-announcements-v2::-webkit-scrollbar { width: 8px; }
.scrollable-announcements-v2::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.scrollable-announcements-v2::-webkit-scrollbar-thumb { background-color: var(--secondary-color); border-radius: 10px; border: 2px solid #f1f1f1; }
.scrollable-announcements-v2::-webkit-scrollbar-thumb:hover { background-color: var(--primary-color); }

/* ===> تغییر شماره 1: تصویر خبر اصلی در موبایل === */
@media (max-width: 767.98px) {
    .news-card.flex-md-row img {
        max-width: 100% !important; /* برای غلبه بر استایل خطی در HTML */
        height: 240px;
        object-fit: cover;
    }
}

/* ======================= Systems & Research Sections (Diamond Background) - اصلاحیه شماره 2 و 4 ======================= */
#systems-diamond,
#research-highlights-v4 {
    background-color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#systems-diamond::before,
#research-highlights-v4::before {
    content: '';
    position: absolute;
    top: 47%;
    left: 50%;
    width: 80vw;
    height: 80vw;
    background-color: #f5f7f9;
    transform: translate(-50%, -50%) rotate(45deg);
    z-index: -1;
    border-radius: 40px;
}

#systems-diamond .container,
#research-highlights-v4 .container {
    position: relative;
    z-index: 2;
}

.diamond-grid-wrapper { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; margin-top: 50px; }
.diamond-card { width: 160px; height: 160px; position: relative; background-color: #fff; box-shadow: 0 10px 25px rgba(0, 86, 179, 0.1); transform: rotate(45deg); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); margin: 20px; }
.diamond-card:hover { transform: rotate(45deg) scale(1.1); box-shadow: 0 15px 35px rgba(0, 86, 179, 0.2); }
.diamond-content { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; transform: rotate(-45deg); text-align: center; color: var(--dark-color); }
.diamond-content i { font-size: 2.5rem; margin-bottom: 10px; transition: color 0.3s; }
.diamond-content span { font-weight: 600; font-size: 0.9rem; }
.diamond-card:nth-child(5n+1) { border-bottom: 5px solid #007bff; }
.diamond-card:nth-child(5n+1) .diamond-content i { color: #007bff; }
.diamond-card:nth-child(5n+2) { border-bottom: 5px solid #28a745; }
.diamond-card:nth-child(5n+2) .diamond-content i { color: #28a745; }
.diamond-card:nth-child(5n+3) { border-bottom: 5px solid #ffc107; }
.diamond-card:nth-child(5n+3) .diamond-content i { color: #ffc107; }
.diamond-card:nth-child(5n+4) { border-bottom: 5px solid #17a2b8; }
.diamond-card:nth-child(5n+4) .diamond-content i { color: #17a2b8; }
.diamond-card:nth-child(5n+5) { border-bottom: 5px solid #dc3545; }
.diamond-card:nth-child(5n+5) .diamond-content i { color: #dc3545; }

/* === استایل‌های بخش دستاوردهای پژوهشی === */
#research-highlights-v4 .section-title { text-align: right !important; }
#research-highlights-v4 .section-title::after { margin-right: 0; margin-left: auto; }
.featured-research-card-v4 { border-radius: var(--radius-default); overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.1); position: relative; height: 520px; display: block; }
.featured-research-card-v4 .card-image { width: 100%; height: 100%; }
.featured-research-card-v4 .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.featured-research-card-v4:hover .card-image img { transform: scale(1.05); }
.featured-research-card-v4 .card-image-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0, 25, 68, 0.9) 20%, rgba(0, 25, 68, 0.1) 70%); }
.featured-research-card-v4 .card-content { position: absolute; bottom: 0; right: 0; left: 0; padding: 30px; color: white; }
.featured-research-card-v4 .card-category { background-color: var(--primary-color); color: white; padding: 5px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: bold; display: inline-block; margin-bottom: 15px; }
.featured-research-card-v4 h3 { font-size: 1.6rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; color: white; }
.featured-research-card-v4 .card-excerpt { font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.recent-research-list-v4 { background-color: #fff; border-radius: var(--radius-default); box-shadow: 0 5px 25px rgba(0,0,0,0.07); padding: 10px; height: 520px; overflow-y: auto; }
.recent-research-list-v4::-webkit-scrollbar { width: 6px; }
.recent-research-list-v4::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.recent-research-list-v4::-webkit-scrollbar-thumb { background-color: var(--secondary-color); border-radius: 10px; }
.recent-research-list-v4::-webkit-scrollbar-thumb:hover { background-color: var(--primary-color); }
.list-item-v4 { display: flex; align-items: center; gap: 15px; padding: 15px; border-radius: 10px; text-decoration: none; transition: background-color 0.3s, transform 0.3s; border-bottom: 1px solid #f0f0f0; position: relative; overflow: hidden; }
.list-item-v4:last-child { border-bottom: none; }
.list-item-v4::before { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background-color: var(--primary-color); transform: scaleY(0); transition: transform 0.3s ease; transform-origin: bottom; }
.list-item-v4:hover { background-color: #f8f9fa; transform: translateX(-5px); }
.list-item-v4:hover::before { transform: scaleY(1); }
.list-item-v4 img { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.list-item-v4 .item-title { font-size: 0.9rem; font-weight: 600; color: var(--dark-color); line-height: 1.6; margin-bottom: 5px; transition: color 0.3s; }
.list-item-v4:hover .item-title { color: var(--primary-color); }
.list-item-v4 .item-date { font-size: 0.8rem; color: #888; }

/* ======================= QUICK ACCESS V3 (Chamfered Corners) ======================= */
.quick-access-grid-v3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
.quick-access-card-v3 { background-color: #fff; padding: 25px 20px; text-align: center; border: 1px solid var(--border-color); transition: all 0.3s ease; clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px); position: relative; }
.quick-access-card-v3::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; background: var(--primary-color); opacity: 0; transition: opacity 0.3s ease; clip-path: inherit; }
.quick-access-card-v3:hover { transform: translateY(-8px); box-shadow: 0 10px 20px rgba(0, 86, 179, 0.1); border-color: transparent; cursor: pointer; }
.quick-access-card-v3:hover::before { opacity: 1; }
.quick-access-card-v3 .card-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; transition: all 0.3s ease; line-height: 1; }
.quick-access-card-v3:hover .card-icon { transform: scale(1.1); color: #fff; }
.quick-access-card-v3 .card-title { font-weight: 700; font-size: 1rem; color: var(--dark-color); line-height: 1.4; transition: color 0.3s ease; }
.quick-access-card-v3:hover .card-title { color: #fff; }

/* ======================= MEDIA SECTION (PODCASTS) ======================= */
.podcast-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.podcast-list-header h4 { margin: 0; color: white; }
.archive-link-v2 { color: #00acc1; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border-bottom: 2px solid transparent; padding-bottom: 3px; }
.archive-link-v2:hover { color: white; border-bottom-color: white; }
.media-section { background-color: #041b47e7; color: #bdc3c7; position: relative; clip-path: url(#podcast-bottom-slope-rtl); padding: 100px 0; }
.media-section .section-title { color: white; }
.media-section .section-title::after { background-color: #00acc1; }
.featured-podcast { background: rgba(255,255,255,0.05); border-radius: 10px; padding: 30px; position: relative; }
.featured-podcast img { border-radius: 8px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.featured-podcast h3 { color: white; margin-top: 20px; font-size: 1.5rem; }
.featured-podcast p { color: #bdc3c7; min-height: 48px; }
.audio-player audio { width: 100%; height: 50px; }
.scrollable-podcast-list { max-height: 340px; overflow-y: auto; padding-left: 15px; }
.scrollable-podcast-list::-webkit-scrollbar { width: 8px; }
.scrollable-podcast-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.scrollable-podcast-list::-webkit-scrollbar-thumb { background-color: #00acc1; border-radius: 10px; }
.scrollable-podcast-list::-webkit-scrollbar-thumb:hover { background-color: #fff; }
.podcast-list .list-group-item { background: transparent; border-color: rgba(255,255,255,0.2); color: #bdc3c7; transition: background-color 0.3s, border-left-color 0.3s; cursor: pointer; border-left: 4px solid transparent; }
.podcast-list .list-group-item.active,
.podcast-list .list-group-item:hover { background-color: rgba(255,255,255,0.1); border-left-color: #00acc1; }
.podcast-list .episode-title { font-weight: 600; color: #fdfdfd; }
.podcast-list .episode-meta { font-size: 0.9rem; color: #bdc3c7; opacity: 0.7; }
.play-indicator { color: #00acc1; font-size: 1.2rem; }

/* ======================= Footer Styles ======================= */
:root {
    --footer-bg: #002366; 
    --footer-text-color: #bdc3c7; 
    --footer-heading-color: #fdfdfd; 
    --footer-accent-color: #17a2b8; 
    --footer-bottom-bg-separator: rgba(255, 255, 255, 0.07);
}
.site-footer { position: relative; isolation: isolate; color: var(--footer-text-color); font-size: 15px; line-height: 1.8; background: transparent; padding-top: 50px; padding-bottom: 0; }
#particles-footer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; clip-path: url(#footer-wave-rtl); }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; clip-path: url(#footer-wave-rtl); background: linear-gradient(270deg, #002366, #2c3e50, #041c47); background-size: 400% 400%; animation: animated-gradient 42s ease infinite; }
.site-footer .footer-col { margin-bottom: 30px; }
.site-footer .footer-heading { color: var(--footer-heading-color); font-size: 18px; font-weight: 700; margin-bottom: 25px; padding-bottom: 10px; border-bottom: 3px solid var(--footer-accent-color); display: inline-block; }
.site-footer .footer-intro-text { font-size: 0.9rem; line-height: 1.9; text-align: justify; }
.site-footer .footer-links li { margin-bottom: 12px; }
.site-footer .footer-links a { color: var(--footer-text-color); text-decoration: none; transition: all 0.2s ease; }
.site-footer .footer-links a:hover { color: var(--footer-accent-color); padding-right: 5px; }
.site-footer .contact-info li { display: flex; align-items: flex-start; margin-bottom: 18px; }
.site-footer .contact-info i { color: var(--footer-accent-color); font-size: 18px; margin-left: 15px; width: 20px; text-align: center; line-height: 1.5; }
.visitor-stats-grid-vertical { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 140px; }
.stat-item-footer { display: flex; align-items: center; justify-content: center; gap: 12px; background-color: var(--footer-bottom-bg-separator); padding: 10px 0; border-radius: 8px; }
.stat-item-footer i { font-size: 1.5rem; color: var(--footer-accent-color); }
.stat-item-footer .stat-text { display: flex; flex-direction: column; line-height: 1.3; }
.stat-item-footer .stat-text span { font-size: 0.8rem; color: var(--footer-text-color); }
.stat-item-footer .stat-text strong { font-size: 1rem; color: #fff; font-weight: bold; }
.site-footer .social-icons { display: flex; gap: 15px; }
.site-footer .social-icons a { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; background-color: rgba(0, 0, 0, 0.2); color: #fff; border-radius: 50%; text-decoration: none; font-size: 18px; transition: all 0.3s ease; }
.site-footer .social-icons a:hover { background-color: var(--footer-accent-color); transform: translateY(-3px); }
.footer-bottom { background-color: transparent; padding: 15px 0; margin-top: 20px; border-top: 1px solid var(--footer-bottom-bg-separator); }
.footer-bottom p { margin: 0; font-size: 14px; color: #999; }

/* ======================= Plyr Player Styles ======================= */
:root { --plyr-color-main: #00acc1; --plyr-font-family: 'Vazirmatn', sans-serif; }
.plyr--audio .plyr__controls { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.15); color: #ffffff; border-radius: 12px; box-shadow: none; padding: 10px; }
.plyr__control--overlaid:hover, .plyr__control:hover { background: var(--plyr-color-main) !important; }
.plyr__progress input[type=range] { color: var(--plyr-color-main); }
.plyr__menu__button { background: rgba(0, 0, 0, 0.5); border-radius: 8px; }

/* ======================= Search Overlay Styles ======================= */
.search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(13, 26, 46, 0.95); z-index: 3000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease; }
.search-overlay.active { opacity: 1; visibility: visible; }
.search-close-btn { position: absolute; top: 2rem; left: 2rem; background: none; border: none; color: #fff; font-size: 3rem; cursor: pointer; }
.search-content { text-align: center; color: #fff; max-width: 600px; width: 90%; }
.search-content h2 { font-weight: bold; margin-bottom: 1rem; }
.search-content p { color: #ccc; margin-bottom: 2rem; }
.search-form { position: relative; }
.search-form input { width: 100%; padding: 15px 50px 15px 20px; border-radius: 50px; border: 2px solid var(--border-color); font-size: 1.1rem; }
.search-form button { position: absolute; right: 5px; top: 5px; bottom: 5px; width: 45px; background: var(--primary-color); color: white; border: none; border-radius: 50%; font-size: 1.2rem; }

/* ================================================================
   Responsive Styles (اصلاحات منوی همبرگری موبایل - نسخه نهایی و رفع بیرون‌زدگی)
================================================================ */
@media (max-width: 992px) {
    /* مخفی کردن منوی افقی دسکتاپ */
    .main-nav .nav-menu { display: none; }
    
    /* تنظیمات دکمه همبرگری */
    .main-nav .nav-toggle { 
        display: block; 
        background: none; 
        border: none; 
        cursor: pointer; 
        color: white; 
        font-size: 1.5rem; 
        z-index: 3001; 
        position: relative;
    }
    .main-nav.scrolled .nav-toggle { color: var(--dark-color); }
    
    /* === منوی تمام صفحه === */
    .main-nav .nav-menu.active { 
        display: flex !important; 
        position: fixed !important; 
        top: 0 !important; 
        right: 0 !important; 
        width: 100% !important; /* محدود به عرض صفحه */
        height: 100vh !important; 
        background-color: var(--dark-color) !important; 
        flex-direction: column !important; 
        z-index: 2000 !important; 
        padding-top: 80px !important; 
        animation: slideIn 0.4s ease-in-out; 
        overflow-y: auto !important; 
        overflow-x: hidden !important; /* جلوگیری از اسکرول افقی */
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    @keyframes slideIn { 
        from { right: -100%; opacity: 0; } 
        to { right: 0; opacity: 1; } 
    }
    
    .nav-logo-title { display: none !important; }
    
    /* مهار کردن ul ها برای جلوگیری از به هم ریختگی پدینگ پیش فرض مرورگر */
    .main-nav .nav-menu ul {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* === لینک‌های اصلی منو === */
    .main-nav .nav-menu li { 
        width: 100% !important; 
        margin: 0 !important; 
        padding: 0 !important; 
        box-sizing: border-box !important;
    }
    
    .main-nav .nav-menu > li > a { 
        color: white !important; 
        width: 100% !important; 
        min-height: 50px !important; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; 
        justify-content: flex-start !important; 
        padding: 15px 20px !important; /* پدینگ استاندارد منوی اصلی */
        text-align: right !important;
        display: flex !important;
        align-items: center !important;
        font-size: 1.1rem !important;
        box-sizing: border-box !important; 
        white-space: normal !important; 
    }
    
    .main-nav .nav-menu > li:hover > a, 
    .main-nav .nav-menu > li.active > a { 
        background-color: var(--primary-color) !important; 
    }
    
    /* === استایل‌های مگامنو (زیرمنوها) === */
    .main-nav .has-megamenu .mega-menu { 
        position: static !important; 
        display: block !important; 
        max-height: 0; 
        overflow: hidden !important; 
        background-color: #2c3136 !important; 
        padding: 0 !important; 
        margin: 0 !important;
        box-shadow: none !important; 
        border: none !important; 
        width: 100% !important; 
        box-sizing: border-box !important;
        transition: max-height 0.4s ease-out !important; 
        
        /* ���� حل مشکل بیرون زدگی: خنثی کردن ترنسفورم دسکتاپ */
        transform: none !important; 
        left: 0 !important;
        right: 0 !important;
    }
    
    .main-nav .has-megamenu.submenu-open .mega-menu { max-height: 2500px !important;   opacity: 1 !important;
        pointer-events: auto !important;}
    
    .main-nav .has-megamenu > a { justify-content: space-between !important; } 
    .main-nav .has-megamenu > a .fa-caret-down { margin-right: auto !important; padding-left: 10px !important;}
    .main-nav .has-megamenu.submenu-open > a .fa-caret-down { transform: rotate(180deg) !important; }
    
    .main-nav .mega-menu-inner { 
        /* ���� حل مشکل استایل‌های خطی (grid) داخل HTML */
        display: block !important; 
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .main-nav .mega-col { width: 100% !important; padding: 0 !important; margin: 0 !important; }
    .main-nav .mega-col h4 { display: none !important; } 
    
    /* =========================================================
       حل مشکل پدینگ و تورفتگی زیرمنوها
       ========================================================= */
    .main-nav .mega-col ul li a { 
        color: #ccc !important; 
        font-size: 0.95rem !important; 
        font-weight: 400 !important; 
        /* ترتیب پدینگ: بالا | راست | پایین | چپ */
        padding: 12px 40px 12px 15px !important; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; 
        box-sizing: border-box !important;
        white-space: normal !important; /* شکستن متون طولانی */
        line-height: 1.6 !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
    }
    .main-nav .mega-col ul li:last-child a { border-bottom: none !important; }
    .main-nav .mega-col ul li a:hover { background-color: #004080 !important; color: white !important;}
    .main-nav .mega-col ul li a i { color: #00acc1 !important; margin-left: 10px !important; width: 20px !important; text-align: center !important; flex-shrink: 0 !important;}
    
    /* مخفی کردن کارت‌های تبلیغاتی مگامنو در موبایل */
    .mega-promo-card { display: none !important; } 
    
    /* ناپدید شدن دکمه‌های کاروسل هنگام باز بودن منو */
    body.menu-open .carousel-control {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    /* جلوگیری از اسکرول صفحه اصلی وقتی منو باز است */
    body.menu-open {
        overflow: hidden !important;
    }
}