/*
 * WebPlus — Chapter 12: FAQ Accordion Styles (الأسئلة الشائعة)
 * ستارة بيضاء عالية التباين (Snow Curtain) مع أكورديون تفاعلي وشارات Schema
 * بادئة الأصناف: wx-
 */

.wx-faq-section {
  position: relative;
  background-color: var(--wx-snow);
  color: var(--wx-ink);
  padding-block: var(--wx-sec-pad);
  overflow: hidden;
}

.wx-faq-header {
  margin-bottom: var(--wx-head-gap);
}

.wx-faq-list {
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wx-faq-item {
  background: #ffffff;
  border: 1px solid rgba(11, 31, 68, 0.1);
  border-radius: var(--wx-radius-lg);
  overflow: hidden;
  transition: all 0.35s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.wx-faq-item:hover,
.wx-faq-item.is-open {
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.08);
}

.wx-faq-summary {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  user-select: none;
}

.wx-faq-question {
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 800;
  color: var(--wx-ink);
  margin: 0;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.wx-faq-item:hover .wx-faq-question,
.wx-faq-item.is-open .wx-faq-question {
  color: var(--wx-blue);
}

.wx-faq-icon-cross {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(11, 31, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.4s var(--wx-ease-expo);
}

.wx-faq-icon-cross svg {
  width: 16px;
  height: 16px;
  stroke: var(--wx-navy);
  transition: transform 0.4s var(--wx-ease-expo), stroke 0.3s ease;
}

.wx-faq-item.is-open .wx-faq-icon-cross {
  background: var(--wx-blue);
  border-color: var(--wx-blue);
}

.wx-faq-item.is-open .wx-faq-icon-cross svg {
  stroke: #ffffff;
  transform: rotate(180deg);
}

/* انسيابية فتح الإجابة بـ CSS Grid */
.wx-faq-answer-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--wx-ease-smooth);
}

.wx-faq-item.is-open .wx-faq-answer-drawer {
  grid-template-rows: 1fr;
}

.wx-faq-answer-inner {
  overflow: hidden;
}

.wx-faq-answer-text {
  padding: 0 clamp(20px, 3vw, 28px) clamp(24px, 3vw, 32px);
  font-size: 15px;
  line-height: 1.85;
  color: var(--wx-slate-600);
  border-top: 1px solid rgba(11, 31, 68, 0.06);
  padding-top: 18px;
}
