/* Rayan Floating Header v1.2.6 */
.rfh-wrapper,
.rfh-wrapper * {
  box-sizing: border-box;
}

.rfh-wrapper {
  --rfh-teal: #008b7a;
  --rfh-teal-dark: #057469;
  --rfh-orange: #ff8717;
  --rfh-orange-dark: #f5750c;
  --rfh-text: #132238;
  --rfh-muted: #8d95a3;
  --rfh-bar-height: 78px;
  --rfh-logo-size: 124px;
  width: 100%;
  position: relative;
  z-index: 9999;
  margin-top: var(--rfh-top-gap, 34px);
  margin-bottom: var(--rfh-bottom-gap, 34px);
  font-family: inherit;
}

.rfh-wrapper.rfh-is-sticky {
  position: sticky;
  top: var(--rfh-top-gap, 18px);
  z-index: 99999;
}

.rfh-wrapper.rfh-footer-fallback {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin-top: var(--rfh-top-gap, 34px);
  margin-bottom: 0;
  z-index: 999999;
  pointer-events: none;
}

.rfh-wrapper.rfh-footer-fallback .rfh-shell {
  pointer-events: auto;
}

.rfh-shell {
  width: min(calc(100% - 70px), var(--rfh-max-width, 1500px));
  margin: 0 auto;
  position: relative;
}

.rfh-mainbar {
  min-height: var(--rfh-bar-height);
  background: rgba(255, 255, 255, 0.985);
  border-radius: 999px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rfh-logo-size) minmax(0, 1fr);
  align-items: center;
  padding: 0 var(--rfh-side-padding, 74px);
  position: relative;
  overflow: visible;
  border: 1px solid rgba(222, 218, 207, 0.9);
  box-shadow:
    0 0 0 7px rgba(255, 255, 255, 0.70),
    0 2px 0 rgba(255, 255, 255, 0.94) inset,
    0 -1px 0 rgba(225, 221, 210, 0.58) inset,
    0 16px 36px rgba(16, 30, 52, 0.10),
    0 4px 10px rgba(16, 30, 52, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* برش دایره‌ای وسط نوار */
.rfh-mainbar::before,
.rfh-mainbar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.rfh-mainbar::before {
  width: calc(var(--rfh-logo-size) + 32px);
  height: calc(var(--rfh-logo-size) + 32px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.74),
    0 12px 28px rgba(16, 30, 52, 0.08);
  z-index: 0;
}

.rfh-mainbar::after {
  width: calc(var(--rfh-logo-size) + 10px);
  height: calc(var(--rfh-logo-size) + 10px);
  background: #fff;
  border: 1px solid rgba(222, 218, 207, 0.88);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(228, 224, 214, 0.58),
    0 1px 0 rgba(255,255,255,0.9);
  z-index: 1;
}

.rfh-right-side,
.rfh-left-side,
.rfh-logo-wrap {
  position: relative;
  z-index: 3;
}

.rfh-right-side {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.rfh-left-side {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(18px, 2.2vw, 34px);
  direction: ltr;
}

.rfh-menu-nav {
  width: 100%;
}

.rfh-menu,
.rfh-menu ul {
  list-style: none;
}

.rfh-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--rfh-menu-gap, 58px);
  margin: 0;
  padding: 0;
}

.rfh-menu li {
  position: relative;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.rfh-menu a {
  color: var(--rfh-text);
  text-decoration: none !important;
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.25;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  padding: 12px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.rfh-menu a:hover {
  color: var(--rfh-teal);
  transform: translateY(-1px);
}

.rfh-menu li.current-menu-item > a,
.rfh-menu li.current_page_item > a,
.rfh-menu li.current-menu-ancestor > a {
  color: var(--rfh-teal);
}

.rfh-menu li.current-menu-item > a::after,
.rfh-menu li.current_page_item > a::after,
.rfh-menu li.current-menu-ancestor > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--rfh-teal);
  box-shadow: 0 0 0 4px rgba(0, 139, 122, 0.08);
}

.rfh-menu .sub-menu {
  position: absolute;
  top: 100%;
  right: -22px;
  list-style: none;
  margin: 15px 0 0;
  padding: 12px;
  min-width: 205px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(222, 218, 207, 0.82);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(16, 30, 52, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 20;
}

.rfh-menu li:hover > .sub-menu,
.rfh-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.rfh-menu .sub-menu a {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 14px;
}

.rfh-menu .sub-menu a:hover {
  background: rgba(0, 139, 122, 0.08);
}

.rfh-logo-wrap {
  width: var(--rfh-logo-size);
  height: var(--rfh-logo-size);
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  text-decoration: none !important;
  border-radius: 50%;
  margin-top: calc((var(--rfh-logo-size) - var(--rfh-bar-height)) / -2);
  margin-bottom: calc((var(--rfh-logo-size) - var(--rfh-bar-height)) / -2);
}

.rfh-logo-inner {
  width: calc(var(--rfh-logo-size) - 18px);
  height: calc(var(--rfh-logo-size) - 18px);
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 24px rgba(16, 30, 52, 0.10),
    inset 0 0 0 1px rgba(228, 224, 214, 0.72),
    inset 0 4px 0 rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.rfh-logo-img {
  display: block;
  height: auto;
  max-height: 132px;
  object-fit: contain;
}

.rfh-logo-text {
  color: var(--rfh-teal);
  font-size: clamp(36px, 3.3vw, 58px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -2px;
}

.rfh-cta {
  min-width: 180px;
  min-height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  background: linear-gradient(180deg, #ff982c 0%, var(--rfh-orange) 100%);
  color: #fff !important;
  text-decoration: none !important;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 950;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 12px 24px rgba(255, 134, 23, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.rfh-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 16px 28px rgba(255, 134, 23, 0.34);
}

.rfh-contact {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--rfh-teal);
  min-width: 0;
  flex: 0 0 auto;
}

.rfh-phone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rfh-teal);
  background: rgba(0, 139, 122, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 139, 122, 0.04);
  flex: 0 0 auto;
}

.rfh-phone-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.rfh-phone-text strong {
  color: var(--rfh-text);
  font-size: clamp(13px, 0.95vw, 17px);
  line-height: 1.3;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.rfh-phone-text em {
  color: var(--rfh-muted);
  font-style: normal;
  font-size: clamp(11px, 0.82vw, 14px);
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
}

.rfh-mobile-toggle {
  display: none;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 139, 122, 0.09);
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.rfh-mobile-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 20px;
  background: var(--rfh-teal);
}

.rfh-mobile-panel {
  display: none;
}

@media (max-width: 1240px) {
  .rfh-wrapper {
    --rfh-logo-size: 116px;
    --rfh-bar-height: 74px;
  }

  .rfh-shell {
    width: min(calc(100% - 44px), var(--rfh-max-width, 1500px));
  }

  .rfh-mainbar {
    padding: 0 34px;
  }

  .rfh-menu {
    gap: clamp(20px, 2.2vw, 36px);
  }

  .rfh-left-side {
    gap: 16px;
  }

  .rfh-cta {
    min-width: 150px;
    min-height: 52px;
    padding: 0 22px;
  }
}

@media (max-width: 980px) {
  .rfh-wrapper {
    --rfh-logo-size: 96px;
    --rfh-bar-height: 68px;
  }

  .rfh-mainbar {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 22px;
  }

  .rfh-right-side .rfh-menu-nav {
    display: none;
  }

  .rfh-left-side {
    justify-content: flex-start;
    gap: 12px;
  }

  .rfh-contact {
    display: none;
  }

  .rfh-mobile-toggle {
    display: inline-flex;
  }

  .rfh-cta {
    min-width: auto;
    min-height: 46px;
    padding: 0 18px;
    font-size: 13px;
  }

  .rfh-mobile-panel {
    width: calc(100% - 28px);
    margin: 18px auto 0;
    background: rgba(255, 255, 255, 0.985);
    border: 1px solid rgba(222, 218, 207, 0.82);
    border-radius: 30px;
    box-shadow:
      0 0 0 6px rgba(255, 255, 255, 0.62),
      0 18px 45px rgba(16, 30, 52, 0.13);
    padding: 18px;
  }

  .rfh-mobile-panel:not([hidden]) {
    display: block;
  }

  .rfh-mobile-panel .rfh-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .rfh-mobile-panel .rfh-menu li {
    width: 100%;
  }

  .rfh-mobile-panel .rfh-menu a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 15px;
  }

  .rfh-mobile-panel .rfh-menu a:hover {
    background: rgba(0, 139, 122, 0.08);
  }

  .rfh-mobile-panel .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 0;
    box-shadow: none;
    padding: 0 12px 8px 0;
    background: transparent;
    border: 0;
    min-width: 0;
  }

  .rfh-mobile-contact-wrap {
    margin-top: 14px;
  }

  .rfh-mobile-contact-wrap .rfh-contact {
    display: flex;
    justify-content: center;
  }

  .rfh-mobile-cta {
    margin-top: 12px;
    background: var(--rfh-orange);
    color: #fff !important;
    width: 100%;
    font-weight: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 16px;
    text-decoration: none !important;
  }
}

@media (max-width: 560px) {
  .rfh-wrapper {
    --rfh-logo-size: 82px;
    --rfh-bar-height: 60px;
    margin-top: max(12px, calc(var(--rfh-top-gap, 34px) / 2));
    margin-bottom: max(14px, calc(var(--rfh-bottom-gap, 34px) / 2));
  }

  .rfh-shell {
    width: calc(100% - 22px);
  }

  .rfh-mainbar {
    padding: 0 14px;
    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.62),
      0 16px 36px rgba(16, 30, 52, 0.12);
  }

  .rfh-mainbar::before {
    width: calc(var(--rfh-logo-size) + 26px);
    height: calc(var(--rfh-logo-size) + 26px);
  }

  .rfh-mainbar::after {
    width: calc(var(--rfh-logo-size) + 10px);
    height: calc(var(--rfh-logo-size) + 10px);
  }

  .rfh-logo-inner {
    width: calc(var(--rfh-logo-size) - 16px);
    height: calc(var(--rfh-logo-size) - 16px);
  }

  .rfh-logo-img {
    max-width: 56px !important;
    max-height: 56px;
  }

  .rfh-logo-text {
    font-size: 30px;
  }

  .rfh-cta {
    display: none;
  }
}


/* v1.2.1 — نازک‌تر و نزدیک‌تر به دموی تایید شده */
.rfh-wrapper {
  --rfh-bar-height: 72px;
  --rfh-logo-size: 132px;
}

.rfh-shell {
  width: min(calc(100% - 74px), var(--rfh-max-width, 1500px));
}

.rfh-mainbar {
  min-height: var(--rfh-bar-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* خود نوار اصلی؛ با این لایه، حس «باز شدن نوار برای لوگو» ساخته می‌شود */
.rfh-mainbar > .rfh-right-side,
.rfh-mainbar > .rfh-left-side {
  min-height: var(--rfh-bar-height);
  background: rgba(255,255,255,.985);
  border-top: 1px solid rgba(222,218,207,.9);
  border-bottom: 1px solid rgba(222,218,207,.9);
  box-shadow:
    0 0 0 6px rgba(255,255,255,.66),
    inset 0 2px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(225,221,210,.58),
    0 16px 36px rgba(16,30,52,.10),
    0 5px 14px rgba(16,30,52,.05);
}

.rfh-mainbar > .rfh-right-side {
  border-radius: 0 999px 999px 0;
  border-right: 1px solid rgba(222,218,207,.9);
  padding-right: var(--rfh-side-padding, 62px);
  padding-left: calc(var(--rfh-logo-size) * .20);
  margin-left: calc(var(--rfh-logo-size) * -0.08);
}

.rfh-mainbar > .rfh-left-side {
  border-radius: 999px 0 0 999px;
  border-left: 1px solid rgba(222,218,207,.9);
  padding-left: var(--rfh-side-padding, 62px);
  padding-right: calc(var(--rfh-logo-size) * .20);
  margin-right: calc(var(--rfh-logo-size) * -0.08);
}

.rfh-mainbar::before {
  width: calc(var(--rfh-logo-size) + 32px) !important;
  height: calc(var(--rfh-logo-size) + 32px) !important;
  background: rgba(255,255,255,.985) !important;
  border: 1px solid rgba(222,218,207,.88);
  box-shadow:
    0 0 0 6px rgba(255,255,255,.66),
    inset 0 2px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(225,221,210,.58),
    0 17px 38px rgba(16,30,52,.105) !important;
  z-index: 1 !important;
}

.rfh-mainbar::after {
  width: calc(var(--rfh-logo-size) + 6px) !important;
  height: calc(var(--rfh-logo-size) + 6px) !important;
  background: #fff !important;
  border: 1px solid rgba(222,218,207,.86) !important;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(228,224,214,.55) !important;
  z-index: 2 !important;
}

.rfh-logo-wrap {
  width: var(--rfh-logo-size) !important;
  height: var(--rfh-logo-size) !important;
  z-index: 4 !important;
  margin-top: calc((var(--rfh-logo-size) - var(--rfh-bar-height)) / -2) !important;
  margin-bottom: calc((var(--rfh-logo-size) - var(--rfh-bar-height)) / -2) !important;
}

.rfh-logo-inner {
  width: calc(var(--rfh-logo-size) - 14px) !important;
  height: calc(var(--rfh-logo-size) - 14px) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.rfh-logo-img {
  max-height: calc(var(--rfh-logo-size) - 18px) !important;
  transform: scale(var(--rfh-logo-zoom, 1.2));
  transform-origin: center;
}

.rfh-logo-text {
  transform: scale(var(--rfh-logo-zoom, 1.2));
  transform-origin: center;
}

.rfh-cta {
  min-height: calc(var(--rfh-bar-height) - 20px) !important;
  min-width: 170px;
}

.rfh-phone-icon {
  width: calc(var(--rfh-bar-height) - 28px) !important;
  height: calc(var(--rfh-bar-height) - 28px) !important;
}

@media (max-width: 1240px) {
  .rfh-mainbar > .rfh-right-side { padding-right: 34px; }
  .rfh-mainbar > .rfh-left-side { padding-left: 34px; }
}

@media (max-width: 980px) {
  .rfh-wrapper {
    --rfh-logo-size: 96px;
    --rfh-bar-height: 66px;
  }

  .rfh-mainbar > .rfh-right-side {
    padding-right: 22px;
    padding-left: 12px;
  }

  .rfh-mainbar > .rfh-left-side {
    padding-left: 22px;
    padding-right: 12px;
  }
}

@media (max-width: 560px) {
  .rfh-wrapper {
    --rfh-logo-size: 82px;
    --rfh-bar-height: 60px;
  }

  .rfh-shell {
    width: calc(100% - 22px);
  }

  .rfh-mainbar > .rfh-right-side {
    padding-right: 14px;
    margin-left: -4px;
  }

  .rfh-mainbar > .rfh-left-side {
    padding-left: 14px;
    margin-right: -4px;
  }
}


/* v1.2.2 — ادامه از نسخه سالم 1.2.1، بدون خط آبی و بدون دایره جدا */
.rfh-wrapper {
  --rfh-bar-height: 72px;
  --rfh-logo-size: 132px;
}

/* اگر قالب wp_body_open نداشت، نسخه‌های قبلی نوار را fixed می‌کردند؛ اینجا فقط بالای سایت می‌آید */
.rfh-wrapper.rfh-footer-fallback {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  pointer-events: auto !important;
  margin-top: var(--rfh-top-gap, 34px) !important;
  margin-bottom: var(--rfh-bottom-gap, 34px) !important;
}

.rfh-wrapper.rfh-is-sticky,
.rfh-wrapper.rfh-footer-fallback.rfh-is-sticky {
  position: sticky !important;
  top: var(--rfh-top-gap, 18px) !important;
}

/* ظاهر اصلی از 1.2.1 حفظ شده، فقط وسط لوگو تمیزتر شده */
.rfh-mainbar > .rfh-right-side,
.rfh-mainbar > .rfh-left-side {
  background: rgba(255,255,255,.986) !important;
  border-color: rgba(222,218,207,.88) !important;
}

/* این بخش دیگر دایره جدا نیست؛ فقط نوار را در وسط سفید می‌کند تا حس بازشدن بدهد */
.rfh-mainbar::before {
  width: calc(var(--rfh-logo-size) + 30px) !important;
  height: calc(var(--rfh-logo-size) + 30px) !important;
  background: rgba(255,255,255,.986) !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 1 !important;
}

/* خط و سایه دایره داخلی حذف شد */
.rfh-mainbar::after {
  display: none !important;
}

.rfh-logo-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.rfh-logo-inner {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.rfh-logo-img {
  max-width: calc(var(--rfh-logo-size) - 10px) !important;
  max-height: calc(var(--rfh-logo-size) - 10px) !important;
  transform: scale(var(--rfh-logo-zoom, 1.2));
  transform-origin: center;
  filter: none !important;
}

.rfh-logo-text {
  transform: scale(var(--rfh-logo-zoom, 1.2));
  transform-origin: center;
}

/* چیدمان سمت چپ: دکمه آخرِ سمت چپ، شماره کنار آن */
.rfh-mainbar > .rfh-left-side {
  direction: ltr !important;
  justify-content: flex-start !important;
}

.rfh-mainbar > .rfh-left-side .rfh-cta {
  order: 1 !important;
}

.rfh-mainbar > .rfh-left-side .rfh-contact {
  order: 2 !important;
}

/* هدر/منوی قالب مجیکال را وقتی گزینه مخفی‌سازی روشن است، با جاوااسکریپت و CSS پشتیبانی می‌کنیم */
body.rfh-hide-theme-header-enabled .rfh-wrapper {
  display: block !important;
  visibility: visible !important;
}

@media (max-width: 980px) {
  .rfh-mainbar > .rfh-left-side {
    flex-direction: row !important;
  }
}

@media (max-width: 560px) {
  .rfh-logo-img {
    max-width: calc(var(--rfh-logo-size) - 12px) !important;
    max-height: calc(var(--rfh-logo-size) - 12px) !important;
  }
}


/* v1.2.3 — حذف فضای سفید بالای سایت: نوار روی اول صفحه می‌نشیند و محتوا را پایین نمی‌راند */
body .rfh-wrapper.rfh-auto-rendered,
body .rfh-wrapper.rfh-footer-fallback {
  position: absolute !important;
  top: var(--rfh-top-gap, 34px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  z-index: 99999 !important;
  pointer-events: none !important;
}

body .rfh-wrapper.rfh-auto-rendered .rfh-shell,
body .rfh-wrapper.rfh-footer-fallback .rfh-shell {
  pointer-events: auto !important;
}

/* اگر چسبان روشن شد، sticky شود؛ اگر خاموش بود، فقط بالای صفحه است و همراه صفحه اسکرول می‌شود */
body .rfh-wrapper.rfh-is-sticky,
body .rfh-wrapper.rfh-footer-fallback.rfh-is-sticky {
  position: sticky !important;
  top: var(--rfh-top-gap, 18px) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  z-index: 99999 !important;
}

/* در حالت ورود ادمین وردپرس، زیر نوار مشکی مدیریت قرار بگیرد */
body.admin-bar .rfh-wrapper.rfh-auto-rendered,
body.admin-bar .rfh-wrapper.rfh-footer-fallback {
  top: calc(var(--rfh-top-gap, 34px) + 32px) !important;
}

/* فاصله پایین قبلی دیگر باعث ایجاد فضای سفید نمی‌شود */
body .rfh-wrapper + *,
body .rfh-wrapper.rfh-auto-rendered + *,
body .rfh-wrapper.rfh-footer-fallback + * {
  margin-top: 0 !important;
}

@media (max-width: 782px) {
  body.admin-bar .rfh-wrapper.rfh-auto-rendered,
  body.admin-bar .rfh-wrapper.rfh-footer-fallback {
    top: calc(var(--rfh-top-gap, 18px) + 46px) !important;
  }
}


/* v1.2.4 — تنظیمات اختصاصی موبایل */
@media (max-width: 768px) {
  body .rfh-wrapper.rfh-auto-rendered,
  body .rfh-wrapper.rfh-footer-fallback {
    top: var(--rfh-mobile-top-gap, 10px) !important;
  }

  body.admin-bar .rfh-wrapper.rfh-auto-rendered,
  body.admin-bar .rfh-wrapper.rfh-footer-fallback {
    top: calc(var(--rfh-mobile-top-gap, 10px) + 46px) !important;
  }

  .rfh-wrapper {
    --rfh-bar-height: var(--rfh-mobile-bar-height, 62px) !important;
    --rfh-logo-size: var(--rfh-mobile-logo-size, 64px) !important;
    --rfh-logo-zoom: var(--rfh-mobile-logo-zoom, 1.12) !important;
  }

  .rfh-shell {
    width: calc(100% - 18px) !important;
  }

  .rfh-mainbar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: var(--rfh-mobile-bar-height, 62px) !important;
    height: var(--rfh-mobile-bar-height, 62px) !important;
    padding: 0 var(--rfh-mobile-side-padding, 12px) !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  .rfh-right-side {
    display: none !important;
  }

  .rfh-logo-wrap {
    order: 2 !important;
    position: static !important;
    width: var(--rfh-mobile-logo-size, 64px) !important;
    height: var(--rfh-mobile-logo-size, 64px) !important;
    min-width: var(--rfh-mobile-logo-size, 64px) !important;
    margin: 0 !important;
    transform: none !important;
    justify-self: auto !important;
  }

  .rfh-logo-inner {
    width: var(--rfh-mobile-logo-size, 64px) !important;
    height: var(--rfh-mobile-logo-size, 64px) !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .rfh-logo-img {
    max-width: calc(var(--rfh-mobile-logo-size, 64px) - 4px) !important;
    max-height: calc(var(--rfh-mobile-logo-size, 64px) - 4px) !important;
    transform: scale(var(--rfh-mobile-logo-zoom, 1.12)) !important;
    transform-origin: center !important;
  }

  .rfh-mainbar::before,
  .rfh-mainbar::after {
    display: none !important;
  }

  .rfh-left-side {
    order: 1 !important;
    display: contents !important;
  }

  .rfh-mobile-toggle {
    order: 1 !important;
    display: inline-flex !important;
    position: static !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    margin: 0 !important;
    background: rgba(0, 139, 122, 0.09) !important;
    transform: none !important;
  }

  .rfh-mobile-toggle span {
    width: 21px !important;
    height: 2.5px !important;
  }

  .rfh-contact {
    display: none !important;
  }

  .rfh-cta {
    order: 3 !important;
    display: inline-flex !important;
    min-width: var(--rfh-mobile-button-width, 120px) !important;
    width: var(--rfh-mobile-button-width, 120px) !important;
    height: calc(var(--rfh-mobile-bar-height, 62px) - 18px) !important;
    min-height: calc(var(--rfh-mobile-bar-height, 62px) - 18px) !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    margin-right: auto !important;
    white-space: nowrap !important;
  }

  .rfh-mobile-panel {
    margin-top: 10px !important;
  }
}

@media (max-width: 390px) {
  .rfh-mainbar {
    gap: 7px !important;
  }

  .rfh-mobile-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .rfh-cta {
    font-size: 11px !important;
    padding: 0 9px !important;
  }
}


/* v1.2.5 — موبایل نهایی: لوگو راست، دکمه حذف، منو/سه‌نقطه چپ */
@media (max-width: 768px) {
  .rfh-mainbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 var(--rfh-mobile-side-padding, 12px) !important;
    gap: 8px !important;
  }

  .rfh-right-side {
    display: none !important;
  }

  .rfh-left-side {
    display: contents !important;
  }

  /* لوگو سمت راست */
  .rfh-logo-wrap {
    order: 1 !important;
    position: static !important;
    width: var(--rfh-mobile-logo-size, 64px) !important;
    height: var(--rfh-mobile-logo-size, 64px) !important;
    min-width: var(--rfh-mobile-logo-size, 64px) !important;
    margin: 0 !important;
    margin-left: auto !important;
    transform: none !important;
  }

  .rfh-logo-inner {
    width: var(--rfh-mobile-logo-size, 64px) !important;
    height: var(--rfh-mobile-logo-size, 64px) !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .rfh-logo-img {
    max-width: calc(var(--rfh-mobile-logo-size, 64px) - 4px) !important;
    max-height: calc(var(--rfh-mobile-logo-size, 64px) - 4px) !important;
    transform: scale(var(--rfh-mobile-logo-zoom, 1.12)) !important;
    transform-origin: center !important;
  }

  .rfh-mainbar::before,
  .rfh-mainbar::after {
    display: none !important;
  }

  /* دکمه درخواست دمو در موبایل حذف شود */
  .rfh-cta {
    display: none !important;
  }

  .rfh-contact {
    display: none !important;
  }

  /* دکمه منو/سه‌نقطه سمت چپ */
  .rfh-mobile-toggle {
    order: 3 !important;
    display: inline-flex !important;
    position: static !important;
    width: var(--rfh-mobile-menu-size, 48px) !important;
    height: var(--rfh-mobile-menu-size, 48px) !important;
    min-width: var(--rfh-mobile-menu-size, 48px) !important;
    margin: 0 !important;
    margin-right: auto !important;
    background: rgba(0, 139, 122, 0.10) !important;
    transform: none !important;
  }

  .rfh-mobile-toggle span {
    width: 22px !important;
    height: 2.5px !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 390px) {
  .rfh-mobile-toggle {
    width: max(40px, calc(var(--rfh-mobile-menu-size, 48px) - 4px)) !important;
    height: max(40px, calc(var(--rfh-mobile-menu-size, 48px) - 4px)) !important;
    min-width: max(40px, calc(var(--rfh-mobile-menu-size, 48px) - 4px)) !important;
  }
}


/* v1.2.6 — چسبان فقط دسکتاپ + فارسی‌سازی و وسط‌چین تلفن */
.rfh-phone-text {
  align-items: center !important;
  text-align: center !important;
}

.rfh-phone-text strong,
.rfh-phone-text em {
  text-align: center !important;
  width: 100% !important;
  direction: rtl !important;
  unicode-bidi: plaintext;
}

/* وقتی حالت چسبان روشن است، فقط در دسکتاپ واقعا sticky شود */
@media (min-width: 769px) {
  body .rfh-wrapper.rfh-is-sticky,
  body .rfh-wrapper.rfh-footer-fallback.rfh-is-sticky {
    position: fixed !important;
    top: var(--rfh-top-gap, 18px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    z-index: 999999 !important;
    pointer-events: none !important;
  }

  body.admin-bar .rfh-wrapper.rfh-is-sticky,
  body.admin-bar .rfh-wrapper.rfh-footer-fallback.rfh-is-sticky {
    top: calc(var(--rfh-top-gap, 18px) + 32px) !important;
  }

  body .rfh-wrapper.rfh-is-sticky .rfh-shell,
  body .rfh-wrapper.rfh-footer-fallback.rfh-is-sticky .rfh-shell {
    pointer-events: auto !important;
  }
}

/* در موبایل حتی اگر حالت چسبان روشن باشد، ثابت نماند */
@media (max-width: 768px) {
  body .rfh-wrapper.rfh-is-sticky,
  body .rfh-wrapper.rfh-footer-fallback.rfh-is-sticky {
    position: absolute !important;
    top: var(--rfh-mobile-top-gap, 10px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body.admin-bar .rfh-wrapper.rfh-is-sticky,
  body.admin-bar .rfh-wrapper.rfh-footer-fallback.rfh-is-sticky {
    top: calc(var(--rfh-mobile-top-gap, 10px) + 46px) !important;
  }
}
