/* =========================================
   SITE HEADER (Glass 3D Fixed)
   ========================================= */

/* ====== هدر اصلی (شیشه‌ای و چسبان) ====== */
.site-header {
  position: fixed; /* استفاده از fixed برای چسبیدن کامل به بالا */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  
  /* افکت شیشه‌ای (Glassmorphism) */
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  /* خط ظریف و سایه 3بعدی اولیه */
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(21, 41, 54, 0.03);
  
  transition: all 0.4s ease;
}

/* ====== حالت اسکرول شده (توسط JS اضافه می‌شود) ====== */
.site-header.scrolled {
  /* مات‌تر می‌شود تا خوانایی حفظ شود */
  background: rgba(255, 255, 255, 0.85); 
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  
  /* سایه سه‌بعدی عمیق‌تر برای جدا شدن از محتوا */
  border-bottom: 1px solid rgba(109, 191, 58, 0.15);
  box-shadow: 0 10px 30px rgba(21, 41, 54, 0.08), 
              0 2px 10px rgba(0, 0, 0, 0.04);
}

/* ====== چیدمان داخلی هدر ====== */
.header-inner {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  gap: 30px;
}

/* ====== لوگو / برند ====== */
.site-header .brand {
  display: flex !important;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header .brand img,
.site-header .custom-logo {
  max-height: 55px !important; /* جلوگیری از بزرگ شدن بی‌رویه لوگو */
  width: auto !important;
  height: auto !important;
  display: block;
}
.site-header .brand-mark {
  background: linear-gradient(135deg, var(--green), #5aa82f);
  color: #fff;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(109, 191, 58, 0.35);
}
.site-header .brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

/* ====== منوی اصلی دسکتاپ ====== */
.site-header .main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.site-header .main-menu {
  display: flex !important;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
  align-items: center;
}
.site-header .main-menu li {
  position: relative;
}
.site-header .main-menu > li > a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}
.site-header .main-menu > li > a:hover,
.site-header .main-menu > li.current-menu-item > a {
  color: var(--green);
  background: rgba(109, 191, 58, 0.08);
}

/* زیرمنو */
.site-header .main-menu .sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(21, 41, 54, 0.12);
  padding: 10px;
  list-style: none;
  margin: 15px 0 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(109, 191, 58, 0.1);
  z-index: 100;
}
.site-header .main-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-header .main-menu .sub-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.25s ease;
}
.site-header .main-menu .sub-menu a:hover {
  background: rgba(109, 191, 58, 0.08);
  color: var(--green);
  padding-right: 22px;
}

/* ====== دکمه تماس ====== */
.header-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--green), #5aa82f);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 8px 20px rgba(109, 191, 58, 0.35);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.header-call-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(109, 191, 58, 0.5);
}

/* ====== دکمه همبرگری ====== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: rgba(109, 191, 58, 0.1);
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 0;
  transition: all 0.3s ease;
  z-index: 10000;
}
.menu-toggle:hover {
  background: rgba(109, 191, 58, 0.2);
}
.menu-line {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--green);
  border-radius: 3px;
  margin: 0 auto;
  transition: all 0.3s ease;
  transform-origin: center;
}
.menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ====== منوی موبایل ====== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 41, 54, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 9998;
}
.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.4s ease;
  overflow-y: auto;
}
.mobile-menu.active {
  right: 0;
}
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.mobile-menu-head span {
  font-weight: 800;
  color: var(--navy);
  font-size: 1.15rem;
}
.mobile-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(109, 191, 58, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: all 0.3s ease;
}
.mobile-close:hover {
  background: var(--green);
  color: #fff;
  transform: rotate(90deg);
}
.mobile-menu-body {
  flex: 1;
  padding: 25px 20px;
}
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-menu-list li {
  margin-bottom: 8px;
}
.mobile-menu-list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}
.mobile-menu-list > li > a:hover {
  background: rgba(109, 191, 58, 0.1);
  color: var(--green);
}
.mobile-menu-footer {
  padding: 25px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.mobile-call-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--green), #5aa82f);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(109, 191, 58, 0.35);
}

/* ====== ریسپانسیو ====== */
@media (max-width: 992px) {
  .site-header .main-nav,
  .header-call-btn { display: none !important; }
  .menu-toggle { display: flex; }
  .header-inner { height: 75px; }
}
@media (max-width: 600px) {
  .site-header .brand img { max-height: 45px !important; }
  .header-inner { height: 68px; }
}