/**
 * FAQ page — Kalhor navy / teal / gold visual identity
 * Scoped under .faq-page — does not touch global style.css
 */

.faq-page {
  --faq-navy: #1b2a4a;
  --faq-navy-deep: #15233f;
  --faq-teal: #09838e;
  --faq-teal-soft: #0a9aa6;
  --faq-gold: #c9a227;
  --faq-gold-soft: #e0c15a;
  --faq-ink: #243044;
  --faq-muted: #5f6b7a;
  --faq-bg: #f5f7fa;
  --faq-surface: #ffffff;
  --faq-border: rgba(27, 42, 74, 0.1);
  --faq-shadow: 0 10px 28px rgba(27, 42, 74, 0.08);
  --faq-radius: 16px;
  --faq-radius-sm: 12px;
  direction: rtl;
  text-align: right;
  color: var(--faq-ink);
  background: var(--faq-bg);
  font-family: IRANSans, Tahoma, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.faq-page *,
.faq-page *::before,
.faq-page *::after {
  box-sizing: border-box;
}

/* ---------- Hero ---------- */
.faq-hero {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(201, 162, 39, 0.22), transparent 55%),
    linear-gradient(145deg, #0a6f78 0%, var(--faq-navy) 55%, var(--faq-navy-deep) 100%);
}

.faq-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21, 35, 63, 0.15) 0%, rgba(21, 35, 63, 0.35) 100%);
  pointer-events: none;
}

.faq-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 3.1rem 0 2.35rem;
}

.faq-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--faq-gold-soft);
}

.faq-hero__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
}

.faq-hero__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.98rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
}

.faq-hero__meta {
  display: inline-flex;
  align-items: center;
  margin: 1rem 0 0;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

/* ---------- Section ---------- */
.faq-section {
  padding: 1.75rem 0 3.25rem;
}

.faq-panel {
  background: var(--faq-surface);
  border: 1px solid var(--faq-border);
  border-radius: var(--faq-radius);
  box-shadow: var(--faq-shadow);
  padding: 0.85rem;
}

@media (min-width: 768px) {
  .faq-panel {
    padding: 1.15rem;
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 52rem;
  margin: 0 auto;
}

/* ---------- Accordion item ---------- */
.faq-item {
  border: 1px solid var(--faq-border);
  border-radius: var(--faq-radius-sm);
  background: #fbfcfd;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.faq-item.is-open {
  background: var(--faq-surface);
  border-color: rgba(9, 131, 142, 0.28);
  box-shadow: 0 8px 22px rgba(27, 42, 74, 0.07);
}

.faq-item__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: right;
  color: var(--faq-navy);
  font-family: inherit;
  transition: background 0.15s ease;
}

.faq-item__q:hover {
  background: rgba(9, 131, 142, 0.04);
}

.faq-item__q:focus-visible {
  outline: 2px solid var(--faq-teal);
  outline-offset: -2px;
}

.faq-item__index {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(9, 131, 142, 0.12), rgba(201, 162, 39, 0.16));
  color: var(--faq-teal);
  font-size: 0.72rem;
  font-weight: 800;
}

.faq-item.is-open .faq-item__index {
  background: linear-gradient(145deg, var(--faq-teal), #0b6f78);
  color: #fff;
}

.faq-item__title {
  flex: 1 1 auto;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.65;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  position: relative;
  border-radius: 999px;
  background: rgba(27, 42, 74, 0.05);
  transition: background 0.2s ease, transform 0.25s ease;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--faq-gold);
  border-radius: 2px;
  transform: translate(-50%, -50%);
}

.faq-item__icon::after {
  width: 2px;
  height: 10px;
}

.faq-item.is-open .faq-item__icon {
  background: rgba(201, 162, 39, 0.16);
  transform: rotate(45deg);
}

.faq-item__a {
  border-top: 1px solid #eef2f6;
  padding: 0 1.05rem 1.05rem;
}

.faq-item__a[hidden] {
  display: none !important;
}

.faq-item__body {
  padding-top: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--faq-muted);
}

.faq-item__body p {
  margin: 0 0 0.75rem;
}

.faq-item__body p:last-child {
  margin-bottom: 0;
}

.faq-item__body a {
  color: var(--faq-teal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-item__body ul,
.faq-item__body ol {
  margin: 0 0 0.75rem;
  padding-right: 1.2rem;
}

.faq-item__body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.faq-item__updated {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ---------- Empty ---------- */
.faq-empty {
  background: var(--faq-surface);
  border: 1px solid var(--faq-border);
  border-radius: var(--faq-radius);
  box-shadow: var(--faq-shadow);
  padding: 2.25rem 1.5rem;
  text-align: center;
}

.faq-empty__title {
  margin: 0 0 0.5rem;
  color: var(--faq-navy);
  font-size: 1.2rem;
  font-weight: 800;
}

.faq-empty__text {
  margin: 0 auto 1.25rem;
  max-width: 28rem;
  color: var(--faq-muted);
  line-height: 1.8;
}

.faq-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

/* ---------- CTA ---------- */
.faq-cta {
  margin-top: 1.75rem;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(201, 162, 39, 0.22), transparent 60%),
    linear-gradient(135deg, #0a6f78 0%, var(--faq-navy) 58%, var(--faq-navy-deep) 100%);
  color: #fff;
  box-shadow: var(--faq-shadow);
}

.faq-cta__inner {
  padding: 1.85rem 1.4rem;
  text-align: center;
}

@media (min-width: 768px) {
  .faq-cta__inner {
    padding: 2.15rem 2rem;
  }
}

.faq-cta__eyebrow {
  margin: 0 0 0.4rem;
  color: var(--faq-gold-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.faq-cta__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  color: #fff;
}

.faq-cta__text {
  margin: 0 auto 1.2rem;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  line-height: 1.8;
}

.faq-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.faq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.faq-btn:hover {
  transform: translateY(-1px);
}

.faq-btn--primary {
  background: var(--faq-teal);
  color: #fff;
  border: 0;
}

.faq-btn--primary:hover {
  background: #0b6f78;
  color: #fff;
}

.faq-btn--ghost {
  background: transparent;
  color: var(--faq-navy);
  border: 1.5px solid rgba(27, 42, 74, 0.2);
}

.faq-btn--ghost:hover {
  border-color: var(--faq-teal);
  color: var(--faq-teal);
}

.faq-btn--light {
  background: #fff;
  color: var(--faq-navy);
  border: 0;
  min-width: 150px;
}

.faq-btn--light:hover {
  background: #f8fafc;
  color: var(--faq-navy);
}

.faq-btn--outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  min-width: 150px;
}

.faq-btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

.faq-btn:focus-visible {
  outline: 2px solid var(--faq-gold);
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .faq-hero__inner {
    padding: 2.5rem 0 1.85rem;
  }

  .faq-item__q {
    padding: 0.9rem 0.85rem;
    gap: 0.55rem;
  }

  .faq-item__title {
    font-size: 0.92rem;
  }

  .faq-cta__actions .faq-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-item__q,
  .faq-item__icon,
  .faq-btn {
    transition: none;
  }
}
