/*
 * EVATECH FAQ homepage sync
 * The Homepage FAQ is the visual source of truth on every page that embeds
 * the v4 FAQ component. This file is intentionally loaded LAST on pages with
 * FAQ so legacy configurator / Bootstrap rules cannot change its typography
 * or stretch the topic buttons on mobile.
 */

[data-page="home-v4"] .v4-faq {
  background: var(--home-canvas, #f4f4f2);
  color: #111;
  font-family: "Open Sans", sans-serif;
}

/* Keep the same container geometry as the Homepage FAQ. */
[data-page="home-v4"] .v4-faq > .container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1600px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

[data-page="home-v4"] .v4-faq__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  margin-bottom: 38px;
}

/* Explicit family prevents legacy configurator h2 { font-family:bold; }
   from falling back to a serif face when its old font asset is unavailable. */
[data-page="home-v4"] .v4-faq__head h2 {
  margin: 0;
  color: #111;
  font-family: "Open Sans", sans-serif !important;
  font-size: clamp(62px, 8vw, 116px);
  font-style: normal;
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.08em;
  text-transform: none;
}

[data-page="home-v4"] .v4-faq__head p {
  max-width: 420px;
  margin: 0;
  color: #666;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
}

[data-page="home-v4"] .v4-faq__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 0 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

[data-page="home-v4"] .v4-faq__tabs::-webkit-scrollbar {
  display: none;
}

/* Reset the legacy configurator mobile rule: button {display:block;width:100%}.
   Without this reset the first FAQ topic becomes a full-width pill. */
[data-page="home-v4"] .v4-faq__tabs button {
  display: inline-flex;
  width: auto;
  max-width: none;
  min-height: 43px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 17px;
  border: 1px solid #ddd;
  border-radius: 22px;
  background: #f5f5f3;
  color: #222;
  font: 700 12px/1 Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

[data-page="home-v4"] .v4-faq__tabs button[aria-selected="true"] {
  border-color: #111;
  background: #111;
  color: #fff;
}

[data-page="home-v4"] .v4-faq__tabs button:focus-visible {
  outline: 3px solid #e21d1d;
  outline-offset: 2px;
}

[data-page="home-v4"] .v4-faq__panels {
  border-top: 1px solid #dedede;
}

[data-page="home-v4"] .v4-faq details {
  border-bottom: 1px solid #dedede;
}

[data-page="home-v4"] .v4-faq summary {
  position: relative;
  padding: 24px 54px 24px 0;
  color: #1b1b1b;
  font-family: "Open Sans", sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

[data-page="home-v4"] .v4-faq summary::-webkit-details-marker {
  display: none;
}

[data-page="home-v4"] .v4-faq summary::after {
  content: "+";
  position: absolute;
  top: 17px;
  right: 8px;
  font-family: "Open Sans", sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

[data-page="home-v4"] .v4-faq details[open] summary::after {
  content: "−";
}

[data-page="home-v4"] .v4-faq details p {
  max-width: 760px;
  margin: -8px 0 24px;
  color: #666;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

@media (max-width: 899px) {
  [data-page="home-v4"] .v4-faq__head {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
  }

  /* Matches the current Homepage mobile visual correction. */
  [data-page="home-v4"] .v4-faq__head h2 {
    font-size: 48px;
  }

  [data-page="home-v4"] .v4-faq__head p {
    font-size: 16px;
  }

  [data-page="home-v4"] .v4-faq__tabs {
    margin-right: -15px;
  }

  [data-page="home-v4"] .v4-faq summary {
    padding: 21px 46px 21px 0;
    font-size: 16px;
    line-height: 1.3;
  }
}
