:root { --chrome-safe-top: env(safe-area-inset-top, 0px); --chrome-safe-bottom: env(safe-area-inset-bottom, 0px);
  --chrome-gutter: 16px; --chrome-ease: cubic-bezier(.16, 1, .3, 1); }
.sp-header :where(ul) { margin: 0; padding: 0; list-style: none; }
.sp-footer p { margin-block-start: 0; }
.sp-footer .sp-footer__text { margin-block: 12px 0; }
.sp-footer .sp-footer__subtitle { margin-block: 14px 0; }
.sp-footer .sp-footer__title { margin-block: 0 14px; }
.sp-footer .sp-footer__subtitle + .sp-footer__text { margin-top: 4px; }
.sp-header, .sp-drawer, .sp-footer { line-height: 1.8; }
@media (min-width: 768px) { :root { --chrome-gutter: 32px; } }
/* SnappPay site chrome: the snapppay.ir header (logo, menu with dropdowns, «ورود به اسنپ‌پی») and a minimal footer.
 * Values follow the live site: white bar, 82px tall, 1.6px #f7f7f7 bottom border, menu 16px #333 with 13px/20px
 * padding, sub-menus 13px #33373d on white, pill CTA #007dfa 14px/500, hamburger #69727d on phones. */
.sp-header {
  position: sticky; top: 0; z-index: 30; padding-top: var(--chrome-safe-top);
  background: #fff; border-bottom: 1.6px solid #f7f7f7;
}
.sp-header__inner {
  display: flex; align-items: center; gap: 8px; max-width: 1440px; height: 82px; margin: 0 auto; padding: 0 50px;
}
.sp-header__logo { display: block; flex-shrink: 0; margin-inline-end: 24px; }
.sp-header__logo { line-height: 0; }
.sp-header__logo img { width: auto; height: 34px; }
.sp-nav { flex: 1; min-width: 0; }
.sp-nav__list { display: flex; align-items: center; }
.sp-nav__item { position: relative; }
.sp-nav__link, .sp-nav__sub a {
  display: flex; align-items: center; gap: 6px; padding: 13px 20px; color: #333; font-size: 16px; line-height: 20px;
  text-decoration: none; white-space: nowrap; transition: color 160ms ease;
}
.sp-nav__link:hover, .sp-nav__item:focus-within > .sp-nav__link { color: #007dfa; }
.sp-caret { width: 9px; height: 6px; flex-shrink: 0; transition: transform 200ms ease; }
.sp-nav__sub {
  position: absolute; z-index: 5; top: 100%; right: 0; min-width: 220px; padding: 6px 0; border-radius: 10px;
  background: #fff; box-shadow: 0 12px 32px -12px #1018282e, 0 0 0 1px #f2f2f2;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}
.sp-nav__sub a { justify-content: space-between; padding: 11px 20px; color: #33373d; font-size: 13px; }
.sp-nav__sub a:hover { color: #007dfa; background: #f7fbff; }
.sp-nav__sub li { position: relative; }
.sp-nav__sub--nested { top: -6px; right: 100%; }
.sp-nav__sub .sp-caret { transform: rotate(90deg); }
.has-sub:hover > .sp-nav__sub, .has-sub:focus-within > .sp-nav__sub, .has-sub.is-open > .sp-nav__sub { opacity: 1; visibility: visible; transform: none; }
.sp-nav__item.has-sub:hover > .sp-nav__link .sp-caret, .sp-nav__item.is-open > .sp-nav__link .sp-caret { transform: rotate(180deg); }
.sp-header__cta {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-inline-start: auto; padding: 12px 24px;
  border-radius: 1000px; background: #007dfa; color: #fff; font-size: 14px; font-weight: 500; line-height: 14px; text-decoration: none;
  transition: background-color 160ms ease;
}
.sp-header__cta:hover { background: #0069d6; }
.sp-header__menu { display: none; }

/* Phones and small tablets: hamburger on the right, logo in the middle, menu in a drawer (as on the site). */
@media (max-width: 1024px) {
  .sp-header__inner { position: relative; justify-content: center; padding: 0 24px; }
  .sp-nav, .sp-header > .sp-header__inner > .sp-header__cta { display: none; }
  .sp-header__logo { margin: 0; }
  .sp-header__logo img { height: 28px; }
  .sp-header__menu {
    position: absolute; right: 16px; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px;
    padding: 0; border: 0; background: transparent; color: #69727d; cursor: pointer;
  }
  .sp-header__menu svg { width: 18px; height: 18px; }
}

/* ---------- Drawer ---------- */
html.is-drawer-open, html.is-drawer-open body { overflow: hidden; }
.sp-drawer { position: fixed; z-index: 1100; inset: 0; }
.sp-drawer__backdrop { position: absolute; inset: 0; background: #1d243359; opacity: 0; transition: opacity 260ms ease; }
.sp-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(320px, 86vw);
  padding: calc(12px + var(--chrome-safe-top)) 0 calc(16px + var(--chrome-safe-bottom)); background: #fff;
  box-shadow: -12px 0 40px #1018281f; transform: translateX(100%); transition: transform 320ms var(--chrome-ease);
}
.sp-drawer.is-open .sp-drawer__backdrop { opacity: 1; }
.sp-drawer.is-open .sp-drawer__panel { transform: none; }
.sp-drawer__head img { width: auto; height: 26px; }
.sp-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 12px 12px; border-bottom: 1px solid #f2f2f2; }
.sp-drawer__close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: #69727d; cursor: pointer; }
.sp-drawer__close svg { width: 20px; height: 20px; }
.sp-drawer__nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sp-drawer__nav ul { margin: 0; padding: 0; list-style: none; }
.sp-drawer__nav a, .sp-drawer__nav button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 10px 20px;
  border: 0; background: none; color: #333; font: inherit; font-size: 15px; text-align: start; text-decoration: none; cursor: pointer;
}
.sp-drawer__nav ul ul { display: none; background: #fafafa; }
.sp-drawer__nav ul ul a, .sp-drawer__nav ul ul button { padding-inline-start: 34px; font-size: 13px; color: #33373d; }
.sp-drawer__nav ul ul ul a { padding-inline-start: 48px; }
.sp-drawer__nav li.is-open > ul { display: block; }
.sp-drawer__nav li.is-open > button .sp-caret { transform: rotate(180deg); }
.sp-drawer__cta { margin: 12px 20px 0; padding: 14px 24px; }

/* ---------- Footer (as on snapppay.ir: #fafafa, 4 columns on desktop, copyright centred) ---------- */
.sp-footer { margin-top: 56px; background: #fafafa; color: #69727d; }
.sp-footer__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; max-width: 1360px; margin: 0 auto;
  padding: 36px var(--chrome-gutter) 8px;
}
.sp-footer__about { grid-column: 1 / -1; }
.sp-footer__logo { display: inline-block; }
.sp-footer__logo img { width: 65px; height: 40px; object-fit: contain; object-position: right center; }
.sp-footer__text { margin-top: 12px; color: #69727d; font-size: 12px; font-style: normal; line-height: 2.2; text-align: justify; }
.sp-footer__text a { color: #007dfa; font-weight: 700; text-decoration: none; }
.sp-footer__subtitle { margin-top: 14px; color: #1d2433; font-size: 13px; font-weight: 700; }
.sp-footer__subtitle + .sp-footer__text { margin-top: 4px; }
.sp-footer__title { margin-bottom: 14px; color: #1d2433; font-size: 15px; font-weight: 700; }
.sp-footer__col ul { margin: 0; padding: 0; list-style: none; }
.sp-footer__col li a { display: inline-block; padding: 4px 0; color: #69727d; font-size: 13px; line-height: 1.9; text-decoration: none; transition: color 160ms ease; }
.sp-footer__col li a:hover { color: #007dfa; }
.sp-footer__col--social { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0 24px; }
.sp-footer__col--social .sp-footer__title { grid-column: 1 / -1; }
.sp-footer__social { display: flex; gap: 14px; }
.sp-footer__social a { display: grid; place-items: center; width: 24px; height: 24px; padding: 0 !important; color: #69727d; }
.sp-footer__social a:hover { color: #007dfa; }
.sp-footer__social svg { width: 22px; height: 22px; }
.sp-footer__enamad { display: block; justify-self: end; width: 96px; min-height: 104px; overflow: hidden; color: transparent; font-size: 0; }
.sp-footer__enamad img { width: 96px; height: auto; }
.sp-footer__copy { margin: 0; padding: 18px var(--chrome-gutter) calc(18px + var(--chrome-safe-bottom)); color: #1d2433; font-size: 11px; line-height: 2; text-align: center; }
.sp-footer__copy a { color: #007dfa; text-decoration: none; }
.ap-shell { padding-bottom: 8px; }
/* Phones: leave room under the copyright so the back-to-top circle never covers it. */
@media (max-width: 1024px) { .sp-footer__copy { padding-bottom: calc(76px + var(--chrome-safe-bottom)); } }

/* Back to top, bottom-left like the site */
.sp-totop {
  position: fixed; z-index: 25; left: 16px; bottom: calc(16px + var(--chrome-safe-bottom)); display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #1d2433; box-shadow: 0 2px 10px #10182826;
  opacity: 0; transform: translateY(10px); transition: opacity 200ms ease, transform 200ms ease;
}
.sp-totop.is-shown { opacity: 1; transform: none; }
.sp-totop svg { width: 22px; height: 22px; }

@media (min-width: 1025px) {
  .sp-footer { margin-top: 80px; }
  .sp-footer__inner { grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)); gap: 32px 48px; padding: 56px 40px 24px; }
  .sp-footer__about { grid-column: auto; padding-inline-end: 48px; }
  .sp-footer__logo img { width: 45px; height: 32px; }
  .sp-footer__col--social { grid-column: auto; display: block; justify-self: end; }
  .sp-footer__social { margin-bottom: 18px; }
  .sp-footer__enamad { margin-inline-start: 0; width: 125px; min-height: 136px; }
  .sp-footer__enamad img { width: 125px; }
  .sp-footer__copy { padding-top: 40px; font-size: 12px; }
  .sp-totop { left: 18px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-drawer__panel, .sp-drawer__backdrop, .sp-nav__sub { transition: none; }
}

.sp-totop:not(.is-shown) { visibility: hidden; pointer-events: none; }
.sp-skip { position: fixed; z-index: 3000; top: 8px; right: 8px; padding: 10px 16px;
  border-radius: 12px; background: #1d2433; color: white; transform: translateY(-200%); text-decoration: none; }
.sp-skip:focus { transform: none; }
/* Keep the reference navigation usable on narrow desktop windows. */
@media (min-width: 1025px) and (max-width: 1199px) {
  .sp-header__inner { padding-inline: 24px; }
  .sp-header__logo { margin-inline-end: 12px; }
  .sp-nav__link { padding-inline: 12px; font-size: 14px; }
  .sp-header__cta { padding-inline: 18px; }
}
