/* =====================================================================
   faq.css — FAQ page styles
   Requires: ../css/styles.css (loaded first)
   ===================================================================== */

/* ── Hero override: shorter than homepage ──────────────────────── */
.faq-hero-shell {
  min-height: auto;
  padding-bottom: 0;
}

.faq-hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.faq-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.faq-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin: 0.4rem 0 1rem;
  line-height: 1.2;
}

.faq-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ── Search bar ──────────────────────────────────────────────────── */
.faq-search-wrap {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
}

.faq-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

.faq-search {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 2.6rem;
  font-size: 0.95rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.faq-search::placeholder {
  color: rgba(255,255,255,0.45);
}

.faq-search:focus {
  border-color: var(--green, #12ae47);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(18,174,71,0.25);
}

.faq-search::-webkit-search-cancel-button {
  display: none;
}

.faq-search-clear {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.faq-search-clear:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* ── Category tabs bar ───────────────────────────────────────────── */
.faq-tabs-wrap {
  background: #0d1e31;
  border-bottom: 1.5px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 90;
}

.faq-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}

.faq-tabs::-webkit-scrollbar {
  display: none;
}

.faq-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.faq-tab:hover {
  color: #fff;
}

.faq-tab.active,
.faq-tab[aria-selected="true"] {
  color: var(--green, #12ae47);
  border-bottom-color: var(--green, #12ae47);
}

.faq-tab:focus-visible {
  outline: 2px solid var(--green, #12ae47);
  outline-offset: -2px;
}

/* ── Main content area ───────────────────────────────────────────── */
.faq-content {
  background: #f8fafc;
  min-height: 50vh;
  padding: 3rem 0 4rem;
}

.faq-layout {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Search notice & no-results ──────────────────────────────────── */
.faq-search-notice {
  background: #e8f5ed;
  border: 1px solid #a3d9b8;
  color: #0a5930;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.faq-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  font-size: 1rem;
}

.faq-link-btn {
  background: none;
  border: none;
  color: var(--green, #12ae47);
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

.faq-link-btn:hover {
  color: var(--emerald, #18c052);
}

/* ── Section groups ──────────────────────────────────────────────── */
.faq-group {
  margin-bottom: 2.5rem;
}

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

.faq-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.faq-group-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--green, #12ae47);
}

/* ── FAQ accordion list ──────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.faq-item {
  border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item[hidden] {
  display: none;
}

/* ── FAQ question button ─────────────────────────────────────────── */
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.1rem 3.5rem 1.1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
  line-height: 1.5;
}

.faq-question:hover {
  background: #f8fafc;
  color: #000b1b;
}

.faq-question:focus-visible {
  outline: 2px solid var(--green, #12ae47);
  outline-offset: -2px;
}

/* chevron icon */
.faq-chevron {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), color 0.15s;
  color: #94a3b8;
}

.faq-chevron::before {
  content: '';
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: border-color 0.15s;
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: translateY(-50%) rotate(180deg);
  color: var(--green, #12ae47);
}

.faq-question[aria-expanded="true"] {
  color: #000b1b;
}

/* ── FAQ answer panel ────────────────────────────────────────────── */
.faq-answer {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.93rem;
  color: #475569;
  line-height: 1.75;
  display: none;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.faq-answer p {
  margin: 0 0 0.75rem;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  margin: 0.4rem 0 0.75rem 1.25rem;
  padding: 0;
}

.faq-answer li {
  margin-bottom: 0.3rem;
}

.faq-answer strong {
  color: #0f172a;
  font-weight: 600;
}

.faq-inline-link {
  color: var(--green, #12ae47);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-inline-link:hover {
  color: var(--emerald, #18c052);
}

/* ── Bottom CTA ──────────────────────────────────────────────────── */
.faq-cta {
  margin-top: 3rem;
  background: #000b1b;
  border-radius: 16px;
  overflow: hidden;
}

.faq-cta-inner {
  text-align: center;
  padding: 3.5rem 2rem;
}

.faq-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
}

.faq-cta p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.faq-cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.btn-arrow {
  margin-left: 0.35rem;
}

/* ── Visually hidden ─────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .faq-hero {
    padding: 2.5rem 0 2rem;
  }
  .faq-hero h1 {
    font-size: 1.7rem;
  }
  .faq-tab {
    font-size: 0.82rem;
    padding: 0.85rem 0.8rem;
  }
  .faq-cta-inner {
    padding: 2.5rem 1.25rem;
  }
  .faq-cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .btn-lg {
    width: 100%;
    text-align: center;
  }
}
