/* ═══════════════════════════════════════════════════════════
   هشت — آکاردئون پرسش‌های متداول
   ═══════════════════════════════════════════════════════════ */

@property --faq-beam-deg {
  syntax: "<angle>";
  inherits: false;
  initial-value: 72deg;
}

.faq {
  position: relative;
  overflow: hidden;
}

/* پرتو نور نرم از گوشهٔ چپ — گسترش متحرک ۲۰٪ تا ۵۰٪ دایره */
.faq__beam {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 50%;
  width: min(92vh, 46rem);
  height: min(92vh, 46rem);
  translate: -42% -50%;
  border-radius: 50%;
  pointer-events: none;
  --faq-beam-deg: 72deg; /* ۲۰٪ از ۳۶۰° */
  background: conic-gradient(
    from 250deg at 50% 50%,
    color-mix(in srgb, var(--c-gold) 34%, transparent) 0deg,
    color-mix(in srgb, var(--c-gold) 14%, transparent) var(--faq-beam-deg),
    transparent var(--faq-beam-deg),
    transparent 360deg
  );
  filter: blur(2.75rem);
  opacity: 0.7;
  animation: faq-beam-sweep 7s ease-in-out infinite;
}

.faq__beam::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 50%,
    color-mix(in srgb, var(--c-gold) 38%, transparent) 0%,
    color-mix(in srgb, var(--c-gold) 12%, transparent) 45%,
    transparent 72%
  );
  filter: blur(1.5rem);
  animation: faq-beam-pulse 7s ease-in-out infinite;
}

.faq__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(16rem, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  min-height: clamp(28rem, 72vh, 42rem);
}

.faq__content {
  min-width: 0;
  align-self: center;
}

.faq__list {
  max-width: 48rem;
  max-height: min(68vh, 44rem);
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  padding-right: 1.15rem;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}
.faq__list::-webkit-scrollbar{display:none;width:0;height:0}
.faq__content--custom-scroll{position:relative}
.faq__custom-scroll-r330.custom-scroll__rail{position:absolute!important;right:.12rem!important;left:auto!important;width:.58rem!important;z-index:5;pointer-events:auto}
.faq__custom-scroll-r330 .custom-scroll__thumb{left:50%;right:auto;width:.28rem;min-height:2rem;background:rgb(var(--smart-scroll-rgb,240,180,41));border-radius:999px;box-shadow:0 0 .75rem rgba(240,180,41,.3);transform:translate(-50%,0)}
.faq__content--custom-scroll:hover .faq__custom-scroll-r330 .custom-scroll__thumb{width:.36rem;box-shadow:0 0 1rem rgba(240,180,41,.5)}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
}

.faq-item__q:hover {
  color: var(--c-gold);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--c-gold);
  transition: transform var(--dur) var(--ease-out);
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__a {
  display: none;
  padding: 0 0 1.35rem;
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 2;
}

.faq-item.is-open .faq-item__a {
  display: block;
}

/* آیکون علامت سؤال — تقریباً به ارتفاع سکشن */
.faq__mark {
  position: relative;
  justify-self: end;
  align-self: stretch;
  width: 100%;
  max-width: min(38rem, 46vw);
  min-height: 100%;
  display: grid;
  place-items: center;
  color: var(--c-gold);
  pointer-events: none;
  user-select: none;
}

.faq__mark-icon {
  display: block;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(14rem, 52vh, 30rem);
  line-height: 0.85;
  color: var(--c-gold);
  filter: drop-shadow(0 0 1.6rem color-mix(in srgb, var(--c-gold) 55%, transparent));
  animation:
    faq-mark-float 4.4s cubic-bezier(0.37, 0, 0.63, 1) infinite,
    faq-mark-fade 3.8s ease-in-out infinite;
}

@keyframes faq-beam-sweep {
  0%,
  100% {
    --faq-beam-deg: 72deg; /* ۲۰٪ دایره */
    opacity: 0.45;
  }
  50% {
    --faq-beam-deg: 180deg; /* ۵۰٪ دایره */
    opacity: 0.85;
  }
}

@keyframes faq-beam-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.8;
  }
}

@keyframes faq-mark-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.35rem);
  }
}

@keyframes faq-mark-fade {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 56rem) {
  .faq__layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 1.75rem;
  }

  .faq__beam {
    width: min(70vh, 28rem);
    height: min(70vh, 28rem);
    translate: -48% -30%;
    top: 18%;
    opacity: 0.55;
  }

  .faq__mark {
    order: -1;
    justify-self: center;
    max-width: 16rem;
    min-height: 0;
  }

  .faq__mark-icon {
    font-size: clamp(8rem, 36vw, 13rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__beam,
  .faq__beam::after,
  .faq__mark-icon {
    animation: none;
  }

  .faq__beam {
    --faq-beam-deg: 120deg;
    opacity: 0.55;
  }

  .faq__mark-icon {
    opacity: 0.85;
  }
}

/* مرورگرهایی بدون @property: پرتو با scale نرم جایگزین می‌شود */
@supports not (background: conic-gradient(from 1deg, red, blue)) {
  .faq__beam {
    background: radial-gradient(
      circle at 30% 50%,
      color-mix(in srgb, var(--c-gold) 30%, transparent) 0%,
      transparent 68%
    );
  }
}

/* R295 — preserve editor-authored question/answer line breaks exactly. */
.faq-item__q > span:first-child,
.faq-item__a {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}
.faq-item__q > span:first-child { min-width:0; }

/* R296 — FAQ typography and digits are canonical Persian UI text. */
#faq-list .faq-item__q,
#faq-list .faq-item__q span,
#faq-list .faq-item__a,
.mwa-faq-row summary,
.mwa-faq-row p{
  font-family:var(--hasht-font-family,var(--font,"Vazir","Vazirmatn Variable","Vazirmatn",Tahoma,Arial,sans-serif))!important;
  font-variant-numeric:normal!important;
  font-feature-settings:"ss01" 1!important;
}
