/* =========================================================
   Home — FAQ (Figma node 190:56692, FAQ component 104:51723)
   Click ↔ Variant2 uses the "Quick" spring (744ms) → --al-ease-quick / --al-dur-faq.
   ========================================================= */

.al-faq {
  padding-block: var(--al-sp-4xl) var(--al-sp-128);
  background: var(--al-bg);
}

.al-faq__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--al-sp-xl);
}

/* ---------------- Head ---------------- */
.al-faq__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--al-sp-sm);
}
.al-faq__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--al-sp-xs);
  padding: var(--al-sp-xs);
  border-radius: 34px;
  background: var(--al-secondary-light);
}
.al-faq__badge-text {
  font-family: var(--al-f-plex);
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
  color: var(--al-text-3);
  background: linear-gradient(to right, var(--al-text-3), var(--al-text-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
:lang(ar) .al-faq__badge-text { font-family: var(--al-f-main); }
.al-faq__avatars { display: flex; align-items: center; }
.al-faq__avatars img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-inline-end: -8px;
}
.al-faq__avatars img:last-child { margin-inline-end: 0; }

/* ---------------- Body ---------------- */
.al-faq__body {
  display: flex;
  align-items: flex-start;
  gap: var(--al-sp-xl);
  width: 100%;
}
.al-faq__list {
  flex: 0 1 735px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--al-sp-md);
}

/* ---------------- Item ----------------
   Row 1 = header button, row 2 = answer panel. Animating the second track 0fr → 1fr gives a
   content-height transition with no JS measuring. */
.al-faq-item {
  display: grid;
  grid-template-rows: auto 0fr;
  border-radius: var(--al-sp-md);
  background: var(--al-muted-bg);
  transition:
    grid-template-rows var(--al-dur-faq) var(--al-ease-quick),
    background-color var(--al-dur-faq) var(--al-ease-quick);
}
.al-faq-item--open {
  grid-template-rows: auto 1fr;
  background: var(--al-secondary-light);
}

.al-faq-item__heading { margin: 0; font: inherit; }

.al .al-faq-item__btn {
  display: flex;
  align-items: flex-start;
  gap: var(--al-sp-sm);
  width: 100%;
  min-height: 72px;
  padding: 22px var(--al-sp-lg);
  border-radius: var(--al-sp-md);
  text-align: start;
  transition: padding-block-end var(--al-dur-faq) var(--al-ease-quick);
}
.al .al-faq-item--open .al-faq-item__btn { padding-block-end: 10px; }
.al .al-faq-item__btn:focus-visible { outline-offset: -2px; }

.al-faq-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-block-start: 2px;
}
.al-faq-item__q {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: var(--al-text);
  transition: color var(--al-dur-faq) var(--al-ease-quick);
}
.al-faq-item--open .al-faq-item__q { color: var(--al-c-blue); }

.al-faq-item__toggle {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-block-start: 2px;
}
.al-faq-item__toggle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition:
    opacity var(--al-dur-faq) var(--al-ease-quick),
    transform var(--al-dur-faq) var(--al-ease-quick);
}
.al-faq-item__close { opacity: 0; transform: rotate(-45deg); }
.al-faq-item--open .al-faq-item__plus { opacity: 0; transform: rotate(45deg); }
.al-faq-item--open .al-faq-item__close { opacity: 1; transform: none; }

/* Answer panel. visibility keeps a closed answer out of the tab order and the accessibility tree;
   it flips at the end of the close animation and immediately on open. */
.al-faq-item__panel {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear var(--al-dur-faq);
}
.al-faq-item--open .al-faq-item__panel {
  visibility: visible;
  transition-delay: 0s;
}
.al-faq-item__panel-inner {
  /* aligned under the question: padding + icon + gap on both sides */
  padding: 0 calc(var(--al-sp-lg) + 24px + var(--al-sp-sm)) var(--al-sp-lg);
}
.al-faq-item__a {
  font-size: 16px;
  line-height: 24px;
  color: var(--al-body);
  opacity: 0;
  transition: opacity var(--al-dur-faq) var(--al-ease-quick);
}
.al-faq-item--open .al-faq-item__a { opacity: 1; }

/* Loading rows: exactly the closed row height, so the swap does not shift the page */
.al-faq-item--skeleton {
  height: 72px;
  background: linear-gradient(90deg, var(--al-muted-bg) 0%, var(--al-border) 50%, var(--al-muted-bg) 100%);
  background-size: 200% 100%;
  animation: al-faq-shimmer 1.4s ease-in-out infinite;
}
@keyframes al-faq-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* ---------------- Aside ---------------- */
.al-faq__aside {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--al-sp-xl);
}
.al-faq__illus {
  width: 256px;
  height: 256px;
  filter: var(--al-art-filter);
}
.al-faq__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--al-sp-md);
}
.al-faq__ask { min-height: 44px; padding-inline: var(--al-sp-lg); }
.al-faq__more-text {
  max-width: 260px;
  font-family: var(--al-f-plex);
  font-size: 14px;
  line-height: 18px;
  color: var(--al-text-3);
  text-align: center;
}
:lang(ar) .al-faq__more-text { font-family: var(--al-f-main); }
.al .al-faq__more-link {
  color: var(--al-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--al-dur-hover) var(--al-ease-out);
}
.al .al-faq__more-link:hover { text-decoration-color: currentColor; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1023.98px) {
  .al-faq { padding-block: var(--al-sp-2xl) var(--al-sp-4xl); }
  .al-faq__body { flex-direction: column; align-items: stretch; gap: var(--al-sp-2xl); }
  .al-faq__list { flex: none; }
  .al-faq__illus { width: 160px; height: 160px; }
  .al-faq__aside { gap: var(--al-sp-lg); }
}

@media (max-width: 767.98px) {
  .al .al-faq-item__btn { min-height: 64px; padding: 18px var(--al-sp-md); gap: var(--al-sp-xs); }
  .al .al-faq-item--open .al-faq-item__btn { padding-block-end: 8px; }
  .al-faq-item__q { font-size: 16px; line-height: 26px; }
  .al-faq-item__icon,
  .al-faq-item__toggle { margin-block-start: 1px; }
  /* the side padding would squeeze the answer to a narrow column on a phone */
  .al-faq-item__panel-inner { padding: 0 var(--al-sp-md) var(--al-sp-md); }
  .al-faq-item__a { font-size: 15px; line-height: 24px; }
  .al-faq-item--skeleton { height: 64px; }
  .al-faq__illus { width: 128px; height: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .al-faq-item--skeleton { animation: none; }
}

/* Figma puts the illustration at the START of the row (right under RTL). The list stays first in
   the DOM so it reads first and stacks first on small screens; only the wide row reorders. */
@media (min-width: 1024px) {
  .al-faq__aside { order: -1; }
}
