/*
 * «سؤال های رایج» (edit 20; in design): from 1024 the head and the support card at the start (sticky), the questions at
 * the end; an answer opens with its own height.
 */

.faq { padding-block: 0 var(--section); }
.faq-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1024px) { .faq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 48px; } .faq-side { position: sticky; top: 112px; } }
.faq-side { display: grid; gap: 24px; align-content: start; }

/* the way to the support: a glass card */
.faq-more { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; padding: 18px 20px; border-radius: var(--radius-card); background: var(--glass-strong); border: 1px solid var(--edge); box-shadow: var(--shadow-tile); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--fg);
  transition: translate var(--d-default) var(--ease-out), border-color var(--d-default) ease, box-shadow var(--d-enter) var(--ease-out); }
.faq-more-ico { grid-row: 1 / span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.faq-more-ico .i { width: 22px; height: 22px; }
.faq-more-t { display: grid; gap: 2px; }
.faq-more-t b { font-size: var(--text-headline); line-height: var(--lh-headline); font-weight: 800; }
.faq-more-t span { color: var(--fg-muted); font-size: var(--text-subhead); line-height: var(--lh-subhead); }
.faq-more-go { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-size: var(--text-subhead); font-weight: 700; }
.faq-more-go .i { width: 16px; height: 16px; transition: translate var(--d-default) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .faq-more:hover { translate: 0 -3px; border-color: var(--edge-strong); box-shadow: var(--shadow-tile-hover); } .faq-more:hover .faq-more-go .i { translate: -3px 0; } }

/* the questions */
.faq-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.faq-item { border-radius: var(--radius-tile); background: var(--surface); border: 1px solid var(--line); transition: border-color var(--d-default) ease, box-shadow var(--d-enter) var(--ease-out), background-color var(--d-default) ease; }
.faq-item.on { border-color: var(--edge-strong); box-shadow: var(--shadow-tile); }
.faq-item h3 { margin: 0; }
.faq-q { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; color: var(--fg); text-align: start; border-radius: inherit; }
.faq-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--fg-muted); font-size: var(--text-label); font-weight: 800; transition: background-color var(--d-default) ease, color var(--d-default) ease; }
.faq-item.on .faq-n { background: var(--accent-soft); color: var(--accent-ink); }
.faq-qt { font-size: var(--text-headline); line-height: var(--lh-headline); font-weight: 700; }
.faq-plus { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--fg-muted); transition: rotate var(--d-enter) var(--ease-out), background-color var(--d-default) ease, color var(--d-default) ease, border-color var(--d-default) ease; }
.faq-plus .i { width: 16px; height: 16px; }
.faq-item.on .faq-plus { rotate: 45deg; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 420ms var(--ease-out); }
.faq-item.on .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 20px 20px; padding-inline-start: 64px; color: var(--fg-muted); font-size: var(--text-callout); line-height: var(--lh-callout); text-wrap: pretty; opacity: 0; translate: 0 -4px; transition: opacity 300ms ease, translate 360ms var(--ease-out); }
.faq-item.on .faq-a p { opacity: 1; translate: 0 0; transition-delay: 80ms; }
@media (max-width: 559px) { .faq-a p { padding-inline-start: 20px; } .faq-q { padding: 16px; gap: 12px; } }
@media (hover: hover) and (pointer: fine) {
  .faq-item:not(.on):hover { border-color: color-mix(in srgb, var(--fg) 20%, transparent); box-shadow: var(--shadow-tile); }
  .faq-item:not(.on):hover .faq-plus { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .faq-a, .faq-a p { transition: none; } }
