/* QA-QC Practices & HSE Policy page - its own font/colour theme (Inter,
   a lighter green palette, rounded cards), scoped entirely under .qaqc-page
   so nothing here leaks into any other page. The shared site header/footer
   (outside this wrapper, in base.njk) keep their normal look. Adapted from
   the client-supplied page mockup. */

.qaqc-page {
  --qc-green: #2f6b45;
  --qc-green-2: #477d55;
  --qc-green-3: #e5f0e4;
  --qc-ink: #20352a;
  --qc-muted: #617267;
  --qc-paper: #fbfcf9;
  --qc-line: #dce7dc;
  --qc-radius: 22px;
  --qc-shadow: 0 16px 44px rgba(38, 76, 48, 0.08);

  overflow: hidden;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--qc-ink);
  background: var(--qc-paper);
  line-height: 1.55;
}
.qaqc-page * { box-sizing: border-box; }
.qaqc-page a { color: inherit; }
.qaqc-page .wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
/* The global stylesheet sets text-align:justify directly on every <p>,
   which beats inheriting left-alignment from .qaqc-page - same
   explicit-rule-beats-inherited-ancestor issue as the h1-h3 fix above.
   No rule in this file centres any paragraph text, so one blanket
   override here is safe. */
.qaqc-page p { text-align: left; }
.qaqc-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--qc-green);
  font-size: 12.16px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.qaqc-page .eyebrow:before { content: ""; width: 26px; height: 2px; background: var(--qc-green-2); }
.qaqc-page h1,
.qaqc-page h2,
.qaqc-page h3,
.qaqc-page p { margin-top: 0; }
.qaqc-page h1,
.qaqc-page h2,
.qaqc-page h3 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.qaqc-page h1 { font-size: clamp(40.8px, 5.5vw, 80px); max-width: 720px; margin: 18px 0; }
.qaqc-page h2 { font-size: clamp(32px, 4vw, 52px); margin: 14px 0; }
.qaqc-page h3 { font-size: 18.88px; margin: 0 0 9px; }
.qaqc-page .lead { font-size: clamp(16px, 1.4vw, 18.88px); color: var(--qc-muted); max-width: 610px; }
.qaqc-page .section { padding: 86px 0; }
.qaqc-page .section-head { max-width: 720px; margin-bottom: 34px; }
.qaqc-page .section-head p { color: var(--qc-muted); max-width: 610px; margin-bottom: 0; }

.qaqc-page .hero { padding: 32px 0 78px; background: linear-gradient(135deg, #f5f9f2 0%, #edf5e9 62%, #e4efdf 100%); position: relative; }
.qaqc-page .hero:after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(71, 125, 85, 0.16);
  border-radius: 50%;
  right: -140px;
  top: -130px;
  box-shadow: 0 0 0 45px rgba(71, 125, 85, 0.035), 0 0 0 90px rgba(71, 125, 85, 0.025);
  pointer-events: none;
}
.qaqc-page .topline { display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 4px 0 45px; position: relative; z-index: 1; }
.qaqc-page .nav-note { font-size: 12.16px; font-weight: 800; letter-spacing: 0.12em; color: var(--qc-green); }
.qaqc-page .hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 50px; align-items: center; position: relative; z-index: 1; }
/* Grid items default to min-width:auto, which can stop a text-heavy
   column from shrinking below its content's natural (unwrapped) width,
   forcing the grid - and the page - wider than the viewport on narrow
   screens instead of wrapping. min-width:0 on every grid child lets text
   wrap normally at any width. */
.qaqc-page .hero-grid > *,
.qaqc-page .intro-grid > *,
.qaqc-page .lab-grid > * { min-width: 0; }
.qaqc-page .hero-copy { padding: 8px 0; }
.qaqc-page .hero-copy .lead { margin-bottom: 26px; }
.qaqc-page .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.qaqc-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 19px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14.56px;
  font-weight: 750;
  transition: transform 0.2s, background 0.2s;
}
.qaqc-page .btn:hover { transform: translateY(-2px); }
.qaqc-page .btn-primary { background: var(--qc-green); color: white; box-shadow: 0 8px 20px rgba(47, 107, 69, 0.17); }
.qaqc-page .btn-secondary { border: 1px solid #c8d9c7; background: rgba(255, 255, 255, 0.55); color: var(--qc-green); }
.qaqc-page .hero-visual { position: relative; min-height: 450px; }
.qaqc-page .photo-main { position: absolute; inset: 0 30px 28px 0; border-radius: 28px; overflow: hidden; background: #d9e7d3; box-shadow: var(--qc-shadow); }
.qaqc-page .photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qaqc-page .photo-main:after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(25, 56, 35, 0.38)); }
.qaqc-page .photo-caption { position: absolute; z-index: 1; left: 25px; right: 190px; bottom: 24px; color: white; font-weight: 750; font-size: 16px; }
.qaqc-page .floating-note { position: absolute; right: 0; bottom: 0; width: 205px; padding: 20px; background: white; border: 1px solid var(--qc-line); border-radius: var(--qc-radius); box-shadow: var(--qc-shadow); }
.qaqc-page .floating-note strong { display: block; color: var(--qc-green); font-size: 16.48px; margin-bottom: 5px; }
.qaqc-page .floating-note span { font-size: 13.28px; color: var(--qc-muted); }

.qaqc-page .quick-strip { margin-top: -1px; background: white; border-bottom: 1px solid var(--qc-line); }
.qaqc-page .quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.qaqc-page .quick-item { padding: 23px 20px; border-right: 1px solid var(--qc-line); display: flex; gap: 13px; align-items: center; }
.qaqc-page .quick-item:first-child { border-left: 1px solid var(--qc-line); }
.qaqc-page .quick-icon,
.qaqc-page .icon { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 14px; background: var(--qc-green-3); color: var(--qc-green); font-size: 19.2px; }
.qaqc-page .quick-icon svg,
.qaqc-page .icon svg { width: 26px; height: 26px; }
.qaqc-page .quick-item b { display: block; font-size: 14.4px; }
.qaqc-page .quick-item span { display: block; font-size: 12.48px; color: var(--qc-muted); margin-top: 2px; }

.qaqc-page .intro-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 70px; align-items: start; }
.qaqc-page .intro-grid .section-head { margin: 0; }
.qaqc-page .feature-panel { background: #f0f6ed; border: 1px solid #e0ebdd; border-radius: var(--qc-radius); padding: 30px; }
.qaqc-page .feature-panel p { color: var(--qc-muted); margin: 0; }
.qaqc-page .feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.qaqc-page .tag { border: 1px solid #d2e2ce; background: white; color: var(--qc-green); padding: 8px 11px; border-radius: 999px; font-size: 12.8px; font-weight: 700; }

/* auto-fit (not a fixed column count) so a partially-filled grid - e.g.
   just the 2 seeded certificates below - stretches to fill the row
   instead of leaving empty cells, while still wrapping to fewer columns
   automatically as more are added via the CMS or the viewport narrows. */
.qaqc-page .cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 30px; }
.qaqc-page .cert-card { border: 1px solid var(--qc-line); border-radius: var(--qc-radius); background: white; overflow: hidden; }
/* object-fit:contain (not cover) and a tall box so a portrait certificate
   scan shows in full, uncropped, rather than just its cropped middle. */
.qaqc-page .cert-image { height: 320px; background: #eef4ec; padding: 14px; }
.qaqc-page .cert-image-trigger {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.qaqc-page .cert-image-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}
.qaqc-page .cert-image-trigger:hover img,
.qaqc-page .cert-image-trigger:focus-visible img { transform: scale(1.03); }
.qaqc-page .cert-image-trigger:focus-visible { outline: 2px solid var(--qc-green); outline-offset: 2px; }
.qaqc-page .cert-image-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7e9286;
  background: linear-gradient(135deg, #eef4ec, #f5f8f2);
  font-size: 12.16px;
  text-align: center;
  padding: 0 16px;
}
.qaqc-page .cert-body { padding: 18px 20px 22px; }
.qaqc-page .cert-body h3 { font-size: 16.48px; margin: 0 0 4px; }
.qaqc-page .cert-body p { font-size: 13.12px; color: var(--qc-muted); margin: 0; }

/* Certificate lightbox - opened by clicking a certificate image above
   (see qaqc-cert-lightbox.js). Above header's z-index:1000 for the same
   reason the Projects page's project-modal needed to clear it. */
.qaqc-page .cert-lightbox { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 30px; }
.qaqc-page .cert-lightbox[hidden] { display: none; }
.qaqc-page .cert-lightbox-backdrop { position: absolute; inset: 0; background: rgba(20, 38, 28, 0.8); }
.qaqc-page .cert-lightbox-image { position: relative; z-index: 1; max-width: min(900px, 100%); max-height: 90vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); background: #fff; }
.qaqc-page .cert-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--qc-green);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.qaqc-page .cert-lightbox-close:hover { background: #fff; }

.qaqc-page .process { background: #f2f7ef; }
.qaqc-page .process-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.qaqc-page .process-card { background: white; border: 1px solid var(--qc-line); border-radius: var(--qc-radius); padding: 22px 19px; min-height: 230px; position: relative; }
.qaqc-page .step { font-size: 12px; font-weight: 850; letter-spacing: 0.1em; color: var(--qc-green-2); margin-bottom: 25px; display: flex; align-items: center; gap: 9px; }
.qaqc-page .step:after { content: ""; height: 1px; background: #d8e5d5; flex: 1; }
.qaqc-page .process-card p { font-size: 14.4px; color: var(--qc-muted); margin: 0; }
.qaqc-page .process-card .icon { margin-bottom: 18px; }

.qaqc-page .lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.qaqc-page .lab-image { height: 440px; border-radius: 26px; overflow: hidden; background: #e1ecdd; box-shadow: var(--qc-shadow); }
.qaqc-page .lab-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qaqc-page .check-list { display: grid; gap: 14px; margin: 25px 0 0; padding: 0; list-style: none; }
.qaqc-page .check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--qc-muted); }
.qaqc-page .check { width: 24px; height: 24px; border-radius: 50%; background: var(--qc-green-3); color: var(--qc-green); display: grid; place-items: center; flex: 0 0 24px; font-size: 13.12px; font-weight: 900; }

.qaqc-page .test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.qaqc-page .test-card { min-height: 225px; padding: 25px; border-radius: var(--qc-radius); border: 1px solid var(--qc-line); background: white; }
.qaqc-page .test-card .icon { margin-bottom: 20px; }
.qaqc-page .test-card p { font-size: 14.4px; color: var(--qc-muted); margin: 0; }

.qaqc-page .applications { background: #f7faf5; }
.qaqc-page .application-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.qaqc-page .application { border: 1px solid var(--qc-line); border-radius: var(--qc-radius); background: white; padding: 23px; min-height: 145px; }

.qaqc-page .hse { padding: 82px 0; background: #edf5e9; border-top: 1px solid #dce9d7; border-bottom: 1px solid #dce9d7; }
.qaqc-page .hse-heading { max-width: 800px; margin-bottom: 30px; }
.qaqc-page .hse h2 { font-size: clamp(33.6px, 4vw, 51.2px); max-width: 780px; margin: 14px 0; }
.qaqc-page .hse-intro { font-size: 16.64px; color: var(--qc-muted); max-width: 780px; margin: 0; }
.qaqc-page .hse-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.qaqc-page .hse-card { background: rgba(255, 255, 255, 0.86); border: 1px solid #d8e6d3; border-radius: var(--qc-radius); padding: 25px; }
.qaqc-page .hse-symbol { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #e3efdd; color: var(--qc-green); font-weight: 850; font-size: 12.8px; margin-bottom: 17px; }
.qaqc-page .hse-card p { color: var(--qc-muted); margin: 0; font-size: 14.72px; }
.qaqc-page .hse-commitment { margin-top: 17px; background: #fff; border: 1px solid #d8e6d3; border-radius: var(--qc-radius); padding: 22px 25px; display: flex; gap: 22px; align-items: flex-start; }
.qaqc-page .hse-commitment strong { color: var(--qc-green); white-space: nowrap; }
.qaqc-page .hse-commitment span { color: var(--qc-muted); }

.qaqc-page .cta { padding: 70px 0; }
.qaqc-page .cta-box { background: linear-gradient(135deg, #f0f7ec, #e3efdc); border: 1px solid #d8e6d2; border-radius: 28px; padding: clamp(28px, 5vw, 55px); display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.qaqc-page .cta-box h2 { font-size: clamp(28.8px, 3.5vw, 44.8px); max-width: 650px; margin-bottom: 12px; }
.qaqc-page .cta-box p { color: var(--qc-muted); margin: 0; }
.qaqc-page .cta-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }

@media (max-width: 900px) {
  .qaqc-page .hero-grid,
  .qaqc-page .intro-grid,
  .qaqc-page .lab-grid { grid-template-columns: 1fr; gap: 35px; }
  .qaqc-page .hero-visual { min-height: 390px; }
  .qaqc-page .process-grid { grid-template-columns: repeat(2, 1fr); }
  .qaqc-page .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .qaqc-page .quick-item:nth-child(3) { border-left: 1px solid var(--qc-line); }
  .qaqc-page .application-grid { grid-template-columns: repeat(2, 1fr); }
  .qaqc-page .hse-cards { grid-template-columns: 1fr 1fr; }
  .qaqc-page .hse-commitment { flex-direction: column; gap: 7px; }
  .qaqc-page .cta-box { align-items: flex-start; flex-direction: column; }
  .qaqc-page .cta-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .qaqc-page .wrap { width: min(100% - 28px, 1160px); }
  .qaqc-page .section { padding: 62px 0; }
  .qaqc-page .topline { padding-bottom: 30px; }
  .qaqc-page .nav-note { display: none; }
  .qaqc-page .hero { padding-bottom: 54px; }
  .qaqc-page .hero-visual { min-height: 320px; }
  .qaqc-page .photo-main { inset: 0 17px 23px 0; }
  .qaqc-page .photo-caption { right: 160px; }
  .qaqc-page .floating-note { width: 170px; padding: 15px; }
  .qaqc-page .quick-grid { grid-template-columns: 1fr 1fr; }
  .qaqc-page .quick-item { padding: 15px 10px; gap: 9px; }
  .qaqc-page .quick-icon { width: 42px; height: 42px; flex-basis: 42px; font-size: 16px; }
  .qaqc-page .quick-icon svg { width: 21px; height: 21px; }
  .qaqc-page .quick-item b { font-size: 12.8px; }
  .qaqc-page .quick-item span { font-size: 11.52px; }
  .qaqc-page .process-grid,
  .qaqc-page .test-grid,
  .qaqc-page .hse-cards { grid-template-columns: 1fr; }
  .qaqc-page .process-card { min-height: unset; }
  .qaqc-page .step { margin-bottom: 16px; }
  .qaqc-page .lab-image { height: 300px; }
  .qaqc-page .cert-image { height: 260px; padding: 10px; }
  .qaqc-page .cert-lightbox-close { top: 14px; right: 14px; }
  .qaqc-page .application-grid { grid-template-columns: 1fr 1fr; }
  .qaqc-page .application { padding: 17px; min-height: 125px; }
  .qaqc-page .cta-actions { flex-direction: column; width: 100%; }
  .qaqc-page .cta-actions .btn { width: 100%; }
}
@media (max-width: 760px) {
  .qaqc-page .intro-grid .section-head h2 { font-size: clamp(40px, 7.8vw, 57.6px); max-width: 100%; margin-top: 18px; }
}

/* Customer satisfaction strip - only rendered at all once a real score has
   been entered via the CMS (see the njk template's {% if %} guard), so
   these styles never apply to fabricated data. */
.qaqc-page .satisfaction-strip { background: #fff; border-top: 1px solid #e4ece1; border-bottom: 1px solid #e4ece1; position: relative; z-index: 2; }
.qaqc-page .satisfaction-inner { max-width: 1180px; margin: 0 auto; padding: 25px 24px; display: grid; grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1.5fr) minmax(170px, 0.8fr); align-items: center; gap: 30px; }
.qaqc-page .satisfaction-label { font-size: 11.84px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: var(--qc-green); margin: 0 0 6px; }
.qaqc-page .satisfaction-title { font-size: 16.8px; font-weight: 750; color: var(--qc-ink); margin: 0; }
.qaqc-page .satisfaction-scoreline { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.qaqc-page .satisfaction-score { font-size: clamp(33.6px, 4vw, 48px); line-height: 1; font-weight: 850; letter-spacing: -0.055em; color: var(--qc-green); font-variant-numeric: tabular-nums; }
.qaqc-page .satisfaction-percent { font-size: 20px; font-weight: 800; color: var(--qc-green); }
.qaqc-page .satisfaction-track { height: 7px; width: 100%; border-radius: 999px; background: #e7efe4; overflow: hidden; }
.qaqc-page .satisfaction-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6b9c68, #2f6b45); transition: width 1.45s cubic-bezier(0.2, 0.75, 0.25, 1); }
.qaqc-page .satisfaction-meta { font-size: 13.44px; color: var(--qc-muted); margin: 9px 0 0; }
.qaqc-page .satisfaction-count { font-size: 24px; line-height: 1.1; font-weight: 800; color: var(--qc-ink); font-variant-numeric: tabular-nums; }
.qaqc-page .satisfaction-count-label { font-size: 13.12px; color: var(--qc-muted); margin-top: 5px; }
@media (max-width: 760px) {
  .qaqc-page .satisfaction-inner { grid-template-columns: 1fr 1.2fr; gap: 16px; padding: 21px 22px; }
  .qaqc-page .satisfaction-intro { grid-column: 1 / -1; }
  .qaqc-page .satisfaction-count-wrap { text-align: right; }
  .qaqc-page .satisfaction-score { font-size: 40px; }
}
@media (max-width: 430px) {
  .qaqc-page .satisfaction-inner { grid-template-columns: 1fr; gap: 18px; }
  .qaqc-page .satisfaction-intro { grid-column: auto; }
  .qaqc-page .satisfaction-count-wrap { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .qaqc-page .satisfaction-count-label { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .qaqc-page .satisfaction-fill { transition: none; }
}
