/* Service showcase (service_showcase.py): hero photo with before/after thumbnails and «Результаты лечения» */
.dp-showcase-photo { position: relative; overflow: hidden; }
.dp-showcase-photo > img.bg { object-position: 50% 30%; }

/* one large before|after card on the hero photo (close crops of real photos), links to the results */
.dp-hero-ba {
  position: absolute; right: 16px; bottom: 16px; left: auto; z-index: 2;
  display: flex; flex-direction: column; gap: 8px; padding: 8px;
  width: min(62%, 440px);
  background: #fff; border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 20, 12, .18);
  text-decoration: none; color: #00140C;
}
.dp-hero-ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 16px; overflow: hidden; }
.dp-hero-ba figure { margin: 0; position: relative; }
.dp-hero-ba img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.dp-hero-ba figcaption {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 12px; border-radius: 999px;
  background: rgba(0, 20, 12, .78); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.6;
}
.dp-hero-ba figure + figure figcaption { background: #00D88A; color: #00140C; }
.dp-hero-ba-note { padding: 0 6px 2px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.dp-hero-ba-note::after { content: " →"; }
.dp-hero-ba:hover .dp-hero-ba-note { text-decoration: underline; text-underline-offset: .2em; }
.dp-hero-ba:focus-visible { outline: 2px solid #00D88A; outline-offset: 3px; }
/* phones: the card would cover the faces — it goes under the photo instead */
@media (max-width: 599px) {
  html body .dp-interior .dp-interior-hero .dp-showcase-photo:has(.dp-hero-ba) {
    display: flex; flex-direction: column; height: auto; min-height: 0; aspect-ratio: auto; background: #fff;
  }  /* template-interior.css fixes the photo to 16:10 on phones */
  .dp-showcase-photo:has(.dp-hero-ba) > img.bg { position: static; height: auto; aspect-ratio: 4 / 3; }
  .dp-hero-ba { position: static; width: auto; margin: 0; padding: 8px; gap: 8px; border-radius: 0; box-shadow: none; }
  .dp-hero-ba-pair { border-radius: 14px; }
  .dp-hero-ba img { aspect-ratio: 4 / 3; }
}

/* one case: the slider on the left, the note beside it — no empty half */
@media (min-width: 768px) {
  html body section.dp-showcase-results:has(> article:only-of-type) > p { grid-column: 2; grid-row: 2; align-self: center; }
  html body section.dp-showcase-results:has(> article:only-of-type) > article { grid-column: 1; grid-row: 2; }
}
/* three cases fit one row on desktop, like the reference card row */
@media (min-width: 1100px) {
  html body section.dp-showcase-results:has(> article:nth-of-type(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* article-type pages (отбеливание, реставрация) have no service-section padding: same as «Профгигиена» */
html body section.dp-showcase-results { padding: 16px; margin-bottom: 16px; row-gap: 16px; }
@media (min-width: 768px) { html body section.dp-showcase-results { padding: clamp(24px, 3.4vw, 48px); } }
