/* =========================
   CCI FAQ
   Accessible accordion. Closed items are simple divider rows; the open item
   becomes a bordered card. The trigger carries a blue rounded-square +/-
   toggle. Answers stay in the DOM (visible without JS) so they're crawlable.
========================= */

.cci-faq {
  --cci-faq-bg: #010F22;          /* open-card fill */
  --cci-faq-border: #00264C;      /* open-card border */
  --cci-faq-divider: #1b2b47;     /* divider under closed rows */
  --cci-faq-toggle-bg: #0d2b54;   /* +/- button square fill */
  --cci-faq-toggle-icon: #005195; /* +/- strokes */
  --cci-faq-q: #ffffff;           /* question colour */
  --cci-faq-a: #d3d3d3;           /* answer colour */

  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

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

/* Inner wrapper: holds the Content Max Width and centres the content while the
   section background stays full width. */
.cci-faq__inner {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* -------- Heading (off by default; styled if enabled) -------- */
.cci-faq__heading {
  margin: 0 0 32px;
  font-family: "Inter", sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  text-align: center;
  color: #ffffff;
}

/* -------- List -------- */
.cci-faq__list {
  display: flex;
  flex-direction: column;
}

/* -------- Item: closed = divider row -------- */
.cci-faq__item {
  padding: 32px 0;
  margin: 0 40px;
  border-bottom: 1px solid var(--cci-faq-divider);
  transition: background-color 0.25s ease, border-color 0.25s ease,
    margin 0.25s ease;
}

.cci-faq__item:last-child {
  border-bottom: 0;
}

/* Drop the divider on the row directly above an open card so its own border
   isn't doubled up by the divider line. */
.cci-faq__item:has(+ .cci-faq__item.is-open) {
  border-bottom: 0;
}

/* -------- Item: open = bordered card -------- */
.cci-faq__item.is-open {
  background-color: var(--cci-faq-bg);
  border: 1px solid var(--cci-faq-border);
  border-radius: 12px;
  margin: 0;
  padding: 40px;
}

/* -------- Question / trigger -------- */
.cci-faq__question {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.cci-faq__trigger {
  position: relative;
  display: block;
  width: 100%;
  /* Right padding reserves room for the absolutely-positioned toggle, so the
     question text can never run underneath it regardless of flex support. */
  padding: 0 64px 0 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: var(--cci-faq-q);
}

/* Defensive: Elementor's global kit styles target every <button> (incl. the
   FAQ trigger), overriding its layout (display/padding) and adding a fill,
   colour and radius on hover/focus. Scope under .cci-faq to outrank
   `.elementor-kit-NN button` and keep the reserved padding + flat look in
   every state. */
.cci-faq .cci-faq__trigger,
.cci-faq .cci-faq__trigger:hover,
.cci-faq .cci-faq__trigger:focus,
.cci-faq .cci-faq__trigger:active {
  display: block !important;
  padding: 0 64px 0 0 !important;
  white-space: normal !important;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--cci-faq-q);
}

.cci-faq__q-text {
  display: block;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* -------- +/- square toggle -------- */
/* Absolutely positioned at the top-right of the trigger, inside the reserved
   padding, so it sits clear of the (wrapping) question text. */
.cci-faq__icon {
  position: absolute;
  top: 16px; /* half the 32px line-height: centres on the first line */
  right: 0;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--cci-faq-toggle-bg);
  transition: background-color 0.25s ease;
}

.cci-faq__icon::before,
.cci-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: var(--cci-faq-toggle-icon);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.cci-faq__icon::before {
  width: 16px;
  height: 2px;
} /* horizontal stroke */

.cci-faq__icon::after {
  width: 2px;
  height: 16px;
} /* vertical stroke -> makes a + */

/* Open/active: invert to a white square so the #005195 minus stands out. */
.cci-faq__item.is-open .cci-faq__icon {
  background-color: #ffffff;
}

/* Open: hide the vertical stroke so it reads as a - */
.cci-faq__item.is-open .cci-faq__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

/* -------- Answer panel -------- */
.cci-faq__answer {
  padding: 0 32px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--cci-faq-a);
}

/* When JS is active the panel animates open/closed via max-height. */
.cci-faq.js-ready .cci-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* The open card carries the 40px padding itself, so the answer sits flush,
   with a 24px gap below the question. */
.cci-faq.js-ready .cci-faq__item.is-open .cci-faq__answer {
  padding: 0;
  margin-top: 24px;
}

/* No-JS / pre-hydration fallback: keep answers visible (and crawlable). */
.cci-faq:not(.js-ready) .cci-faq__answer {
  padding: 0 32px 28px;
}

.cci-faq__answer > :first-child {
  margin-top: 0;
}

.cci-faq__answer > :last-child {
  margin-bottom: 0;
}

.cci-faq__answer a {
  color: #d3a64b;
}

.cci-faq__answer a:hover,
.cci-faq__answer a:focus {
  color: #a47910;
}

.cci-faq__answer strong,
.cci-faq__answer b {
  color: #ffffff;
}

/* -------- Support line (sits directly under the heading) -------- */
.cci-faq__support {
  margin: 0 0 40px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: #ffffff;
}

.cci-faq .cci-faq__support-link {
  color: inherit;
  text-decoration: underline;
}

.cci-faq .cci-faq__support-link:hover,
.cci-faq .cci-faq__support-link:focus {
  color: #a47910;
  text-decoration: underline;
}

/* -------- Tablet (<=1024px) -------- */
@media screen and (max-width: 1024px) {
  .cci-faq__heading {
    font-size: 32px;
    line-height: 40px;
  }

  .cci-faq__support {
    font-size: 16px;
    line-height: 24px;
  }

  .cci-faq__trigger {
    padding-right: 52px;
    font-size: 18px;
    line-height: 28px;
    font-weight: 600;
  }

  .cci-faq .cci-faq__trigger {
    padding: 0 52px 0 0 !important;
  }

  .cci-faq__item {
    padding: 24px 0;
    margin: 0 24px;
  }

  .cci-faq__item.is-open {
    padding: 32px 24px;
  }

  .cci-faq__icon {
    top: 14px; /* half the 28px mobile line-height */
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .cci-faq__answer {
    font-size: 16px;
    line-height: 24px;
  }
}

/* -------- Mobile (<=767px) -------- */
@media screen and (max-width: 767px) {
  .cci-faq__heading {
    font-size: 28px;
    line-height: 36px;
  }

  .cci-faq__support {
    margin-bottom: 32px;
  }
}
