/* =========================================================
   ABS Global — Services page (services.html)
   Page-specific styles. Builds on assets/css/style.css
   ========================================================= */

/* ---------- Page hero (full-bleed artwork, min-height 60vh;
   crumbs + title use the same treatment as about.html) ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  overflow: hidden;
  padding: 80px 0;
  background: #0c2540;
  color: #fff;
  text-align: center;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('../img/services-hero.jpg') center / cover no-repeat;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .85) 100%);
  opacity: .6;
}
.page-hero__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 48px, 940px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-hero h1 {
  max-width: 860px;
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.05rem, 3.9vw, 3.3rem);
  line-height: 1.16;
  letter-spacing: .002em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 6px 40px rgba(2, 12, 24, .35);
}

/* ---------- Breadcrumbs (matches about.html hero) ---------- */
.crumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 18px;
  font-size: .78rem;
  color: rgba(255, 255, 255, .62);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .55);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .75);
  transition: color .2s;
}
.crumbs a:hover { color: #fff; }
.crumbs svg { width: 13px; height: 13px; }
.crumbs__sep { color: rgba(255, 255, 255, .32); display: inline-flex; }
.crumbs [aria-current="page"] { color: #fff; font-weight: 600; }

/* ---------- Certification we offer ---------- */
.cert { background: #fff; overflow: hidden; }

.cert-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
/* cards reuse the global .s-card component from style.css (same as index.html) */
.cert-grid .s-card[hidden] { display: none; }

.cert-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.cert-more__btn {
  padding: 8px 28px;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s, border-color .3s, color .3s;
}
.cert-more__btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ---------- Section separators (reference: 0.8px primary @50%) ---------- */
.section-sep {
  width: min(100% - 48px, var(--container));
  margin: 0 auto;
  border: 0;
  border-top: 1px solid rgba(55, 118, 189, .5);
}

/* ---------- Path to certification / lifecycle steppers ---------- */
.steps-section {
  overflow: hidden;
}
.steps-section .section-head { margin-bottom: clamp(30px, 3.8vw, 48px); }

.steps {
  position: relative;
  margin: 0 0 clamp(26px, 3.4vw, 40px);
}
/* accent colour of the stepper — overridden per step (inline --acc on
   the step buttons / detail panels) and kept in sync by services.js */
.stepper { --acc: #3776bd; }
.steps--eco { --acc: #10b981; }

.steps__track,
.steps__progress {
  position: absolute;
  top: 35px;
  left: var(--track-start, 24px);
  height: 1.5px;
  border-radius: 2px;
  pointer-events: none;
}
.steps__track {
  right: calc(100% - var(--track-end, 100%));
  background: #e2e8f0;
}
.steps__progress {
  width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 35%, transparent), var(--acc));
  transition: width .55s var(--ease);
  z-index: 1;
}
.steps__list {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 0 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.steps__list::-webkit-scrollbar { display: none; }

.steps__step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 108px;
  padding: 0 2px;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.steps__dot {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #f6f9fd;
  color: #9fb3c8;
  font-family: var(--font-head);
  font-size: .74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background .35s, border-color .35s, color .35s, box-shadow .35s, transform .35s var(--ease);
}
.steps__step:hover .steps__dot {
  border-color: color-mix(in srgb, var(--acc) 45%, transparent);
  color: var(--acc);
}
.steps__step.is-done .steps__dot {
  background: color-mix(in srgb, var(--acc) 9.4%, transparent);
  border-color: color-mix(in srgb, var(--acc) 35%, transparent);
  color: var(--acc);
}
.steps__step.is-active .steps__dot {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 12.5%, transparent),
              0 4px 14px color-mix(in srgb, var(--acc) 19%, transparent);
}
.steps__label {
  max-width: 104px;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: #8fa4ba;
  transition: color .25s;
  text-wrap: balance;
}
.steps__step:hover .steps__label { color: var(--ink-2); }
.steps__step.is-done .steps__label { color: #475569; }
.steps__step.is-active .steps__label { color: var(--acc); font-weight: 600; }

/* ---------- Step detail card ---------- */
.step-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e8ecf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 34px 64px -50px rgba(13, 35, 58, .5);
}
.steps--eco .step-card { border-color: color-mix(in srgb, var(--acc) 9.4%, transparent); }
.step-card__bar {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 37.6%, transparent), transparent);
}
.step-card__body {
  position: relative;
  padding: clamp(26px, 3.6vw, 42px) clamp(22px, 3.4vw, 40px) clamp(22px, 3vw, 34px);
}

.step-panel { display: none; position: relative; }
.step-panel.is-active { display: block; animation: stepPanelIn .45s var(--ease) both; }
@keyframes stepPanelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.step-panel__wm {
  position: absolute;
  top: -14px;
  right: 2px;
  font-family: var(--font-head);
  font-size: clamp(4.6rem, 9vw, 7.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  color: color-mix(in srgb, var(--acc) 4%, transparent);
  pointer-events: none;
  user-select: none;
}

.step-panel__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.step-panel__badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: var(--acc);
  color: #fff;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step-panel__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 20%, transparent), transparent);
}

.step-panel h3 {
  position: relative;
  z-index: 1;
  margin: 8px 0 14px;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 1.8vw, 1.38rem);
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
}

.step-panel__list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(28px, 4vw, 46px);
}
.step-panel__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.step-panel__item:last-child { border-bottom: 0; }
.step-panel__no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  margin-top: 2px;
  border: 1px solid color-mix(in srgb, var(--acc) 14.5%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--acc) 3%, transparent);
  color: var(--acc);
  font-family: var(--font-head);
  font-size: .64rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step-panel__item p {
  margin: 0;
  font-size: .85rem;
  line-height: 1.68;
  color: var(--ink-2);
}
.step-panel__item p strong {
  color: var(--ink);
  font-weight: 600;
}

/* card footer */
.step-card__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px clamp(22px, 3.4vw, 40px) 22px;
  border-top: 1px solid #f1f5f9;
}
.step-card__count {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #94a3b8;
  white-space: nowrap;
}
.step-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.step-nav__btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: border-color .25s, color .25s, background .25s, transform .25s var(--ease);
}
.step-nav__btn svg { width: 15px; height: 15px; }
.step-nav__btn:hover:not(:disabled) {
  border-color: var(--acc);
  color: var(--acc);
  transform: translateY(-1px);
}
.step-nav__btn:disabled { opacity: .35; cursor: default; }

.step-dots { display: flex; align-items: center; gap: 6px; }
.step-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #e2e8f0;
  cursor: pointer;
  transition: width .3s var(--ease), background .3s;
}
.step-dot.is-done { background: color-mix(in srgb, var(--acc) 30%, transparent); }
.step-dot:hover { background: color-mix(in srgb, var(--acc) 45%, transparent); }
.step-dot.is-active { width: 20px; background: var(--acc); }

/* text pager (lifecycle card) */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}
.pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s, gap .25s var(--ease);
}
.pager__btn svg { width: 15px; height: 15px; }
.pager__btn:hover:not(:disabled) { gap: 10px; color: #64748b; }
.pager__btn:disabled { color: #cbd5e1; cursor: default; }
.pager__state {
  font-size: .78rem;
  font-weight: 600;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

/* ---------- The value of ISO certification ---------- */
.value { background: #fff; overflow: hidden; }
.value-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.value-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  background: linear-gradient(to bottom right, #eff6ff 0%, rgba(240, 249, 255, .4) 100%);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .08);
}
.value-card--wide { grid-column: span 2; }

.value-card__num {
  position: absolute;
  top: -12px;
  right: -4px;
  padding: 20px;
  font-family: var(--font-head);
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
  color: rgba(191, 219, 254, .5);
  opacity: .7;
  pointer-events: none;
  user-select: none;
  transition: transform .5s var(--ease);
}
.value-card:hover .value-card__num { transform: scale(1.1); }

.value-card__bar {
  width: 40px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  transition: width .5s var(--ease);
}
.value-card:hover .value-card__bar { width: 64px; }

.value-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.012em;
  color: #0f172a;
}
.value-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: .88rem;
  line-height: 1.7;
  color: #64748b;
}

/* ---------- Responsive ---------- */
/* grid breakpoints follow the reference: cert 1/2/3 cols at 640/1280,
   value 3/2/1 cols above 1024 / 640-1024 / below 640 */
@media (min-width: 640px) {
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .cert-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023.98px) {
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
  .value-grid { grid-template-columns: 1fr; }
  .value-card--wide { grid-column: span 1; }
}

@media (max-width: 980px) {
  .steps__label { font-size: .64rem; max-width: 88px; }
  .steps__step { max-width: 92px; }
}

@media (max-width: 760px) {
  /* steppers become scrollable chip strips */
  .steps__track,
  .steps__progress { display: none; }
  .steps__list {
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 2px 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
  }
  .steps__step {
    flex: 0 0 auto;
    width: 88px;
    max-width: 88px;
    scroll-snap-align: start;
  }
  .steps__label { font-size: .62rem; }

  .step-card__foot { padding-inline: clamp(18px, 4vw, 26px); }
}

@media (max-width: 640px) {
  .step-panel__wm { font-size: clamp(4rem, 12vw, 6rem); }
  .step-panel__list { grid-template-columns: 1fr; }
  .step-panel__item { padding: 11px 0; }
  .step-panel__item:last-child { border-bottom: 0; }
  .step-panel__item:nth-last-child(2) { border-bottom: 1px solid #f1f5f9; }
}

@media (max-width: 760px) {
  .page-hero__inner { width: calc(100% - 36px); }
  .step-panel h3 { font-size: 1.08rem; }
  .step-panel__badge { width: 31px; height: 31px; flex-basis: 31px; border-radius: 9px; font-size: .66rem; }
}

@media (max-width: 560px) {
  .pager { flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .step-panel.is-active { animation: none; }
  .steps__progress { transition: none; }
}
