.service-page {
  --service-page-rail: var(--container-max);
  overflow-x: hidden;
}
.service-page > .container,
.service-page > .avet-service-hero > .container {
  width: 100%;
  max-width: var(--service-page-rail);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}
.service-page .avet-breadcrumbs { padding: clamp(18px, 2vw, 28px) 0 clamp(20px, 2.5vw, 36px); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--text-sm); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.breadcrumbs a { color: var(--color-brand-700); }

.service-hero { padding: 0 0 70px; }
.service-hero-card { display: grid; grid-template-columns: 1.02fr .98fr; min-height: 560px; overflow: hidden; border-radius: 38px; background: #eaf4f7; box-shadow: var(--shadow-md); }
.service-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 82px); }
.service-hero-copy h1 { max-width: 760px; margin: 18px 0 20px; font-size: clamp(2.5rem, 4.4vw, 4.5rem); }
.service-hero-copy .lead { max-width: 650px; }
.service-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.service-hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 24px; margin: 18px 0 0; padding: 20px clamp(20px, 3vw, 34px); border: 1px solid rgba(16,43,78,.1); border-radius: 22px; background: #f7fbfc; box-shadow: var(--shadow-sm); list-style: none; font-size: var(--text-sm); }
.service-hero-facts li { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.service-hero-facts li::before { content: "✓"; display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; color: white; background: var(--green); font-size: 12px; }
.service-hero-photo { position: relative; min-height: 420px; }
.service-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.service-price-pill { position: absolute; right: 24px; bottom: 24px; padding: 15px 18px; border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); color: var(--ink); }
.service-price-pill strong { display: block; color: var(--blue); font-family: var(--font-heading); font-size: 22px; }

.service-layout { display: grid; grid-template-columns: minmax(240px, 310px) minmax(0, 1fr); gap: clamp(36px, 6vw, 90px); align-items: start; padding-bottom: clamp(64px, 7vw, 96px); }
.service-sidebar { position: sticky; top: 108px; }
.service-sidebar-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow-sm); }
.service-sidebar h2 { margin: 0; padding: 22px 22px 15px; font-size: 20px; }
.service-nav { display: grid; padding: 0 10px 12px; }
.service-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: 12px; color: var(--color-text); font-size: var(--text-sm); font-weight: 650; }
.service-nav a::after { content: "→"; color: var(--blue); }
.service-nav a:hover { background: var(--pale); }
.service-nav a[aria-current="page"] { color: white; background: var(--blue); }
.service-nav a[aria-current="page"]::after { color: white; }
.sidebar-help { margin-top: 16px; padding: 21px; border-radius: 22px; color: white; background: var(--ink); }
.sidebar-help strong { display: block; margin-bottom: 7px; font-family: var(--font-heading); font-size: 18px; }
.sidebar-help p { color: #c8d8e6; font-size: 13px; }
.sidebar-help a { width: 100%; }

.service-content { min-width: 0; container-type: inline-size; }
.content-section { padding-bottom: 76px; scroll-margin-top: 110px; }
.service-content > .content-section:last-child { padding-bottom: 0; }
.content-section > p, .content-section > ul { max-width: 850px; }
.content-section h2 { max-width: 870px; }
.service-content .content-section > :where(.eyebrow, h2, h3, h4, p, ul) {
  margin-left: 0 !important;
  margin-right: auto !important;
}
.service-content .content-section > :where(.symptom-grid, .visit-steps, .urgent-note) {
  width: 100%;
  max-width: none !important;
  margin-inline: 0 !important;
}
.content-section h3 { margin-top: 34px; font-size: clamp(1.45rem, 2vw, 1.85rem); }
.content-section h4 { margin-top: 26px; font-size: 1.2rem; }
.content-section ul:not(.symptom-grid) { padding-left: 1.2em; }
.content-section li + li { margin-top: 8px; }
.symptom-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.symptom-grid li { display: flex; gap: 12px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; font-weight: 600; }
.symptom-grid li + li { margin-top: 0; }
.symptom-grid li::before { content: "!"; display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 9px; color: #85442f; background: #ffe1d5; font-weight: 800; }
.urgent-note { display: flex; gap: 14px; margin-top: 24px; padding: 20px; border-left: 5px solid var(--coral); border-radius: 0 16px 16px 0; background: #fff1eb; }
.urgent-note strong { color: var(--ink); }
.urgent-note p { margin: 0; }
.visit-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
.service-page .visit-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 14px; min-width: 0; padding: 24px; border-radius: 20px; background: white; border: 1px solid var(--line); }
.service-page .visit-step > div { min-width: 0; }
.service-page .visit-step .visit-step-number,
.service-page .visit-step > span:first-child { display: grid; place-items: center; grid-row: auto; flex: 0 0 40px; width: 40px; min-width: 40px; height: 40px; min-height: 40px; margin: 0; border-radius: 13px; color: var(--blue); background: var(--pale); font-family: var(--font-heading); font-weight: 800; line-height: 1; }
.visit-step h3 { margin: 0 0 10px; font-size: 19px; }
.visit-step p { margin: 0; color: var(--muted); font-size: 13px; }
.doctor-quote { margin: 32px 0 0; padding: 32px 34px; border-radius: 8px 28px 28px 28px; color: white; background: var(--blue); }
.doctor-quote p { margin-bottom: 16px; color: white; font-family: var(--font-heading); font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.42; }
.doctor-quote footer { margin: 0; padding: 0; color: var(--color-brand-100); background: none; font-size: var(--text-sm); }

.photo-carousel { position: relative; margin-top: 28px; }
.photo-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 26px; }
.photo-viewport::-webkit-scrollbar { display: none; }
.photo-track { display: flex; gap: 16px; }
.clinic-photo { flex: 0 0 calc(72% - 8px); scroll-snap-align: start; margin: 0; }
.clinic-photo img { width: 100%; height: 430px; object-fit: cover; border-radius: 26px; }
.clinic-photo figcaption { padding: 10px 4px 0; color: var(--muted); font-size: 13px; }
.carousel-controls { display: flex; gap: 8px; margin-top: 18px; }
.carousel-arrow { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: white; cursor: pointer; font-size: 20px; }

.price-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; margin-bottom: 24px; }
.price-head > div { min-width: 0; }
.price-head p { max-width: 520px; margin: 0; color: var(--muted); font-size: var(--text-sm); }
.price-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow-sm); }
.price-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.price-table th, .price-table td { padding: 17px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.price-table th { color: var(--muted); background: #f7fafc; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.price-table th:last-child, .price-table td:last-child { width: 150px; text-align: right; color: var(--ink); font-weight: 750; white-space: nowrap; }
.price-table .price-group td { padding-top: 23px; color: var(--blue); background: var(--pale); font-family: var(--font-heading); font-size: 17px; font-weight: 750; }
.price-table tr:last-child td { border-bottom: 0; }
.price-note { margin-top: 14px; color: var(--muted); font-size: 12px; }

.service-reviews { padding: 78px 0; background: var(--sand); }
.service-reviews .reviews-head { grid-template-columns: auto 1fr auto; }
.avet-service-faq { padding-bottom: clamp(64px, 6vw, 88px); }
.faq-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 60px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 16px; background: white; }
.faq-list details:not([open]) > :not(summary) { display: none; }
.faq-list summary { padding: 19px 52px 19px 20px; color: var(--ink); font-weight: 700; cursor: pointer; position: relative; list-style: none; }
.faq-list summary::marker { content: ""; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 20px; top: 50%; color: var(--blue); font-size: 24px; line-height: 1; transform: translateY(-50%); transform-origin: center; transition: transform 240ms cubic-bezier(.2, .8, .2, 1); }
.faq-list details[open] summary::after { content: "+"; transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 20px 20px; margin: 0; color: var(--muted); font-size: var(--text-sm); }
.faq-list[data-avet-faq-enhanced] details.is-opening > :not(summary) { animation: avet-faq-content-in 240ms cubic-bezier(.2, .8, .2, 1) both; }
.faq-list[data-avet-faq-enhanced] details.is-closing > :not(summary) { animation: avet-faq-content-out 240ms cubic-bezier(.2, .8, .2, 1) both; }
.service-final-cta { padding-top: 0; }

@keyframes avet-faq-content-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes avet-faq-content-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

@media (max-width: 980px) {
  .service-hero-card { grid-template-columns: 1fr; }
  .service-hero-photo { order: -1; height: 390px; }
  .service-layout { grid-template-columns: 1fr; }
  .service-sidebar { position: static; overflow: hidden; }
  .service-sidebar-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .service-sidebar h2 { padding: 0 0 12px; }
  .service-nav { display: flex; overflow-x: auto; gap: 8px; padding: 0 0 10px; scroll-snap-type: x mandatory; }
  .service-nav a { flex: 0 0 auto; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); background: white; scroll-snap-align: start; }
  .service-nav a::after { display: none; }
  .sidebar-help { display: none; }
  .faq-grid { grid-template-columns: 1fr; gap: 26px; }
}

/* Use the content column width: the desktop sidebar reduces the available space. */
@container (min-width: 640px) {
  .visit-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 960px) {
  .visit-steps:not(:has(> .visit-step:nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .faq-list summary::after { transition: none; }
  .faq-list[data-avet-faq-enhanced] details > :not(summary) { animation: none; }
}

@media (max-width: 700px) {
  .avet-service-prices .price-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .avet-service-prices .price-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-collapse: separate;
  }

  /* Keep the real column headers available to assistive technology. */
  .avet-service-prices .price-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
  }

  .avet-service-prices .price-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 0.75rem;
  }

  .avet-service-prices .price-table tbody tr {
    display: grid;
    width: 100%;
    min-width: 0;
  }

  .avet-service-prices .price-table tbody tr:not(.price-group) {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
  }

  .avet-service-prices .price-table tbody td {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
  }

  .avet-service-prices .price-table tbody tr:not(.price-group) > td:first-child {
    padding: 1rem 1rem 0.75rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.45;
  }

  .avet-service-prices .price-table tbody tr:not(.price-group) > td:last-child {
    display: grid;
    width: auto;
    margin: 0 1rem;
    padding: 0.75rem 0 1rem;
    justify-items: start;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-weight: 750;
    text-align: left;
  }

  .avet-service-prices .price-table tbody tr:not(.price-group) > td:last-child::before {
    margin-bottom: 0.2rem;
    color: var(--muted);
    content: "Цена, руб.";
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .avet-service-prices .price-table tbody tr:not(.price-group) > td:last-child:empty {
    display: none;
  }

  .avet-service-prices .price-table .price-group {
    margin-top: 0.35rem;
  }

  .avet-service-prices .price-table .price-group td {
    border: 1px solid var(--color-brand-200);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    color: var(--color-brand-800);
    background: var(--pale);
    line-height: 1.35;
  }

  .avet-service-prices .price-table .price-note {
    display: block;
    margin-top: 0.4rem;
    font-weight: 400;
    line-height: 1.5;
  }
}

@media (max-width: 640px) {
  .service-page > .container,
  .service-page > .avet-service-hero > .container { padding-inline: var(--container-gutter-mobile); }
  .service-page .avet-breadcrumbs { padding: 18px 0 20px; }
  .service-hero { padding-bottom: 48px; }
  .service-hero-card { min-height: 0; border-radius: 24px; }
  .service-hero-photo { height: 260px; }
  .service-price-pill { right: 12px; bottom: 12px; padding: 11px 13px; font-size: 12px; }
  .service-price-pill strong { font-size: 18px; }
  .service-hero-copy { padding: 28px 20px 32px; }
  .service-hero-copy h1 { margin: 12px 0 16px; font-size: 2.35rem; }
  .service-hero-copy .lead { font-size: 15px; }
  .service-hero-actions { display: grid; grid-template-columns: 1fr; }
  .service-hero-actions .btn { width: 100%; }
  .service-hero-facts { gap: 10px; margin-top: 14px; padding: 18px; border-radius: 18px; }
  .service-layout { gap: 36px; }
  .content-section { padding-bottom: 56px; }
  .symptom-grid { grid-template-columns: 1fr; }
  .doctor-quote { padding: 24px 20px; }
  .clinic-photo { flex-basis: 88%; }
  .clinic-photo img { height: 290px; }
  .price-head { display: block; }
  .price-head p { margin-top: 12px; }
  .service-reviews { padding: 58px 0; }
  .service-reviews .reviews-head { grid-template-columns: 1fr auto; }
  .service-reviews .google-card { grid-column: 1 / -1; }
}
