
@font-face{font-family:Vazirmatn;src:url(/uploads/new-icro/assets/fonts/Vazir-Regular-FD.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Vazirmatn;src:url(/uploads/new-icro/assets/fonts/Vazir-Bold-FD.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:Vazirmatn;src:url(/uploads/new-icro/assets/fonts/Vazir-Medium-FD.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Vazirmatn FD";src:url(/uploads/new-icro/assets/fonts/Vazir-Regular-FD.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Vazirmatn FD";src:url(/uploads/new-icro/assets/fonts/Vazir-Bold-FD.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Vazirmatn FD";src:url(/uploads/new-icro/assets/fonts/Vazir-Medium-FD.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}


html,
body {
  width: 100%;
  padding: 0;
  margin: 0;
  direction: ltr !important;
  text-align: left !important;
}

*,
:before,
:after {
  box-sizing: border-box;
  border: 0 solid #e5e7eb;
}
.auth-icon-btn, 
.mobile-auth-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* پدینگ برای حالت دایره‌ای یا مربعی هماهنگ */
  text-decoration: none;
  transition: background 0.3s ease;
}
a{
text-decoration: none;
}
    .search-area {
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    background-color: #27477de6;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    transition: all .5s;
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
}
    .search-area--opened {
    visibility: visible;
    opacity: 1;
}
    .search-area__form {
  flex-direction: column;
  margin: 80px 0;
  transition: all .5s;
  display: flex;
}
    .search-area__input {
  opacity: 1;
  color: #fff;
  background-color: #0000;
  border-width: 0 0 2px;
  border-color: #fff;
  border-radius: 0;
  margin-bottom: 20px;
  padding: 10px 0;
  font-size: 28px;
  font-weight: 700;
}
    .search-area__text {
  color: #fff;
}
    a:not([href]) {
  color: inherit;
  text-decoration: none;
}
    .search-area__close-btn {
  cursor: pointer;
  color: #fff;
  opacity: 1;
  background-color: #12bad0;
  border: 0;
  border-radius: 5px;
  padding: 12px;
  font-size: 1em;
  line-height: 12px;
  display: flex;
  position: absolute;
  top: 20px;
  right: 30px;
}
.mobile-auth-icon-btn {
  margin-left: 8px;
}

.mobile-auth-icon-btn {
  margin-left: 8px;
  background-color: var(--accent-color) !important;
  padding: 1rem;
}

@layer base {
  /* 01 — 🌹 تم پیش‌فرض «میراث ایران» */
  :root {
    --primary-color: #031930;
    --secondary-color: #109393;
    --accent-color: #d79c34;
    --accent-alt: #019e89;

    --bg-primary: #f7f4ed;
    --bg-secondary: #ffffff;
    --bg-surface: #eef4f2;

    --text-primary: #17202a;
    --text-secondary: #52606d;
    --border-color: #d9e1df;

    /* Glass & UI Variables */
    --header-glass: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(217, 225, 223, 0.6);
    --header-text-on-hero: #031930;

    --header-scrolled-glass: rgba(255, 255, 255, 0.96);
    --header-scrolled-border: rgba(217, 225, 223, 0.8);
    --header-text-scrolled: #031930;

    --card-glass: rgba(255, 255, 255, 0.85);
    --card-border: rgba(217, 225, 223, 0.8);

    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(217, 225, 223, 0.6);
    --dropdown-text: #17202a;

    --mobile-menu-bg: rgba(255, 255, 255, 0.97);
    --mobile-menu-border: rgba(217, 225, 223, 0.8);
    --mobile-link-bg: rgba(3, 25, 48, 0.03);
    --mobile-link-border: rgba(3, 25, 48, 0.06);
    --mobile-link-text: #17202a;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(217, 225, 223, 0.8);
    --hero-card-title: #031930;
    --hero-card-text: #52606d;
    --hero-card-chip-bg: rgba(3, 25, 48, 0.05);
    --hero-card-chip-text: #031930;
    --hero-card-button-bg: #031930;
    --hero-card-button-text: #ffffff;

    /* Semantic */
    --success-color: #2e7d5b;
    --error-color: #b42318;
  }

  /* 02 — 💠 تم «فیروزه پارسی» */
  html.theme-firoozeh {
    --primary-color: #019e89;
    --secondary-color: #d79c34;
    --accent-color: #109393;
    --bg-primary: #f3faf8;
    --bg-secondary: #ffffff;
    --text-primary: #102a2a;
    --text-secondary: #607a78;
    --border-color: #cde5e1;

    --header-glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(205, 229, 225, 0.8);
    --header-text-on-hero: #031930;

    --header-scrolled-glass: rgba(243, 250, 248, 0.96);
    --header-scrolled-border: rgba(205, 229, 225, 0.8);
    --header-text-scrolled: #102a2a;

    --card-glass: rgba(255, 255, 255, 0.9);
    --card-border: rgba(205, 229, 225, 0.8);

    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(205, 229, 225, 0.8);
    --dropdown-text: #102a2a;

    --mobile-menu-bg: rgba(243, 250, 248, 0.98);
    --mobile-menu-border: rgba(205, 229, 225, 0.8);
    --mobile-link-bg: rgba(1, 158, 137, 0.05);
    --mobile-link-border: rgba(1, 158, 137, 0.1);
    --mobile-link-text: #102a2a;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(205, 229, 225, 0.8);
    --hero-card-title: #019e89;
    --hero-card-text: #607a78;
    --hero-card-chip-bg: rgba(1, 158, 137, 0.08);
    --hero-card-chip-text: #019e89;
    --hero-card-button-bg: #019e89;
    --hero-card-button-text: #ffffff;
  }

  /* 03 — 👑 تم «زرین ایران» */
  html.theme-zarrin {
    --primary-color: #031930;
    --secondary-color: #134d94;
    --accent-color: #d79c34;
    --bg-primary: #f8f6f0;
    --bg-secondary: #ffffff;
    --text-primary: #17202a;
    --text-secondary: #626b73;
    --border-color: #ddd8cb;

    --header-glass: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(221, 216, 203, 0.8);
    --header-text-on-hero: #031930;

    --header-scrolled-glass: rgba(248, 246, 240, 0.97);
    --header-scrolled-border: rgba(221, 216, 203, 0.8);
    --header-text-scrolled: #17202a;

    --card-glass: rgba(255, 255, 255, 0.9);
    --card-border: rgba(221, 216, 203, 0.8);

    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(221, 216, 203, 0.8);
    --dropdown-text: #17202a;

    --mobile-menu-bg: rgba(248, 246, 240, 0.98);
    --mobile-menu-border: rgba(221, 216, 203, 0.8);
    --mobile-link-bg: rgba(215, 156, 52, 0.05);
    --mobile-link-border: rgba(221, 216, 203, 0.8);
    --mobile-link-text: #17202a;

    --hero-card-bg: rgba(255, 255, 255, 0.92);
    --hero-card-border: rgba(221, 216, 203, 0.8);
    --hero-card-title: #031930;
    --hero-card-text: #626b73;
    --hero-card-chip-bg: rgba(215, 156, 52, 0.1);
    --hero-card-chip-text: #b0690f;
    --hero-card-button-bg: #d79c34;
    --hero-card-button-text: #031930;
  }

  /* 04 — 🌺 تم «سرخ پارسی» */
  html.theme-sorkh {
    --primary-color: #031930;
    --secondary-color: #134d94;
    --accent-color: #de262e;
    --bg-primary: #faf7f5;
    --bg-secondary: #ffffff;
    --text-primary: #1b1b1b;
    --text-secondary: #626262;
    --border-color: #e5d9d5;

    --header-glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(229, 217, 213, 0.8);
    --header-text-on-hero: #031930;

    --header-scrolled-glass: rgba(250, 247, 245, 0.97);
    --header-scrolled-border: rgba(229, 217, 213, 0.8);
    --header-text-scrolled: #1b1b1b;

    --card-glass: rgba(255, 255, 255, 0.9);
    --card-border: rgba(229, 217, 213, 0.8);

    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(229, 217, 213, 0.8);
    --dropdown-text: #1b1b1b;

    --mobile-menu-bg: rgba(250, 247, 245, 0.98);
    --mobile-menu-border: rgba(229, 217, 213, 0.8);
    --mobile-link-bg: rgba(222, 38, 46, 0.04);
    --mobile-link-border: rgba(229, 217, 213, 0.8);
    --mobile-link-text: #1b1b1b;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(229, 217, 213, 0.8);
    --hero-card-title: #031930;
    --hero-card-text: #626262;
    --hero-card-chip-bg: rgba(222, 38, 46, 0.06);
    --hero-card-chip-text: #de262e;
    --hero-card-button-bg: #de262e;
    --hero-card-button-text: #ffffff;
  }

  /* 05 — 🌸 تم «نگار ایرانی» */
  html.theme-negar {
    --primary-color: #031930;
    --secondary-color: #109393;
    --accent-color: #e62f89;
    --bg-primary: #fcf8fb;
    --bg-secondary: #ffffff;
    --text-primary: #241b23;
    --text-secondary: #685d65;
    --border-color: #e8dce4;

    --header-glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(232, 220, 228, 0.8);
    --header-text-on-hero: #031930;

    --header-scrolled-glass: rgba(252, 248, 251, 0.96);
    --header-scrolled-border: rgba(232, 220, 228, 0.8);
    --header-text-scrolled: #241b23;

    --card-glass: rgba(255, 255, 255, 0.88);
    --card-border: rgba(232, 220, 228, 0.8);

    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(232, 220, 228, 0.8);
    --dropdown-text: #241b23;

    --mobile-menu-bg: rgba(252, 248, 251, 0.98);
    --mobile-menu-border: rgba(232, 220, 228, 0.8);
    --mobile-link-bg: rgba(230, 47, 137, 0.04);
    --mobile-link-border: rgba(232, 220, 228, 0.8);
    --mobile-link-text: #241b23;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(232, 220, 228, 0.8);
    --hero-card-title: #031930;
    --hero-card-text: #685d65;
    --hero-card-chip-bg: rgba(230, 47, 137, 0.06);
    --hero-card-chip-text: #e62f89;
    --hero-card-button-bg: #e62f89;
    --hero-card-button-text: #ffffff;
  }

  /* 06 — 🌑 تم Dark «شب پارس» */
  html.dark {
    --primary-color: #019e89;
    --secondary-color: #109393;
    --accent-color: #d79c34;

    --bg-primary: #031930;
    --bg-secondary: #08243d;
    --bg-surface: #0d3049;

    --text-primary: #f5f7f8;
    --text-secondary: #b9c7d0;
    --border-color: #214257;

    --header-glass: rgba(8, 36, 61, 0.4);
    --glass-border: rgba(33, 66, 87, 0.5);
    --header-text-on-hero: #f5f7f8;

    --header-scrolled-glass: rgba(3, 25, 48, 0.96);
    --header-scrolled-border: rgba(33, 66, 87, 0.6);
    --header-text-scrolled: #f5f7f8;

    --card-glass: rgba(8, 36, 61, 0.6);
    --card-border: rgba(33, 66, 87, 0.8);

    --dropdown-bg: rgba(8, 36, 61, 0.98);
    --dropdown-border: rgba(33, 66, 87, 0.8);
    --dropdown-text: #f5f7f8;

    --mobile-menu-bg: rgba(3, 25, 48, 0.98);
    --mobile-menu-border: rgba(33, 66, 87, 0.8);
    --mobile-link-bg: rgba(255, 255, 255, 0.03);
    --mobile-link-border: rgba(33, 66, 87, 0.5);
    --mobile-link-text: #f5f7f8;

    --hero-card-bg: rgba(8, 36, 61, 0.75);
    --hero-card-border: rgba(33, 66, 87, 0.8);
    --hero-card-title: #f5f7f8;
    --hero-card-text: #b9c7d0;
    --hero-card-chip-bg: rgba(215, 156, 52, 0.15);
    --hero-card-chip-text: #d79c34;
    --hero-card-button-bg: #d79c34;
    --hero-card-button-text: #031930;
  }

  /* 07 — ⚪ تم «نگار بی‌رنگ» (Achromatopsia) */
  html.theme-achromatopsia {
    --primary-color: #111111;
    --secondary-color: #3a3a3a;
    --accent-color: #666666;
    --bg-primary: #ffffff;
    --bg-secondary: #f2f2f2;
    --bg-surface: #e2e2e2;
    --text-primary: #111111;
    --text-secondary: #666666;
    --border-color: #bdbdbd;

    --header-glass: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(189, 189, 189, 0.8);
    --header-text-on-hero: #111111;
    --header-scrolled-glass: rgba(255, 255, 255, 0.98);
    --header-scrolled-border: rgba(189, 189, 189, 0.8);
    --header-text-scrolled: #111111;

    --card-glass: rgba(242, 242, 242, 0.9);
    --card-border: rgba(189, 189, 189, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(189, 189, 189, 0.8);
    --dropdown-text: #111111;

    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --mobile-menu-border: rgba(189, 189, 189, 0.8);
    --mobile-link-bg: rgba(0, 0, 0, 0.03);
    --mobile-link-border: rgba(189, 189, 189, 0.5);
    --mobile-link-text: #111111;

    --hero-card-bg: rgba(242, 242, 242, 0.9);
    --hero-card-border: rgba(189, 189, 189, 0.8);
    --hero-card-title: #111111;
    --hero-card-text: #666666;
    --hero-card-chip-bg: rgba(0, 0, 0, 0.08);
    --hero-card-chip-text: #111111;
    --hero-card-button-bg: #111111;
    --hero-card-button-text: #ffffff;

    --success-color: #333333;
    --error-color: #111111;
  }

  /* 08 — 🔴 تم «دید سرخ» (Protanopia) */
  html.theme-protanopia {
    --primary-color: #174a7e;
    --secondary-color: #e0a11b;
    --accent-color: #007c83;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #17202a;
    --text-secondary: #59636e;
    --border-color: #cbd5e1;

    --header-glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(203, 213, 225, 0.8);
    --header-text-on-hero: #174a7e;
    --header-scrolled-glass: rgba(248, 250, 252, 0.96);
    --header-scrolled-border: rgba(203, 213, 225, 0.8);
    --header-text-scrolled: #17202a;

    --card-glass: rgba(255, 255, 255, 0.9);
    --card-border: rgba(203, 213, 225, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(203, 213, 225, 0.8);
    --dropdown-text: #17202a;

    --mobile-menu-bg: rgba(248, 250, 252, 0.98);
    --mobile-menu-border: rgba(203, 213, 225, 0.8);
    --mobile-link-bg: rgba(23, 74, 126, 0.04);
    --mobile-link-border: rgba(203, 213, 225, 0.6);
    --mobile-link-text: #17202a;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(203, 213, 225, 0.8);
    --hero-card-title: #174a7e;
    --hero-card-text: #59636e;
    --hero-card-chip-bg: rgba(224, 161, 27, 0.1);
    --hero-card-chip-text: #14213d;
    --hero-card-button-bg: #e0a11b;
    --hero-card-button-text: #14213d;

    --success-color: #007c83;
    --error-color: #7a2e2e;
  }

  /* 09 — 🟢 تم «دید سبز» (Deuteranopia) */
  html.theme-deuteranopia {
    --primary-color: #1c3aba;
    --secondary-color: #d79c34;
    --accent-color: #134d94;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #17202a;
    --text-secondary: #59636e;
    --border-color: #cbd5e1;

    --header-glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(203, 213, 225, 0.8);
    --header-text-on-hero: #031930;
    --header-scrolled-glass: rgba(248, 250, 252, 0.96);
    --header-scrolled-border: rgba(203, 213, 225, 0.8);
    --header-text-scrolled: #17202a;

    --card-glass: rgba(255, 255, 255, 0.9);
    --card-border: rgba(203, 213, 225, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(203, 213, 225, 0.8);
    --dropdown-text: #17202a;

    --mobile-menu-bg: rgba(248, 250, 252, 0.98);
    --mobile-menu-border: rgba(203, 213, 225, 0.8);
    --mobile-link-bg: rgba(28, 58, 186, 0.04);
    --mobile-link-border: rgba(203, 213, 225, 0.6);
    --mobile-link-text: #17202a;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(203, 213, 225, 0.8);
    --hero-card-title: #031930;
    --hero-card-text: #59636e;
    --hero-card-chip-bg: rgba(215, 156, 52, 0.1);
    --hero-card-chip-text: #b0690f;
    --hero-card-button-bg: #d79c34;
    --hero-card-button-text: #031930;

    --success-color: #176b87;
    --error-color: #8a3b12;
  }

  /* 10 — 🔵 تم «دید آسمان» (Tritanopia) */
  html.theme-tritanopia {
    --primary-color: #8a3d00;
    --secondary-color: #b0690f;
    --accent-color: #d79c34;
    --bg-primary: #fffcf5;
    --bg-secondary: #ffffff;
    --text-primary: #211a16;
    --text-secondary: #685f58;
    --border-color: #ddd3c8;

    --header-glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(221, 211, 200, 0.8);
    --header-text-on-hero: #031930;
    --header-scrolled-glass: rgba(255, 252, 245, 0.96);
    --header-scrolled-border: rgba(221, 211, 200, 0.8);
    --header-text-scrolled: #211a16;

    --card-glass: rgba(255, 255, 255, 0.9);
    --card-border: rgba(221, 211, 200, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --dropdown-border: rgba(221, 211, 200, 0.8);
    --dropdown-text: #211a16;

    --mobile-menu-bg: rgba(255, 252, 245, 0.98);
    --mobile-menu-border: rgba(221, 211, 200, 0.8);
    --mobile-link-bg: rgba(138, 61, 0, 0.04);
    --mobile-link-border: rgba(221, 211, 200, 0.6);
    --mobile-link-text: #211a16;

    --hero-card-bg: rgba(255, 255, 255, 0.9);
    --hero-card-border: rgba(221, 211, 200, 0.8);
    --hero-card-title: #031930;
    --hero-card-text: #685f58;
    --hero-card-chip-bg: rgba(215, 156, 52, 0.1);
    --hero-card-chip-text: #8a3d00;
    --hero-card-button-bg: #8a3d00;
    --hero-card-button-text: #ffffff;
  }
}

/* ==========================================
   فیلترهای کوررنگی برای تصاویر، اسلایدرها و پس‌زمینه‌ها
   ========================================== */

/* ===================================================
   07 — ⚪ کوررنگی کامل (Achromatopsia)
=================================================== */
html.theme-achromatopsia img,
html.theme-achromatopsia video,
html.theme-achromatopsia .swiper-slide,
html.theme-achromatopsia .filtered-bg,
html.theme-achromatopsia .site-footer,
html.theme-achromatopsia .archive-hero,
html.theme-achromatopsia .archive-hero__container,
html.theme-achromatopsia .sidebar-quote-banner,
html.theme-achromatopsia #globeCanvas,
html.theme-achromatopsia .agency-table-section,
html.theme-achromatopsia .world-network-section,
html.theme-achromatopsia .organization-showcase,
html.theme-achromatopsia .about-hero
{
  filter: grayscale(100%) contrast(120%);
}

/* ===================================================
   08 — 🔴 دید سرخ (Protanopia)
=================================================== */
html.theme-protanopia img,
html.theme-protanopia video,
html.theme-protanopia .swiper-slide,
html.theme-protanopia .filtered-bg,
html.theme-protanopia .site-footer,
html.theme-protanopia .archive-hero,
html.theme-protanopia .archive-hero__container,
html.theme-protanopia .sidebar-quote-banner,
html.theme-protanopia #globeCanvas,
html.theme-protanopia .agency-table-section,
html.theme-protanopia .world-network-section,
html.theme-protanopia .organization-showcase,
html.theme-protanopia .about-hero
{
  filter: url("#daltonize-protanopia");
}

/* ===================================================
   09 — 🟢 دید سبز (Deuteranopia)
=================================================== */
html.theme-deuteranopia img,
html.theme-deuteranopia video,
html.theme-deuteranopia .swiper-slide,
html.theme-deuteranopia .filtered-bg,
html.theme-deuteranopia .site-footer,
html.theme-deuteranopia .archive-hero,
html.theme-deuteranopia .archive-hero__container,
html.theme-deuteranopia .sidebar-quote-banner,
html.theme-deuteranopia #globeCanvas,
html.theme-deuteranopia .agency-table-section,
html.theme-deuteranopia .world-network-section,
html.theme-deuteranopia .organization-showcase,
html.theme-deuteranopia .about-hero {
  filter: url("#daltonize-deuteranopia");
}

/* ===================================================
   10 — 🔵 دید آسمان (Tritanopia)
=================================================== */
html.theme-tritanopia img,
html.theme-tritanopia video,
html.theme-tritanopia .swiper-slide,
html.theme-tritanopia .filtered-bg,
html.theme-tritanopia .site-footer,
html.theme-tritanopia .archive-hero,
html.theme-tritanopia .archive-hero__container,
html.theme-tritanopia .sidebar-quote-banner,
html.theme-tritanopia #globeCanvas,
html.theme-tritanopia .agency-table-section,
html.theme-tritanopia .world-network-section,
html.theme-tritanopia .organization-showcase,
html.theme-tritanopia .about-hero
 {
  filter: url("#daltonize-tritanopia");
}

body {
  font-family: Vazirmatn, Tahoma, sans-serif !important;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
}
body button {
  font-family: Vazirmatn, Tahoma, sans-serif !important;
}

.glass-panel {
  background: var(--card-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
}

#theme-dropdown {
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  color: var(--dropdown-text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#theme-dropdown button {
  color: var(--dropdown-text);
}

#theme-dropdown button:hover {
  background: var(
    --mobile-link-bg
  ); /* جایگزین کدهای ثابت برای پشتیبانی از تمامی تم‌ها */
}
/* ==========================================
   Accessibility — Global image vision filters
   ========================================== */

/* کلاس پایه: به تمام imgهای موردنظر اضافه کن */
.vision-media {
  display: block;
  max-width: 100%;
  transition: filter 0.3s ease;
}

/* حالت عادی */
body.theme-normal .vision-media,
body:not(.theme-protanopia):not(.theme-deuteranopia):not(.theme-tritanopia):not(
    .theme-monochrome
  )
  .vision-media {
  filter: none;
}

/* ------------------------------------------
   دید سرخ
   Protanopia — کاهش تشخیص طیف قرمز
   ------------------------------------------ */
body.theme-protanopia .vision-media {
  filter: saturate(0.72) hue-rotate(8deg) contrast(1.12) brightness(1.04);
}

/* ------------------------------------------
   دید سبز
   Deuteranopia — کاهش تشخیص طیف سبز
   ------------------------------------------ */
body.theme-deuteranopia .vision-media {
  filter: saturate(0.7) hue-rotate(-12deg) contrast(1.12) brightness(1.04);
}

/* ------------------------------------------
   دید آسمان
   Tritanopia — کاهش تشخیص طیف آبی و زرد
   ------------------------------------------ */
body.theme-tritanopia .vision-media {
  filter: saturate(0.8) hue-rotate(18deg) contrast(1.08) brightness(1.03);
}

/* ------------------------------------------
   نگار بی‌رنگ
   سیاه‌وسفید با کنتراست خواناتر
   ------------------------------------------ */
body.theme-monochrome .vision-media {
  filter: grayscale(1) contrast(1.25) brightness(1.07);
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==========================================
   Header Base
   ========================================== */

.site-header {
  position: fixed;
  top: 0;
  right: 0; /* این خط اضافه شود */
  left: 0;
  z-index: 50;
  /* width: 100%;  این خط کاملاً حذف شود */
  padding: 1.25rem 0;
  transition: all 0.5s ease;
  box-sizing: border-box; /* جلوگیری از اضافه شدن پدینگ به عرض کل */
}

.header-container {
  padding: 0 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 0;
  transition: all 0.5s ease;
}

/* ==========================================
   Brand / Logo
   ========================================== */

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo-box {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--header-text-on-hero);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--accent-color);
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.header-logo-box img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.main-logo {
  display: none;
  flex-shrink: 0;
  width: 140px;
}

.main-logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ==========================================
   Mega Menu Desktop Styles
   ========================================== */

/* کانتینر اصلی در نوبار */
.header-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.mega-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

.chevron-icon {
  transition: transform 0.3s ease;
}

/* پنل مگامنو - مخفی به صورت پیش‌فرض */
.mega-menu-container {
  position: absolute;
  top: 100%;
  right: 50%; /* وسط‌چین کردن مگامنو نسبت به آیتم پدر در سایت‌های RTL */
  transform: translateX(50%) translateY(15px);
  width: max-content;
  max-width: 90vw; /* جلوگیری از بیرون زدن در صفحات کوچک */
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;

  /* افکت شیشه‌ای اگر در سیستم شما فعال است */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* نمایش مگامنو با Hover روی دسکتاپ */
@media (min-width: 1024px) {
  .header-nav-item.has-mega-menu:hover .mega-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
  }
  .header-nav-item.has-mega-menu:hover .chevron-icon {
    transform: rotate(180deg);
  }
}

/* گرید داخلی مگامنو (۳ ستون) */
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 2.5rem;
}

/* عنوان ستون‌ها */
.mega-title {
  font-size: 1.1rem;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-secondary);
  position: relative;
}

/* خط تزئینی زیر عنوان */
.mega-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

.mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mega-list li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* حالت هاور آیتم‌ها */
.mega-list li a:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
  transform: translateX(-5px); /* حرکت ظریف به سمت چپ در RTL */
}

/* جایگاه تصویر/آیکن */
.mega-img-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: #fff; /* رنگ پایه تا زمان لود عکس */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* حالت پیش‌فرض (هدر در بالای صفحه) */
#main-header .header-chip,
#main-header .header-actions .header-chip {
  color: #ffffff !important;
  transition:
    color 0.3s ease,
    background 0.3s ease;
}

/* حالت اسکرول خورده */
#main-header.header-scrolled .header-chip,
#main-header.header-scrolled .header-actions .header-chip {
  color: var(--secondary-color) !important;
}

/* ==========================================
   Mobile Sub-Menu Styles
   ========================================== */

.mobile-nav-item {
  width: 100%;
}

.mobile-sub-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
}

.mobile-chevron {
  transition: transform 0.3s ease;
}

/* انیمیشن آکاردئون با CSS Grid */
.mobile-sub-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
  overflow: hidden;
}

.mobile-nav-item.open .mobile-sub-menu {
  grid-template-rows: 1fr;
}

.mobile-nav-item.open .mobile-chevron {
  transform: rotate(180deg);
}

.mobile-sub-inner {
  min-height: 0;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.mobile-sub-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-sub-title {
  color: var(--accent-color);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.mobile-sub-group a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding-right: 0.5rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-sub-group a:hover {
  color: var(--accent-color);
}

/* ==========================================
   Desktop Navigation
   ========================================== */

.header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.header-link {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.25s ease;
}

.header-link:hover {
  color: var(--accent-color);
}

.active-link::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--accent-color);
}

/* اطمینان از اینکه عکس از باکس بیرون نزند */
.mega-img-box {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* استایل خود تگ img داخل باکس */
.mega-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* برای آیکن‌ها contain و برای عکس‌ها cover مناسب‌تر است */
  display: block;
  transition: transform 0.3s ease;
}

/* افکت زوم ملایم روی آیکن هنگام هاور کردن کل لینک (اختیاری) */
.mega-list a:hover .mega-img-box img {
  transform: scale(1.1);
}

/* ==========================================
   Header Buttons / Chips
   ========================================== */

.header-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.header-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--header-text-on-hero);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  outline: none;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease,
    transform 0.2s ease;
}

.header-chip:hover {
  opacity: 0.8;
}

.header-chip:active {
  transform: scale(0.95);
}

.theme-selector {
  position: relative;
}

.theme-menu-btn {
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.theme-status-dot {
  width: 0.75rem;
  height: 0.75rem;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-color);
  animation: themePulse 1.5s ease-in-out infinite;
}

.language-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.search-btn,
.mobile-menu-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.625rem;
}

.search-btn svg,
.mobile-menu-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ==========================================
   Theme Dropdown
   ========================================== */

.theme-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  display: none;
  width: 14rem;
  max-height: 80vh;
  padding: 0.5rem;
  margin-top: 0.75rem;
  overflow-y: auto;
  color: var(--dropdown-text);
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.theme-dropdown.is-open {
  display: block;
}

.theme-dropdown-title {
  padding: 0 0.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  opacity: 0.6;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.75rem;
  color: inherit;
  font-family: inherit;
  font-size: 0.75rem;
  text-align: right;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.theme-option:hover {
  background: var(--mobile-link-bg);
}

.theme-color {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid;
  border-radius: 50%;
}

.theme-divider {
  width: 100%;
  height: 1px;
  margin: 0.5rem 0;
  background: var(--border-color);
  opacity: 0.5;
}
/* ==========================================
   World / Language / Representatives Menu
   ========================================== */

.world-menu-selector,
.mobile-world-menu-selector {
  position: relative;
}

/* پنل اصلی مشابه Dropdown تم */
.world-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 120;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 8rem));
  padding: 0.65rem;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--dropdown-text, var(--text-primary));
  background: var(--dropdown-bg, var(--bg-surface));
  border: 1px solid var(--dropdown-border, var(--border-color));
  border-radius: 1rem;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* حالت باز */
.world-menu-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* تیتر پنل */
.world-menu-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.65rem 0.85rem;
  color: var(--accent-color);
  font-size: 0.83rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
}

.world-menu-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

/* هر آکاردئون */
.world-menu-accordion {
  border-bottom: 1px solid var(--border-color);
}

.world-menu-accordion:last-child {
  border-bottom: 0;
}

.world-menu-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.95rem 0.65rem;
  color: var(--dropdown-text, var(--text-primary));
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 0.6rem;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.world-menu-accordion-trigger:hover {
  color: var(--accent-color);
  background: var(--mobile-link-bg, rgba(255, 255, 255, 0.06));
}

.world-menu-accordion-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.world-menu-chevron {
  flex: 0 0 auto;
  transition: transform 0.3s ease;
}

/* باز شدن آکاردئون */
.world-menu-accordion.is-open .world-menu-chevron {
  transform: rotate(180deg);
}

.world-menu-accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s ease;
}

.world-menu-accordion.is-open .world-menu-accordion-content {
  grid-template-rows: 1fr;
}

.world-menu-accordion-inner {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 0;
  padding: 0 0.25rem;
}

.world-menu-accordion.is-open .world-menu-accordion-inner {
  padding-bottom: 0.65rem;
}

/* لینک‌های داخلی پنل */
.world-menu-link,
.world-menu-all-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  color: var(--dropdown-text, var(--text-primary));
  font-size: 0.79rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.55rem;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.world-menu-link:hover,
.world-menu-link.is-current {
  color: var(--accent-color);
  background: var(--mobile-link-bg, rgba(255, 255, 255, 0.07));
}

.world-menu-link:hover {
  transform: translateX(-3px);
}

.world-menu-link small {
  flex: 0 0 auto;
  color: var(--accent-color);
  font-size: 0.67rem;
  font-weight: 800;
  opacity: 0.85;
}

.world-menu-all-link {
  justify-content: center;
  margin-top: 0.35rem;
  color: #fff;
  font-weight: 700;
  background: var(--accent-color);
}

.world-menu-all-link:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.world-menu-all-link i {
  font-size: 1rem;
  font-style: normal;
}

/* ==========================================
   Mobile World Menu
   ========================================== */

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* در حالت دسکتاپ این بخش موبایل مخفی باشد */
.mobile-header-actions {
  display: flex;
}

.mobile-world-menu-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
}

/* پنل در موبایل از راست باز می‌شود */
.mobile-world-menu-dropdown {
  top: calc(100% + 0.7rem);
  right: 0;
  left: auto;
  width: min(21rem, calc(100vw - 2rem));
  max-height: min(70vh, 34rem);
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
}

.mobile-world-menu-dropdown.is-open {
  transform: translateY(0) scale(1);
}

/* ==========================================
   Responsive Header Visibility
   ========================================== */

@media (min-width: 1024px) {
  .header-nav,
  .header-actions {
    display: flex;
  }

  .mobile-header-actions {
    display: none;
  }
}

@media (max-width: 1023px) {
  .header-actions {
    display: none;
  }

  .mobile-header-actions {
    display: flex;
  }

  .world-menu-dropdown {
    border-radius: 0.85rem;
  }
}

@media (max-width: 380px) {
  .mobile-world-menu-dropdown {
    width: calc(100vw - 1.25rem);
  }

  .world-menu-link,
  .world-menu-all-link {
    font-size: 0.75rem;
  }
}
/* ==========================================
   اصلاح پنل زبان‌ها و نمایندگی‌ها در موبایل
   وسط‌چین شدن و جلوگیری از خروج از صفحه
   ========================================== */
@media (max-width: 1023px) {
  .mobile-world-menu-dropdown {
    position: fixed;
    top: calc(1.25rem + 5rem + 0.65rem);
    right: auto;
    left: 50%;

    /* همیشه کمی از دو طرف صفحه فاصله دارد */
    width: min(21rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 9rem);

    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;

    /* مرکز واقعی صفحه */
    transform: translate(-50%, -8px) scale(0.98);
    transform-origin: top center;
  }

  .mobile-world-menu-dropdown.is-open {
    transform: translate(-50%, 0) scale(1);
  }
}

/* ==========================================
   Theme Color Swatches
   ========================================== */

.color-default {
  background: #031930;
  border-color: #d79c34;
}

.color-dark {
  background: #08243d;
  border-color: #019e89;
}

.color-firoozeh {
  background: #019e89;
  border-color: #109393;
}

.color-zarrin {
  background: #134d94;
  border-color: #d79c34;
}

.color-sorkh {
  background: #de262e;
  border-color: #031930;
}

.color-negar {
  background: #e62f89;
  border-color: #031930;
}

.color-achromatopsia {
  background: #666666;
  border-color: #bdbdbd;
}

.color-protanopia {
  background: #174a7e;
  border-color: #e0a11b;
}

.color-deuteranopia {
  background: #1c3aba;
  border-color: #d79c34;
}

.color-tritanopia {
  background: #8a3d00;
  border-color: #d79c34;
}

/* ==========================================
   Mobile Menu
   ========================================== */

.mobile-menu-btn {
  display: inline-flex;
}

.mobile-menu-panel {
  position: absolute;
  top: 5rem;
  right: 1rem;
  left: 1rem;
  z-index: 50;
  display: none;
  padding: 1.25rem;
  overflow: hidden;

  background: var(--mobile-menu-bg);
  border: 1px solid var(--mobile-menu-border);
  border-radius: 2rem;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-height: 100vh; /* محدود کردن ارتفاع به اندازه صفحه نمایش */
  overflow-y: auto; /* فعال کردن اسکرول عمودی */
  padding-bottom: 120px; /* ایجاد فضای خالی در پایین تا آیتم آخر زیر نوار مرورگر گیر نکند */
}

.mobile-menu-panel::-webkit-scrollbar {
  width: 4px;
}
.mobile-menu-panel::-webkit-scrollbar-track {
  background: transparent;
}
.mobile-menu-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.mobile-menu-panel.is-open {
  display: block;
  animation: mobileMenuEnter 0.3s ease both;
}

.mobile-menu-light {
  position: absolute;
  top: -2.5rem;
  right: -2.5rem;
  width: 8rem;
  height: 8rem;
  pointer-events: none;
  background: color-mix(in srgb, var(--accent-color) 20%, transparent);
  border-radius: 50%;
  filter: blur(24px);
}

.mobile-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  color: var(--dropdown-text);
  font-size: 1rem;
  text-decoration: none;
  background: var(--mobile-link-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 1rem;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.mobile-link:not(:first-child) {
  opacity: 0.9;
}

.mobile-link:hover {
  background: var(--mobile-link-bg);
  border-color: var(--accent-color);
}

.mobile-link:active {
  transform: scale(0.95);
}

.mobile-link i {
  font-style: normal;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.mobile-link:hover i {
  transform: translateX(0.25rem);
}

.mobile-link-title {
  font-weight: 700;
}

.mobile-link:not(:first-child) span {
  font-weight: 500;
}

/* ==========================================
   Mobile Actions
   ========================================== */

.mobile-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.mobile-language-btn {
  flex: 1;
  padding: 1rem;
  color: var(--dropdown-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--mobile-link-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.mobile-search-btn {
  display: flex;
  flex: 2;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #000;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 900;
  cursor: pointer;
  background: var(--accent-color);
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 10px 20px
    color-mix(in srgb, var(--accent-color) 20%, transparent);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.mobile-language-btn:hover,
.mobile-search-btn:hover {
  opacity: 0.8;
}

.mobile-language-btn:active,
.mobile-search-btn:active {
  transform: scale(0.95);
}

.mobile-search-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ==========================================
   Mobile Theme Switcher
   ========================================== */

.mobile-theme-switcher {
  position: relative;
  z-index: 1;
  padding: 0.75rem;
  margin-top: 1.5rem;
  background: var(--mobile-link-bg);
  border-radius: 1.5rem;
}

.mobile-theme-switcher p {
  margin: 0 0 0.75rem;
  color: var(--dropdown-text);
  font-size: 0.625rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.mobile-theme-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-theme-btn {
  height: 2.5rem;
  cursor: pointer;
  border: 2px solid;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.mobile-theme-btn:active {
  transform: scale(0.9);
}

/* ==========================================
   Scrolled Header
   ========================================== */

#main-header.header-scrolled #header-inner {
  background: var(--header-scrolled-glass);
  border-color: var(--header-scrolled-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#main-header.header-scrolled .header-link,
#main-header.header-scrolled .header-chip {
  color: var(--header-text-scrolled);
}

#main-header.header-scrolled .header-logo-box {
  color: var(--header-text-scrolled);
  background: var(--mobile-link-bg);
  border-color: var(--dropdown-border);
}

#main-header.header-scrolled .header-chip {
  background: var(--mobile-link-bg);
  border-color: var(--dropdown-border);
}
/* وضعیت اولیه هدر */
.site-header {
  padding: 1.25rem 0;
  transition: padding 0.5s ease;
}

/* هدر بعد از اسکرول */
.site-header.header-scrolled {
  padding: 0.5rem 0;
}

/* سایه‌ای که قبلاً shadow-xl در Tailwind ایجاد می‌کرد */
#main-header.header-scrolled #header-inner {
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.theme-dropdown {
  display: none;
}

.theme-dropdown.is-open {
  display: block;
}

.mobile-menu-panel {
  display: none;
}

.mobile-menu-panel.is-open {
  display: block;
}

/* ==========================================
   Responsive
   ========================================== */

/* sm: 640px */
@media (min-width: 640px) {
  .header-container {
    padding: 0 1.5rem;
  }

  .header-inner {
    padding: 0 1.5rem;
  }

  .header-logo-box {
    width: 3rem;
    height: 3rem;
  }

  .main-logo {
    display: block;
  }
}

/* md: 768px */
@media (min-width: 768px) {
  .header-actions {
    display: flex;
  }

  .mobile-menu-btn,
  .mobile-menu-panel {
    display: none !important;
  }
}

/* lg: 1024px */
@media (min-width: 1024px) {
  .header-container {
    padding: 0 2rem;
  }

  .header-nav {
    display: flex;
  }
}

/* xl: 1280px */
@media (min-width: 1280px) {
  .header-inner {
    border-radius: 1rem;
  }
}

/* موبایل و تبلت */
@media (max-width: 1279px) {
  .header-inner {
    margin: 0.5rem 0;
    border-radius: 1rem;
  }
}

/* ==========================================
   Animations
   ========================================== */

@keyframes themePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.9);
  }
}

@keyframes mobileMenuEnter {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
   SITE FOOTER (Full & Optimized)
   ========================================== */



/* ساختار کلی فوتر و قرارگیری در انتهای صفحه */
.site-footer {
  position: relative;
  overflow: hidden;
  background-color: var(--footer-bg, #011832);
  color: #ffffff;
  font-family: inherit;
  width: 100%;
  margin-top: auto; /* برای چسبیدن طبیعی به انتهای صفحه در صورت کوتاه بودن محتوا */
}

/* ================= پس‌زمینه‌ها و لایه‌ها ================= */

/* لایه ۱: تصویر پس‌زمینه (موبایل پیش‌فرض) */
.footer-bg-custom {
  position: absolute;
  inset: 0;
  z-index: 9;
  background-image: url("/assets/images/footer-bg-mobile.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* تصویر پس‌زمینه دسکتاپ */
@media (min-width: 768px) {
  .footer-bg-custom {
    background-image: url("/assets/images/footer-bg.jpg");
  }
}

/* لایه ۲: گرادینت‌های شعاعی */
.footer-bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(
      circle at top right,
      rgba(117, 167, 167, 0.18),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(255, 255, 255, 0.08),
      transparent 24%
    );
  pointer-events: none;
}

/* لایه ۳: لایه تیره روی عکس برای خوانایی محتوا */
.footer-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-color: rgba(1, 24, 50, 0.88);
  pointer-events: none;
}

/* لایه ۴: هاله‌های نورانی (Glow) */
.footer-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(64px);
  z-index: 4;
}

.footer-glow-right {
  top: -6rem;
  right: -5rem;
  width: 14rem;
  height: 14rem;
  background-color: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.footer-glow-left {
  bottom: -7.5rem;
  left: -3.75rem;
  width: 16rem;
  height: 16rem;
  background-color: rgba(103, 232, 249, 0.1);
}

/* ================= کانتینر و گریدبندی ================= */

.footer-container {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3.5rem 1rem 1.5rem;
}

@media (min-width: 768px) {
  .footer-container {
    padding: 4rem 1.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .footer-container {
    padding: 5rem 2rem 2.5rem;
  }
}

/* گرید ۳ ستونه اصلی */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
  }
}

.footer-col {
  display: flex;
  width: 100%;
}

/* ================= کارت‌های شیشه‌ای (Glassmorphism) ================= */

.footer-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--footer-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--footer-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.5rem;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
  transition: border-color 0.3s ease;
}

.footer-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .footer-card {
    padding: 1.75rem;
  }
}

/* هدر کارت‌ها */
.footer-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.footer-header-diamond {
  display: block;
  width: 0.625rem;
  height: 0.625rem;
  transform: rotate(45deg);
  background-color: var(--accent-color);
  flex-shrink: 0;
}

.footer-card-header h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
}

@media (min-width: 768px) {
  .footer-card-header h3 {
    font-size: 1.125rem;
  }
}

/* ================= ستون اول: معرفی و آمار ================= */

.footer-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.footer-logo {
  height: 4rem;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .footer-logo {
    height: 4.75rem;
  }
}

.footer-desc {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 2;
  color: #cbd5e1;
  text-align: justify;
}

@media (min-width: 768px) {
  .footer-desc {
    font-size: 0.9375rem;
  }
}

/* آمار */
.footer-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.footer-stat-item {
  border-radius: 1rem;
  border: 1px solid var(--footer-card-border, rgba(255, 255, 255, 0.1));
  background-color: rgba(10, 36, 66, 0.7);
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.footer-stat-num {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--accent-color);
}

.footer-stat-text {
  font-size: 0.75rem;
  color: #cbd5e1;
  white-space: nowrap;
}

/* آیکون‌های تماس و شبکه اجتماعی */
.footer-social-grid {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.footer-social-btn {
  display: flex;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  border: 1px solid var(--footer-card-border, rgba(255, 255, 255, 0.1));
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.footer-social-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-social-btn:hover {
  transform: translateY(-4px);
  background-color: var(--accent-color);
  color: var(--footer-bg, #011832);
}

/* ================= لینک‌ها (ستون ۲ و ۳ - عدم شکست متن) ================= */

.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;          /* جلوگیری از شکسته شدن و ۲ خطی شدن متن */
  overflow: hidden;
  text-overflow: ellipsis;     /* افزودن سه‌نقطه در رزولوشن‌های خیلی خاص */
  transition: all 0.3s ease;
}

.footer-link-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-link-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(-4px);
}

.footer-link-icon {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--accent-color);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.footer-link-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.footer-link-item:hover .footer-link-icon {
  background-color: var(--accent-color);
  color: var(--footer-bg, #011832);
}

/* ================= ستون سوم: خبرنامه ================= */
/* ===================================================
   تثبیت و زیباسازی فرم خبرنامه اسپریت در فوتر
   =================================================== */
.footer-newsletter-wrap {
  width: 100%;
  direction: rtl;
  text-align: right;
}

.footer-newsletter-wrap form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* اصلاح تمام فیلدهای ورودی */
.footer-newsletter-wrap .es-form-group {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.footer-newsletter-wrap .es-form-control {
  width: 100% !important;
  height: 42px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: all 0.25s ease;
}

.footer-newsletter-wrap .es-form-control:focus {
  border-color: var(--accent-color, #d79c34) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0 0 2px rgba(215, 156, 52, 0.2) !important;
}

.footer-newsletter-wrap .es-form-control::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.8rem !important;
}

/* تراز فیلد ایمیل LTR */
.footer-newsletter-wrap input[name="email"] {
  direction: ltr !important;
  text-align: right !important;
}

.footer-newsletter-wrap input[name="email"]:focus {
  text-align: left !important;
}

/* ردیف کپچا */
.footer-newsletter-wrap .es-form-captcha-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
}

.footer-newsletter-wrap .es-form-captcha {
  flex: 1 !important;
  min-width: 0 !important;
}

.footer-newsletter-wrap .captcha-image {
  height: 42px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: #fff;
  object-fit: contain;
}

.footer-newsletter-wrap .refreshCaptcha {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.2s ease;
}

.footer-newsletter-wrap .refreshCaptcha:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* دکمه ارسال */
.footer-newsletter-wrap #submit-subscribe {
  width: 100% !important;
  height: 42px !important;
  background: var(--accent-color, #d79c34) !important;
  color: #031930 !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: opacity 0.2s ease, transform 0.15s ease;
  margin-top: 4px !important;
}

.footer-newsletter-wrap #submit-subscribe:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}


/* ================= نوار پایین (Bottom Bar) ================= */

.footer-bottom-bar {
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .footer-bottom-bar {
    margin-top: 3rem;
  }
}

.footer-divider {
  height: 1px;
  background: linear-gradient(
    to left,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

.footer-copyright {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .footer-copyright {
    padding-top: 1.75rem;
  }
}
/* تغییر عکس پس‌زمینه برای تبلت و دسکتاپ (از عرض 768 پیکسل به بالا) */
@media (min-width: 768px) {
  .footer-bg-custom {
    background-image: url("/uploads/icroir/icro/assets/images/footer-bg.jpg");
  }
}

/* up btn */
/* تنظیمات پایه دکمه بالابر */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem; /* قرارگیری در سمت چپ برای سایت‌های RTL */
  z-index: 99;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;

  /* استفاده از رنگ‌های سیستم تم شما */
  background-color: var(--accent-color);
  color: #ffffff; /* معمولاً روی رنگ accent، سفید خوانایی خوبی دارد */

  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;

  /* تنظیمات انیمیشن و مخفی بودن اولیه */
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: all 0.3s ease;
}

/* افکت Hover (هاور) */
.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  /* برای روشن‌تر شدن رنگ در هاور بدون نیاز به متغیر جدید */
  filter: brightness(1.1);
}

/* افکت کلیک کردن */
.scroll-to-top:active {
  transform: translateY(0);
  filter: brightness(0.9);
}

/* کلاسی که جاوااسکریپت برای نمایش دکمه اضافه می‌کند */
.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.25rem;
    left: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}
