/* پس‌زمینه تمام‌عرض */
.hero-home {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 88vh; /* ارتفاع قابل تنظیم */
  background: url("https://aicer.ir/images/aicer-pics/person-computing-software-code-laptop.jpg") center center / cover no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

/* لایه تاریک برای خوانایی بهتر متن */
.hero-home::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* ظرف داخلی */
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* بخش چپ متن */
.hero-left {
  max-width: 560px;
  margin-left: 1rem;
}

/* تیتر بزرگ */
.hero-title {
  margin: 0 0 1rem 0;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.05;
  font-size: clamp(34px, 6.2vw, 72px);
}

/* زیرتیتر */
.hero-sub {
  margin: 0 0 2rem 0;
  font-size: clamp(16px, 2vw, 20px);
  opacity: 0.95;
}

/* دکمه سفید با کادر */
.btn-outline-white {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  background-color: transparent;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: 10px;
}

/* حالت هاور دکمه */
.btn-outline-white:hover {
  background-color: #fff;
  color: #111;
}

/* متن زیر عنوان: فشرده + justify */
.hero-sub{
  margin: 0 !important;
  line-height: 1.22 !important;      /* فاصله‌ی بین خطوط کم */
  text-align: justify !important;
  text-justify: inter-word;           /* پخش کلمات */
  color: #fff;
}

/* هر span یک خط؛ بدون فاصله‌ی عمودی */
.hero-sub span{
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

/* خط آخر چپ‌چین بماند (اختیاری) */
.hero-sub{
  text-align-last: left;
}

/* اگر قبلاً <p> استفاده کرده‌ای، فاصله‌ی پیش‌فرضشان را صفر کن */
.hero-sub p{ margin:0 !important; }

/* بلاک خبرها – فقط روی Addon با ID= news1 اعمال می‌شود */
#news1 .sppb-article,
#news1 .sppb-media {
  display: flex !important;
  align-items: flex-start !important;
  gap: 20px !important;
  padding: 20px 0 !important;
  border-bottom: 1px solid #e6e6e6 !important;
}

/* ستون تصویر با عرض ثابت */
#news1 .sppb-article-img,
#news1 .sppb-media-left {
  flex: 0 0 220px !important;
  max-width: 220px !important;
}

/* خودِ تصویر */
#news1 .sppb-article-img img,
#news1 .sppb-media-left img {
  width: 220px !important;
  height: auto !important;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* متن کنار تصویر */
#news1 .sppb-article-content,
#news1 .sppb-media-body { flex: 1 !important; }

#news1 .sppb-article-title {
  font-size: 22px !important;
  line-height: 1.35 !important;
  margin: 0 0 8px !important;
}

#news1 .sppb-article-introtext {
  font-size: 16px !important;
  color: #444 !important;
  margin: 0 !important;
}

/* موبایل */
@media (max-width: 768px) {
  #news1 .sppb-article,
  #news1 .sppb-media { flex-direction: column !important; }
  #news1 .sppb-article-img,
  #news1 .sppb-media-left,
  #news1 .sppb-article-img img,
  #news1 .sppb-media-left img {
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: auto !important;
  }
}




.custom-footer {
  background-color: #1c2c4c; /* آبی تیره */
  color: #fff;
  padding: 30px 20px;
  font-size: 14px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* برای واکنش‌گرا شدن */
}

.custom-footer h4 {
  margin-bottom: 10px;
  font-size: 20px;
  color: #fff;
}

.custom-footer p {
  margin: 0.5em 0;
  line-height: 1.8;
}

.footer-left {
  flex: 1;
  min-width: 250px;
}

.footer-social {
  display: flex;
  gap: 15px;
  font-size: 22px;
  margin-left: auto;   /* این خط باعث میشه کل بلوک بره سمت راست */
}

.footer-social a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer-social a:hover {
  transform: scale(1.15); /* کمی بزرگتر شدن هنگام هاور */
}

/* رنگ مخصوص هر شبکه */
.footer-social a.telegram:hover { color: #0088cc; }   /* Telegram */
.footer-social a.email:hover    { color: #dd4b39; }   /* Gmail */
.footer-social a.linkedin:hover { color: #0077b5; }   /* LinkedIn */
.footer-social a.instagram:hover { color: #E1306C; }  /* Instagram */

.footer-top-button {
  position: absolute;
  top: -20px;
  right: 20px;
}

.footer-top-button a {
  display: inline-block;
  background-color: #0d1c3d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  border: 2px solid #fff;
  transition: 0.3s ease;
}

.footer-top-button a:hover {
  background-color: #fff;
  color: #0d1c3d;
}


/* ====== HOME ONLY (Cassiopeia) ====== */
/* هدر شفاف و روی هیرو – فقط در صفحه Home */
.itemid-101 .container-header {
  position: absolute;         /* بیاد روی تصویر */
  top: 0; left: 0; right: 0;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 1000;
}

/* وقتی می‌خواهی بعد از اسکرول، هدر پس‌زمینه بگیرد (اختیاری) */
@supports (backdrop-filter: blur(4px)) {
  .itemid-101 .container-header.is-sticky,
  .itemid-101 .container-header.scrolled {
    background: rgba(15,25,55,.75) !important;
    backdrop-filter: saturate(140%) blur(4px);
  }
}

/* رنگ منو و برند روی بک‌گراند شفاف سفید شود */
.itemid-101 .container-header .mod-menu a,
.itemid-101 .container-header .navbar-brand, 
.itemid-101 .container-header .site-title,
.itemid-101 .container-header .navbar-toggler { 
  color: #fff !important;
}
.itemid-101 .container-header .navbar-toggler svg,
.itemid-101 .container-header .navbar-toggler-icon {
  filter: invert(1); /* آیکن منوی موبایل سفید شود */
}

/* اگر هدر آمده روی محتوا، اولِ سکشن هیرو را کمی پایین‌تر ببریم */
.itemid-101 .hero-home {
  padding-top: 96px;  /* تقریبی به اندازه ارتفاع هدر */
}

/* اگر نوار Title زیر هدر داری، پنهان کن */
.itemid-101 #banner,          /* پوزیشن banner (در صورت استفاده) */
.itemid-101 #masthead,        /* بسته به قالب */
.itemid-101 #title, 
.itemid-101 .page-title-wrapper {
  display: none !important;
}

/* برای اینکه محتوای صفحه زیر هدر نچسبد (در صورت نیاز) */
@media (max-width: 991px){
  .itemid-101 .hero-home { padding-top: 120px; }
}
/* زیرمنوهای ناوبری در صفحه Home – پس‌زمینه تیره و شفاف */
.itemid-101 .container-header .dropdown-menu,
.itemid-101 .container-header .mod-menu .mod-menu__sub {
  background: rgba(17, 24, 39, 0.92) !important; /* تیرهِ شفاف */
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(6px);
}

/* رنگ آیتم‌های زیرمنو */
.itemid-101 .container-header .dropdown-menu .dropdown-item,
.itemid-101 .container-header .mod-menu .mod-menu__sub a {
  color: #fff !important;
}

/* حالت هاور روی آیتم‌های زیرمنو */
.itemid-101 .container-header .dropdown-menu .dropdown-item:hover,
.itemid-101 .container-header .mod-menu .mod-menu__sub a:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
}

/* حذف فلش/پیکان سفید بالای زیرمنو (اگر وجود دارد) */
.itemid-101 .container-header .dropdown-menu::before,
.itemid-101 .container-header .dropdown-menu::after {
  display: none !important;
}
/* ==== HOME ONLY: reset submenu colors for Cassiopeia ==== */
/* پس‌زمینه و رنگ زیرمنوها: سفید با متن مشکی */
.itemid-101 .container-header .mod-menu .mod-menu__sub,
.itemid-101 .container-header .dropdown-menu {
  background: #ffffff !important;                 /* زمینه سفید */
  border: 1px solid rgba(0,0,0,0.08) !important;  /* کادر خیلی ظریف */
  box-shadow: 0 10px 24px rgba(0,0,0,0.15) !important;
  backdrop-filter: none !important;               /* شفافیت/بلور قبلی حذف شود */
}

/* لینک‌ها و آیتم‌های داخل زیرمنو: متن مشکی */
.itemid-101 .container-header .mod-menu .mod-menu__sub li,
.itemid-101 .container-header .mod-menu .mod-menu__sub li a,
.itemid-101 .container-header .dropdown-menu .dropdown-item {
  color: #111 !important;                         /* مشکیِ خوانا */
  background: transparent !important;
}

/* هاور روی آیتم‌های زیرمنو: خاکستری خیلی روشن */
.itemid-101 .container-header .mod-menu .mod-menu__sub li a:hover,
.itemid-101 .container-header .dropdown-menu .dropdown-item:hover {
  background: #f2f2f2 !important;
  color: #111 !important;
}

/* هر فلش/پیکانِ تزئینیِ سفید را حذف کن */
.itemid-101 .container-header .mod-menu .mod-menu__sub::before,
.itemid-101 .container-header .mod-menu .mod-menu__sub::after,
.itemid-101 .container-header .dropdown-menu::before,
.itemid-101 .container-header .dropdown-menu::after {
  display: none !important;
}
/* ===== HOME (itemid-101) – MetisMenu fix ===== */

/* باکس زیرمنو وقتی باز است (mm-collapse/mm-show) */
.itemid-101 .container-header .metismenu .mm-collapse,
.itemid-101 .container-header .metismenu .mm-show {
  background: #ffffff !important;                 /* زمینه سفید (درخواست تو) */
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.15) !important;
}

/* لینک‌ها و آیتم‌های داخل زیرمنو: متن مشکی */
.itemid-101 .container-header .metismenu .mm-collapse a,
.itemid-101 .container-header .metismenu .mm-show a,
.itemid-101 .container-header .metismenu .mm-collapse li,
.itemid-101 .container-header .metismenu .mm-show li {
  color: #111 !important;                          /* مشکی خوانا */
  background: transparent !important;
  text-decoration: none;
}

/* هاور روی آیتم‌های زیرمنو */
.itemid-101 .container-header .metismenu .mm-collapse a:hover,
.itemid-101 .container-header .metismenu .mm-show a:hover {
  background: #f2f2f2 !important;
  color: #111 !important;
}

/* فلش/پیکان یا تزیینات احتمالی را حذف کن */
.itemid-101 .container-header .metismenu .mm-collapse::before,
.itemid-101 .container-header .metismenu .mm-collapse::after,
.itemid-101 .container-header .metismenu .mm-show::before,
.itemid-101 .container-header .metismenu .mm-show::after {
  display: none !important;
}




/* ====== HOME ONLY (Cassiopeia) ====== */
/* حذف بک‌گراند آبی فوتر در صفحه Home */
.itemid-101 footer.container-footer {
  background: #ffffff !important;   /* رنگ ساده سفید یا هر رنگی که خواستی */
  color: #000000 !important;        /* متن مشکی */
  border-top: 1px solid #e0e0e0;    /* خط باریک بالای فوتر */
  border-radius: 0 !important;      /* بدون گردی */
  padding: 40px 0;
}

/* لینک‌ها */
.itemid-101 footer.container-footer a {
  color: #444444 !important;
  text-decoration: none;
}
.itemid-101 footer.container-footer a:hover {
  opacity: .7;
}

/* ===== Clean mobile header (Cassiopeia) ===== */
@media (max-width: 991px){
  
  /* پایین‌تر آوردن متن هیرو */
  .hero-sub{
    margin-top: 40px !important;   /* میتونی 30 یا 50 هم تست کنی */
  }
  /* 1) حذف Brand و tagline */
  .navbar-brand,
  .site-description{
    display: none !important;
  }

  /* 2) منو فقط وقتی بسته است مخفی باشد */
  .container-nav .navbar-collapse:not(.show) .navbar-nav{
    display: none;
  }

  /* وقتی باز شد نمایش داده شود */
  .container-nav .navbar-collapse.show .navbar-nav{
    display: flex;
    flex-direction: column;
  }

  /* 3) فاصله‌های اضافی هدر */
  header.header,
  .container-header,
  .container-nav{
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  /* ===== جلوگیری از سفید شدن منو ===== */

  .container-nav{
    position: relative;
  }

  .container-nav .navbar-collapse{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: transparent !important; /* اگر میخوای شفاف باشه */
  }

  .container-nav .navbar-collapse.show{
    background: transparent !important;
  }
}
/* ===== HERO FIX MOBILE ===== */
@media (max-width: 768px) {
  /* کوچک کردن متن AI */
  .hero-sub span {
    font-size: 26px !important;
    line-height: 1.3 !important;
  }

  /* کم کردن فاصله بالا */
  .hero-home {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

/* منوی کشویی بنفش فقط برای صفحات داخلی */
@media (max-width: 991px){

  body:not(.home) .container-nav{
    position: relative;
  }

  body:not(.home) .container-nav .navbar-collapse{
  position: fixed;      /* به جای absolute */
  top: 60px;            /* ارتفاع هدر - اگر کم/زیاد بود عدد رو تنظیم کن */
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #3f3d8f !important;  /* بنفش سایتت */
  padding: 20px 0;
}

  body:not(.home) .container-nav .navbar-collapse.show .navbar-nav{
    display: flex;
    flex-direction: column;
  }

  body:not(.home) .container-nav .navbar-nav .nav-link{
    color: #fff !important;
  }

}