/* ============================================================
   FAQ PAGE CSS
   ============================================================ */

/* ── Page layout ── */
.faq-page {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 80px) 40px 96px;
}

/* ── Header ── */
.faq-header {
  text-align: center;
  margin-bottom: 56px;
}

.faq-header h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 35%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-header p {
  font-size: 1rem;
  color: var(--gray-light);
  line-height: 1.75;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Search ── */
.faq-search {
  position: relative;
  margin-bottom: 40px;
}

.faq-search input {
  width: 100%;
  padding-block: 14px;
  padding-inline: 20px 52px;
  background: rgba(18, 85, 204, 0.08);
  border: 1px solid rgba(0, 194, 255, 0.18);
  border-radius: var(--r-md);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.96rem;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.faq-search input::placeholder { color: var(--gray); }

.faq-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.12);
}

.faq-search-icon {
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 0.9rem;
  pointer-events: none;
  transition: color var(--t-fast);
}

.faq-search input:focus + .faq-search-icon { color: var(--cyan); }

/* ── Category tabs ── */
.faq-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.faq-tab {
  padding: 8px 18px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-size: 0.81rem;
  font-weight: 600;
  border: 1px solid rgba(0, 194, 255, 0.14);
  background: transparent;
  color: var(--gray-light);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    border-color var(--t-fast),
    box-shadow var(--t-fast);
}

.faq-tab:hover {
  background: rgba(0, 194, 255, 0.09);
  color: var(--cyan);
  border-color: rgba(0, 194, 255, 0.28);
}

.faq-tab.active {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 194, 255, 0.32);
}

/* ── Category group ── */
.faq-group {
  margin-bottom: 48px;
}

.faq-group.hidden { display: none; }

.faq-group-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.faq-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 194, 255, 0.12);
}

/* ── Accordion item ── */
.faq-item {
  background: var(--g-card);
  border: 1px solid rgba(0, 194, 255, 0.09);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--t-mid);
}

.faq-item.open {
  border-color: rgba(0, 194, 255, 0.26);
}

.faq-item.no-match { display: none; }

/* Question button */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: start;
  transition: background var(--t-fast);
}

.faq-question:hover { background: rgba(0, 194, 255, 0.04); }

.faq-q-text {
  font-family: var(--font-head);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

.faq-chevron {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0, 194, 255, 0.08);
  border: 1px solid rgba(0, 194, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 0.74rem;
  flex-shrink: 0;
  transition:
    transform var(--t-mid),
    background var(--t-mid),
    color var(--t-mid),
    border-color var(--t-mid);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}

/* Answer panel */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer { max-height: 700px; }

.faq-answer-body {
  padding: 0 22px 22px;
  border-top: 1px solid rgba(0, 194, 255, 0.07);
  padding-top: 16px;
  font-size: 0.915rem;
  color: var(--gray-light);
  line-height: 1.85;
}

.faq-answer-body a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
}
.faq-answer-body a:hover { text-decoration: underline; }

.faq-answer-body strong { color: var(--off-white); font-weight: 600; }

/* Highlight matching search text */
.faq-highlight {
  background: rgba(0, 194, 255, 0.22);
  color: var(--cyan);
  border-radius: 3px;
  padding: 0 2px;
}

/* ── No results ── */
.faq-no-results {
  display: none;
  text-align: center;
  padding: 56px 20px;
  color: var(--gray);
}

.faq-no-results.show { display: block; }

.faq-no-results i {
  font-size: 2.4rem;
  color: rgba(0, 194, 255, 0.20);
  display: block;
  margin-bottom: 16px;
}

.faq-no-results h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-light);
  margin-bottom: 8px;
}

.faq-no-results p { font-size: 0.9rem; }

/* ── CTA block ── */
.faq-cta {
  margin-top: 56px;
  padding: 48px 36px;
  text-align: center;
  background: var(--g-card);
  border: 1px solid rgba(0, 194, 255, 0.12);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

.faq-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--g-accent);
}

.faq-cta h3 {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.faq-cta p {
  font-size: 0.93rem;
  color: var(--gray-light);
  line-height: 1.72;
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* "Still Have a Question?" — the heading, the sentence under it and the
   button sit on one centred column in Arabic exactly as in English, at every
   width.  Stated explicitly so a direction-based rule cannot pull the Arabic
   copy out to the right edge. */
html .faq-cta,
html .faq-cta h3,
html .faq-cta p {
  text-align: center;
}
html .faq-cta p {
  margin-inline: auto;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .faq-page { padding: calc(var(--nav-h) + 48px) 20px 72px; }
  .faq-question { padding: 16px 18px; }
  .faq-answer-body { padding: 0 18px 18px; padding-top: 14px; }
  .faq-cta { padding: 36px 22px; }
}