/* Shared layout safeguards. Page-specific design rules remain in templates/. */

/* Match the templates' intended dark label on their white quote buttons. */
.qa-template-readiness-review .btn.white,
.qa-template-gap-analysis .btn.white {
  color: var(--ink);
}

body.page-template-template-readiness-review #myHeader {
  position: sticky !important;
  top: var(--wp-admin--admin-bar--height, 0px) !important;
}

body.page-template-template-readiness-review .qa-template-readiness-review {
  padding-top: 0 !important;
}
/* Keep both contact regions readable before the mobile navigation breakpoint. */
@media (min-width: 992px) and (max-width: 1399px) {
  #myHeader .headertopbar {
    align-items: center;
    gap: 20px;
  }

  #myHeader .headertopbarLeft {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    flex: 1;
    min-width: 0;
    column-gap: 10px;
    row-gap: 6px;
  }

  #myHeader .headertopbarLeft > a {
    min-width: 0;
    white-space: nowrap;
  }

  #myHeader .headertopbarLeft > a img {
    flex-shrink: 0;
  }

  #myHeader .headertopbarLeft > span:nth-of-type(2),
  #myHeader .headertopbarLeft > span:nth-of-type(3),
  #myHeader .headertopbarLeft > span:nth-of-type(5) {
    display: none;
  }

  #myHeader .headertopbarright {
    flex-shrink: 0;
  }
}

/* Long contact addresses must fit the footer's existing columns. */
.FooterOutrWrp .footer-info,
.FooterOutrWrp .ftrTxtCnt {
  min-width: 0;
  max-width: 100%;
}

.FooterOutrWrp .ftrTxtCnt a {
  overflow-wrap: anywhere;
}

.FooterOutrWrp .ftrIcn {
  flex-shrink: 0;
}

/* The existing certificate link is fixed to the bottom on small phones. */
@media (max-width: 480px) {
  .FooterOutrWrp .footerLeft {
    padding-bottom: 48px;
  }
}

/* Service pages use light cards within dark sections. */
body .qa-template-page .section.dark .check > div { color: #e4eef6; }
body .qa-template-page .section.dark .check b { color: white; }
body .qa-template-page .integration-quote-panel p.integration-copy { color: #415364 !important; }
body .qa-template-page :is(.checkbox, .reportbox, .scorebox) h3 { color: #274165 !important; }

:is(.page-template-template-signature-iso-consulting, .page-template-template-internal-audits,
    .page-template-template-readiness-review, .page-template-template-gap-analysis) .qa-template-page {
  & :is(.arrow, .tick, .choose a, .checkline strong, .scoreline strong, .reportline strong, .stars, .num),
  & :is(.qa-template-readiness-review, .qa-template-gap-analysis) .eyebrow { color: #a33d0a; }
  & .dot { color: #126c4a; }
  & .btn:is(.primary, .orange) { background-color: #b24409; color: white; }
  & :is(.cta, .finalcheck, .report, .score, .visual-band, .featured) :is(.eyebrow, .num, .iso-internal-audit-link),
  & .quote-mark { color: #ffbb89; }
}
body :is(.qa-template-internal-audits, .qa-template-gap-analysis, .qa-template-readiness-review) .eyebrow { color: #a33d0a; }
body :is(.qa-template-internal-audits, .qa-template-gap-analysis, .qa-template-readiness-review) :is(.hero, .cta, .report, .score, .finalcheck, .visual-band) .eyebrow { color: #ffbb89; }
body.page-template-template-gap-analysis .qa-template-page .hero .eyebrow,
body.page-template-template-signature-iso-consulting .qa-template-page .quote-panel .quote-mark { color: #ffbb89 !important; }
body.page-template-template-internal-audits .qa-template-page .hero { background-color: #274165; }
@media (max-width: 360px) { body.page-template-template-readiness-review .qa-template-page .two, body.page-template-template-internal-audits .qa-template-page .two { grid-template-columns: minmax(0, 1fr) !important; } body.page-template-template-readiness-review .qa-template-page .two > *, body.page-template-template-internal-audits .qa-template-page .two > * { min-width: 0; } }

/* Keep each implementation item as one card with a readable text column. */
body.page-template-template-signature-iso-consulting .qa-template-page .included > div > div {
  display: block;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
body.page-template-template-signature-iso-consulting .qa-template-page .included > div > .dot {
  flex: 0 0 auto;
}
body.page-template-template-signature-iso-consulting .qa-template-page .included > div > div > strong,
body.page-template-template-signature-iso-consulting .qa-template-page .included > div > div > span {
  display: block;
}

/* The shared theme's icon-and-text grid does not match these benefit cards. */
body.page-template-template-readiness-review .qa-template-page .benefit,
body.page-template-template-gap-analysis .qa-template-page .benefit {
  display: block;
}

@media (max-width: 360px) {
  body.page-template-template-signature-iso-consulting .qa-template-page .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-template-template-signature-iso-consulting .qa-template-page .hero-grid > * {
    min-width: 0;
  }

  body.page-template-template-signature-iso-consulting .qa-template-page .hero h1 {
    font-size: 2.3rem !important;
  }
}

