/* Service page (page-service.php; Figma "Services / Implantation" 4595:1164 desktop, 4775:906 mobile).
   Built on main.css: its tokens, type (.h2, .title-*, .lead, .note, .eyebrow), buttons, .section + its texture
   layers, the shared Portfolio and Booking blocks. Here: what this page adds, under .svc (the page's <main>). */

.svc {
  --fs-72: clamp(48px, 5vw, 72px);    /* hero title (Figma 72/64) */
  --fs-56: clamp(40px, 3.89vw, 56px); /* section titles here are 56/56 (home: 72) */
  --svc-gap: 64px;                    /* section head → content, rows inside a block (Figma 64) */
  --svc-table-gap: 48px;              /* a block's 40/40 head → its table (user 2026-10-27; 40 / 32 / 24 below) */
  --svc-note-gap: 32px;               /* a table → its footnote (veneers, Figma 32; 28 tablet, 24 phone) */
  --card: rgba(255, 255, 255, 0.08);  /* Figma "Background/Accent 1" at 8%: cards, tables */
  --tint: rgba(205, 189, 133, 0.12);  /* the gold tint over table heads (Action/Main at 12%) */
}
.svc :is(h4, figure, blockquote) { margin: 0; }   /* main.css resets up to h3 only */
/* the shared booking block keeps the home page's type (Figma: 72/64 title, 40/36 "Є питання?" on every service frame —
   UI audit 2026-10-27); :where() keeps the specificity */
.svc .h2:not(:where(#booking *)) { font-size: var(--fs-56); line-height: 1; }
.svc .title-40:not(:where(#booking *)) { line-height: 1; }
.svc .title-32 { line-height: 1; }
.svc .title-32 em { display: block; }
.svc .section-head .lead, .svc-lead { max-width: 640px; }
.svc-section__inner { display: flex; flex-direction: column; gap: var(--svc-gap); }
.svc-card { background: var(--card); padding: 40px; }
.svc-text { display: flex; flex-direction: column; gap: 16px; max-width: 640px; color: var(--foreground-gray); font-size: 18px; line-height: 28px; }
.svc-text strong { color: var(--foreground-white); font-weight: 500; }
.svc-text--note { max-width: none; font-size: 16px; line-height: 24px; }
.svc-icon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 32px; background: var(--surface); }
.svc-outro { display: flex; flex-direction: column; align-items: flex-start; gap: 48px; }
.svc-outro > .title-40 { margin-bottom: -16px; }   /* its own title (veneers): 32 to the text (16 on the phone), 48 / 40 to the button */
/* the outro closing a block (UI audit 2026-10-27): after a footnote it's a block of its own — the gap between blocks
   (veneers 4977:2696: 80 / phone 40); right after a table it's ¾ of the block's gap (implantation 4595:1289: 48 / 24) */
.svc-footnote + .svc-outro { margin-top: calc(var(--space-head) - var(--svc-gap)); }
.svc-table + .svc-outro { margin-top: calc(var(--svc-gap) * -0.25); }
.svc-block { display: flex; flex-direction: column; gap: var(--svc-gap); }
.svc-block__head { display: flex; flex-direction: column; gap: 16px; }

/* bullet lists: 18/28 medium white (Figma "Action/Medium"), a gray explanation under the item (<small>) */
.svc-list { display: flex; flex-direction: column; gap: 8px; padding-left: 27px; list-style: disc; font-weight: 500; font-size: 18px; line-height: 28px; }
.svc-list small { display: block; color: var(--foreground-gray); font-weight: 400; font-size: 16px; line-height: 24px; }
.svc-list--regular { gap: 16px; font-weight: 400; }   /* alternatives: 16 between the bullets (2026-11-23) */
/* «who it suits» table (Figma 4602:2624, 2026-11-23): 16 between the bullets (phone 12); a «bold | text» item runs on one line, all white */
.svc-list--fit { gap: 16px; }
.svc-list__pair { font-weight: 400; }
.svc-list__pair strong { font-weight: 600; }
.svc-text--fit { color: var(--foreground-white); font-weight: 500; }   /* the right column as text (All-on-4 4992:3920, veneers): white medium */
.svc-list--tips { gap: 16px; font-weight: 400; color: var(--foreground-gray); }   /* care tips: 16 (2026-11-23) */
.svc-list--tips strong { color: var(--foreground-white); font-weight: 500; }

/* ---------- Background: the home page's principle (main.css "Page background"), not the Figma frames ----------
   A few whole copies of the texture, NOT clipped by their sections: each starts in one section and runs on over the
   next, its own soft (transparent) top and bottom ending it — so no hard edges anywhere. Copies follow each other
   without overlapping (1440: 2557 high each); no "eclipse" fades (main.css "Page background": the rule).
   Hosts: about, portfolio, price, doctor, FAQ (desktop); every section its own 693-high copy on the phone (as home). */
.svc-section, .svc .section--cases { --tex: none; }
.svc-about { --tex: var(--texture); --tex-top: 100px; }          /* runs over how it works · who it suits · methods */
.svc .section--cases { --tex: var(--texture); --tex-top: 0px; }  /* portfolio + stages */
.svc-price { --tex: var(--texture); --tex-top: 100px; }          /* price + alternatives */
.svc-doctor { --tex: var(--texture); --tex-top: 0px; }           /* doctor + care */
.svc-faq { --tex: var(--texture); --tex-top: 0px; }              /* FAQ + booking */
.svc .section--booking { --tex: none; }

/* ---------- Hero (Figma 4595:1250): photo + warm tint + fade to black, content at the bottom-left ---------- */
.svc-hero { position: relative; isolation: isolate; }
.svc-hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--background-black); }
.svc-hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-hero__bg::before, .svc-hero__bg::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* warm tint; over it the top darkens under the header, 50% → 0 over the top 464px (300 on the phone) so the logo and
   the menu read better (Figma "top-eclipse" 4925:2658 / 4925:2660 — this page only, not the home hero; 50% instead of Figma's 30% — user) */
.svc-hero__bg::before {
  background: linear-gradient(rgba(12, 9, 4, 0.5), rgba(12, 9, 4, 0) var(--eclipse-h, 464px)),
    linear-gradient(rgba(97, 57, 8, 0.5), rgba(36, 22, 5, 0.5));
}
/* the home hero's eased fade to black over the bottom 464px (no hard edge on bright photos) */
.svc-hero__bg::after {
  top: calc(100% - 464px);
  background: linear-gradient(rgba(12, 9, 4, 0), rgba(12, 9, 4, 0.002) 1.8%, rgba(12, 9, 4, 0.008) 4.8%,
    rgba(12, 9, 4, 0.021) 9%, rgba(12, 9, 4, 0.042) 13.9%, rgba(12, 9, 4, 0.075) 19.8%, rgba(12, 9, 4, 0.126) 27%,
    rgba(12, 9, 4, 0.194) 35%, rgba(12, 9, 4, 0.278) 43.5%, rgba(12, 9, 4, 0.382) 53%, rgba(12, 9, 4, 0.541) 66%,
    rgba(12, 9, 4, 0.738) 81%, var(--background-black));
}
/* one screen, as the home hero (Figma 928 = its screen): the notice strip lies over its top, so closing the strip
   doesn't move anything — the photo just shows more (user request 2026-10-23); content 80 from the bottom, never
   under its content */
.svc-hero__inner {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 48px;
  min-height: 100vh; min-height: 100svh;
  padding-top: calc(var(--header-h) + 80px); padding-bottom: 80px;
}
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font-weight: 500; font-size: 18px; line-height: 24px; }
.crumbs li + li::before { content: "/"; display: inline-block; width: 24px; margin: 0 12px; text-align: center; color: var(--foreground-white); }
/* the link's tap area 44 high without moving the line (it was 20 — UI audit 2026-10-26) */
.crumbs a { display: inline-block; padding-block: 10px; margin-block: -10px; transition: color var(--dur-default) var(--ease-default); }
.crumbs a:hover { color: var(--action-main); }
.crumbs [aria-current] { color: var(--action-secondary); }
.svc-hero__text { display: flex; flex-direction: column; gap: 32px; }
.svc-hero__head { display: flex; flex-direction: column; gap: 16px; }
.svc-hero__title { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-72); line-height: 0.889; letter-spacing: -0.04em; text-wrap: balance; }
.svc-hero__title em { display: block; }
.svc-hero__lead { max-width: 520px; opacity: 0.8; }
.svc-hero__price { display: flex; align-items: center; gap: 16px; }
.svc-hero__price .title-32 em { display: inline; color: var(--action-secondary); }
.svc-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.svc-hero__actions .btn { min-width: 216px; }
.svc-hero__call { padding: 16px 24px 16px 20px; }
.svc-hero__call:hover img { transform: none; }   /* a phone icon, not the ↗ arrow that turns on hover */

/* Price tooltip (Figma "tooltip" 4600:2475): ⓘ on the surface colour; hover / focus / tap shows a dark panel above */
.tip { position: relative; display: inline-flex; }
.tip__btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 28px; background: var(--surface); transition: background-color var(--dur-default) var(--ease-default); }
.tip:is(:hover, :focus-within, .is-open) .tip__btn { background: var(--surface-hover); }
.tip__panel {
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 2; width: 360px; translate: -50% 0;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; background: var(--background-black);
  color: var(--foreground-gray); font-size: 16px; line-height: 24px;
  opacity: 0; visibility: hidden; transition: opacity 0.2s var(--ease-figma-out), visibility 0.2s;
}
.tip__panel strong { color: var(--foreground-white); font-weight: 500; }
.tip:is(:hover, .is-open) .tip__panel, .tip:has(.tip__btn:focus-visible) .tip__panel { opacity: 1; visibility: visible; }

/* ---------- How it works · who it suits · methods ---------- */
.svc-about__inner { display: flex; flex-direction: column; gap: var(--space-head); }
.svc-about__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; }
.svc-quotes { display: flex; flex-wrap: wrap; gap: 24px 40px; }   /* one or two notes (Figma 5231:2469: 620 + 40 + 620) */
.svc-quotes .svc-quote { flex: 1 1 380px; }
.svc-quote { display: flex; flex-direction: column; gap: 8px; max-width: 640px; padding: 16px 0 16px 40px; border-left: 1px solid var(--action-main); }
.svc-quote__title { font-family: var(--font-serif); font-style: italic; font-size: 24px; line-height: 24px; letter-spacing: -0.04em; }
.svc-about__photo { aspect-ratio: 16 / 9; overflow: hidden; background: var(--card); }
.svc-about__photo img { width: 100%; height: 100%; object-fit: cover; }   /* each page's crop: "Per-page photo crops" below */

/* tables (who it suits, methods): columns side by side, a gold-tinted head row (equal height via subgrid), lines */
.svc-table { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); grid-template-rows: auto 1fr; background: var(--card); }
.svc-table--3 { --cols: 3; }
.svc-table--1 { --cols: 1; }
.svc-table__col { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.svc-table__col + .svc-table__col { border-left: 1px solid var(--line); }
/* the head right above a table: --svc-table-gap instead of the block's gap (the gap below the table stays) */
:is(.svc-block__head, .title-40) + .svc-table { margin-top: calc(var(--svc-table-gap) - var(--svc-gap)); }
/* a footnote under a table ("* Остаточний вибір…", veneers 4977:2696): --svc-note-gap below the table, full width */
.svc-table + .svc-footnote { margin-top: calc(var(--svc-note-gap) - var(--svc-gap)); }
.svc-table__head { padding: 32px 40px; border-bottom: 1px solid var(--line); background: var(--tint); font-weight: 400; text-wrap: balance; }
.svc-table__cell { padding: 32px 40px; }   /* desktop 32 / 40 (user 2026-10-27); tablet and phone set their own */
.svc-table .svc-list { padding-left: 67px; }   /* 40 cell padding + the bullet's 27 */
.svc-method { display: flex; flex-direction: column; gap: 20px; }
/* a method described as a list + its cost (All-on-4 4992:3922): the list inside the padded cell, 18/28 italic gray cost */
.svc-table .svc-method .svc-list { padding-left: 27px; }
.svc-method__price { color: var(--foreground-gray); font-style: italic; font-size: 18px; line-height: 28px; }

/* ---------- Stages ---------- */
.svc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc-step { display: flex; flex-direction: column; gap: 40px; }
.svc-step__num { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-72); line-height: 0.889; letter-spacing: -0.04em; color: var(--action-secondary); font-variant-numeric: lining-nums; }
.svc-step__text { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.svc-step__desc { font-size: 16px; line-height: 24px; opacity: 0.8; }
.svc-step__text .note { margin-top: auto; }   /* results line up at the bottom of a row (Figma) */
.svc-step-cta {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; padding: 40px 40px 48px; background: var(--surface); text-align: center;
}
.svc-step-cta::before {   /* Figma: the texture at 30%, covering the whole card at any size (was a fixed 420 × 746 in the
     centre: on a wide card it left bare side bands — user request 2026-10-26) */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/texture.jpg") center / cover no-repeat; opacity: 0.3;
}
.svc-step-cta__logo { margin-bottom: -24px; }   /* logo → title 16 (Figma), the rest 40 */
.svc-step-cta__title { font-style: normal; }

/* ---------- Price ---------- */
.svc-price__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.svc-price__main, .svc-price__extra { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; }
.svc-price__head { display: flex; flex-direction: column; gap: 16px; }
/* one card (no "paid separately"): full width; without a table the text sits left, the CTA bottom right (Figma 5231:2508) */
.svc-price__cards > :only-child { grid-column: 1 / -1; }
.svc-price__main:not(:has(.svc-ptable)) { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }
.svc-price__main:not(:has(.svc-ptable)) .svc-price__head { flex: 0 1 760px; }
.svc-price__main:not(:has(.svc-ptable)) { background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)); }   /* the single offer (Figma 5231:2508): fades out */
@media (min-width: 1024px) { .svc-price__main:not(:has(.svc-ptable)) { padding: 80px; } }   /* 80 all round on the desktop */
.svc-price__title em { display: block; color: var(--action-secondary); }
.svc-ptable { width: 100%; border-collapse: collapse; font-size: 18px; line-height: 28px; }
.svc-ptable :is(th, td) { padding: 16px 24px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.svc-ptable tr > :last-child { width: 200px; border-left: 1px solid var(--line); }
.svc-ptable tbody tr:last-child td { border-bottom: 0; }
.svc-ptable th { background: var(--tint); font-weight: 600; }
.svc-ptable td { font-weight: 500; }
.svc-ptable td:last-child { color: var(--action-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }
.svc-extras { flex: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.svc-extras li { display: flex; align-items: center; gap: 20px; }
.svc-extras li + li { padding-top: 20px; border-top: 1px solid var(--line); }
.svc-extras__text { display: flex; flex-direction: column; font-size: 18px; line-height: 28px; }
.svc-extras__text strong { font-weight: 500; }
.svc-extras__price { color: var(--action-secondary); font-weight: 600; }
.svc-extras__desc { color: var(--foreground-gray); }

/* ---------- Alternatives ---------- */
.svc-alt__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.svc-alt__cards:where(:has(> :nth-child(2):last-child)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* two options = halves (All-on-4 4992:4108); :where keeps the phone rules winning */
.svc-alt__card { display: flex; flex-direction: column; padding: 0; }
.svc-alt__img { display: grid; place-items: center; height: 320px; background: var(--card); overflow: hidden; }
.svc-alt__img img { width: 320px; height: 320px; object-fit: contain; }
/* photos instead of objects (wp-admin «Зображення — фото на всю картку», veneers 4977:2912): edge to edge, cropped */
.svc-alt--photos .svc-alt__img img { width: 100%; height: 100%; object-fit: cover; }
.svc-alt__body { display: flex; flex-direction: column; gap: 32px; padding: 40px; }
.svc-alt__head, .svc-alt__desc { display: flex; flex-direction: column; gap: 16px; }
/* cards side by side (≥1024): one height in a row, the cost note at the bottom of each, so the notes line up
   (user request 2026-10-26; were as tall as their own text) */
@media (min-width: 1024px) {
  .svc-alt__body, .svc-alt__desc { flex: 1 1 auto; }
  .svc-alt__desc > .note { margin-top: auto; }
}

/* ---------- Doctor + technologies ---------- */
.svc-doctor__card { display: flex; align-items: center; gap: 80px; }
.svc-doctor__photo { flex: none; width: min(600px, 50%); aspect-ratio: 600 / 400; overflow: hidden; }
.svc-doctor__photo img { width: 100%; height: 100%; object-fit: cover; }
.svc-doctor__info { flex: 1; display: flex; flex-direction: column; gap: 40px; }
.svc-doctor__who { display: flex; flex-direction: column; gap: 16px; }
.svc-doctor__quote { margin: 0; }
.svc-tech { gap: 48px; padding-top: 16px; }
.svc-tech > .btn { align-self: flex-start; }
.svc-tech__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc-tech__card { display: flex; flex-direction: column; gap: 40px; }
.svc-tech__text { display: flex; flex-direction: column; gap: 16px; }
/* cards side by side: the texts start on one line in a row, as in Figma (4977:2962: a one-line title keeps the
   two-line one's place) — the cards share the row tracks (subgrid) instead of <br> in the titles (UI audit 2026-10-27) */
@media (min-width: 1024px) {
  .svc-tech__card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 16px; }
  .svc-tech__card > .svc-icon { margin-bottom: 24px; }   /* icon → title 40 */
  .svc-tech__text { display: contents; }
}

/* ---------- Warranty and care ---------- */
.svc-care__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.svc-care__col { display: flex; flex-direction: column; gap: 40px; }
.svc-care__photo { position: relative; flex: 1; min-height: 240px; overflow: hidden; }   /* fills what the warranty card leaves next to the tips (Figma) */
.svc-care__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }   /* out of the flow: the photo never sets the row's height */
.svc-care__warranty { display: flex; flex-direction: column; gap: 32px; }
.svc-care__terms { font-family: var(--font-serif); font-style: italic; font-size: 24px; line-height: 24px; letter-spacing: -0.04em; color: var(--action-secondary); }
/* the tips card (Figma 4994:4640): the text part padded, the warning edge to edge at the card's bottom */
.svc-card.svc-care__tips { display: flex; flex-direction: column; padding: 0; }
.svc-care__main { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 40px; padding: 40px; }
.svc-care__body { display: flex; flex-direction: column; gap: 32px; }
.svc-warning { display: flex; align-items: flex-start; gap: 16px; padding: 32px 40px; background: var(--surface); font-weight: 500; font-size: 18px; line-height: 28px; }
.svc-warning img { flex: none; }

/* ---------- FAQ (Figma 4742:5130; states: question gold on hover, + → − when open) ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
/* the top line belongs to the first question, not to the column: the questions rise in on scroll (reveal.js), the line
   with them (on the column it stood still above them) */
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { margin: 0; font: inherit; }
.faq__q button {
  display: flex; align-items: flex-start; gap: 32px; width: 100%; padding: 40px 0 24px; text-align: left;
  font-family: var(--font-serif); font-style: italic; font-size: 24px; line-height: 24px; letter-spacing: -0.04em;
  transition: color 0.3s var(--ease-figma-out), padding 0.4s var(--ease-default);
}
.faq__q button span { flex: 1; }
.faq__q button:hover { color: var(--action-secondary); }
.faq__icon { flex: none; transition: transform 0.4s var(--ease-default); }
.faq__icon-v { transition: opacity 0.3s var(--ease-default); }
.faq__a { display: grid; grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding-bottom: 40px; color: var(--foreground-gray); font-size: 18px; line-height: 28px; }
.faq__a p:not(:last-child) { padding-bottom: 0; }   /* an answer's paragraphs follow line by line (Figma 5017:6300), the space after the last */
.faq.is-ready .faq__a { transition: grid-template-rows 0.4s var(--ease-default); }
.faq.is-ready .faq__item:not(.is-open) .faq__a { grid-template-rows: 0fr; }
.faq.is-ready .faq__item:not(.is-open) .faq__q button { padding-bottom: 39px; }   /* + the 1px line = Figma's 104 / 128 step */
.faq__item.is-open .faq__icon { transform: rotate(180deg); }
.faq__item.is-open .faq__icon-v { opacity: 0; }

/* ---------- Booking map (Figma 4627:4068): the static map picture + the gold pin at the clinic, to the Google card ---------- */
/* Google reviews between the form and the map (Figma "reviews · Міні-карусель" 5159:2721) */
.svc-reviews { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.svc-reviews__head { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.svc-reviews__title { line-height: 48px; }
.svc-reviews__title em { display: inline; }
.svc-reviews__rating { display: flex; align-items: center; gap: 32px; }
.svc-reviews__summary { display: flex; align-items: flex-start; gap: 12px; }
.svc-reviews__score { font-family: var(--font-serif); font-style: italic; font-size: 40px; line-height: 40px; letter-spacing: -0.04em; color: var(--action-secondary); }
.svc-reviews__details { display: flex; flex-direction: column; gap: 4px; }
.svc-reviews__stars { display: flex; gap: 2px; }
.svc-reviews__stars img { flex: none; }
.svc-reviews__source { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; white-space: nowrap; }
a.svc-reviews__source:hover { color: var(--action-secondary); }
.svc-reviews__arrows { gap: 8px; }
.svc-reviews__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.svc-reviews__track::-webkit-scrollbar { display: none; }
/* whole cards only, no piece of the next one (user request 2026-11-05): 3 → 2 (tablet) → 1 (phone); the arrows move by one */
.svc-review { --per-view: 3; flex: 0 0 calc((100% - (var(--per-view) - 1) * 16px) / var(--per-view)); min-width: 0; height: 232px; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--card); scroll-snap-align: start; }
.svc-review__top { display: flex; align-items: center; justify-content: space-between; flex: none; }
.svc-review__text { flex: 1; min-height: 0; overflow-y: auto; color: #dadada; font-size: 16px; line-height: 24px; white-space: pre-line; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }   /* a long text scrolls inside the card */
.svc-review__author { display: flex; align-items: center; gap: 12px; flex: none; }
.svc-review__avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); font-family: var(--font-serif); font-style: italic; font-size: 18px; line-height: 24px; color: var(--action-secondary); }
.svc-review__meta { flex: 1; min-width: 0; }
.svc-review__name { font-weight: 500; font-size: 16px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-review__date { color: var(--foreground-gray); font-size: 12px; line-height: 16px; }
@media (max-width: 700px) {
  .svc-reviews__head { flex-direction: column; align-items: stretch; }
  .svc-reviews__title { line-height: 32px; }
  .svc-reviews__rating { justify-content: space-between; gap: 16px; }
  .svc-review { --per-view: 1; }
}
@media (min-width: 701px) and (max-width: 1023px) {
  .svc-review { --per-view: 2; }
}
.booking__map { position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; background: var(--card); }
.booking__map > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.booking__pin { position: absolute; top: 50%; left: 50%; translate: -50% -100%; transition: translate 0.3s var(--ease-figma-out); }
a.booking__map:hover .booking__pin { translate: -50% calc(-100% - 6px); }

/* =================== Responsive (the home page's steps: ≤1279, ≤1023, ≤700 phone, ≤375) =================== */
@media (max-width: 1279px) {
  .svc { --svc-gap: 48px; --svc-table-gap: 40px; }
  /* price table: the price column as wide as its value, not 200 — the names got 165px at 1024 and broke into 3 lines
     (UI audit 2026-10-26) */
  .svc-ptable tr > :last-child { width: 1%; white-space: nowrap; }
  .svc-doctor__card { gap: 48px; }
  .faq { gap: 48px; }
}

/* 1024–1099: the header with the service page's longer first link ("Про імплантацію") doesn't fit one line even with
   the narrowest gaps → the burger + mobile menu here already, as below 1024 (user decision 2026-10-23; up to 1099
   instead of 1087 so the full nav gets some room — user decision 2026-10-26) */
@media (min-width: 1024px) and (max-width: 1099px) {
  .header__nav, .services-menu, .services-eclipse { display: none; }
  .header__inner { justify-content: space-between; }
  .header__burger { display: inline-flex; }
  .header.is-menu-open :is(.header__phone, .header__cta) { display: none; }
}

@media (max-width: 1023px) {
  .svc { --svc-gap: 40px; --svc-table-gap: 32px; --svc-note-gap: 28px; }
  .svc-hero__inner { padding-top: calc(var(--header-h) + 56px); padding-bottom: 56px; }
  .svc-hero__actions .btn { min-width: 0; }
  .svc-hero__call { padding: 12px 24px 12px 20px; }
  .svc-steps, .svc-tech__cards, .svc-alt__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-price__cards, .svc-care__grid, .faq { grid-template-columns: 1fr; }
  .faq { gap: 0; }
  .faq__col + .faq__col .faq__item:first-child { border-top: 0; }
  .svc-doctor__card { flex-direction: column; align-items: stretch; gap: 40px; }
  .svc-doctor__photo { width: 100%; }
  .svc-care__photo { flex: none; aspect-ratio: 358 / 208; min-height: 0; }   /* the phone's ratio (Figma 390), scaled up to 1023 (user request 2026-10-27; was 580 / 428 from 701) */
  .svc-care__main { padding: 28px; }   /* = the tablet's card padding */
  /* price table: the card is full width again (one per row) → the price column back to the desktop's share, not as
     narrow as its value (that's for 1024–1279, two cards side by side) — user 2026-10-27 */
  .svc-ptable tr > :last-child { width: 37%; white-space: normal; }
  .svc-warning { padding: 24px 28px; }
  /* tablet: cards and tables 28 inside instead of 40 (user decision); the phone sets its own below */
  .svc-card:where(:not(.svc-alt__card)), .svc-table__head, .svc-table__cell, .svc-alt__body { padding: 28px; }
  .svc-table .svc-list { padding-left: 55px; }   /* 28 cell padding + the bullet's 27 */
}

/* tablet only: the alternatives one per row, horizontal — the picture on the left edge to edge, the text on the right
   (28 around), centred against the picture; the technologies too — the icon on the left, the text next to it from its
   top edge (user decisions) */
@media (min-width: 701px) and (max-width: 1023px) {
  .svc-tech__cards { grid-template-columns: 1fr; }
  .svc-tech__card { flex-direction: row; align-items: flex-start; gap: 28px; }
  .svc-tech__text { flex: 1; }
  .svc-alt__cards { grid-template-columns: 1fr; }
  .svc-alt__card { flex-direction: row; }
  .svc-alt__img { flex: none; width: 40%; height: auto; min-height: 280px; }
  .svc-alt__img img { width: min(100%, 320px); height: auto; aspect-ratio: 1; }
  .svc-alt--photos .svc-alt__img { position: relative; min-height: 240px; }
  .svc-alt--photos .svc-alt__img img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  .svc-alt__body { flex: 1; justify-content: center; }
}

/* tables as stacked cards (the phone layout of Figma 4775:906): each column its own card, its head tinted on top —
   the 3-column methods from the tablet down (too narrow side by side), the 2-column one on the phone */
@media (max-width: 1023px) {
  .svc-table--3 { display: flex; flex-direction: column; gap: 16px; background: none; }
  .svc-table--3 .svc-table__col { display: flex; flex-direction: column; background: var(--card); }
  .svc-table--3 .svc-table__col + .svc-table__col { border-left: 0; }
}

/* =================== Phone (Figma "Services / Implantation / Mobile" 4775:906, 390 wide) =================== */
@media (max-width: 700px) {
  .svc { --svc-gap: 32px; --svc-table-gap: 24px; --svc-note-gap: 24px; }
  .svc .h2:not(:where(#booking *)) { font-size: 32px; line-height: 32px; }
  .svc .h2:not(:where(#booking *)) em { display: inline; }   /* phone: the italic part runs on in the same line (Figma mobile) */
  .svc-about .h2 { text-wrap: wrap; }   /* plain wrap as in Figma ("…імплантація зубів / і як вона працює?"), not balance */
  .svc-step .title-32 br { display: none; }   /* the desktop's forced breaks ("Індивідуальний / план") */
  .svc .title-40:not(:where(#booking *)) { font-size: 24px; line-height: 24px; }
  .svc .title-32 { font-size: 24px; line-height: 24px; }
  .svc .note { font-size: 14px; line-height: 20px; }
  .svc-card { padding: 24px 16px; }
  .svc-text { font-size: 16px; line-height: 24px; }
  .svc-text--note { font-size: 14px; line-height: 20px; }
  .svc-icon { width: 48px; height: 48px; border-radius: 24px; }
  .svc-icon img { width: 24px; height: 24px; }
  .svc-outro { gap: 32px; align-self: stretch; }
  .svc-about .svc-outro { gap: 40px; }   /* text → button 40 (Figma mobile 5000:4805, 4775:987) */
  .svc-about .svc-outro > .title-40 { margin-bottom: -24px; }   /* title → text stays 16 */
  .svc-about .svc-footnote + .svc-outro { margin-top: 8px; }   /* 40 between the blocks (the block's own gap is 32) */
  .svc-block { gap: 32px; }
  .svc-block__head { gap: 8px; }
  .svc-list { gap: 8px; padding-left: 24px; font-size: 16px; line-height: 24px; }
  .svc-list small { font-size: 14px; line-height: 20px; }
  .svc-list--regular { gap: 12px; }
  .svc-list--fit { gap: 12px; }   /* phone 12 (Figma mobile, 2026-11-23) */
  .svc-list--tips { gap: 12px; }

  /* background: every section its own copy (main.css phone: 693 high, full width), 80 from its top (Figma mobile) */
  .svc .svc-section, .svc .section--cases { --tex: var(--texture); --tex-top: 80px; }
  .svc .section--booking { --tex: var(--texture); --tex-top: 40px; }
  .svc .section--cases { --tex-top: 0px; }   /* the portfolio is shorter than its copy: start it at the top, clear of the stages' */

  /* hero: the photo starts under the notice strip and is 244 shorter than the hero (Figma 390×844: 56–656 of 844),
     fading into black over its last 300, content 40 from the bottom — so the text always sits on the faded part,
     whatever the screen's height (it was a fixed 600 from the top: on 553–740 high screens the lead lay on the bright
     photo, contrast ~2 — UI audit 2026-10-27); with the strip closed it starts at the top */
  .svc-hero__bg { top: var(--notice-h, 0px); bottom: auto; height: max(300px, 100% - 244px); }
  .svc-hero__bg::after { top: calc(100% - 300px); }
  .svc-hero__bg { --eclipse-h: 300px; }
  .svc-hero__inner { gap: 40px; padding-top: calc(var(--header-h) + 40px); padding-bottom: 40px; }
  .crumbs ol { font-size: 16px; }
  .crumbs li + li::before { margin: 0 12px; }
  .svc-hero__text { gap: 16px; }
  .svc-hero__head { gap: 8px; }
  .svc-hero__title { font-size: 36px; line-height: 32px; }
  .svc-hero__lead { opacity: 1; color: var(--foreground-gray); font-size: 16px; line-height: 24px; }
  .svc-hero__price .title-32 { font-size: 22px; line-height: 24px; }
  .svc-hero__actions { flex-direction: column; align-self: stretch; }
  .svc-hero__actions .btn { width: 100%; }
  .svc-hero__call { padding: 12px 24px 12px 20px; }
  .svc-hero__call img { width: 20px; height: 20px; }
  /* the panel in the middle of the screen, above the price row (the ⓘ's place depends on the price's length): it hangs
     on the full-width row instead of the ⓘ */
  .svc-hero__text, .svc-hero__price { align-self: stretch; }
  .svc-hero__price { position: relative; }
  .tip { position: static; }
  .tip__panel { left: 0; right: 0; width: auto; max-width: 360px; margin-inline: auto; translate: none; }

  /* how it works · who it suits · methods */
  .svc-about__inner { gap: 40px; }
  .svc-about__intro { gap: 20px; }
  .svc-quote { gap: 8px; padding: 8px 0 8px 16px; }
  .svc-quote__title { font-size: 20px; line-height: 20px; }
  .svc-quote .note { font-size: 14px; line-height: 20px; }
  .svc-about__photo { aspect-ratio: 358 / 200; }
  .svc-table { display: flex; flex-direction: column; gap: 16px; background: none; }
  .svc-table__col { display: flex; flex-direction: column; background: var(--card); }
  .svc-table__col + .svc-table__col { border-left: 0; }
  .svc .svc-table__head { padding: 20px 16px; font-size: 20px; line-height: 20px; }   /* .svc: over .svc .title-32 */
  .svc-table__cell { padding: 20px 16px; }
  .svc-table .svc-list { padding-left: 40px; }   /* 16 cell padding + the bullet's 24 */
  .svc-method { gap: 12px; }
  .svc-method > p:first-child, .svc-method__price { font-size: 16px; line-height: 24px; }
  .svc-table .svc-method .svc-list { gap: 8px; padding-left: 24px; }   /* 8 as on the desktop (the alternatives' lists: 4) */

  /* stages */
  .svc-steps { grid-template-columns: 1fr; gap: 16px; }
  .svc-step { gap: 24px; }
  .svc-step__num { font-size: 48px; line-height: 48px; }
  .svc-step__text { gap: 12px; }
  .svc-step__desc { font-size: 14px; line-height: 20px; }
  .svc-step-cta { gap: 32px; padding: 56px 40px 64px; }
  .svc-step-cta__logo { margin-bottom: -16px; }   /* logo → title 16, the rest 32 */
  .svc .svc-step-cta__title { font-size: 32px; line-height: 32px; }   /* .svc: over .svc .title-32 (24 here) */
  .svc-step-cta .btn { width: auto; }

  /* price: the turnkey card's table runs edge to edge (Figma) */
  .svc-price__cards { gap: 16px; }
  .svc-price__main { gap: 24px; padding: 24px 0 32px; }
  .svc-price__main > :not(.svc-ptable) { margin-inline: 16px; }
  .svc-price__main > .btn { width: calc(100% - 32px); margin-top: 8px; }   /* table → button 32 (Figma mobile) */
  .svc-price__head { gap: 16px; }
  .svc-price__extra .svc-price__head { gap: 8px; }
  .svc-ptable { font-size: 16px; line-height: 24px; }
  .svc-ptable :is(th, td) { padding: 12px 16px; }
  .svc-ptable tr > :last-child { width: 37%; white-space: nowrap; }   /* as on the tablet (Figma 390: a fixed 160 of 358 — user 2026-10-27); a price never breaks: on 320 the column grows to fit it */
  .svc-price__extra { gap: 24px; }
  .svc-extras { gap: 16px; }
  .svc-extras li { align-items: flex-start; gap: 12px; }
  .svc-extras li + li { padding-top: 16px; }
  .svc-extras__text { font-size: 16px; line-height: 24px; }
  .svc-extras__desc { margin-top: 4px; font-size: 14px; line-height: 20px; }
  .svc-price__extra > .note { font-size: 12px; line-height: 16px; }

  /* alternatives */
  .svc-alt__cards { grid-template-columns: 1fr; gap: 16px; }
  .svc-alt__card { padding: 0; }   /* picture edge to edge; the body has its own padding */
  /* Figma mobile: the picture a 276 square in the 358 × 276 frame — the full height, centred (height: 100% of a grid
     item doesn't resolve here, so out of the flow) */
  .svc-alt__img { position: relative; height: auto; aspect-ratio: 358 / 276; }
  .svc-alt__img img { position: absolute; top: 0; left: 50%; translate: -50% 0; width: auto; height: 100%; aspect-ratio: 1; }
  .svc-alt--photos .svc-alt__img { min-height: 0; }
  .svc-alt--photos .svc-alt__img img { inset: 0; left: 0; translate: none; width: 100%; height: 100%; aspect-ratio: auto; }
  .svc-alt__body { gap: 24px; padding: 24px 16px; }
  .svc-alt__head { gap: 8px; }
  .svc-alt__desc { gap: 16px; }
  .svc-alt .svc-outro .svc-block__head { padding-block: 8px; }

  /* doctor + technologies (a line between them, Figma) */
  .svc-doctor__card { gap: 32px; }
  .svc-doctor__photo { aspect-ratio: 358 / 240; }
  .svc-doctor__info { gap: 24px; }
  .svc-doctor__who { gap: 8px; }
  .svc-doctor__name { font-size: 32px; line-height: 32px; }
  .svc-doctor__who .lead { font-size: 16px; line-height: 24px; }
  .svc .svc-doctor__quote { font-size: 20px; line-height: 20px; }
  .svc-tech { gap: 24px; padding-top: 32px; border-top: 1px solid var(--line); }
  .svc-tech__cards { grid-template-columns: 1fr; gap: 16px; }
  .svc-tech__card { gap: 24px; }
  .svc-tech__text { gap: 12px; }
  .svc-tech__text .note { color: var(--foreground-white); opacity: 0.8; }
  .svc-tech > .btn { align-self: stretch; margin-top: 16px; }   /* cards → button 40 (Figma mobile 5000:5194, 4801:3104) */

  /* warranty and care */
  .svc-care__grid { gap: 24px; }
  .svc-care__col { gap: 24px; }
  .svc-care__warranty { gap: 24px; }
  .svc-care__terms { font-size: 20px; line-height: 20px; }
  .svc-care__main { gap: 24px; padding: 24px 16px; }
  .svc-care__body { gap: 24px; }
  .svc-care__body .svc-alt__head { gap: 8px; }
  .svc-list--tips { font-size: 16px; line-height: 24px; }
  .svc-warning { flex-direction: column; gap: 16px; padding: 16px 16px 24px; font-size: 14px; line-height: 20px; }   /* Figma 4801:3367 */

  /* FAQ: one column, 20px questions */
  .faq__q button { gap: 24px; padding: 24px 0 12px; font-size: 20px; line-height: 20px; }
  .faq.is-ready .faq__item:not(.is-open) .faq__q button { padding-bottom: 23px; }   /* + the 1px line (Figma mobile) */
  .faq__icon { width: 20px; height: 20px; }
  .faq__a p { padding-bottom: 24px; font-size: 16px; line-height: 24px; }

  /* booking map: square on the phone, the pin stays on the clinic (centre) */
  .booking__map { aspect-ratio: 1; margin-top: 8px; }   /* socials → map 40 (Figma mobile 5000:5330, 4775:1479) */
  .booking__pin { width: 32px; height: 32px; }   /* Figma mobile pin 32 */
}

/* =================== Per-page photo crops (each service page's Figma file; main.svc--<default-language slug>) ===================
   Art direction of the seed photos: a page whose photos are replaced in wp-admin may drop its lines. */
/* «Імплантація» (Figma 4595:1164 / 4775:906) */
.svc--implantatsiia .svc-about__photo img {   /* 4602:2527: the left 85% of the photo, from 4% down — zoomed 1.17× from the left edge */
  object-position: 0 0; transform: scale(1.171); transform-origin: 0 32.5%;
}
.svc--implantatsiia .svc-doctor__photo img { object-position: 50% 17%; }   /* 4717:4996: 11–48% of the portrait */
.svc--implantatsiia .svc-care__photo img { transform: scale(1.106); transform-origin: 100% 50%; }   /* 4742:5265: the right 90% */
/* «Вініри» (Figma 4977:2662 / 5000:4755) */
.svc--viniry .svc-about__photo img { object-position: 50% 0; }   /* 4977:3439: from the top */
.svc--viniry .svc-alt__card:first-child .svc-alt__img img { object-position: 50% 0; }   /* 4990:3726: from the top, the others centred */
.svc--viniry .svc-doctor__photo img { object-position: 50% 30%; }   /* 4992:3744 */
.svc--viniry .svc-care__photo img { object-position: 50% 27%; }   /* 4992:3834 */
@media (min-width: 1024px) { .svc--viniry .svc-care__grid { grid-template-columns: 580fr 660fr; } }   /* 4977:3014: photo + warranty 580, tips 660 (implantation: equal) */
@media (max-width: 1023px) { .svc--viniry .svc-care__photo { aspect-ratio: 358 / 170; } }   /* 5000:5983, phone ratio up to 1023 (as the rest) */
/* «All-on-4» (Figma 4992:3858 / 5032:6829); the alternatives' objects come placed on their tile (seed PNGs 832×640, «фото на всю картку») */
.svc--all-on-4 .svc-about__photo img {   /* 4994:4666: the left 84% of the photo zoomed 1.19× from the left edge, ~6% of it above the frame */
  object-position: 0 0; transform: scale(1.195); transform-origin: 0 42%;
}
@media (min-width: 701px) { .svc--all-on-4 .svc-hero__lead { max-width: 640px; } }   /* 4992:3863: a 640 lead (implantation 520) */
.svc--all-on-4 .svc-doctor__photo img { object-position: 50% 17%; }   /* 5032:6580: as implantation */
.svc--all-on-4 .svc-care__photo img { object-position: 50% 100%; }   /* 5032:6728: the bottom of the photo */
@media (max-width: 700px) {
  .svc--implantatsiia .svc-hero__bg img { object-position: 70% 50%; }   /* 4779:1974 */
  .svc--viniry .svc-hero__bg img { object-position: 38% 50%; }   /* 5000:5809 */
  .svc--all-on-4 .svc-hero__bg img { object-position: 36% 50%; }   /* 5040:7776 */
  .svc--viniry .h2 em { display: block; }   /* its mobile file breaks before the italic part (implantation's runs on)… */
  .svc--viniry :is(.svc-doctor, .svc-faq) .h2 em { display: inline; }   /* …except the doctor's and the FAQ's titles */
  .svc--all-on-4 .h2 em { display: block; }   /* 5032:6829 breaks before the italic part too… */
  .svc--all-on-4 .svc-doctor .h2 em { display: inline; }   /* …except the doctor's title */
}
/* the alternatives' objects come placed on a transparent 832×640 tile, ~75% × 80% of it: the tablet's tall box shows
   the whole tile (cover cut the objects on both sides), scaled 1.25 so the objects fill its width */
@media (min-width: 701px) and (max-width: 1023px) {
  .svc--all-on-4 .svc-alt__img img { object-fit: contain; transform: scale(1.25); }
}
/* desktop: two cards are wide, so cover blew the tile up; the whole tile in the 320 box puts the objects at ~336×258 (4992:4108) */
@media (min-width: 1024px) { .svc--all-on-4 .svc-alt--photos .svc-alt__img img { height: 320px; object-fit: contain; transform: scale(1.2); } }   /* the img took the tile ratio (480 tall) and got cut; 1.2 = the objects at ~336 / 375 wide (4992:4108) */
