/* ============================================
   FAQ Page — redesigned
   - RTL-first: logical properties, Arabic fonts, mirrored hero
   - Modern animated accordion (JS API unchanged)
   ============================================ */

.faq-hero { min-height: 44vh; padding: 8rem 0 3.25rem; }
.faq-hero-content { max-width: 740px; text-align: start; }
.faq-hero .page-hero-desc { margin-bottom: 0; }

/* In RTL the content hugs the right side, where the shared overlay is dark
   green — mirror the gradient so dark Arabic text always sits on light bg. */
[dir="rtl"] .faq-hero .page-hero-overlay {
  background:
    radial-gradient(120% 80% at 15% 15%, rgba(6, 95, 70, 0.55), transparent 60%),
    linear-gradient(255deg, rgba(246, 247, 250, 0.97) 35%, rgba(246, 247, 250, 0.82) 55%, rgba(6, 95, 70, 0.42) 100%);
}
[dir="rtl"] .faq-hero .page-hero-badge,
[dir="rtl"] .faq-hero .page-hero-title,
[dir="rtl"] .faq-hero .page-hero-desc {
  font-family: var(--font-ar-heading);
}
[dir="rtl"] .faq-hero .page-hero-desc {
  font-family: var(--font-ar-body);
  line-height: 2;
}

.faq-section { padding-top: 3.25rem; padding-bottom: 4rem; }
.faq-container { max-width: 960px; }

/* ---------- Category pills ---------- */
.pw-faq-cats {
  display: flex; gap: 0.55rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 2.25rem;
}
.pw-faq-cat {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem; font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  white-space: nowrap; min-height: 40px;
}
[dir="rtl"] .pw-faq-cat { font-family: var(--font-ar-body); }
.pw-faq-cat.active {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(14, 143, 92, 0.28);
}
.pw-faq-cat:hover:not(.active) {
  border-color: var(--brand-600); color: var(--brand-700);
  transform: translateY(-1px);
}
.pw-faq-cat:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* ---------- Accordion list ---------- */
.pw-faq-list { max-width: 820px; margin: 0 auto; }
.pw-faq-item {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.pw-faq-item:hover { border-color: var(--border-hover); }
.pw-faq-item.open {
  border-color: var(--brand-600);
  background: #fff;
  box-shadow: 0 10px 28px rgba(14, 143, 92, 0.12);
}
.pw-faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.05rem 1.25rem;
  background: transparent; border: none;
  color: var(--text-primary);
  font-size: 0.97rem; font-weight: 700;
  cursor: pointer; text-align: start;
  font-family: var(--font-sans);
  transition: background var(--transition-fast);
  min-height: 56px;
}
[dir="rtl"] .pw-faq-q { font-family: var(--font-ar-body); }
.pw-faq-q:hover { background: rgba(14, 143, 92, 0.05); }
.pw-faq-q:focus-visible { outline: 2px solid var(--brand-600); outline-offset: -2px; }
.pw-faq-q span:first-child {
  display: flex; align-items: center; gap: 0.65rem;
  line-height: 1.7;
}
[dir="rtl"] .pw-faq-q span:first-child { line-height: 1.9; }
.pw-faq-q span:first-child i { color: var(--brand-600); font-size: 0.95rem; flex-shrink: 0; }
.pw-faq-item.open .pw-faq-q span:first-child i { color: var(--brand-700); }
.pw-faq-q span:last-child {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary); color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.pw-faq-item.open .pw-faq-q span:last-child {
  background: var(--brand-600); color: #fff;
  transform: rotate(45deg);
}

/* Smooth open/close (grid-rows technique — no JS change needed) */
.pw-faq-a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.pw-faq-a > p {
  overflow: hidden; min-height: 0;
  margin: 0;
  padding: 0 1.25rem;
  padding-inline-start: 2.9rem;
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.75;
}
[dir="rtl"] .pw-faq-a > p { line-height: 2; }
.pw-faq-item.open .pw-faq-a { grid-template-rows: 1fr; }
.pw-faq-item.open .pw-faq-a > p { padding-bottom: 1.15rem; }

.pw-billing-empty { text-align: center; padding: 3rem; color: var(--text-muted); }
.pw-billing-empty i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; display: block; }
.pw-billing-empty p { margin-bottom: 1.5rem; }

/* ---------- Contact CTA card ---------- */
.faq-contact-note {
  max-width: 820px; margin: 2.25rem auto 0;
  padding: 1.5rem 1.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  background: linear-gradient(135deg, #065f46, #0e8f5c);
  border: none; border-radius: 18px;
  box-shadow: 0 14px 34px rgba(6, 95, 70, 0.28);
  color: #fff;
  position: relative; overflow: hidden;
}
.faq-contact-note::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 120% at 90% 10%, rgba(255, 255, 255, 0.14), transparent 60%);
  pointer-events: none;
}
[dir="rtl"] .faq-contact-note::before {
  background: radial-gradient(80% 120% at 10% 10%, rgba(255, 255, 255, 0.14), transparent 60%);
}
.faq-contact-note h2 { font-size: 1.2rem; margin-bottom: 0.3rem; color: #fff; }
[dir="rtl"] .faq-contact-note h2 { font-family: var(--font-ar-heading); }
.faq-contact-note p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); margin: 0; line-height: 1.8; }
.faq-contact-note .btn {
  flex-shrink: 0;
  background: #fff; color: var(--brand-700); border: none;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.faq-contact-note .btn:hover { transform: translateY(-2px); color: var(--brand-700); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .faq-hero { min-height: 38vh; padding: 7rem 0 2.5rem; }
  .pw-faq-cats { gap: 0.4rem; margin-bottom: 1.75rem; }
  .pw-faq-cat { font-size: 0.8rem; padding: 0.5rem 0.9rem; }
  .pw-faq-q { font-size: 0.9rem; padding: 0.95rem 1rem; }
  .pw-faq-a > p { padding-inline-start: 1rem; }
  .faq-contact-note { align-items: stretch; flex-direction: column; text-align: start; }
  .faq-contact-note .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pw-faq-a { transition: none; }
  .pw-faq-cat, .pw-faq-q span:last-child, .faq-contact-note .btn { transition: none; }
}
