/* =========================================
   ICON BOX
========================================= */

.icon-box {
  padding: 30px 20px;
}

.icon-box .icon {
  width: 2px;
  height: 2px;
  margin: 0 auto 15px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.icon-box .icon img {
  max-width: 40%;
  max-height: 40%;
  object-fit: contain;
  display: block;
  margin: 0 auto !important;
  padding-top: 10px;
}


/* =========================================
   HERO TITLE ANIMATION
========================================= */

.hero-title-wrapper {
  text-align: center;
}

.hero-typing-title {
  font-family: IRanSansX, sans-serif;
  font-weight: 900;
  display: inline-block;
  position: relative;

  min-height: 1.4em;

  opacity: 0;
  transform: translateY(12px);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.hero-typing-title.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* Cursor */

.hero-typing-title::after {
  content: "";
  display: inline-block;

  width: 3px;
  height: 0.95em;

  margin-right: 8px;

  background: currentColor;

  vertical-align: -5px;

  animation: heroCursorBlink 0.7s infinite;
}


/* حذف نرم کرسر بعد از پایان تایپ */

.hero-typing-title.typing-complete::after {
  animation: heroCursorOut 0.6s forwards;
}


@keyframes heroCursorBlink {

  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }

}


@keyframes heroCursorOut {

  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }

}


/* =========================================
   SUBTITLE
========================================= */

.hero-subtitle {
  font-family: IRanSansX, sans-serif;

  opacity: 0;
  transform: translateY(15px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.hero-subtitle.show {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================
   HERO - MOBILE
========================================= */

@media (max-width: 768px) {

  .hero-typing-title {
    min-height: 2.6em;
    line-height: 1.5;
  }

}


/* =========================================
   REDUCE MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  .hero-typing-title,
  .hero-subtitle {
    transition: none;
    transform: none;
  }

  .hero-typing-title::after {
    animation: none;
    display: none;
  }

}


/* =========================================
   MOBILE HEADER
   فقط لوگو و عنوان به سمت راست
   منوی سه‌خط کاملاً دست‌نخورده
========================================= */

@media (max-width: 1199px) {

  /*
   * لوگو + نام انجمن
   *
   * هیچ position:absolute استفاده نشده
   * تا روی سه‌خط اثری نگذارد.
   */
  #header .logo {
    margin-right: 0 !important;
    margin-left: auto !important;

    padding: 0 !important;

    display: flex !important;
    align-items: center !important;

    gap: 8px;

    /*
     * چند پیکسل بیشتر به سمت راست
     * بدون تغییر جای سه‌خط
     */
    transform: translateX(8px);
  }


  /*
   * داخل HTML چند div فقط برای ایجاد
   * فاصله با &nbsp; قرار داده شده.
   *
   * همین divها یکی از دلایل اصلی هستند
   * که لوگو از سمت راست فاصله می‌گیرد.
   */
  #header .logo > div {
    display: none !important;
  }


  /*
   * لوگوی انجمن
   */
  #header .logo img {
    flex-shrink: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
  }


  /*
   * نام انجمن
   *
   * font-size تعیین نمی‌کنیم
   * تا همان اندازه اصلی HTML حفظ شود.
   */
  #header .logo .sitename {
    font-family: IRanSansX, sans-serif !important;

    margin: 0 !important;
    padding: 0 !important;

    white-space: nowrap !important;

    flex-shrink: 0 !important;
  }

}


/* =========================================
   گوشی‌های کوچک
========================================= */

@media (max-width: 480px) {

  #header .logo {
    gap: 6px;

    transform: translateX(6px);
  }

}



/* =========================================
   APIR GLOBAL VISUAL SYSTEM
   Shared styles previously spread across pages
========================================= */

/* Hero bottom transition — does not alter the image itself */
#hero {
  position: relative !important;
  overflow: hidden !important;
}

#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 110px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.18) 25%,
    rgba(255,255,255,.50) 55%,
    rgba(255,255,255,.82) 80%,
    #fff 100%
  );
  pointer-events: none;
  z-index: 1;
}

#hero .container {
  position: relative;
  z-index: 2;
}

#hero h1 {
  font-family: IRanSansX, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px;
}

/* Standard section headings */
.section-title h1,
.section-title h2,
.section-title h3,
body > h1.text-center,
main > h1.text-center,
main > h2.text-center,
section:not(#hero) > h1.text-center,
section:not(#hero) > h2.text-center,
section:not(#hero) .container > h1.text-center,
section:not(#hero) .container > h2.text-center,
.isotope-layout > h1,
.isotope-layout > h2 {
  font-family: IRanSansX, sans-serif !important;
  font-weight: 900 !important;
  color: #0b3f6c !important;
  position: relative;
  display: table;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-bottom: 15px !important;
}

.section-title h1::after,
.section-title h2::after,
.section-title h3::after,
body > h1.text-center::after,
main > h1.text-center::after,
main > h2.text-center::after,
section:not(#hero) > h1.text-center::after,
section:not(#hero) > h2.text-center::after,
section:not(#hero) .container > h1.text-center::after,
section:not(#hero) .container > h2.text-center::after,
.isotope-layout > h1::after,
.isotope-layout > h2::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 3px;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-radius: 20px;
  background: linear-gradient(90deg,#67b7ff,#1769aa);
}

/* Footer aligned with the approved index look */
#footer,
#footer.footer,
#footer.light-background {
  background: #082f49 !important;
  color: #e8f2f8 !important;
  border-top: 3px solid #1769aa;
}

#footer p,
#footer span,
#footer li { color: #d8e7f1 !important; }

#footer h1,
#footer h2,
#footer h3,
#footer h4,
#footer .sitename {
  color: #fff !important;
  font-weight: 700 !important;
}

#footer a {
  color: #d8e7f1 !important;
  text-decoration: none !important;
  transition: color .25s ease, transform .25s ease;
}

#footer a:hover { color: #67b7ff !important; }
#footer .logo img { max-height: 65px; width: auto; }

/* Footer social network logos must stay inside their circular buttons. */
#footer .social-links a {
  overflow: hidden;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

#footer .social-links a img.aparat-icon {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 0 !important;
  max-width: 22px !important;
  min-height: 0 !important;
  max-height: 22px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
}
#footer .social-links { gap: 10px; }

#footer .social-links a {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: #fff !important;
}

#footer .social-links a:hover {
  background: rgba(255,255,255,.15) !important;
  color: #fff !important;
  transform: translateY(-3px);
}

#footer .copyright {
  background: #082f49 !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
  margin-top: 35px !important;
  padding-top: 22px !important;
  padding-bottom: 22px !important;
}

#footer .copyright p,
#footer .copyright span,
#footer .copyright strong,
#footer .credits { color: #d8e7f1 !important; }

#footer .copyright a,
#footer .credits a { color: #fff !important; }
#footer .footer-top { padding-top: 55px !important; padding-bottom: 20px !important; }

@media (max-width: 768px) {
  #footer { text-align: center !important; }
  #footer .footer-top { padding-top: 40px !important; }
  #footer .social-links { justify-content: center !important; }
  #footer .copyright { margin-top: 25px !important; }
}

/* CTA */
#call-to-action {
  background: linear-gradient(120deg,#0b3f6c 0%,#1769aa 55%,#2f80ed 100%) !important;
  position: relative;
  overflow: hidden;
}

#call-to-action::before,
#call-to-action::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
#call-to-action::before { width: 280px; height: 280px; top: -130px; right: -80px; }
#call-to-action::after { width: 220px; height: 220px; bottom: -120px; left: -40px; }
#call-to-action .container { position: relative; z-index: 2; }

/* Stats */
#stats {
  background: linear-gradient(120deg,#082f49 0%,#0b3f6c 48%,#1769aa 100%) !important;
  position: relative;
  overflow: hidden;
  padding-top: 65px !important;
  padding-bottom: 65px !important;
}

#stats::before,
#stats::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
#stats::before { width: 300px; height: 300px; right: -130px; top: -160px; }
#stats::after { width: 230px; height: 230px; left: -100px; bottom: -130px; }
#stats .container { position: relative; z-index: 2; }
#stats .stats-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 15px 10px !important;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease;
}
#stats .stats-item span {
  color: #fff !important;
  font-size: 46px !important;
  font-weight: 900 !important;
  line-height: 1.2;
  margin-bottom: 8px;
}
#stats .stats-item p {
  color: #d9ebf7 !important;
  font-family: IRanSansX,sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  margin: 0 !important;
}
#stats .stats-item:hover { transform: translateY(-4px); }

@media (max-width: 768px) {
  #stats { padding-top: 45px !important; padding-bottom: 45px !important; }
  #stats .stats-item { padding: 20px 10px !important; }
  #stats .stats-item span { font-size: 38px !important; }
}

/* =========================================
   MEMBERSHIP REDESIGN — page-specific
========================================= */
.membership-page {
      background: #ffffff;
    }

    .membership-page #pricing {
      padding-top: 70px;
      padding-bottom: 70px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    }

    .membership-page .membership-section-title {
      text-align: center;
      margin-bottom: 42px;
    }

    .membership-page .membership-section-title h2 {
      font-family: IRanSansX, sans-serif;
      color: #0b3f6c;
      font-weight: 900;
      margin-bottom: 10px;
    }

    .membership-page .membership-section-title p {
      font-family: IRanSansX, sans-serif;
      color: #6f8294;
      margin: 0;
    }

    .membership-page #pricing .row {
      align-items: stretch;
    }

    .membership-page #pricing .col-lg-4 {
      display: flex;
    }

    .membership-page #pricing .pricing-item {
      width: 100%;
      min-height: 100%;
      padding: 34px 28px 30px;
      border-radius: 0;
      border: 1px solid rgba(14, 83, 132, 0.10);
      background: #ffffff;
      box-shadow: 0 12px 35px rgba(21, 73, 111, 0.08);
      transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
      display: flex;
      flex-direction: column;
    }

    .membership-page #pricing .pricing-item:hover {
      transform: translateY(-6px);
      border-color: rgba(47, 128, 237, 0.25);
      box-shadow: 0 18px 42px rgba(21, 73, 111, 0.14);
    }

    .membership-page #pricing .featured .pricing-item {
      background: linear-gradient(145deg, #0b3f6c 0%, #1769aa 100%);
      color: #ffffff;
      border-color: transparent;
    }

    .membership-page #pricing .pricing-item h3 {
      font-family: IRanSansX, sans-serif;
      font-weight: 900;
      color: #0b3f6c;
      margin-bottom: 22px;
    }

    .membership-page #pricing .featured .pricing-item h3,
    .membership-page #pricing .featured .pricing-item li,
    .membership-page #pricing .featured .pricing-item span {
      color: #ffffff !important;
    }

    .membership-page #pricing .pricing-item ul {
      flex: 1;
      padding: 0;
      margin: 0 0 28px;
      list-style: none;
    }

    .membership-page #pricing .pricing-item li {
      font-family: IRanSansX, sans-serif;
      color: #415a70;
      line-height: 2;
      margin-bottom: 8px;
    }

    .membership-page #pricing .pricing-item li i {
      color: #2f80ed;
      margin-left: 7px;
    }

    .membership-page #pricing .featured .pricing-item li i {
      color: #bfe0ff;
    }

    .membership-page #pricing .buy-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 155px;
      min-height: 46px;
      padding: 10px 20px;
      border-radius: 3px;
      background: #2f80ed;
      color: #ffffff !important;
      border: 0;
      font-family: IRanSansX, sans-serif;
      font-weight: 700;
      text-decoration: none;
      transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    }

    .membership-page #pricing .buy-btn:hover {
      transform: translateY(-2px);
      background: #1769aa;
      box-shadow: 0 8px 18px rgba(47, 128, 237, .20);
    }

    .membership-page #pricing .featured .buy-btn {
      background: #ffffff;
      color: #0b3f6c !important;
    }

    .membership-page #membership-process {
      scroll-margin-top: 110px;
      padding: 78px 0 84px;
      background: #ffffff;
    }

    .membership-page .process-shell {
      max-width: 1080px;
      margin: 0 auto;
    }

    .membership-page .process-intro {
      text-align: center;
      margin-bottom: 42px;
    }

    .membership-page .process-intro h2 {
      font-family: IRanSansX, sans-serif;
      font-weight: 900;
      color: #0b3f6c;
      margin-bottom: 10px;
    }

    .membership-page .process-intro p {
      font-family: IRanSansX, sans-serif;
      color: #6b8093;
      margin: 0;
    }

    .membership-page .step-card {
      position: relative;
      padding: 24px 82px 24px 24px;
      margin-bottom: 16px;
      border-radius: 0;
      background: #ffffff;
      border: 1px solid rgba(14, 83, 132, .10);
      box-shadow: 0 8px 26px rgba(21, 73, 111, .06);
    }

    .membership-page .step-number {
      position: absolute;
      right: 20px;
      top: 20px;
      width: 44px;
      height: 44px;
      border-radius: 0;
      background: linear-gradient(145deg, #0b3f6c, #2f80ed);
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: IRanSansX, sans-serif;
      font-size: 18px;
      font-weight: 900;
      box-shadow: 0 7px 18px rgba(47, 128, 237, .18);
    }

    .membership-page .step-card p,
    .membership-page .step-card li {
      font-family: IRanSansX, sans-serif;
      color: #3f566b;
      line-height: 2.05;
      margin-bottom: 8px;
    }

    .membership-page .step-card p:last-child {
      margin-bottom: 0;
    }

    .membership-page .document-card,
    .membership-page .notice-card,
    .membership-page .fees-card {
      margin: 20px 0;
      padding: 28px;
      border-radius: 0;
    }

    .membership-page .document-card {
      background: #f6fbff;
      border: 1px solid rgba(47, 128, 237, .14);
    }

    .membership-page .document-card h3,
    .membership-page .fees-card h3 {
      font-family: IRanSansX, sans-serif;
      font-weight: 900;
      color: #0b3f6c;
      font-size: 20px;
      margin-bottom: 16px;
    }

    .membership-page .document-card ol,
    .membership-page .document-card ul {
      margin-bottom: 0;
      padding-right: 24px;
    }

    .membership-page .document-card li {
      font-family: IRanSansX, sans-serif;
      line-height: 2;
      color: #40586d;
      margin-bottom: 7px;
    }

    .membership-page .sub-documents {
      margin: 12px 0 4px;
      padding: 0;
      list-style: none;
    }

    .membership-page .sub-documents li {
      position: relative;
      padding-right: 20px;
    }

    .membership-page .sub-documents li::before {
      content: "•";
      color: #2f80ed;
      position: absolute;
      right: 0;
      font-weight: 900;
    }

    .membership-page .notice-card {
      background: #fffaf0;
      border: 1px solid rgba(218, 161, 42, .22);
    }

    .membership-page .notice-card p {
      position: relative;
      padding-right: 24px;
      font-family: IRanSansX, sans-serif;
      color: #695837;
      line-height: 2;
      margin-bottom: 8px;
    }

    .membership-page .notice-card p::before {
      content: "!";
      position: absolute;
      right: 0;
      top: 3px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #d6a12d;
      color: #fff;
      font-size: 11px;
      font-weight: 900;
    }

    .membership-page .fees-card {
      background: #f8fbfe;
      border: 1px solid rgba(14, 83, 132, .10);
    }

    .membership-page .fees-card .table-responsive {
      border-radius: 0;
      overflow: hidden;
      box-shadow: 0 7px 20px rgba(21, 73, 111, .05);
    }

    .membership-page .fees-card table {
      width: 100%;
      margin: 0;
      background: #ffffff;
      font-family: IRanSansX, sans-serif;
    }

    .membership-page .fees-card th,
    .membership-page .fees-card td {
      padding: 14px 12px;
      vertical-align: middle;
      color: #3d5569;
      border-color: rgba(14, 83, 132, .10) !important;
    }

    .membership-page .fees-card thead th {
      background: #0b3f6c;
      color: #ffffff;
      font-weight: 800;
    }

    .membership-page .fees-card tbody tr:nth-child(even) {
      background: #f8fbfe;
    }

    .membership-page .email-link {
      color: #1769aa;
      font-weight: 700;
      text-decoration: none;
    }

    .membership-page .email-link:hover {
      text-decoration: underline;
    }

    @media (max-width: 991px) {
      .membership-page #pricing .row {
        row-gap: 20px;
      }
    }

    @media (max-width: 768px) {
      .membership-page #pricing,
      .membership-page #membership-process {
        padding-top: 52px;
        padding-bottom: 58px;
      }

      .membership-page .step-card {
        padding: 74px 20px 22px;
      }

      .membership-page .step-number {
        right: 20px;
        top: 18px;
      }

      .membership-page .document-card,
      .membership-page .notice-card,
      .membership-page .fees-card {
        padding: 20px;
      }
    }

/* =========================================
   APIR INTERNAL PAGES — shared visual consistency
========================================= */
body.apir-subpage {
--apir-navy: #0b3f6c;
      --apir-navy-deep: #082f49;
      --apir-blue: #1769aa;
      --apir-bright: #2f80ed;
      --apir-sky: #eaf6ff;
      --apir-soft: #f7fbff;
      --apir-border: rgba(14, 83, 132, 0.14);
      --apir-text: #31465a;
      --apir-muted: #607b91;

      background: #ffffff;
      color: var(--apir-text);
    }

    body.apir-subpage a {
      transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
    }

    /* Hero: preserve each page's original image dimensions and crop behavior */
    body.apir-subpage #hero {
      position: relative !important;
      overflow: hidden !important;
    }

    /* Do not override #hero > img here. main.css keeps the original Hero image exactly as designed. */

    body.apir-subpage #hero::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 64px;
      z-index: 1;
      pointer-events: none;
      background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.10) 35%,
        rgba(255,255,255,.48) 72%,
        #ffffff 100%
      );
    }

    body.apir-subpage #hero .container {
      position: relative;
      z-index: 2;
    }

    body.apir-subpage #hero h1 {
      font-family: IRanSansX, sans-serif !important;
      color: var(--apir-navy) !important;
      font-size: clamp(1.9rem, 3.7vw, 3.15rem) !important;
      line-height: 1.45 !important;
      font-weight: 900 !important;
      letter-spacing: -.5px;
      margin-bottom: 12px !important;
      text-shadow: 0 2px 12px rgba(24, 83, 126, .08);
    }

    body.apir-subpage #hero h5,
    body.apir-subpage #hero p {
      font-family: IRanSansX, sans-serif !important;
      color: #52738c !important;
      font-weight: 700 !important;
      line-height: 1.9;
    }

    /* Legacy page-title: preserve the template's original background and dimensions */
    body.apir-subpage .page-title {
      position: relative;
      overflow: hidden;
    }


    body.apir-subpage .page-title .container {
      position: relative;
      z-index: 2;
      text-align: center;
    }

    body.apir-subpage .page-title h1 {
      color: var(--apir-navy) !important;
      font-family: IRanSansX, sans-serif !important;
      font-weight: 900 !important;
      font-size: clamp(1.9rem, 3.7vw, 3rem) !important;
    }

    /* Main spacing */
    body.apir-subpage > section:not(#hero),
    body.apir-subpage main > section:not(#hero) {
      padding-top: 68px !important;
      padding-bottom: 68px !important;
    }

    body.apir-subpage .light-background,
    body.apir-subpage section.light-background {
      background: linear-gradient(180deg, #f9fcff 0%, #eef7fd 100%) !important;
    }

    body.apir-subpage #portfolio {
      background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    }

    body.apir-subpage #faq {
      background: linear-gradient(180deg, #f7fbff 0%, #eef7fd 100%) !important;
    }

    /* Section headings */
    body.apir-subpage .section-title h1,
    body.apir-subpage .section-title h2,
    body.apir-subpage section:not(#hero) > h1,
    body.apir-subpage section:not(#hero) > h2,
    body.apir-subpage section:not(#hero) > .container > h1,
    body.apir-subpage section:not(#hero) > .container > h2,
    body.apir-subpage > h1.text-center,
    body.apir-subpage .full-width h1,
    body.apir-subpage .glossary-title {
      font-family: IRanSansX, sans-serif !important;
      color: var(--apir-navy) !important;
      font-weight: 900 !important;
      position: relative;
      display: table;
      margin-left: auto !important;
      margin-right: auto !important;
      padding-bottom: 15px !important;
      line-height: 1.6;
    }

    body.apir-subpage .section-title h1::after,
    body.apir-subpage .section-title h2::after,
    body.apir-subpage section:not(#hero) > h1::after,
    body.apir-subpage section:not(#hero) > h2::after,
    body.apir-subpage section:not(#hero) > .container > h1::after,
    body.apir-subpage section:not(#hero) > .container > h2::after,
    body.apir-subpage > h1.text-center::after,
    body.apir-subpage .full-width h1::after,
    body.apir-subpage .glossary-title::after {
      content: "";
      position: absolute;
      width: 58px;
      height: 3px;
      left: 50%;
      bottom: 0;
      transform: translateX(-50%);
      background: linear-gradient(90deg, #67b7ff, #1769aa);
      border-radius: 0 !important;
    }

    body.apir-subpage .section-title p,
    body.apir-subpage .glossary-intro {
      color: var(--apir-muted) !important;
      line-height: 2;
    }

    /* Rectangular card system — no rounded containers */
    body.apir-subpage .service-item,
    body.apir-subpage .pricing-item,
    body.apir-subpage .faq-item,
    body.apir-subpage .testimonial-item,
    body.apir-subpage #PageContent,
    body.apir-subpage .newsbox,
    body.apir-subpage .boxShadow,
    body.apir-subpage .glossary-item,
    body.apir-subpage .info-item,
    body.apir-subpage .php-email-form,
    body.apir-subpage .portfolio-details-slider,
    body.apir-subpage .portfolio-info,
    body.apir-subpage .service-details .services-list,
    body.apir-subpage .service-details .service-box {
      border-radius: 0 !important;
    }

    body.apir-subpage .service-item,
    body.apir-subpage .pricing-item,
    body.apir-subpage .faq-item,
    body.apir-subpage .testimonial-item,
    body.apir-subpage #PageContent,
    body.apir-subpage .newsbox,
    body.apir-subpage .boxShadow,
    body.apir-subpage .glossary-item,
    body.apir-subpage .info-item,
    body.apir-subpage .php-email-form {
      background: #ffffff !important;
      border: 1px solid var(--apir-border) !important;
      box-shadow: 0 10px 28px rgba(22, 69, 104, .06) !important;
    }

    body.apir-subpage .service-item,
    body.apir-subpage .pricing-item {
      border-top: 3px solid var(--apir-blue) !important;
    }

    body.apir-subpage .service-item {
      height: 100%;
      padding-top: 30px !important;
      padding-bottom: 30px !important;
    }

    body.apir-subpage .service-item:hover,
    body.apir-subpage .pricing-item:hover,
    body.apir-subpage .glossary-item:hover {
      transform: translateY(-4px);
      box-shadow: 0 18px 38px rgba(22, 69, 104, .11) !important;
    }

    body.apir-subpage .service-item h3,
    body.apir-subpage .pricing-item h3 {
      color: var(--apir-navy) !important;
      font-weight: 800 !important;
      line-height: 1.8;
    }

    body.apir-subpage .featured .pricing-item {
      background: linear-gradient(145deg, #0b3f6c, #1769aa) !important;
      border-color: #0b3f6c !important;
      color: #ffffff !important;
    }

    body.apir-subpage .featured .pricing-item h3,
    body.apir-subpage .featured .pricing-item h4,
    body.apir-subpage .featured .pricing-item h5,
    body.apir-subpage .featured .pricing-item li,
    body.apir-subpage .featured .pricing-item span,
    body.apir-subpage .featured .pricing-item p {
      color: #ffffff !important;
    }

    body.apir-subpage .faq-item {
      border-right: 3px solid var(--apir-blue) !important;
      margin-bottom: 12px !important;
    }

    body.apir-subpage .faq-item h3 {
      color: #17496e !important;
      font-weight: 800 !important;
    }

    /* Existing informational bands */
    body.apir-subpage .full-width {
      background: linear-gradient(180deg, #f9fcff 0%, #eef7fd 100%) !important;
      border-top: 1px solid rgba(14,83,132,.08);
      border-bottom: 1px solid rgba(14,83,132,.08);
    }

    body.apir-subpage .full-width p,
    body.apir-subpage #description p,
    body.apir-subpage #description li,
    body.apir-subpage .service-details p,
    body.apir-subpage .glossary-description {
      color: #425f75;
      line-height: 2.05 !important;
    }

    body.apir-subpage #PageContent,
    body.apir-subpage .newsbox {
      width: min(1180px, calc(100% - 28px));
      margin: 40px auto 70px !important;
      padding: 22px 10px !important;
      border-top: 3px solid var(--apir-blue) !important;
    }

    /* Portfolio / news / branch / committee grids */
    body.apir-subpage .portfolio-item img,
    body.apir-subpage .portfolio-details-slider img {
      border-radius: 0 !important;
    }

    body.apir-subpage .portfolio-item > img,
    body.apir-subpage .portfolio-item > div > img {
      border: 1px solid rgba(14,83,132,.12);
      box-shadow: 0 8px 24px rgba(22,69,104,.07);
      transition: transform .28s ease, box-shadow .28s ease;
    }

    body.apir-subpage .portfolio-item:hover > img,
    body.apir-subpage .portfolio-item:hover > div > img {
      transform: translateY(-3px);
      box-shadow: 0 14px 30px rgba(22,69,104,.12);
    }

    body.apir-subpage .portfolio-filters {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 7px !important;
      background: #f1f8fd;
      border: 1px solid rgba(14,83,132,.09);
      border-radius: 0 !important;
    }

    body.apir-subpage .portfolio-filters li {
      margin: 0 !important;
      padding: 8px 15px !important;
      border-radius: 0 !important;
    }

    body.apir-subpage .portfolio-filters li.filter-active,
    body.apir-subpage .portfolio-filters li:hover {
      background: #ffffff;
      color: var(--apir-blue) !important;
      box-shadow: 0 4px 12px rgba(35,94,137,.09);
    }

    /* Tables */
    body.apir-subpage table {
      width: min(100%, 960px) !important;
      margin-left: auto !important;
      margin-right: auto !important;
      border: 1px solid #d7e4ed !important;
      background: #ffffff !important;
      box-shadow: 0 8px 24px rgba(22,69,104,.05);
      border-radius: 0 !important;
      border-collapse: collapse !important;
    }

    body.apir-subpage table th,
    body.apir-subpage table td {
      padding: 12px 14px !important;
      border-color: #d7e4ed !important;
      vertical-align: middle !important;
      line-height: 1.8;
    }

    body.apir-subpage table tr:first-child > th,
    body.apir-subpage table tr:first-child > td {
      background: var(--apir-navy) !important;
      color: #ffffff !important;
      font-weight: 800 !important;
    }

    body.apir-subpage table tbody tr:nth-child(even) > * {
      background-color: #f7fbff !important;
    }

    body.apir-subpage > h1.text-center {
      margin-top: 55px !important;
      margin-bottom: 24px !important;
    }

    body.apir-subpage > table {
      margin-bottom: 65px !important;
    }

    /* Glossary */
    body.apir-subpage .glossary-header {
      text-align: center;
      max-width: 920px;
      margin-left: auto;
      margin-right: auto;
    }

    body.apir-subpage .glossary-category-title {
      color: var(--apir-navy) !important;
      font-weight: 900 !important;
      padding: 12px 16px !important;
      border-right: 4px solid var(--apir-blue);
      background: #eef7fd;
      border-radius: 0 !important;
      margin-bottom: 18px !important;
    }

    body.apir-subpage .glossary-item {
      padding: 20px 22px !important;
      margin-bottom: 12px !important;
      border-right: 3px solid #67b7ff !important;
    }

    body.apir-subpage .glossary-term {
      color: #17496e !important;
      font-weight: 800 !important;
      margin-bottom: 8px !important;
    }

    /* Forms and buttons */
    body.apir-subpage input,
    body.apir-subpage textarea,
    body.apir-subpage select,
    body.apir-subpage .form-control {
      border-radius: 0 !important;
      border-color: rgba(14,83,132,.18) !important;
      min-height: 46px;
    }

    body.apir-subpage textarea,
    body.apir-subpage textarea.form-control {
      min-height: 140px;
    }

    body.apir-subpage input:focus,
    body.apir-subpage textarea:focus,
    body.apir-subpage select:focus,
    body.apir-subpage .form-control:focus {
      border-color: rgba(47,128,237,.62) !important;
      box-shadow: 0 0 0 3px rgba(47,128,237,.08) !important;
    }

    body.apir-subpage button[type="submit"],
    body.apir-subpage .buy-btn,
    body.apir-subpage .btn-get-started,
    body.apir-subpage .btn-primary {
      border-radius: 0 !important;
      border: 0 !important;
      background: linear-gradient(120deg, #0b3f6c, #1769aa 62%, #2f80ed) !important;
      color: #ffffff !important;
      font-weight: 700 !important;
      box-shadow: 0 6px 16px rgba(23,105,170,.16);
    }

    body.apir-subpage button[type="submit"]:hover,
    body.apir-subpage .buy-btn:hover,
    body.apir-subpage .btn-get-started:hover,
    body.apir-subpage .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 22px rgba(23,105,170,.24);
    }

    /* Membership featured button: white like the approved design */
    body.apir-subpage #pricing .featured .buy-btn {
      background: #ffffff !important;
      color: #0b3f6c !important;
      border: 1px solid rgba(255,255,255,.85) !important;
      box-shadow: 0 6px 16px rgba(5,35,58,.18) !important;
    }

    body.apir-subpage #pricing .featured .buy-btn:hover {
      background: #eaf6ff !important;
      color: #0b3f6c !important;
      transform: translateY(-2px);
    }

    /* Keep rectangular visual language in content area */
    body.apir-subpage main .card,
    body.apir-subpage main .alert,
    body.apir-subpage main .accordion-item,
    body.apir-subpage main .swiper,
    body.apir-subpage main .swiper-slide,
    body.apir-subpage main .portfolio-details-slider,
    body.apir-subpage main .service-item,
    body.apir-subpage main .pricing-item,
    body.apir-subpage main .faq-item,
    body.apir-subpage main .testimonial-item,
    body.apir-subpage main .info-item,
    body.apir-subpage main .php-email-form,
    body.apir-subpage main .glossary-item {
      border-radius: 0 !important;
    }

    /* Responsive polish */
    @media (max-width: 991px) {

      body.apir-subpage > section:not(#hero),
      body.apir-subpage main > section:not(#hero) {
        padding-top: 52px !important;
        padding-bottom: 52px !important;
      }

      body.apir-subpage table {
        display: block;
        max-width: calc(100vw - 28px) !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
    }

    @media (max-width: 575px) {

      body.apir-subpage #hero h1 {
        font-size: 1.75rem !important;
      }

      body.apir-subpage .service-item,
      body.apir-subpage .pricing-item,
      body.apir-subpage .glossary-item,
      body.apir-subpage #PageContent,
      body.apir-subpage .newsbox {
        padding-left: 16px !important;
        padding-right: 16px !important;
      }
    }

    /* Branch profile heading alignment: line up with address/details */
    body.apir-subpage .profileinfo h1 {
      display: block !important;
      width: 100% !important;
      text-align: right !important;
      margin-right: 0 !important;
      margin-left: 0 !important;
      padding-right: 0 !important;
      padding-left: 0 !important;
    }

    body.apir-subpage .profileinfo h1::after {
      right: 0 !important;
      left: auto !important;
      transform: none !important;
    }

/* =========================================
   INTERNAL PAGE HEADER — single line
========================================= */
body.apir-subpage #header .logo .sitename {
  white-space: nowrap !important;
  width: max-content !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 1200px) {
  body.apir-subpage #header .logo {
    flex-shrink: 0 !important;
    gap: 8px !important;
    margin-left: 48px !important;
  }
  body.apir-subpage #header .logo > div { display: none !important; }
  body.apir-subpage #header .logo .sitename {
    font-size: 19px !important;
    line-height: 1.3 !important;
  }
  body.apir-subpage #header .navmenu {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  body.apir-subpage #header .navmenu > ul > li > a {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }
}

@media (max-width: 575px) {
  body.apir-subpage #header .logo .sitename { font-size: 14px !important; }
  body.apir-subpage #header .logo img {
    max-height: 34px !important;
    width: auto !important;
  }
}

/* =========================================
   GLOBAL FLOATING CONTACT
   The button itself is created by assets/js/main.js
========================================= */
#apir-contact-wrapper {
  position: fixed !important;
  left: 24px !important;
  bottom: 9px !important;
  z-index: 99998 !important;
  direction: rtl;

  /* مهم: wrapper را flex می‌کنیم تا فضای baseline/line-box زیر دکمه
     ایجاد نشود و مرکز واقعی دکمه دقیقاً با scroll-top هم‌خط شود. */
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  width: max-content !important;
  height: 52px !important;
  line-height: 0 !important;
}

#apir-contact-main {
  min-width: 140px;
  height: 52px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0 !important;
  border-radius: 30px !important;
  background: var(--accent-color, #2487ce) !important;
  color: var(--contrast-color, #ffffff) !important;
  font-family: IRanSansX, sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1;
  box-shadow: 0 5px 20px rgba(0,0,0,.18) !important;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

#apir-contact-main:hover {
  background: var(--accent-color, #2487ce) !important;
  color: var(--contrast-color, #ffffff) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
}

#apir-contact-main svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: currentColor;
}

#apir-contact-main span {
  color: inherit !important;
  white-space: nowrap;
}

#apir-contact-options {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

#apir-contact-options.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.apir-contact-option {
  min-height: 44px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border-radius: 22px;
  color: #fff !important;
  font-family: IRanSansX, sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 5px 16px rgba(0,0,0,.15);
}

.apir-contact-option:hover {
  color: #fff !important;
  transform: translateY(-1px);
}
.apir-contact-option i { font-size: 18px; }
.apir-whatsapp { background: #25D366 !important; }
.apir-bale { background: #0aca9b !important; }
.apir-phone { background: #204490 !important; }

/* Keep contact and scroll-top controls on the same bottom line */
/* ابعاد و موقعیت scroll-top را هم قطعی می‌کنیم تا وابسته به main.css نباشد */
.scroll-top {
  right: 15px !important;
  width: 40px !important;
  height: 40px !important;
  box-sizing: border-box !important;
}
.scroll-top.active {
  bottom: 15px !important;
}

@media (max-width: 576px) {
  #apir-contact-wrapper {
    left: 15px !important;
    bottom: 11px !important;
    height: 48px !important;
  }
  #apir-contact-main {
    min-width: 125px;
    height: 48px;
    padding: 0 15px;
    font-size: 14px !important;
  }
  #apir-contact-main svg {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
  #apir-contact-options { min-width: 125px; }
  .scroll-top.active { bottom: 15px !important; }
}
/* Scroll Top - Rounded like contact button */
.scroll-top {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: var(--accent-color, #2487ce) !important;
  color: #fff !important;
  box-shadow: 0 5px 20px rgba(0,0,0,.18) !important;
}

.scroll-top:hover {
  background: var(--accent-color, #2487ce) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
}

.scroll-top i {
  font-size: 24px !important;
  line-height: 1 !important;
}
