/* Measure full-bleed artwork against the content width, excluding scrollbars. */
main { container-type: inline-size; }

/* Independent photo and full-width gold backdrop. */
main > .implementation-reference.content-section {
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding: 40px 32px;
  background: transparent;
}
.implementation-reference.content-section::before {
  content: '';
  position: absolute;
  inset: -180px calc(50% - 50cqw) -220px;
  z-index: -2;
  pointer-events: none;
  background: url('/assets/principal/implementation-gold-reference.webp') center / 100% 100% no-repeat;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 78%, transparent);
}
.implementation-reference .implementation-doctors {
  position: absolute;
  top: 0;
  right: -16px;
  z-index: -1;
  display: block;
  width: 54%;
  height: 374px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--media-radius);
  mask-image: linear-gradient(90deg, transparent, #000 16%), linear-gradient(to bottom, #000 82%, transparent);
  mask-composite: intersect;
}
.implementation-reference.content-section .implementation-header {
  display: flex;
  align-items: flex-start;
  max-width: 54%;
  min-height: 310px;
  margin: 0 0 24px;
  padding: 0;
}
main > .implementation-reference.content-section h2 {
  margin: 0;
  font-size: var(--section-title);
  line-height: 1.08;
}
.implementation-intro h2::before {
  content: '';
  display: block;
  width: 104px;
  height: 4px;
  margin-bottom: 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ffe49c, #bb8326);
}
.implementation-reference .implementation-banner {
  display: table;
  min-width: 52%;
  margin: 0;
  padding: 14px 48px;
  border-radius: 22px 22px 0 0;
  clip-path: polygon(4% 0, 94% 0, 100% 100%, 0 100%);
  color: #17120a;
  background: linear-gradient(115deg, #d49b27, #ffe9a5 48%, #e2ad34);
  box-shadow: inset 0 2px 0 #ffe7a3;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}
.implementation-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid #c79d4980;
}
.implementation-step {
  position: relative;
  min-width: 0;
  padding: 24px 20px;
  border: 1px solid #c79d49;
  border-radius: 22px;
  background: linear-gradient(145deg, #0b0b09f0, #20190dde);
}
.implementation-number {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: #eccb72;
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
}
.implementation-number::after { content: ''; width: 1px; height: 44px; background: #b88d37; }
.implementation-step h3 { margin: 0; color: #eccb72; font-size: 18px; font-weight: 600; line-height: 1.4; text-transform: none; }
.implementation-step p { margin: 16px 0 0; font-size: 16px; line-height: 1.6; color: #d3d3d3; }
.implementation-connector {
  display: block;
  position: absolute;
  top: 44px;
  right: -24px;
  z-index: 1;
  width: 24px;
  height: 24px;
  color: #f3cb65;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px #d0a44099);
}
@media (min-width: 768px) and (max-width: 1099px) {
  .implementation-reference.content-section .implementation-header { max-width: 58%; min-height: 290px; }
  .implementation-reference .implementation-doctors { width: 48%; top: 32px; height: 300px; }
  .implementation-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .implementation-step:nth-child(2) .implementation-connector { display: none; }
}
@media (max-width: 767px) {
  main > .implementation-reference.content-section { padding: 32px 0; }
  .implementation-reference.content-section::before { inset-block: -100px -160px; background-size: 100% 100%; }
  .implementation-reference .implementation-doctors { display: none; }
  .implementation-reference.content-section .implementation-header { max-width: 100%; min-height: 0; margin-bottom: 40px; }
  .implementation-intro h2::before { width: 80px; margin-bottom: 20px; }
  .implementation-reference .implementation-banner { display: block; min-width: 0; padding: 14px 20px; font-size: 18px; border-radius: 16px 16px 0 0; }
  .implementation-steps { grid-template-columns: minmax(0, 1fr); }
  .implementation-step { padding: 24px 20px; border-radius: 18px; }
  .implementation-number { font-size: 40px; margin-bottom: 16px; }
  .implementation-connector { top: auto; right: calc(50% - 12px); bottom: -25px; transform: rotate(90deg); }
}
