/* Shared, visually editable Company-proof and FAQ presentation. */

/* Legacy one-page builds contain their own footer inside editable page content.
   Keep the shared WordPress template footer as the single site-wide footer. */
.wp-block-post-content .gi-vip-footer,
.wp-block-post-content .gi-emp-footer,
.wp-block-post-content .gi-event-footer,
.wp-block-post-content .gi-merch-footer {
  display: none !important;
}

.wp-block-group:has(> .gi-standard-proof-layout),
.wp-block-group:has(> .gi-standard-faq-layout) {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.wp-block-group:has(> .gi-standard-proof-layout) > [class*="-trust"] {
  width: 100% !important;
  max-width: none !important;
}

/* A few visual-editor conversions retained a narrow constrained Group directly
   inside the FAQ section. Widen only that immediate section wrapper. */
[class$="-faq"] > .wp-block-group:has(.gi-standard-faq-layout) {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

[class$="-trustgrid"]:has(.gi-standard-proof-layout) {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 26px !important;
}

[class$="-trustgrid"]:has(.gi-standard-proof-layout) > * { width: 100%; max-width: none; }
[class$="-trustgrid"]:has(.gi-standard-proof-layout) > :has(> .gi-standard-proof-layout) { display: contents !important; }
[class$="-trustgrid"]:has(.gi-standard-proof-layout) > :has(> .gi-standard-proof-layout) > [class$="-kicker"] { order: 1 !important; margin-bottom: -8px !important; }
[class$="-trustgrid"]:has(.gi-standard-proof-layout) > :has(> .gi-standard-proof-layout) > h2 { order: 2 !important; margin-bottom: -8px !important; }
[class$="-trustgrid"]:has(.gi-standard-proof-layout) > :has(> .gi-standard-proof-layout) > p { order: 3 !important; margin-bottom: 0 !important; }
[class$="-trustgrid"]:has(.gi-standard-proof-layout) > :not(:has(> .gi-standard-proof-layout)) { order: 4 !important; }
.gi-standard-proof-layout {
  order: 5 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100%;
  margin-top: 4px !important;
}

.gi-standard-proof-layout > [class$="-trustfact"] {
  padding: 18px 0 !important;
  border: 0 !important;
  border-top: 3px solid #ff9f0a !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.gi-standard-proof-layout > [class$="-trustfact"] h3 {
  display: block;
  margin: 0 0 14px !important;
  color: #0e213a !important;
  font-size: clamp(22px, 2vw, 30px) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
}

.gi-standard-proof-layout > [class$="-trustfact"] p,
.gi-standard-proof-layout > [class$="-trustfact"] span {
  display: block;
  margin: 0 !important;
  color: #0e213a !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

.gi-standard-proof-layout > [class$="-trustfact"] p strong {
  display: inline;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: 800 !important;
  line-height: inherit !important;
}

*:has(> .gi-standard-faq-layout) > [class$="-section-head"] {
  width: min(960px, 100%);
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center;
}

/* The legacy Client/VIP page alone supplied a 645px inner wrapper. Widen that
   specific editable wrapper without shrinking nested FAQ wrappers elsewhere. */
.gi-vip-inner:has(> .gi-standard-faq-layout) {
  width: min(960px, calc(100% - 28px)) !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* The Client/VIP FAQ section itself also carries the old 645px cap. Remove
   that cap only when it contains the standardized editable FAQ layout. */
.gi-vip-section.gi-vip-faq:has(.gi-standard-faq-layout) {
  width: 100% !important;
  max-width: none !important;
}

*:has(> .gi-standard-faq-layout) > [class$="-section-head"] [class$="-kicker"],
*:has(> .gi-standard-faq-layout) > [class$="-kicker"],
*:has(> .gi-standard-faq-layout) > p:has(+ h2 + .gi-standard-faq-layout) {
  color: #a9460a !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
}

*:has(> .gi-standard-faq-layout) > [class$="-section-head"] h2,
*:has(> .gi-standard-faq-layout) > h2:has(+ .gi-standard-faq-layout) {
  margin-top: 18px !important;
  color: #171717 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(42px, 5vw, 72px) !important;
  font-weight: 700 !important;
  line-height: 1.02 !important;
  letter-spacing: -.035em !important;
}

[class$="-bottomgrid"]:has(.gi-standard-faq-layout) {
  grid-template-columns: 1fr !important;
}

.gi-standard-faq-layout {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  width: min(960px, 100%) !important;
  max-width: 960px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* Keep the remaining legacy FAQ wrappers at the same approved width as the
   homepage FAQ while leaving page copy and block structure untouched. */
.gi-wrap.gi-faq:has(> .gi-standard-faq-layout),
.rfq-article:has(.gi-standard-faq-layout),
.giq-wrap:has(.gi-standard-faq-layout) {
  width: min(960px, calc(100% - 28px)) !important;
  max-width: 960px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

.gi-standard-faq-item {
  padding: 0 !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.gi-standard-faq-item summary {
  padding: 10px 0;
  color: #171717;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

.gi-standard-faq-item > p {
  margin: 0 !important;
  padding: 2px 0 14px 19px;
  color: #637188 !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

@media (max-width: 900px) {
  .gi-standard-proof-layout { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 560px) {
  /* Some legacy pages wrap the FAQ section in a padded constrained Group.
     Remove only that redundant outer padding so the visual-editor FAQ aligns
     with the page's standard 14px mobile gutter. */
  .wp-block-group:has(> .gi-standard-faq-layout),
  .wp-block-group:has(> [class*="-faq"] .gi-standard-faq-layout) {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  /* Full-width legacy block wrappers lose their theme padding above. Restore
     the approved 14px content gutter on the FAQ list itself. Pages that
     already use a scoped inner wrapper keep their existing 14–22px gutter. */
  html body.wp-singular.page .entry-content .wp-block-group > .gi-standard-faq-layout,
  html body.wp-singular.page .entry-content .gi-powerbank-guide > .gi-standard-faq-layout {
    width: min(960px, calc(100% - 28px)) !important;
  }

  /* Keep the kicker and heading aligned with those repaired legacy FAQ lists
     instead of letting long centered headings touch both screen edges. */
  html body.wp-singular.page .entry-content .wp-block-group:has(> .gi-standard-faq-layout) > p,
  html body.wp-singular.page .entry-content .wp-block-group:has(> .gi-standard-faq-layout) > h2 {
    width: min(960px, calc(100% - 28px)) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  /* These two approved bottom grids retain a 300px minimum column below the
     browser's 320px test width. Let the FAQ column shrink inside its gutter. */
  .gi-eu-bottomgrid:has(.gi-standard-faq-layout),
  .gi-pkg-bottomgrid:has(.gi-standard-faq-layout) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .gi-standard-proof-layout { grid-template-columns: 1fr !important; }
  .gi-standard-proof-layout > [class$="-trustfact"] { padding-right: 0 !important; padding-left: 0 !important; }
  .gi-standard-faq-item summary { padding: 9px 0; font-size: 16px; }
  .gi-standard-faq-item > p { padding: 2px 0 12px 18px; font-size: 15px !important; }
  *:has(> .gi-standard-faq-layout) > [class$="-section-head"] h2,
  *:has(> .gi-standard-faq-layout) > h2:has(+ .gi-standard-faq-layout) { font-size: 40px !important; }
}
/* Approved desktop hero artwork keeps intentional copy space on the left.
 * On narrow screens, move the crop toward the product grouping so that copy
 * space does not become an empty mobile column. */
@media (max-width: 782px) {
  /* WordPress alignfull uses 100vw, which includes the browser scrollbar and
     made this guide hero seven pixels wider than the mobile document. */
  .page-id-599 .wp-block-group.hero {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  img[src*="-hero-preview-v4"],
  html body.wp-singular.page[class] .entry-content img[src*="-hero-preview-v4"] {
    width: 100% !important;
    height: clamp(300px, 92vw, 400px) !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: 80% 50% !important;
  }

  .giq-hero {
    background-size: cover !important;
    background-position: 80% 50% !important;
  }
}
