@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");

/* Solid black backgrounds for the trust section and footer. */
html[lang="fa"] section[data-track-section="Trust & Safety"],
html[lang="fa"] footer[data-co="SiteFooter"] {
  background: #000;
}

html[lang="fa"],
html[dir="rtl"] {
  --font-family-sans: Vazirmatn, "eToro", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[lang="fa"],
html[lang="fa"] body,
html[dir="rtl"],
html[dir="rtl"] body {
  font-family: var(--font-family-sans);
}

/* Hero copy sits on the right in RTL — darken that edge (mirror of EN left fade) */
html[dir="rtl"] [data-co="HeroImageScrim-desktop"] {
  background-image: linear-gradient(
    to left,
    var(--color-bg-soft-black) 30%,
    transparent 65%
  ) !important;
}

/* Prefer logical list indent over physical pl-6 baked into utility classes */
html[dir="rtl"] [class*=":_ol]:pl-6"] ol,
html[dir="rtl"] [class*=":_ul]:pl-6"] ul {
  padding-left: 0;
  padding-inline-start: 1.5rem;
}

/*
  Frozen carousel / marquee snapshots use LTR transforms and margin-right.
  Keep the track LTR so positions match EN; restore RTL for slide copy.
*/
html[dir="rtl"] [data-co="CarouselSlider"] > .flex,
html[dir="rtl"] .swiper-wrapper {
  direction: ltr;
}

html[dir="rtl"] [data-co="CarouselSlider"] [role="group"][aria-roledescription="slide"],
html[dir="rtl"] .swiper-slide {
  direction: rtl;
}

html[dir="rtl"] .swiper-slide {
  margin-right: 0 !important;
  margin-inline-end: 60px;
}

/* Static USDT/IRT price card — same dark glass language as the rest of the page */
.tether-price-card {
  color: var(--brand-color-cream);
  background: var(--brand-color-soft-black-72);
  border: 1px solid var(--brand-color-white-32);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 768px) {
  .tether-price-card {
    width: 440px;
    max-width: 440px;
    border-radius: var(--radius-lg);
  }

  .price-cards-row .tether-price-card {
    width: 100%;
    max-width: none;
  }
}

.tether-price-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
}

.tether-price-card__asset {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tether-price-card__logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.tether-price-card__names {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.tether-price-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-color-cream);
}

.tether-price-card__ticker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-alpha-cream-72);
}

.tether-price-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.tether-price-card__amount {
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-color-cream);
  line-height: 1;
}

.tether-price-card__currency {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-alpha-cream-72);
}

.tether-price-card__stats {
  display: grid;
  grid-template-columns: minmax(4.5rem, 0.9fr) 1fr 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 14px;
  background: var(--brand-color-white-8);
  border-block: 1px solid var(--brand-color-white-8);
}

.tether-price-card__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  min-width: 0;
}

.tether-price-card__stat--period {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-alpha-cream-72);
}

.tether-price-card__chevron {
  width: 10px;
  height: 7px;
}

.tether-price-card__stat-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-color-cream);
  line-height: 1.2;
}

.tether-price-card__stat-value--up {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brand-color-mint);
}

.tether-price-card__stat-value--up svg {
  width: 10px;
  height: 10px;
}

.tether-price-card__stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-fg-white-muted);
}

.tether-price-card__chart {
  position: relative;
  height: 132px;
  padding: 8px 0 0;
}

.tether-price-card__spark {
  display: block;
  width: 100%;
  height: 132px;
}

.tether-price-card__chart-label {
  position: absolute;
  bottom: 8px;
  left: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-alpha-cream-72);
  pointer-events: none;
}

.price-cards-row .tether-price-card {
  width: 100%;
  max-width: none;
}

.tether-price-card--gold .tether-price-card__amount {
  font-size: 1.55rem;
}

/* Three steps follow the reading direction, then stack in order on mobile. */
.buying-guide__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.buying-guide__heading { text-align: center; max-width: 960px; }
.buying-guide__heading p { margin: 16px 0 0; color: var(--color-alpha-cream-72); font-size: 18px; line-height: 1.8; }
.buying-guide__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px; list-style: none; padding: 0; margin: 0; width: 100%; }
.buying-guide__step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 28px 28px; border: 1px solid rgba(231, 255, 239, .15); border-radius: 16px; background: rgba(8, 21, 15, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.buying-guide__step:not(:last-child)::after { content: ""; position: absolute; left: -29px; top: calc(50% - 8px); width: 16px; height: 16px; border-left: 4px solid var(--brand-color-mint); border-bottom: 4px solid var(--brand-color-mint); transform: rotate(45deg); border-radius: 2px; }
.buying-guide__icon { flex-shrink: 0; color: var(--brand-color-mint); margin-bottom: 22px; }
.buying-guide__step h3 { font-size: 21px; font-weight: 700; line-height: 1.6; margin: 0 0 16px; }
.buying-guide__step p { max-width: 270px; margin: 0; font-size: 18px; line-height: 1.9; color: var(--color-alpha-cream-72); }
.buying-guide__cta { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 52px; padding: 12px 36px; border-radius: 999px; font-size: 18px; font-weight: 700; text-decoration: none; transition: background-color .2s; }
.buying-guide__cta:focus-visible { outline: 2px solid var(--brand-color-mint); outline-offset: 5px; }
@media (max-width: 767px) {
  .buying-guide__steps { grid-template-columns: 1fr; gap: 32px; }
  .buying-guide__step { padding: 24px; }
  .buying-guide__step:not(:last-child)::after { top: auto; bottom: -23px; left: calc(50% - 7px); width: 12px; height: 12px; border-width: 3px; transform: rotate(-45deg); }
  .buying-guide__heading p, .buying-guide__step p { font-size: 16px; }
  .buying-guide__icon { margin-bottom: 14px; }
}

/* Account banner: copy on the left, supplied asset artwork on the right. */
.asset-banner {
  background: #001c18 url("../images/tether-gold-banner.png") center 70% / cover no-repeat;
  color: var(--brand-color-cream);
}
.asset-banner__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: clamp(280px, 25vw, 420px);
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 8%;
}
.asset-banner__copy { width: 43%; text-align: right; }
.asset-banner__copy h2 { margin: 0; font-size: clamp(24px, 2.35vw, 38px); font-weight: 700; line-height: 1.6; }
.asset-banner__copy p { margin: 14px 0 20px; font-size: clamp(14px, 1.4vw, 20px); font-weight: 500; line-height: 1.9; }
.asset-banner__cta { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-width: 172px; min-height: 46px; padding: 10px 28px; border-radius: 999px; font-size: 16px; font-weight: 700; text-decoration: none; transition: background-color .2s; }
.asset-banner__cta:focus-visible { outline: 2px solid var(--brand-color-mint); outline-offset: 5px; }
@media (max-width: 600px) {
  .asset-banner { background-position: right bottom; background-size: auto 260px; }
  .asset-banner__inner { min-height: 490px; align-items: flex-start; padding: 32px 24px 260px; background: linear-gradient(#001c18 0%, #001c18 42%, transparent 63%); }
  .asset-banner__copy { width: 100%; text-align: center; }
  .asset-banner__copy h2 { font-size: 24px; }
  .asset-banner__copy p { font-size: 14px; }
}

/* App promotion uses the supplied phone artwork on the left. */
.app-banner { width: 100%; color: var(--brand-color-cream); background: #001c18 url("../images/mobile-app-banner.png") center / cover no-repeat; direction: rtl; }
.app-banner__inner { display: flex; align-items: center; max-width: 1600px; min-height: clamp(360px, 36vw, 640px); margin: 0 auto; padding: 32px 8%; }
.app-banner__copy { width: 43%; text-align: right; }
.app-banner__copy h2 { margin: 0; font-size: clamp(26px, 2.5vw, 40px); font-weight: 700; line-height: 1.5; }
.app-banner__copy p { margin: 12px 0 20px; font-size: clamp(14px, 1.35vw, 20px); line-height: 1.9; color: var(--color-alpha-cream-72); }
.app-banner__copy ul { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0 0 24px; padding: 0; }
.app-banner__copy li { display: flex; align-items: baseline; gap: 12px; font-size: clamp(14px, 1.3vw, 19px); line-height: 1.7; }
.app-banner__copy li::before { content: "✓"; color: var(--brand-color-mint); font-weight: 700; }
.app-banner__cta { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 46px; padding: 10px 28px; border: 0; border-radius: 999px; font-family: inherit; font-size: 16px; font-weight: 700; }
.app-banner__cta:disabled { cursor: default; opacity: 1; }
.app-banner__cta:focus-visible { outline: 2px solid var(--brand-color-mint); outline-offset: 5px; }
@media (max-width: 600px) {
  .app-banner { background-position: left bottom; background-size: auto 310px; }
  .app-banner__inner { align-items: flex-start; min-height: 640px; padding: 32px 24px 320px; background: linear-gradient(#001c18 0%, #001c18 44%, transparent 61%); }
  .app-banner__copy { width: 100%; }
  .app-banner__copy h2 { font-size: 26px; }
  .app-banner__copy p, .app-banner__copy li { font-size: 14px; }
}

.business-memo {
  padding: 32px 20px;
  background: #000;
  color: var(--brand-color-cream);
  text-align: center;
}
.business-memo p {
  margin: 0;
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.8;
}

/* Mobile layout and touch navigation. */
.mobile-navigation { display: none; }
@media (max-width: 767px) {
  html[lang="fa"] { scroll-padding-top: 88px; }
  [data-co="StickyHeaderShell"] { background: #000; }
  [data-co="HeaderBar"] > div > div { gap: 12px; }
  [data-co="BrandLogo"] { max-width: 150px; height: 32px; object-fit: contain; }
  [data-co="MobileMenu"] { margin-inline-end: 12px; }
  [data-co="MobileMenu"] button { min-width: 44px; min-height: 44px; }
  .mobile-navigation:not([hidden]) { display: grid; gap: 4px; padding: 12px 20px 20px; border-top: 1px solid #ffffff20; max-height: calc(100dvh - 64px); overflow-y: auto; }
  .mobile-navigation a { display: flex; align-items: center; min-height: 48px; padding: 10px 16px; border-radius: 12px; color: var(--brand-color-cream); font-size: 16px; }
  .mobile-navigation a:focus-visible { outline: 2px solid var(--brand-color-mint); outline-offset: -2px; }
  .mobile-navigation .mobile-navigation__signup { justify-content: center; background: var(--brand-color-mint); color: #082417; font-weight: 700; margin-top: 8px; }
  main [data-padding="section"] { padding-block: 40px; }
  main h2 { line-height: 1.6; overflow-wrap: break-word; }
  [data-track-section="Hero"] h1 { font-size: clamp(28px, 7.5vw, 40px); line-height: 1.5; }
  [data-track-section="Hero"] [data-co="HeroBackground"] { position: absolute; inset: 0; height: 100%; opacity: .32; pointer-events: none; }
  [data-track-section="Hero"] > div > div > div > [dir="rtl"] { padding-block: 28px 32px; gap: 24px; }
  .tether-price-card { min-width: 0; max-width: 480px; margin-inline: auto; }
  .tether-price-card__header { padding: 18px 16px; gap: 8px; }
  .tether-price-card__logo { width: 38px; height: 38px; }
  .tether-price-card__asset { gap: 6px; }
  .tether-price-card__amount { font-size: clamp(24px, 6.5vw, 32px); }
  .tether-price-card__currency { font-size: 13px; }
  .tether-price-card__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; gap: 12px 6px; }
  .tether-price-card__stat--period { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 6px; font-size: 12px; }
  .tether-price-card__stat-label { font-size: 12px; }
  [data-testid="trust-bar-marquee"] > [aria-hidden="true"] { display: none; }
  [data-testid="trust-bar-marquee"] ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 20px 12px; animation: none; transform: none; }
  [data-testid="trust-bar-marquee"] li[aria-hidden="true"] { display: none; }
  [data-testid="trust-bar-marquee"] li { padding: 0; gap: 10px; min-width: 0; }
  [data-testid="trust-bar-marquee"] .trust-bar-icon-frame { width: 36px; height: 36px; }
  [data-testid="trust-bar-marquee"] .text-body-sm { font-size: 12px; line-height: 1.7; }
  .buying-guide__heading h2 { font-size: clamp(22px, 5.6vw, 28px); }
  .buying-guide__inner { gap: 24px; }
  .buying-guide__step { padding: 20px; }
  .buying-guide__step h3 { font-size: 19px; margin-bottom: 8px; }
  .buying-guide__icon { height: 72px; margin-bottom: 12px; }
  .buying-guide__cta, .asset-banner__cta, .app-banner__cta { min-height: 48px; }
  [data-track-section="Trust & Safety"] [data-co="Cards02"] > li > div { padding: 20px; gap: 20px; }
  [data-track-section="Trust & Safety"] h3 { font-size: 20px; }
  [data-track-section="Trust & Safety"] [data-co="Tag"] { padding: 8px 14px; }
  /* Hidden carousel copies must not set the visible mobile banner's height. */
  [data-co="CarouselSlider"] > .flex { align-items: flex-start; }
  [data-co="CarouselSlider"] [aria-roledescription="slide"] { align-self: flex-start; }
  .app-banner { background-position: left bottom; background-size: auto 300px; }
  .app-banner__inner { min-height: 0; padding: 32px 24px 310px; background: linear-gradient(#001c18 0%, #001c18 43%, transparent 65%); }
  .app-banner__copy { width: 100%; max-width: 440px; margin-inline: auto; }
  .app-banner__copy h2 { font-size: 28px; }
  .app-banner__copy p, .app-banner__copy li { font-size: 15px; }
  .app-banner__copy p br { display: none; }
  .asset-banner { background-position: right bottom; background-size: auto 240px; }
  .asset-banner__inner { min-height: 0; padding: 32px 24px 250px; background: linear-gradient(#001c18 0%, #001c18 38%, transparent 65%); }
  .asset-banner__copy { width: 100%; text-align: center; }
  .asset-banner__copy h2 { font-size: 26px; }
  .asset-banner__copy p { font-size: 15px; }
  .business-memo { padding: 28px 20px; }
  footer[data-co="SiteFooter"] summary { min-height: 48px; }
  footer[data-co="SiteFooter"] details a { display: inline-flex; align-items: center; min-height: 44px; }
  footer[data-co="SiteFooter"] p { line-height: 1.9; overflow-wrap: anywhere; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  [data-co="HeaderBar"] > div { padding-inline: 20px; }
  [data-co="HeaderBar"] > div > div,
  [data-co="HeaderBar"] > div > div > div,
  [data-co="DesktopMenu"] > ul { gap: 16px; }
  [data-co="HeaderAuthCta-login"], [data-co="HeaderAuthCta-signup"] { padding-inline: 16px; }
  [data-track-section="Hero"] > div > div > div > [dir="rtl"] { flex-direction: column; justify-content: center; gap: 28px; padding-block: 40px; min-height: 0; }
  [data-track-section="Hero"] > div > div > div > [dir="rtl"] > div { width: 100%; max-width: 560px; text-align: center; }
  [data-track-section="Hero"] h1 { font-size: 40px; line-height: 1.5; }
  [data-track-section="Hero"] h1 + p { font-size: 18px; }
  [data-track-section="Hero"] [data-co="CtaLink-external"] { margin-inline: auto; }
  .tether-price-card { margin-inline: auto; }
  .buying-guide__steps { gap: 28px; }
  .buying-guide__step { padding: 20px 16px; }
  .buying-guide__step:not(:last-child)::after { left: -21px; width: 12px; height: 12px; border-width: 3px; }
  .buying-guide__step h3 { font-size: 18px; }
  .buying-guide__step p { font-size: 16px; }
  [data-track-section="Trust & Safety"] [data-co="Cards02"] { flex-direction: column; }
  [data-track-section="Trust & Safety"] [data-co="Cards02"] > li > div { padding: 24px; gap: 20px; }
}
