/* Hand-written QA fixes, loaded after brand-scale.css on every page. Keep one block per defect. */

/* 1. Service steps: the list showed both the browser marker ("1.") and the text number ("01") */
.dp-service-steps { list-style: none; padding-inline-start: 0; }
.dp-service-steps > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
}
.dp-service-steps > li > span:first-child { color: var(--dp-color-forest, #0B3B2A); font-weight: 600; font-variant-numeric: tabular-nums; }
.dp-service-steps > li > div, .dp-service-steps h3 { display: block; }

/* 2. Before/after: images of different proportions were letterboxed and the halves did not line up */
.dp-case-compare:not(:fullscreen) .dp-case-frame img { object-fit: cover; object-position: center; }

/* 3. Works on service pages: stacked in one narrow column on desktop, so lay them out as a grid */
.dp-interior .e-con:has(> .e-con > .elementor-widget .dp-case-compare) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.dp-interior .e-con:has(> .e-con > .elementor-widget .dp-case-compare) > :not(:has(.dp-case-compare)) { grid-column: 1 / -1; }
.dp-interior .e-con:has(> .e-con > .elementor-widget .dp-case-compare) .dp-case-compare:not(:fullscreen) { max-inline-size: none; }
@media (max-width: 1023px) {
  .dp-interior .e-con:has(> .e-con > .elementor-widget .dp-case-compare) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dp-interior .e-con:has(> .e-con > .elementor-widget .dp-case-compare) { grid-template-columns: minmax(0, 1fr); }
}

/* 4. Work captions are a card title, not a section heading: Lead size */
.dp-interior .e-con:has(> .e-con > .elementor-widget .dp-case-compare) > .e-con div.elementor-heading-title { font-size: 20px !important; line-height: 1.25; font-weight: 500; }

/* 5. Heading hierarchy on narrow screens: the scale made H2 and H3 both 20px. H1 28 > H2 20 > H3 17 (all semibold) */
@media (max-width: 1023px) {
  .dp-interior-content .dp-service-section h3 { font-size: 17px !important; line-height: 1.3; }
}

/* 6. Price list on service pages: name was 28px next to a 14px price. Name 20/500, price 20/600 */
.dp-service-price-row .elementor-heading-title { font-size: 20px !important; line-height: 1.3; font-weight: 500; }
.dp-service-price-amount, .dp-service-price-amount * { font-size: 20px !important; font-weight: 600; white-space: nowrap; }

/* 7. Loose routing paragraphs at the end of service pages sat on the page background without a card */
[class*="dp-local-routing"] {
  margin-block: 16px;
  padding: clamp(20px, 3vw, 40px);
  border-radius: clamp(20px, 2.5vw, 32px);
  background: var(--dp-color-white, #fff);
}
[class*="dp-local-routing"] > p:last-child { margin-bottom: 0; }
[class*="dp-service-parent-link"] {
  margin-block: 16px;
  padding: clamp(16px, 2.5vw, 28px) clamp(20px, 3vw, 40px);
  border-radius: clamp(20px, 2.5vw, 32px);
  background: var(--dp-color-white, #fff);
}
[class*="dp-service-parent-link"] > :last-child { margin-bottom: 0; }
@media (max-width: 1023px) {
  html body .dp-interior-content .dp-service-section h3.elementor-heading-title { font-size: 17px !important; }
}

/* 8. One price panel for every service: light card on lavender (the black version felt like a hospital) */
.dp-old-prices { display: none !important; }
.dp-price-panel {
  margin-block: 16px;
  padding: clamp(24px, 4vw, 56px);
  border-radius: clamp(24px, 3vw, 40px);
  background: #fff;
  color: #000;
}
.dp-price-panel h2 { margin: 0 0 8px; max-width: 22ch; }
.dp-price-lead { margin: 0 0 24px; max-width: 62ch; font-size: 17px; color: #5b5870; }
.dp-price-search {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 100%; max-width: 420px; height: 52px; margin: 0 0 16px; padding: 0 20px;
  border: 1px solid #dcd8f2; border-radius: 999px; background: #fff; font: inherit; font-size: 17px; color: #000;
}
.dp-price-search:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.dp-price-panel .dp-price-row, .sys-list .dp-price-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 16px 0; border-top: 1px solid #dcd8f2;
}
.dp-price-panel .dp-price-row[hidden] { display: none; }
.dp-price-row .n { flex: 1 1 auto; font-size: 17px; font-weight: 500; }
.dp-price-row .p { flex: none; font-size: 20px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dp-price-panel .dp-price-list > :last-child { border-bottom: 1px solid #dcd8f2; }
.dp-price-more { margin: 0; }
.dp-price-more > summary {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 20px; min-height: 48px; padding: 0 22px;
  border: 1px solid #000; border-radius: 999px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600;
}
.dp-price-more > summary::-webkit-details-marker { display: none; }
.dp-price-more > summary::after { content: "+"; font-size: 20px; line-height: 1; }
.dp-price-more[open] > summary::after { content: "−"; }
.dp-price-more[open] > summary { margin-top: 0; margin-bottom: 4px; order: 2; }
.dp-price-more[open] { display: flex; flex-direction: column; }
.dp-price-more[open] > summary { order: 99; margin-top: 20px; align-self: flex-start; }
.dp-price-empty { margin: 16px 0 0; font-size: 17px; color: #5b5870; }
.dp-price-empty[hidden] { display: none; }
@media (max-width: 640px) {
  .dp-price-panel .dp-price-row, .sys-list .dp-price-row { flex-direction: column; gap: 4px; padding: 16px 0; }
  .dp-price-search { max-width: none; }
}

/* 9. Label above the H1, same as the implantation page */
.dp-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dp-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dp-color-green, #00D88A); }

/* 10. Longer breadcrumb trails (Главная / Услуги / направление / страница) wrap on narrow screens instead of widening the page */
nav.crumbs, nav.template-crumbs { flex-wrap: wrap; row-gap: 2px; white-space: normal; max-inline-size: 100%; }
nav.crumbs > *, nav.template-crumbs > * { max-inline-size: 100%; overflow-wrap: anywhere; }
nav.crumbs, nav.template-crumbs { display: flex !important; flex-wrap: wrap !important; gap: 2px 8px; align-items: baseline; }
nav.crumbs > *, nav.template-crumbs > * { white-space: normal !important; }
/* on phones the trail stays on one line and scrolls sideways (no dangling slashes, no page overflow) */
@media (max-width: 767px) {
  nav.crumbs, nav.template-crumbs { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: 0 8px; }
  nav.crumbs::-webkit-scrollbar, nav.template-crumbs::-webkit-scrollbar { display: none; }
  nav.crumbs > *, nav.template-crumbs > * { white-space: nowrap !important; flex: none; }
}

/* 11. Primary hero button: brand green with a dark ink, soft pill with an arrow (a black pill read as "confirm/delete") */
.dp-interior-cta.btn.dark, .template-button.template-button--dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 0 26px;
  border: 0; border-radius: 999px; background: var(--dp-color-green, #00D88A); color: var(--dp-color-green-ink, #00140C);
  font-size: 17px; font-weight: 500; white-space: nowrap;
}
.dp-interior-cta.btn.dark::after, .template-button.template-button--dark::after { content: "→"; font-weight: 500; }
.dp-interior-cta.btn.dark:hover, .template-button.template-button--dark:hover { filter: brightness(.94); }
.dp-interior-cta.btn.white, .template-button.template-button--outline { min-height: 54px; }
@media (max-width: 640px) {
  .dp-interior-cta.btn.dark, .template-button.template-button--dark { width: 100%; }
}

/* 12. Implantation price block: the same light card as the other services (it was the last black one) */
#implant-prices .sys-list { background: #fff !important; color: #000 !important; }
#implant-prices .sys-list .dot.light { color: #000 !important; }
#implant-prices .sys-list .row-sb > span:last-child { color: #5b5870 !important; }
#implant-prices .sys-list h2.h2 { color: #000 !important; }
#implant-prices .sys-row { border-color: #dcd8f2 !important; border-bottom-color: #dcd8f2 !important; border-top-color: #dcd8f2 !important; color: #000 !important; }
#implant-prices .sys-row .n { font-size: 20px !important; font-weight: 500; color: #000 !important; }
#implant-prices .sys-row .c { color: #5b5870 !important; }
#implant-prices .sys-row .p { color: #000 !important; }
#implant-prices .sys-list p.note { color: #5b5870 !important; }
#implant-prices .sys-list .btn.white { background: #fff !important; color: #000 !important; border: 1px solid #000 !important; }

/* 13. A panel that ends up inside another white section must not be a card inside a card; text values ("Входит в отбеливание") are not amounts */
.dp-service-section .dp-price-panel, [class*="dp-remaining-content"] > .dp-price-panel { margin: 0; padding: 0; background: transparent; border-radius: 0; }
.dp-price-row .p.text { font-size: 17px !important; font-weight: 500; white-space: normal; text-align: right; max-width: 18ch; }

/* the panel is a card of its own with room around it, and an opened list never runs into the next block */
.dp-price-panel { display: flow-root; margin-block: 16px; }
.dp-service-section .dp-price-panel, [class*="dp-remaining-content"] > .dp-price-panel { margin-block: 24px; }
.dp-price-panel + * { margin-top: 16px; }

/* 14. Hero buttons never wider than their card; doctors block without a double top gap; article headings keep a hierarchy on phones */
.dp-interior-cta.btn, .template-button { box-sizing: border-box; max-width: 100%; }
.dp-service-section > .dp-direction-team, .dp-service-section .dp-direction-team { margin-top: 0; }
@media (max-width: 1023px) {
  main:has(.editorial-crumbs) h2 { font-size: 20px !important; line-height: 1.25; }
}

@media (max-width: 640px) {
  .dp-interior-cta.btn.dark, .template-button.template-button--dark { padding: 0 16px; gap: 8px; white-space: normal; text-align: center; }
}
@media (max-width: 400px) {
  .dp-interior-cta.btn.dark, .template-button.template-button--dark { white-space: nowrap; }
  .dp-interior-cta.btn.dark::after, .template-button.template-button--dark::after { display: none; }
}

/* 15. Treatment articles: the price block is part of the article card, not a card inside a card */
main.dp-interior--article .dp-price-panel { margin: 24px 0; padding: 0; background: transparent; border-radius: 0; }

/* 16. Doctor cards on article pages: the same compact row card as on service pages, rating chips that do not stick together */
.editorial-reading-block .editorial-doctor-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.editorial-reading-block .editorial-doctor-meta > a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #dcd8f2; border-radius: 999px;
  text-decoration: none; font-size: 14px; color: #000; background: #fff;
}
.editorial-reading-block .editorial-doctor-meta > a strong { font-weight: 600; }
@media (max-width: 760px) {
  .editorial-reading-block .editorial-doctors .editorial-doctor-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 14px; align-items: start; padding: 12px; }
  .editorial-reading-block .editorial-doctors .editorial-doctor-link { display: contents; }
  .editorial-reading-block .editorial-doctors .editorial-doctor-photo { grid-column: 1; grid-row: 1 / span 3; width: 84px; height: 84px; aspect-ratio: auto; border-radius: 14px; object-fit: cover; }
  .editorial-reading-block .editorial-doctors .editorial-doctor-link > strong { grid-column: 2; grid-row: 1; text-decoration: underline; text-underline-offset: .18em; font-weight: 600; font-size: 17px; }
  .editorial-reading-block .editorial-doctors .editorial-doctor-card > p.editorial-doctor-role { grid-column: 2; grid-row: 2; margin: 0; font-size: 14px; color: #5b5870; }
  .editorial-reading-block .editorial-doctors .editorial-doctor-meta { grid-column: 2; grid-row: 3; }
}
@media (max-width: 760px) {
  .editorial-reading-block .editorial-doctors .editorial-doctor-link > strong, .editorial-doctors .editorial-doctor-card > p.editorial-doctor-role { margin: 0; padding: 0; text-align: left; justify-self: start; }
  .editorial-reading-block .editorial-doctors .editorial-doctor-meta { min-width: 0; margin: 0; padding: 0; border: 0; }
}

/* 17. The "Записаться" pill in the header is visible on phones on every inner page (news/article pages hid it) */
@media (max-width: 767px) {
  header.nav.light .nav-right a.pill-glass:not(.burger) { display: inline-flex !important; }
}

/* 18. On a lime card the primary button stays black (green on lime clashes); buttons side by side keep a gap */
.editorial-appointment .template-button--dark, .editorial-appointment .btn.dark,
.lime .template-button--dark, .lime .btn.dark { background: #000; color: #fff; }
.editorial-appointment .template-button--dark::after, .lime .btn.dark::after { color: #fff; }
.editorial-text-card > .template-button { margin: 0 12px 12px 0; }

/* 19. Doctor profiles of the Elementor template: the same green primary button as everywhere */
.dp-interior--profile a.elementor-button[href="#booking"] {
  background: var(--dp-color-green, #00D88A); color: var(--dp-color-green-ink, #00140C); border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; box-sizing: border-box; font-weight: 500;
}
.dp-interior--profile a.elementor-button[href="#booking"] .elementor-button-text { color: var(--dp-color-green-ink, #00140C); }
.dp-interior--profile a.elementor-button[href="#booking"]::after { content: "→"; font-weight: 500; }
@media (max-width: 400px) { .dp-interior--profile a.elementor-button[href="#booking"]::after { display: none; } }

/* 20. Doctor facts chips: the title (21 год) is the accent, the caption (практики) is the small line */
html body .dp-interior--profile .elementor-icon-box-title, html body .dp-interior--profile .elementor-icon-box-title span { font-size: 17px !important; font-weight: 600; }
html body .dp-interior--profile .elementor-icon-box-description { font-size: 14px !important; font-weight: 400; color: #5b5870; }

/* 21. Award posters carry their own lettering: show the whole poster instead of cropping the text */
html body img[src$="/2026/06/l-5.jpeg"], html body img[src$="/2026/06/l.jpeg"] { object-fit: contain !important; background: #0b0b0b; }

/* 22. Certificate slider arrows on two doctor pages had no size (343 px glyphs): small round buttons */
.elementor-swiper-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 8px 8px 0 0; border: 1px solid #000; border-radius: 50%; background: #fff; color: #000; cursor: pointer; }
.elementor-swiper-button svg, .elementor-swiper-button i { width: 18px; height: 18px; fill: currentColor; font-size: 18px; }

/* 23. The menu sheet is the same on every page (template pages now use it too; same values as the static pages) */
.menu-sheet { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); }
.menu-sheet.open { display: block; }
.menu-panel { position: absolute; top: 12px; left: 12px; right: 12px; max-height: calc(100vh - 24px); overflow-y: auto; background: #fff; border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.menu-panel a { font-size: 17px; font-weight: 500; padding: 10px 4px; border-bottom: 1px solid #dcd8f2; color: #000; text-decoration: none; }
.menu-panel .btn { margin-top: 14px; justify-content: center; }
.menu-close { align-self: flex-end; margin-bottom: 6px; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #dcd8f2; color: #000; cursor: pointer; }
.menu-close svg { width: 22px; height: 22px; }

/* 24. One booking form look on every page (static pages: lime button, calm heading); no "test mode" caption for visitors */
.template-booking > p#template-booking-preview { display: none; }
html body .template-wrap .template-booking-heading h2, html body .template-booking-heading h2 { font-size: 28px !important; line-height: 1.2; }
.template-booking .template-button--dark { background: #DCF024; color: #000; }
.template-booking .template-button--dark::after { display: none; }
.template-booking-close { border: 0; background: #EFEDFC; width: 44px; height: 44px; font-size: 22px; }
