/* SCC FAQ */
.scc-faq {
  padding: 4.5rem 0;
  background: var(--scc-off-white);
}
/*
 * Lock the section background on hover.
 * When any child (e.g. the <button>) is hovered, the CSS :hover pseudo-class
 * also fires on every ancestor including this <section>. If a Kadence theme
 * rule applies a background-color on :hover to .wp-block or button elements,
 * it can propagate visually. This rule prevents that.
 */
.wp-block-scc-faq.scc-faq:hover,
.scc-faq:hover {
  background-color: var(--scc-off-white);
}

.scc-faq__header {
  text-align: center;
  margin-bottom: 3rem;
}
.scc-faq__header .scc-section-label { justify-content: center; }
.scc-faq__list { max-width: 780px; margin: 0 auto; }

/* Accordion items */
.scc-faq__item {
  border-bottom: 1px solid rgba(14,75,100,0.08);
  background: transparent;
}
.scc-faq__item:first-child { border-top: 1px solid rgba(14,75,100,0.08); }
/* Prevent any theme :hover rule from adding a background to items */
.scc-faq__item:hover { background: transparent; }

.scc-faq__question {
  list-style: none;
  width: 100%;
  background: none;
  background-color: transparent; /* explicit — prevents shorthand override */
  border: none;
  cursor: pointer;
  font-family: var(--scc-font);
  font-size: calc(1.1rem * var(--ts, 1));
  font-weight: 500;
  color: var(--scc-teal-dark);
  text-align: left;
  padding: 1rem 2.5rem 1rem 0;
  position: relative;
  transition: color 0.25s ease;
  display: block;
  line-height: 1.5;
  outline: none;
}
/*
 * More specific selector (0,3,0) beats Kadence's generic button:hover (0,2,1).
 * Also resets background explicitly so no theme rule can inject a bg-color.
 */
.scc-faq__item .scc-faq__question:hover {
  color: var(--scc-teal-light);
  background: none;
  background-color: transparent;
}
/* Kill any inherited :focus / :active background from themes */
.scc-faq__item .scc-faq__question:focus,
.scc-faq__item .scc-faq__question:active,
.scc-faq__item .scc-faq__question:focus-visible {
  background: none;
  background-color: transparent;
  outline: none;
  box-shadow: none;
}
/* Keyboard focus keeps a visible ring. It used to be switched off here along
   with the theme's background, and the click handler blurred the button, so a
   keyboard user lost track of which question they were on. Same (0,3,0)
   specificity as the reset above and later in the file, so it wins. */
.scc-faq__item .scc-faq__question:focus-visible {
  outline: 3px solid var(--scc-teal, #0e4b64);
  outline-offset: 2px;
}

.scc-faq__question::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230e4b64' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.3s var(--scc-ease);
}
.scc-faq__question::-webkit-details-marker { display: none; }
.scc-faq__item[open] .scc-faq__question { color: var(--scc-teal); }
.scc-faq__item[open] .scc-faq__question::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Items are <details> (1.46.0): the browser hides a closed answer, keeps it
   out of the tab order, and still finds it with Find in page. The old
   max-height + visibility mechanics and the accordion script are gone. */
.scc-faq__answer { overflow: hidden; }
.scc-faq__answer-inner {
  padding: 0 0 1.15rem;
  font-size: calc(1rem * var(--ts, 1)); line-height: 1.65;
  font-weight: 300;
  color: var(--scc-text-secondary);
  line-height: 1.8;
  font-family: var(--scc-font);
}
.scc-faq__answer-inner a {
  color: var(--scc-teal);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(14,75,100,0.2);
  transition: border-color 0.25s ease;
}
.scc-faq__answer-inner a:hover { border-color: var(--scc-teal); }

/*
 * Prefix with .wp-block-scc-faq to beat Kadence's .entry-content p margin
 * rules (specificity 0,1,1) that can collapse the gap between the list and
 * contact text. Our prefixed rule sits at (0,2,0) and always wins.
 */
.wp-block-scc-faq .scc-faq__contact {
  text-align: center;
  margin-top: 3rem;     /* extra breathing room below the last FAQ item border */
  font-size: calc(1rem * var(--ts, 1));
  font-weight: 300;
  color: var(--scc-text-secondary);
  font-family: var(--scc-font);
}
.wp-block-scc-faq .scc-faq__contact a {
  color: var(--scc-teal);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(14,75,100,0.2);
  transition: border-color 0.25s ease;
}
.wp-block-scc-faq .scc-faq__contact a:hover {
  border-color: var(--scc-teal);
  color: var(--scc-teal); /* prevent Kadence a:hover from overriding */
  text-decoration: none;
}

@media (max-width: 768px) {
  .scc-faq { padding: 3.5rem 0; }
}


/* Open/close animation where the browser can animate to height: auto
   (::details-content + interpolate-size). Elsewhere, and with reduced motion,
   answers open instantly. allow-discrete sits in its own declaration so a
   browser that doesn't know it still keeps the transition. */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .scc-faq { interpolate-size: allow-keywords; }
    .scc-faq__item::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size .35s var(--scc-ease, ease), content-visibility .35s;
      transition-behavior: allow-discrete;
    }
    .scc-faq__item[open]::details-content { block-size: auto; }
  }
}

/* ── Ruled look (is-style-ruled) ──
   White, left-aligned. Heading under the section rule with the contact line
   below it in a left column; questions on the right with square +/- boxes.
   em sizes follow the block's font size. */
.scc-faq.is-style-ruled,
.wp-block-scc-faq.scc-faq.is-style-ruled:hover {
  container: scc-faq / inline-size;
  padding: var(--scc-block-pad, var(--scc-sec, clamp(3rem, 7vw, 5.5rem))) 0;
  background: transparent;
  color: var(--scc-ink, #1c2a31);
  font-size: 1.125rem;
  line-height: 1.6;
}
.scc-faq.is-style-ruled .scc-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "list" "more";
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  max-width: var(--scc-inner, 82rem);
  padding: 0 var(--scc-gutter, clamp(1rem, 4vw, 3rem));
}
.scc-faq.is-style-ruled .scc-faq__header { grid-area: head; margin: 0; text-align: start; }
.scc-faq.is-style-ruled .scc-section-title {
  margin: 0;
  padding-top: 1.1rem;
  border-top: 8px solid var(--scc-rule-color, var(--scc-teal-light, #1e6685));
  color: var(--scc-teal, #0e4b64);
  font-size: clamp(1.778em, 4.2vw, 2.756em);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.scc-faq.is-style-ruled .scc-faq__list {
  grid-area: list;
  max-width: none;
  margin: 1.75rem 0 0;
  border-top: 2px solid var(--scc-teal, #0e4b64);
}
.scc-faq.is-style-ruled .scc-faq__item { border-bottom: 1px solid var(--scc-rule, rgba(14, 75, 100, .18)); }
.scc-faq.is-style-ruled .scc-faq__item:first-child { border-top: 0; }
.scc-faq.is-style-ruled .scc-faq__question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  align-items: start;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 1rem 0;
  color: var(--scc-teal, #0e4b64);
  font-size: 1.022em;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: break-word;
}
.scc-faq.is-style-ruled .scc-faq__question::after {
  content: "+";
  position: static;
  display: grid;
  place-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: -.3rem;
  transform: none;
  background: none;
  box-shadow: inset 0 0 0 2px var(--scc-teal, #0e4b64);
  color: var(--scc-teal, #0e4b64);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}
.scc-faq.is-style-ruled .scc-faq__item[open] .scc-faq__question::after {
  content: "\2212";
  transform: none;
  background: var(--scc-teal, #0e4b64);
  color: #fff;
}
.scc-faq.is-style-ruled .scc-faq__item .scc-faq__question:hover { color: var(--scc-magenta, #c11f70); }
.scc-faq.is-style-ruled .scc-faq__item .scc-faq__question:hover::after { box-shadow: inset 0 0 0 2px var(--scc-magenta, #c11f70); }
.scc-faq.is-style-ruled .scc-faq__item .scc-faq__question:focus-visible { outline: 3px solid var(--scc-magenta, #c11f70); outline-offset: 3px; }
.scc-faq.is-style-ruled .scc-faq__answer-inner {
  max-width: 40em;
  padding: 0 3.25rem 1.25rem 0;
  color: inherit;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.scc-faq.is-style-ruled .scc-faq__answer-inner p { margin: 0; }
.scc-faq.is-style-ruled .scc-faq__answer-inner p + p { margin-top: .6rem; }
.scc-faq.is-style-ruled a,
.wp-block-scc-faq.is-style-ruled .scc-faq__contact a {
  color: var(--scc-teal, #0e4b64);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .18em;
  border-bottom: 0;
}
.scc-faq.is-style-ruled a[href^="tel:"] { white-space: nowrap; }
.scc-faq.is-style-ruled a:hover { color: var(--scc-magenta, #c11f70); }
.wp-block-scc-faq.is-style-ruled .scc-faq__contact {
  grid-area: more;
  overflow-wrap: anywhere;
  max-width: 26rem;
  margin: 1.5rem 0 0;
  color: var(--scc-muted, #3c4a50);
  font-size: 1em;
  font-weight: 400;
  text-align: start;
}
@container scc-faq (max-width: 37.5rem) {
  .scc-faq.is-style-ruled .scc-faq__answer-inner { padding-right: 0; }
}
@container scc-faq (min-width: 56rem) {
  .scc-faq.is-style-ruled .scc-container {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "head list" "more list";
    align-items: start;
  }
  .scc-faq.is-style-ruled .scc-faq__list { margin-top: 0; }
}
/* A text color set on the block (block supports) reaches the muted closing
   line too; questions and the heading keep their teal. */
.wp-block-scc-faq.is-style-ruled.has-text-color .scc-faq__contact { color: inherit; }
