/*********************************************************
  QUALITY PAGE — SCOPED STYLES (quality.html)
  Everything lives under .quality-page to avoid leaks
**********************************************************/

/* -------- Local tokens -------- */
.quality-page {
  --brand: #0b5ea8;
  --brand-2: #0a4d8b;
  --ink: #2e3a46;
  --muted: #555;
  --surface: #fff;
  --rail: #e8f0fb;
  --shadow: 0 8px 24px rgba(0,0,0,.06);
  --radius: 12px;

  /* Uniform green check for policy list */
  --check-svg: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
<circle cx="12" cy="12" r="12" fill="%232E7D32"/>\
<path d="M16.7 8.7l-6.1 6.6L7.3 12" fill="none" stroke="%23fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\
</svg>');
}

/* =======================
   KPI BAR
   ======================= */
.quality-page .kpi-bar{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1rem;
  margin:2.5rem auto 2rem;
}
.quality-page .kpi{
  display:grid;
  grid-template-columns:54px auto;
  align-items:center;
  gap:.75rem;
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:1rem 1.25rem;
}
.quality-page .kpi .icon{
  width:54px;height:54px;
  display:grid;place-items:center;
  border-radius:10px;
  background:linear-gradient(180deg,var(--brand) 0%, var(--brand-2) 100%);
}
.quality-page .kpi .icon svg{ width:28px;height:28px; fill:#fff; }
.quality-page .kpi .meta .num{
  display:block;font-size:1.4rem;color:var(--brand);line-height:1.1;
}
.quality-page .kpi .meta .label{
  display:block;color:var(--muted);font-size:.95rem;
}

/* =======================
   CERTIFICATIONS (badges)
   ======================= */
.quality-page .cert-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:1rem;
  margin:1rem auto 2rem;
  align-items:stretch;
}
.quality-page .cert-badge{
  background:var(--surface);
  border-radius:14px;
  padding:1rem 1.25rem;
  box-shadow:var(--shadow);
  display:grid;
  place-items:center;
  gap:.6rem;
  text-align:center;
}
.quality-page .cert-badge .cert-mark{
  width:180px; max-width:80%; height:auto; display:block;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.10));
}
.quality-page .cert-badge p{
  color:var(--ink);
  margin:0;
  font-weight:600;
}

/* =======================
   QUALITY POLICY + CHECKLIST
   ======================= */
.quality-page .policy-card{
  background:var(--surface);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:1.5rem;
  margin:2rem auto;
  max-width:1000px;
}
.quality-page .policy-card h2{
  text-align:center;color:var(--brand);margin-bottom:.5rem;
}
.quality-page .policy-card p{
  text-align:center;color:#333;max-width:860px;margin:.25rem auto 1rem;
}
.quality-page .policy-card h3{ color:var(--brand); text-align:center; margin:0 0 .75rem; }

/* Consistent green checks */
.quality-page .checklist{
  list-style:none; padding:0; margin:.25rem auto 0;
  max-width:900px;
}
.quality-page .checklist li{
  position:relative; padding-left:28px; margin:.45rem 0; color:#444; line-height:1.6;
}
.quality-page .checklist li::before{
  content:""; position:absolute; left:0; top:.2rem;
  width:18px; height:18px;
  background-image:var(--check-svg);
  background-size:18px 18px; background-repeat:no-repeat;
}

/* =======================
   PROCESS TIMELINE (vertical rail)
   ======================= */
.quality-page .process-rail { margin: 2rem auto 2.5rem; }
.quality-page .process-rail h2 {
  text-align:center; color:var(--brand); margin-bottom:1.25rem;
}

/* Rail list */
.quality-page .rail{
  position:relative;
  list-style:none;
  padding:0 0 0 3.25rem;          /* room for markers */
  margin:0 auto;
  max-width:980px;
  display:grid; gap:1rem;
}
/* Vertical rail line */
.quality-page .rail::before{
  content:"";
  position:absolute;
  left:1.75rem; top:.25rem; bottom:.25rem;
  width:2px; background:var(--rail);
}
/* Item layout */
.quality-page .rail-item{
  position:relative;
  display:grid;
  grid-template-columns:48px 1fr;
  align-items:start; gap:.85rem;
}
/* Marker */
.quality-page .rail-node{
  width:48px; height:48px; border-radius:50%;
  display:grid; place-items:center;
  font:700 .95rem/1 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color:#fff; background:linear-gradient(180deg,var(--brand) 0%, var(--brand-2) 100%);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  z-index:1;
}
/* Card */
.quality-page .rail-card{
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:.9rem 1rem;
  border-left:4px solid #e5eef8;
}
.quality-page .rail-card h3{ margin:0 0 .25rem; color:var(--brand); font-size:1.05rem; }
.quality-page .rail-card p { margin:0; color:#444; line-height:1.6; }

/* Desktop: alternate left/right around a center rail */
@media (min-width:900px){
  .quality-page .rail{
    max-width:1100px;
    grid-template-columns:1fr 40px 1fr;
    gap:1.25rem 1.25rem;
    padding-left:0;               /* rail is centered, no left pad needed */
  }
  .quality-page .rail::before{
    left:calc(50% - 1px); width:2px;
  }
  .quality-page .rail-item{ display:contents; }
  .quality-page .rail-item .rail-node{ grid-column:2; margin:0 auto; }
  .quality-page .rail-item:nth-child(odd)  .rail-card{ grid-column:1; border-left:none; border-right:4px solid #e5eef8; }
  .quality-page .rail-item:nth-child(even) .rail-card{ grid-column:3; }
}

/* =======================
   ASSURANCE CARDS
   ======================= */
.quality-page .assure-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:1rem; margin:2rem auto 2.5rem;
}
.quality-page .assure-card{
  background:var(--surface); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:1rem 1.1rem;
}
.quality-page .assure-card h3{ margin:.5rem 0 .35rem; color:var(--brand); }
.quality-page .assure-card p{ color:#444; margin:0; }
.quality-page .aicon{
  width:46px; height:46px; border-radius:10px;
  background:linear-gradient(180deg,var(--brand) 0%, var(--brand-2) 100%);
  display:grid; place-items:center;
}
.quality-page .aicon svg{ width:26px; height:26px; fill:#fff; }

/* =======================
   CTA BAND
   ======================= */
.quality-page .cta-band{
  background:linear-gradient(180deg,var(--brand) 0%, var(--brand-2) 100%);
  color:#fff; padding:2rem 0; margin-top:.5rem;
}
.quality-page .cta-inner{ text-align:center; display:grid; gap:.6rem; }
.quality-page .cta-inner p{ opacity:.95; }

/* =======================
   BOTTOM CERTIFICATE CALLOUT
   ======================= */
.quality-page .cert-cta{
  margin:1.75rem auto 2.75rem;
  border:2px dashed #cfe3fb;
  background:#f9fbff;
  padding:1.25rem 1.5rem;
  border-radius:14px;
  text-align:center;
  display:grid; gap:.5rem;
}
.quality-page .cert-cta h3{ color:var(--brand); margin:0; }
.quality-page .cert-cta .btn-download{ margin:.25rem auto 0; }

/* =======================
   RESPONSIVE POLISH
   ======================= */
@media (max-width:640px){
  .quality-page .kpi .meta .num{ font-size:1.25rem; }
  .quality-page .rail{ padding-left:3rem; }
  .quality-page .rail-node{ width:32px; height:32px; font-size:.9rem; top:.9rem; }
}
