/* ==========================================================================
   FAQ (الأسئلة الشائعة) — accordion section
   All selectors scoped to .faq. Desktop values match Figma @1280 exactly.
   ========================================================================== */

.faq {
  background: #f4f6fa;
  padding: 96px 24px;
  font-family: "Tajawal", sans-serif;
}

.faq__inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* ---- Heading -------------------------------------------------------------- */
.faq__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: #241b4f;
  word-break: break-word;
}

.faq__eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: normal;
  letter-spacing: 0.56px;
}

.faq__title {
  margin: 0;
  font-weight: 700;
  font-size: 40px;
  line-height: normal;
}

/* ---- List ----------------------------------------------------------------- */
.faq__list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

/* ---- Item (card) ---------------------------------------------------------- */
.faq__item {
  background: #ffffff;
  border: 1px solid #e7e5f0;
  /* physical corners from Figma: tl 16, tr 6, br 16, bl 6 */
  border-radius: 16px 6px 16px 6px;
  padding: 24px 26px;
  overflow: hidden;
}

/* ---- Summary (question row) ---------------------------------------------- */
.faq__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  cursor: pointer;
  list-style: none;
}

.faq__summary::-webkit-details-marker { display: none; }
.faq__summary::marker { content: ""; }

.faq__q {
  font-weight: 700;
  font-size: 18px;
  line-height: normal;
  color: #241b4f;
  text-align: right;
  word-break: break-word;
}

/* ---- Toggle button -------------------------------------------------------- */
.faq__toggle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(55, 40, 115, 0.12);
  transition: background-color 0.2s ease;
}

.faq__item[open] .faq__toggle {
  background: rgba(55, 40, 115, 0.2);
}

.faq__icon {
  width: 16px;
  height: 16px;
  display: block;
}

.faq__bar {
  stroke: #241b4f;
  stroke-width: 2;
  stroke-linecap: round;
}

.faq__bar--v {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* + collapses into − : hide the vertical bar (opacity is direction-proof, works in RTL & LTR) */
.faq__item[open] .faq__bar--v {
  transform: rotate(90deg);
  opacity: 0;
}

/* ---- Divider + answer (revealed when open) -------------------------------- */
.faq__divider {
  height: 1px;
  width: 100%;
  background: rgba(55, 40, 115, 0.14);
  margin-top: 16px;
}

.faq__answer {
  margin: 16px 0 0;
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  color: var(--border); /* #6B6790 — matches Figma answer color exactly */
  text-align: right;
  width: 100%;
  word-break: break-word;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .faq {
    padding: 64px 24px;
  }
  .faq__inner {
    gap: 40px;
  }
  .faq__title {
    font-size: 30px;
  }
}

@media (max-width: 560px) {
  .faq {
    padding: 48px 16px;
  }
  .faq__inner {
    gap: 28px;
  }
  .faq__title {
    font-size: 22px;
  }
  .faq__eyebrow {
    font-size: 13px;
  }
  .faq__item {
    padding: 18px 18px;
  }
  .faq__summary {
    gap: 12px;
  }
  .faq__q {
    font-size: 16px;
  }
  .faq__answer {
    font-size: 15px;
  }
}
