/* ==========================================================================
   FAQ page (measured on live nafas.com/faq; Framer component framer-169zv1h)
   Breakpoints: desktop >= 1440, tablet 810-1439.98, phone <= 809.98.
   - Page: black. Section top padding = nav height + 32 / 0 / 0 (112 / 100 / 80), bottom 100 / 0 / 0.
   - Desktop: row, gap 100, padding 50. Left column (flex 1, sticky top 0): an invisible 52px "A" (black on
     black on live, it only takes space), gap 50, then the category list (240 wide, gap 40, 32/38.4).
     Right column: heading 52/62.4, gap 50, accordion panel 1000 wide.
   - Tablet: gap 20, padding 30, left column 133 wide (categories gap 30, 21/25.2), heading 48/57.6 fills the
     column, panel 582 wide.
   - Phone: column, gap 30, padding 30/30/50: heading 32/38.4, categories (padding 10 0, gap 20), panel 100%.
   - Panel: black, radius 20, padding 0 20, overflow hidden. Items: question row padding 20 0, gap 24, 24/30
     Medium; a 16x2 bar as the icon (one bar only on live, also when open); 1px #9e9e9e bottom line on every item
     but the last; near-invisible 1px "Line" rows (1px each): category 1 after items 1 and 2, categories 2-4 two at
     the end, category 5 none. Tablet: only category 1's panel is 582 wide, the others fill the column.
   - Answer: padding 0 20 20 0, gap 20, 21/1.4 (tablet 18, phone 16), pre-wrap; "Access Form" pill 35 high,
     padding 0 16, radius 32, 1px white outline, 15/18 white, no hover.
   - Categories: white, active and hover #91c851. Accordion items toggle on their own; open states stay by
     position when the category changes (js/10-faq.js), and the panel height animates with the item spring.
   ========================================================================== */

/* ---------- base (desktop >= 1440) ---------- */
.nf-faq {
  /* Framer layout spring of the accordion item height (same component as the residential FAQ, ~0.54s) */
  --nf-faq-dur: 540ms;
  --nf-faq-ease: linear(0, 0.078 3.3%, 0.19 6.3%, 0.307 9.4%, 0.427 12.4%, 0.53 15.6%, 0.624 18.7%, 0.703 21.9%, 0.764 24.8%, 0.816 28%, 0.858 31.1%, 0.891 34.4%, 0.916 37.2%, 0.935 40.6%, 0.95 43.3%, 0.962 46.5%, 0.971 49.4%, 0.978 52.6%, 0.983 55.6%, 0.987 58.7%, 0.99 61.9%, 0.993 65.4%, 0.997 74.1%, 0.9985 83.3%, 1);
  position: relative; width: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 112px 0 100px; background-color: var(--nf-black);
}
.nf-faq__comp {
  position: relative; width: 100%; max-width: 1440px; display: flex; flex-direction: row; justify-content: center;
  align-items: flex-start; gap: 100px; padding: 50px;
}
.nf-faq__side {
  position: sticky; top: 0; z-index: 1; flex: 1 0 0px; width: 1px; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; gap: 50px;
}
.nf-faq__ghost, .nf-faq__title-box { position: relative; flex: 0 0 auto; width: auto; white-space: pre; }
.nf-faq__ghost-text, .nf-faq__title {
  white-space: pre; font-family: var(--nf-font-medium); font-weight: 400; font-size: 52px; line-height: 62.4px;
  letter-spacing: normal; text-align: left;
}
.nf-faq__ghost-text { color: var(--nf-black); user-select: none; -webkit-user-select: none; }
.nf-faq__title { color: var(--nf-white); }
.nf-faq__cats {
  position: relative; z-index: 1; flex: 0 0 auto; width: 240px; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; gap: 40px; overflow: hidden;
}
.nf-faq__cat { position: relative; width: 100%; display: flex; flex-direction: column; gap: 10px; cursor: pointer; overflow: hidden; }
.nf-faq__cat:focus { outline: none; }
.nf-faq__cat:focus-visible { outline: 1px solid var(--nf-green); outline-offset: 2px; }
.nf-faq__cat-text {
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; font-family: var(--nf-font-regular);
  font-weight: 400; font-size: 32px; line-height: 38.4px; letter-spacing: normal; color: var(--nf-white); text-align: left;
  transition: color var(--nf-faq-dur) var(--nf-faq-ease);  /* live: colour spring, ~90% at 190ms, settled by 400ms */
}
.nf-faq__cat.is-active .nf-faq__cat-text { color: var(--nf-green); }
@media (hover: hover) { .nf-faq__cat:hover .nf-faq__cat-text { color: var(--nf-green); } }

.nf-faq__main { position: relative; flex: 0 0 auto; width: min-content; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 50px; }
.nf-faq__panels { position: relative; flex: 0 0 auto; width: 1000px; overflow: hidden; }
.nf-faq__panel {
  position: relative; width: 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
  padding: 0 20px; background-color: var(--nf-black); border-radius: 20px; overflow: hidden;
}
.nf-faq__panel[hidden] { display: none; }

.nf-faq__item { position: relative; flex: 0 0 auto; width: 100%; display: flex; flex-direction: column; overflow: hidden; }
.nf-faq__item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; box-sizing: border-box;
  border: 0 solid #9e9e9e; border-bottom-width: 1px;
}
.nf-faq__item--last::after { border-bottom-width: 0; }
.nf-faq__line { position: relative; flex: 0 0 auto; width: 100%; height: 1px; background-color: rgba(0, 0, 0, 0.05); overflow: hidden; }
.nf-faq__q {
  position: relative; flex: 0 0 auto; width: 100%; display: flex; flex-direction: row; justify-content: flex-start;
  align-items: center; gap: 24px; padding: 20px 0; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.nf-faq__q:focus { outline: none; }
.nf-faq__q:focus-visible { outline: 1px solid var(--nf-green); outline-offset: -1px; }
.nf-faq__q-box { position: relative; flex: 1 0 0px; width: 1px; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
.nf-faq__q-text {
  white-space: pre-wrap; font-family: var(--nf-font-medium); font-weight: 500; font-size: 24px; line-height: 1.25;
  letter-spacing: normal; color: var(--nf-black); text-align: left;
}
.nf-faq__icon { position: relative; z-index: 1; flex: 0 0 auto; width: 16px; height: 16px; overflow: hidden; }
.nf-faq__bar { position: absolute; top: calc(50% - 1px); left: calc(50% - 8px); width: 16px; height: 2px; border-radius: 10px; background-color: var(--nf-black); }

.nf-faq__a { display: none; position: relative; flex: 0 0 auto; width: 100%; flex-direction: column; align-items: flex-start; gap: 20px; padding: 0 20px 20px 0; }
.nf-faq__item.is-open .nf-faq__a, .nf-faq__item.is-anim .nf-faq__a { display: flex; }
.nf-faq__a-box { position: relative; flex: 0 0 auto; width: 100%; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
.nf-faq__a-text {
  white-space: pre-wrap; font-family: var(--nf-font-regular); font-weight: 400; font-size: 21px; line-height: 1.4;
  letter-spacing: normal; color: var(--nf-black); text-align: left;
}
.nf-faq__btn-box { position: relative; flex: 0 0 auto; }
.nf-faq__btn {
  position: relative; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 4px;
  height: 35px; padding: 0 16px; border-radius: 32px; background-color: transparent;
}
.nf-faq__btn::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--nf-white); border-radius: 32px; pointer-events: none; }
.nf-faq__btn-text { white-space: pre; font-family: var(--nf-font-regular); font-weight: 400; font-size: 15px; line-height: 1.2; color: var(--nf-white); }

/* ---------- tablet 810-1439.98 ---------- */
@media (min-width: 810px) and (max-width: 1439.98px) {
  .nf-faq { padding: 100px 0 0; }
  .nf-faq__comp { max-width: none; gap: 20px; padding: 30px; }
  .nf-faq__side { flex: 0 0 auto; width: 133px; }
  .nf-faq__cats { width: 133px; gap: 30px; }
  .nf-faq__cat-text { font-size: 21px; line-height: 25.2px; }
  .nf-faq__main { flex: 1 0 0px; width: 1px; }
  .nf-faq__title-box { width: 100%; white-space: pre-wrap; }
  .nf-faq__title { font-size: 48px; line-height: 57.6px; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
  .nf-faq__panels { width: 100%; }
  .nf-faq__panel[data-nf-faq-panel="0"] { width: 582px; }  /* live: only the first category is fixed at 582 */
  .nf-faq__a-text { font-size: 18px; }
}

/* ---------- phone <= 809.98 ---------- */
@media (max-width: 809.98px) {
  .nf-faq { padding: 80px 0 0; }
  .nf-faq__comp { max-width: none; flex-direction: column; justify-content: flex-start; gap: 30px; padding: 30px 30px 50px; }
  .nf-faq__side, .nf-faq__main { display: contents; }
  .nf-faq__ghost { display: none; }
  .nf-faq__title-box { order: 1; width: 100%; white-space: pre-wrap; }
  .nf-faq__title { font-size: 32px; line-height: 38.4px; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
  .nf-faq__cats { order: 2; width: 100%; gap: 20px; padding: 10px 0; }
  .nf-faq__cat-text { font-size: 21px; line-height: 25.2px; }
  .nf-faq__panels { order: 3; width: 100%; }
  .nf-faq__a-text { font-size: 16px; }
}

/* ---------- Danny's fix (2026-10-23), not on live ----------
   Live draws the questions, answers and the icon bar black on the black page, so the FAQ cannot be read.
   Ours uses white, like the EcoFlow FAQ on black. Layout and everything else stay as live. */
.nf-faq__q-text, .nf-faq__a-text { color: var(--nf-white); }
.nf-faq__bar { background-color: var(--nf-white); }

/* ---------- Live search (Danny, 2026-10-23), not on live ----------
   A search field under the heading filters the questions of every category as you type (js/10-faq.js): matching
   questions show grouped under their category name, the matched words turn green, answers that hold the match open.
   Desktop / tablet: 54 high, 30 under the heading (main gap 50 - 20), so the category list moves down by the same
   84px to stay level with the panel. Phone: 48 high, between the heading and the categories. */
.nf-faq__search {
  position: relative; flex: 0 0 auto; width: 100%; height: 54px; margin-top: -20px; display: flex; flex-direction: row;
  align-items: center; gap: 12px; padding: 0 12px 0 20px; border-radius: 32px; background-color: #1f1d20; color: var(--nf-white);
}
.nf-faq__search:focus-within { outline: 1px solid var(--nf-green); outline-offset: 0; }
.nf-faq__search-icon { flex: 0 0 auto; width: 24px; height: 24px; }
.nf-faq__search-input {
  flex: 1 0 0px; width: 1px; height: 100%; padding: 0; border: 0; background: transparent; color: var(--nf-white);
  font-family: var(--nf-font-regular); font-weight: 400; font-size: 18px; line-height: 1.2; letter-spacing: normal;
  -webkit-appearance: none; appearance: none; outline: none;
}
.nf-faq__search-input::placeholder { color: var(--nf-grey-9e); opacity: 1; }
.nf-faq__search-input::-webkit-search-cancel-button, .nf-faq__search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.nf-faq__search-clear {
  flex: 0 0 auto; width: 36px; height: 36px; display: flex; justify-content: center; align-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--nf-white); cursor: pointer;
}
.nf-faq__search-clear[hidden] { display: none; }
.nf-faq__search-clear svg { width: 24px; height: 24px; }
.nf-faq__search-clear:focus { outline: none; }
.nf-faq__search-clear:focus-visible { outline: 1px solid var(--nf-green); }
@media (hover: hover) { .nf-faq__search-clear:hover { color: var(--nf-green); } }
.nf-faq__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nf-faq__cats { margin-top: 84px; }

/* results: every category with a hit, its name above its questions; the near-invisible line rows step aside */
.nf-faq__group { display: none; }
.nf-faq.is-searching .nf-faq__group {
  display: block; width: 100%; padding: 24px 0 4px; font-family: var(--nf-font-regular); font-weight: 400;
  font-size: 16px; line-height: 1.2; color: var(--nf-grey-9e);
}
.nf-faq.is-searching .nf-faq__line, .nf-faq__item[hidden] { display: none; }
.nf-faq.is-searching .nf-faq__panel { width: 100%; }
.nf-faq.is-searching .nf-faq__item::after { border-bottom-width: 1px; }
.nf-faq.is-searching .nf-faq__item.is-tail::after { border-bottom-width: 0; }
.nf-faq.is-searching .nf-faq__cat.is-active .nf-faq__cat-text { color: var(--nf-white); }
@media (hover: hover) { .nf-faq.is-searching .nf-faq__cat:hover .nf-faq__cat-text { color: var(--nf-green); } }
.nf-faq__hit { background: none; color: var(--nf-green); }

.nf-faq__empty { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 20px; }
.nf-faq__empty[hidden] { display: none; }
.nf-faq__empty-text { font-family: var(--nf-font-regular); font-weight: 400; font-size: 21px; line-height: 1.4; color: var(--nf-white); }
/* Tier 1 CTA (green pill, black text) to the region's WhatsApp: the build sets the number and "I'm from <country>" */
.nf-faq__empty-btn {
  display: inline-flex; justify-content: center; align-items: center; height: 54px; max-width: 360px; padding: 0 24px;
  border-radius: 32px; background-color: var(--nf-green); color: var(--nf-black); text-decoration: none; white-space: nowrap;
  font-family: var(--nf-font-medium); font-weight: 500; font-size: 15px; line-height: 1.2;
  transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1), opacity 200ms cubic-bezier(0.25, 1, 0.5, 1);
}
@media (hover: hover) { .nf-faq__empty-btn:hover { opacity: 0.9; } }
.nf-faq__empty-btn:active { transform: scale(0.97); }
.nf-faq__empty-btn:focus { outline: none; }
.nf-faq__empty-btn:focus-visible { outline: 2px solid var(--nf-green); outline-offset: 2px; }

@media (min-width: 810px) and (max-width: 1439.98px) {
  .nf-faq__empty-text { font-size: 18px; }
}
@media (max-width: 809.98px) {
  .nf-faq__search { order: 2; height: 48px; margin-top: 0; padding: 0 8px 0 16px; }
  .nf-faq__search-input { font-size: 16px; }  /* 16 or more, or iOS Safari zooms in on focus */
  .nf-faq__cats { order: 3; margin-top: 0; }
  .nf-faq.is-searching .nf-faq__cats { display: none; }  /* results right under the field, above the keyboard */
  .nf-faq__panels { order: 4; }
  .nf-faq__empty { padding: 20px 0; }
  .nf-faq__empty-text { font-size: 16px; }
  .nf-faq__empty-btn { height: 44px; padding: 0 16px; }
}

/* Plus when closed, minus when open (QC 2026-10-28; live shows the single bar, a minus, in both states). The vertical
   bar folds away as the question opens. */
.nf-faq__icon::after {
  content: ""; position: absolute; top: calc(50% - 8px); left: calc(50% - 1px); width: 2px; height: 16px;
  border-radius: 10px; background-color: var(--nf-white); transition: transform 0.25s ease;
}
.nf-faq__item.is-open .nf-faq__icon::after { transform: scaleY(0); }
@media (prefers-reduced-motion: reduce) { .nf-faq__icon::after { transition: none; } }

/* Tablet: the questions fill the width next to the categories, and the category column grows with the screen
   (QC 2026-10-28; live fixes it at 133px, so "About the Nafas Residential Service" ran to 4 lines, and fixes the
   first category's questions at 582px, half the width at 1280). */
@media (min-width: 810px) and (max-width: 1439.98px) {
  .nf-faq__side, .nf-faq__cats { width: clamp(160px, 19vw, 240px); }
  .nf-faq__panel[data-nf-faq-panel="0"] { width: 100%; }
}
