/* ============================================
   HOMEPAGE - FAQ

   Four topic rows separated by thin lines. Each opens to its questions,
   indented beside a line in the topic's colour, and each question opens to
   its answer. Both levels are native <details> sharing a name, so opening
   one closes the others. Type comes from css/theme.css.
   Markup: tools/home_faq.py.

   The older .faq / .faq__* / .faq-item rules in style.css are still used by
   the FAQs on the service, country, pricing, pilot, hire and trust pages.
   ============================================ */

.faqs {
  background: #ffffff;
  interpolate-size: allow-keywords;
}

.faq-narrow { max-width: 880px; margin: 0 auto; }

.faq-tone--pink  { --tone-a: #f9cad7; }
.faq-tone--lilac { --tone-a: #d4cef7; }
.faq-tone--peach { --tone-a: #fad9bd; }
.faq-tone--sky   { --tone-a: #d2e7fa; }

/* ---------- Topics ---------- */
.faq-topics { border-top: 1px solid #e6e3f0; }

.faq-cat { border-bottom: 1px solid #e6e3f0; }

.faq-cat > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 4px;
  list-style: none;
  cursor: pointer;
}

.faq-cat > summary::-webkit-details-marker { display: none; }
.faq-cat > summary:focus-visible { outline: 2px solid #3230e0; outline-offset: -3px; border-radius: 12px; }

.faq-cat__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #f1f1fd;
  color: #3230e0;
}

.faq-cat__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-cat__text { flex: 1; min-width: 0; }

.faq-cat__title {
  display: block;
  font: 400 28px/1.25 var(--font-display);
  color: var(--heading-strong);
  transition: color 0.25s ease;
}

.faq-cat[open] .faq-cat__title { color: #3230e0; }

.faq-cat__count {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-small);
  line-height: 22px;
  color: var(--ink-muted);
}

.faq-cat__chev {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--heading-strong);
  box-shadow: 0 6px 14px -8px rgba(35, 13, 79, 0.4);
  transition: transform 0.3s ease, background-color 0.25s ease, color 0.25s ease;
}

.faq-cat__chev svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-cat > summary:hover .faq-cat__chev { color: #3230e0; }
.faq-cat[open] .faq-cat__chev { transform: rotate(180deg); background: #3230e0; color: #ffffff; }

.faq-cat__body {
  margin: 0 0 24px 68px;
  padding-left: 24px;
  border-left: 2px solid var(--tone-a);
}

/* ---------- Questions ---------- */
.faq-x { border-bottom: 1px solid #ebe9f5; }
.faq-x:last-child { border-bottom: 0; }

.faq-x summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--heading-strong);
}

.faq-x summary::-webkit-details-marker { display: none; }
.faq-x summary:focus-visible { outline: 2px solid #3230e0; outline-offset: 2px; border-radius: 10px; }

.faq-x__num {
  flex-shrink: 0;
  min-width: 28px;
  font: 600 14px/1 var(--font-body);
  color: #3230e0;
}

.faq-x__q { flex: 1; transition: color 0.2s ease; }
.faq-x summary:hover .faq-x__q { color: #3230e0; }

/* Plus that turns into a minus */
.faq-x__icon {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f1fd;
  transition: background-color 0.25s ease;
}

.faq-x__icon::before,
.faq-x__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: #3230e0;
  transition: transform 0.3s ease, background-color 0.25s ease;
}

.faq-x__icon::after { transform: rotate(90deg); }
.faq-x[open] .faq-x__icon { background: #3230e0; }
.faq-x[open] .faq-x__icon::before,
.faq-x[open] .faq-x__icon::after { background: #ffffff; }
.faq-x[open] .faq-x__icon::after { transform: rotate(0deg); }

.faq-x__a { padding: 0 52px 22px 4px; }
.faq-x__a p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); }

.faq-x__a a {
  font-weight: 500;
  color: #3230e0;
  text-decoration: underline;
  text-decoration-color: rgba(50, 48, 224, 0.35);
  text-underline-offset: 3px;
}

.faq-x__a a:hover { text-decoration-color: currentColor; }

/* Smooth open and close where the browser can animate to auto height */
.faq-cat::details-content,
.faq-x::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete;
}

.faq-cat[open]::details-content,
.faq-x[open]::details-content { block-size: auto; }

/* ---------- Contact card ---------- */
.faq-contact {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid #efe6f6;
  border-radius: 20px;
  background: linear-gradient(100deg, #fde8ee 0%, #efeaff 55%, #e6f4ff 100%);
}

.faq-contact__photo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
}

.faq-contact__title { margin: 0; font: 500 18px/1.3 var(--font-display); color: var(--heading-strong); }
.faq-contact__text { margin: 2px 0 0; font-size: var(--fs-small); line-height: 22px; color: var(--ink-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .faq-cat > summary { gap: 12px; padding: 20px 2px; }
  .faq-cat__icon { width: 44px; height: 44px; border-radius: 14px; }
  .faq-cat__title { font-size: 22px; }
  .faq-cat__chev { width: 34px; height: 34px; }
  .faq-cat__body { margin: 0 0 18px; padding-left: 16px; }

  .faq-x summary { gap: 12px; padding: 16px 2px; font-size: 16px; }
  .faq-x__a { padding: 0 0 18px 2px; }
  .faq-x__icon { width: 28px; height: 28px; }

  .faq-contact { grid-template-columns: 56px minmax(0, 1fr); }
  .faq-contact__btn { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-cat::details-content,
  .faq-x::details-content,
  .faq-cat__title,
  .faq-cat__chev,
  .faq-x__q,
  .faq-x__icon,
  .faq-x__icon::before,
  .faq-x__icon::after { transition: none; }
}
