/* صفحه قوانین و حریم خصوصی */
body.legal-page .bg {
  background:
    radial-gradient(ellipse 85% 50% at 50% -12%, rgba(255, 193, 7, 0.07) 0%, transparent 52%),
    var(--bg-base);
}

.legal-page__glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
}

.legal-page__glow--a {
  width: min(50vw, 20rem);
  height: min(50vw, 20rem);
  top: 6%;
  inset-inline-end: -8%;
  background: rgba(255, 193, 7, 0.12);
}

.legal-page__glow--b {
  width: min(42vw, 16rem);
  height: min(42vw, 16rem);
  bottom: 18%;
  inset-inline-start: -6%;
  background: rgba(147, 197, 253, 0.08);
}

.legal-page__main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--pad-inline) 2.5rem;
  box-sizing: border-box;
}

.legal-page__crumb {
  margin: 0 0 0.85rem;
}

.legal-page__crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legal-page__crumb-list a {
  color: var(--y-core);
  text-decoration: none;
  transition: color 0.15s ease;
}

.legal-page__crumb-list a:hover {
  color: var(--y-hot);
}

.legal-page__head {
  margin-bottom: 1.35rem;
}

.legal-page__hero {
  padding: 1.15rem 1.1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 214, 10, 0.18);
  background: rgba(12, 10, 6, 0.62);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  clip-path: polygon(
    0.75rem 0,
    100% 0,
    100% calc(100% - 0.75rem),
    calc(100% - 0.75rem) 100%,
    0 100%,
    0 0.75rem
  );
}

.legal-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 10, 0.28);
  background: rgba(255, 193, 7, 0.1);
  color: var(--y-hot);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.legal-page__badge i {
  font-size: 0.72rem;
}

.legal-page__title {
  margin: 0;
  font-size: clamp(1.2rem, 4.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.legal-page__intro {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text);
}

.legal-page__updated {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legal-page__jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 204, 64, 0.12);
}

.legal-page__jump-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.legal-page__jump-link i {
  font-size: 0.8rem;
  color: var(--y-core);
}

.legal-page__jump-link:hover {
  border-color: rgba(255, 214, 10, 0.4);
  color: var(--y-hot);
  background: rgba(255, 214, 10, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.legal-doc {
  position: relative;
  margin-bottom: 1.15rem;
  padding: 1.1rem 1.05rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 214, 10, 0.14);
  background: linear-gradient(165deg, rgba(26, 23, 16, 0.95) 0%, rgba(14, 12, 8, 0.92) 100%);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  scroll-margin-top: calc(var(--store-header-space, 4rem) + 1rem);
  overflow: hidden;
}

.legal-doc::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--y-hot) 0%, var(--y-core) 45%, transparent 100%);
  opacity: 0.85;
}

.legal-doc--privacy::before {
  background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 40%, transparent 100%);
}

.legal-doc--privacy {
  margin-bottom: 1.35rem;
}

.legal-doc__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 204, 64, 0.12);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--y-core);
}

.legal-doc--privacy .legal-doc__title {
  color: #93c5fd;
}

.legal-doc__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 214, 10, 0.22);
  background: rgba(255, 193, 7, 0.1);
  font-size: 0.88rem;
}

.legal-doc--privacy .legal-doc__title-icon {
  border-color: rgba(147, 197, 253, 0.3);
  background: rgba(96, 165, 250, 0.12);
}

.legal-doc__section {
  position: relative;
  padding-inline-start: 0.15rem;
}

.legal-doc__section + .legal-doc__section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 204, 64, 0.1);
}

.legal-doc__heading {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0 0 0.4rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text);
}

.legal-doc__heading::before {
  content: "";
  flex-shrink: 0;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--y-core);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.45);
}

.legal-doc--privacy .legal-doc__heading::before {
  background: #93c5fd;
  box-shadow: 0 0 8px rgba(147, 197, 253, 0.4);
}

.legal-doc__section p {
  margin: 0;
  padding-inline-start: 0.8rem;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ——— CTA بازگشت به ورود ——— */
.legal-page__cta {
  margin-top: 0.5rem;
}

.legal-page__cta-inner {
  padding: 1.15rem 1.1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 214, 10, 0.22);
  background: rgba(12, 10, 6, 0.72);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
  text-align: center;
}

.legal-page__cta-note {
  margin: 0 0 0.85rem;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-muted);
}

.legal-page__cta-btn {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  min-height: 3.1rem;
  padding: 0.65rem 1rem;
  gap: 0.65rem;
  justify-content: flex-start;
  text-align: start;
}

.legal-page__cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.18);
  font-size: 1rem;
}

.legal-page__cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  flex: 1;
  min-width: 0;
}

.legal-page__cta-label {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.legal-page__cta-sub {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.82;
  line-height: 1.3;
}

.legal-page__cta-arrow {
  flex-shrink: 0;
  font-size: 0.85rem;
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.legal-page__cta-btn:hover .legal-page__cta-arrow {
  transform: translateX(0.2rem);
  opacity: 1;
}

@media (min-width: 36rem) {
  .legal-page__hero {
    padding: 1.35rem 1.25rem 1.15rem;
  }

  .legal-doc {
    padding: 1.25rem 1.35rem 1.2rem;
  }

  .legal-doc__section p {
    font-size: 0.84rem;
  }
}

@media (min-width: 48rem) {
  .legal-page__main {
    padding-bottom: 3rem;
  }

  .legal-page__cta-inner {
    padding: 1.35rem 1.5rem;
  }

  .legal-page__cta-btn {
    max-width: 24rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-page__jump-link:hover,
  .legal-page__cta-btn:hover .legal-page__cta-arrow {
    transform: none;
  }
}
