/* =========================================================
   Sparkle’s Home – FAQ Styles (Professional + Simple)
   Palette aligned to system brand (#12095d + #f9a44c)
   Drop this in as faq.css (or inline in <style>)
========================================================= */

/* ---------- Design Tokens (System-Aligned) ---------- */
:root {
  /* Text / neutrals */
  --ink: #0d2c55;
  --ink-2: #1b3b6f;
  --ink-light: #4a5a73;
  --muted: #6b7280;

  /* Surfaces */
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e6e8ee;

  /* Brand */
  --brand: #12095d;        /* primary */
  --brand-light: #2a1fb3;  /* hover/active for buttons/links */
  --brand-2: #f9a44c;      /* complementary accent (CTA/labels) */
  --accent: #38b2ac;       /* optional cool accent (chips/badges) */

  /* State */
  --success: #22c55e;

  /* Shape & elevation */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 5px 15px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.12);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

/* ---------- Shell ---------- */
.faq {
  width: min(95%, 1200px);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ---------- Header ---------- */
.faq-head {
  background: linear-gradient(135deg, var(--card) 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.faq-head::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand-2));
}

.faq-title {
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  color: var(--ink);
  line-height: 1.2;
}
.faq-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Controls ---------- */
.faq-controls {
  display: flex;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
  align-items: center;
  flex-wrap: wrap;
}
.faq-search {
  flex: 1;
  min-width: 280px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-search::placeholder { color: var(--muted); }
.faq-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 9, 93, 0.12);
}

.faq-btn {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.faq-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.faq-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 9, 93, 0.28);
}

@media (max-width: 640px) {
  .faq-controls { flex-direction: column; width: 100%; }
  .faq-search { min-width: 100%; }
  .faq-btn { width: 100%; }
}

/* ---------- FAQ List ---------- */
.faq-list {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
details.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}
details.faq-item:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Question Row ---------- */
summary.faq-q {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  color: var(--ink);
  line-height: 1.4;
  transition: background-color 0.2s ease;
}
summary.faq-q::-webkit-details-marker { display: none; }
summary.faq-q:hover { background-color: #f8fafc; }

/* Caret */
.caret {
  margin-top: 4px;
  width: 12px; height: 12px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
details[open] .caret { transform: rotate(45deg); }

/* ---------- Answer ---------- */
.faq-a {
  padding: 0 24px 24px 52px;
  color: var(--ink-light);
  font-size: 1rem;
  line-height: 1.7;
}
.faq-a strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Empty State ---------- */
.faq-empty {
  display: none;
  text-align: center;
  padding: 40px 24px;
  color: var(--muted);
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: #f8fafc;
  font-size: 1.1rem;
}
.faq-empty::before {
  content: "🔍";
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
}

/* ---------- Category Badges (Optional) ---------- */
.category-badge {
  display: inline-block;
  padding: 4px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.category-process { background: var(--brand); }
.category-preparation { background: var(--brand-2); }
.category-policy { background: var(--success); }
