/* ==========================================================================
  AIclinics  single-service v2 (premium clinic UX)
  Loaded only when "Template: Послуга  новий дизайн" is selected for a CPT service.
  Design system source: brand.novamed.ua/index.html (Brandbook v0.01)
  Theme variables reused: --primary-color, --teal-light, --text, --text-dark,
              --bg-alt, --border, --radius, --radius-card, --shadow, --font
  ========================================================================== */

/* --- v2 local tokens (additive on top of theme :root) ------------------- */
.s2 {
  --s2-mono: 'Inter', 'Nunito', sans-serif;
  --s2-radius-btn: 999px;
  --s2-radius-card: 10px 0 10px 0;
  --s2-shadow-sm: 0 2px 8px rgba(0,0,0,.04);
  --s2-shadow-md: 0 8px 30px rgba(0,0,0,.06);
  --s2-shadow-lg: 0 20px 60px rgba(0,0,0,.08);
  --s2-shadow-teal: 0 8px 30px rgba(9,202,143,.18);
  --s2-grad: linear-gradient(135deg, #007C24, #13D59B);
  --s2-line: #E8E8EC;
  --s2-text-mute: #5a6069;
  --s2-section-pad-y: 64px;
  --s2-section-pad-y-lg: 100px;
}

@media (min-width: 1024px) {
  .s2 { --s2-section-pad-y: var(--s2-section-pad-y-lg); }
}

.s2 {
  font-family: var(--font, 'Nunito', sans-serif);
  color: var(--text, #4B4F58);
  background: #fff;
}

.s2 *, .s2 *::before, .s2 *::after { box-sizing: border-box; }
.s2 img { max-width: 100%; height: auto; display: block; }

/* --- mono label (signature of brandbook) -------------------------------- */
.s2__mono-label {
  font-family: var(--s2-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--s2-text-mute);
  margin-bottom: 12px;
  display: block;
}

/* --- container --------------------------------------------------------- */
.s2__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 1024px) { .s2__container { padding: 0 32px; } }

/* --- breadcrumbs ------------------------------------------------------- */
.s2__crumbs {
  padding: 16px 0 0;
  /* font-size + color inherit from global .breadcrumbs in critical.css
    to keep breadcrumbs consistent across all page types */
}

/* ==========================================================================
  1. HERO
  ========================================================================== */
.s2-hero {
  padding: 32px 0 56px;
}
@media (min-width: 1024px) { .s2-hero { padding: 40px 0 80px; } }

.s2-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
@media (min-width: 768px) {
  .s2-hero__grid {
    grid-template-columns: 320px 1fr;
    gap: 48px;
  }
}
@media (min-width: 1280px) {
  .s2-hero__grid {
    grid-template-columns: 380px 1fr;
    gap: 64px;
  }
}

/* When the service/category has no featured image, the media column is not
   rendered — collapse the grid to one column so we don't leave an empty
   grey box (with its background/shadow) on the right. */
.s2-hero__grid--no-media {
  grid-template-columns: 1fr !important;
}

.s2-hero__media {
  order: -1;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--s2-radius-card);
  background: var(--bg-alt, #FAFAFA);
}
@media (min-width: 768px) {
  .s2-hero__media { order: 1; aspect-ratio: 1 / 1; }
}
.s2-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.s2-hero__body { min-width: 0; }

.s2-hero__title {
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.3px;
  color: var(--text-dark, #3A3A3A);
  margin: 0 0 16px;
}

.s2-hero__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text, #4B4F58);
  margin: 0 0 28px;
  max-width: 60ch;
}

/* --- quick facts ------------------------------------------------------- */
.s2-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 32px;
  max-width: 560px;
}
@media (max-width: 480px) {
  .s2-facts { grid-template-columns: 1fr; }
}

.s2-facts__card {
  background: var(--bg-alt, #FAFAFA);
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius-card);
  padding: 16px 14px;
  text-align: left;
}
.s2-facts__label {
  font-family: var(--s2-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--s2-text-mute);
  margin: 0 0 6px;
}
.s2-facts__value {
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  line-height: 1.2;
}
.s2-facts__value-sm { font-size: 15px; line-height: 1.3; }

/* --- hero CTAs --------------------------------------------------------- */
.s2-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.s2-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--s2-radius-btn);
  font-family: var(--font, 'Nunito', sans-serif);
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.23,1,.32,1),
        background .2s, color .2s, box-shadow .2s, border-color .2s;
  text-decoration: none;
  line-height: 1;
}
.s2-btn:hover { transform: translateY(-2px); }
.s2-btn:active { transform: translateY(0); }
.s2-btn:focus-visible { outline: 3px solid rgba(9,202,143,.4); outline-offset: 2px; }

.s2-btn--primary {
  background: var(--primary-color, #09CA8F);
  color: #fff;
  box-shadow: var(--s2-shadow-teal);
}
.s2-btn--primary:hover { background: var(--primary-hover, #08AB79); color: #fff; }

.s2-btn--ghost {
  background: transparent;
  color: var(--primary-dark, #067A55);
  border-color: var(--primary-color, #09CA8F);
}
.s2-btn--ghost:hover { background: var(--teal-light, #E8F8F2); }

.s2-btn--sm { padding: 10px 18px; font-size: 14px; }

/* ==========================================================================
  2. SECTION wrapper
  ========================================================================== */
.s2-sec {
  padding: var(--s2-section-pad-y) 0;
  position: relative;
}
.s2-sec--alt { background: var(--bg-alt, #FAFAFA); }
.s2-sec__head {
  margin-bottom: 32px;
  max-width: 720px;
}
.s2-sec__title {
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark, #3A3A3A);
  margin: 0;
  letter-spacing: -.2px;
}
.s2-sec__intro {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text, #4B4F58);
  margin: 10px 0 0;
}

/* ==========================================================================
  3. ЦІНИ (price list)
  ========================================================================== */
.s2-prices__table {
  background: #fff;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius-card);
  overflow: hidden;
}
.s2-prices__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--s2-line);
  transition: background .15s;
}
.s2-prices__row:last-child { border-bottom: 0; }
.s2-prices__row:hover { background: #FBFBFC; }

.s2-prices__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark, #3A3A3A);
  line-height: 1.4;
}
.s2-prices__name a { color: inherit; }
.s2-prices__name a:hover { color: var(--primary-dark, #067A55); }
.s2-prices__name-sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--s2-text-mute);
  margin-top: 4px;
}

.s2-prices__amount {
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  white-space: nowrap;
  text-align: right;
}
.s2-prices__amount-from { font-size: 11px; color: var(--s2-text-mute); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; margin-right: 4px; }

@media (max-width: 600px) {
  .s2-prices__row { grid-template-columns: 1fr auto; }
  .s2-prices__cta { grid-column: 1 / -1; justify-self: start; }
}

/* ==========================================================================
  4. ЛІКАРІ (doctors grid)
  ========================================================================== */
.s2-doctors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.s2-doctor {
  background: #fff;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius-card);
  padding: 20px;
  box-shadow: var(--s2-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.s2-doctor:hover {
  box-shadow: var(--s2-shadow-md);
  transform: translateY(-2px);
}
.s2-doctor__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt, #FAFAFA);
  margin-bottom: 14px;
}
.s2-doctor__avatar img { width: 100%; height: 100%; object-fit: cover; }
.s2-doctor__name {
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  margin: 0 0 4px;
  line-height: 1.3;
}
.s2-doctor__name a { color: inherit; }
.s2-doctor__name a:hover { color: var(--primary-dark, #067A55); }
.s2-doctor__role {
  font-size: 13px;
  color: var(--s2-text-mute);
  margin: 0 0 6px;
}
.s2-doctor__exp {
  font-family: var(--s2-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-dark, #067A55);
  margin: 0 0 14px;
}
.s2-doctor__cta { margin-top: auto; }

/* ==========================================================================
  5. ОБЛАДНАННЯ (compact row)
  ========================================================================== */
.s2-equipment {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.s2-equipment__card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius-card);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.s2-equipment__card:hover {
  box-shadow: var(--s2-shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
.s2-equipment__media {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt, #FAFAFA);
}
.s2-equipment__media img { width: 100%; height: 100%; object-fit: cover; }
.s2-equipment__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  margin: 0 0 4px;
  line-height: 1.3;
}
.s2-equipment__desc {
  font-size: 13px;
  color: var(--s2-text-mute);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
  6. ПІДКАТЕГОРІЇ (cards: photo-icon / svg-icon / placeholder)
  ========================================================================== */
.s2-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.s2-cat {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius-card);
  padding: 18px 22px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  position: relative;
  min-height: 96px;
}
.s2-cat:hover {
  box-shadow: var(--s2-shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-color, #09CA8F);
  color: inherit;
}

/* Icon container  three variants */
.s2-cat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* (a) Photo icon  large round avatar, no background */
.s2-cat__icon--photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt, #FAFAFA);
}
.s2-cat__icon--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* (b) SVG / monochrome icon  small with teal-light tile */
.s2-cat__icon--svg,
.s2-cat__icon--placeholder {
  width: 56px;
  height: 56px;
  background: var(--teal-light, #E8F8F2);
  border-radius: 12px;
  color: var(--primary-dark, #067A55);
}
.s2-cat__icon--svg img,
.s2-cat__icon--placeholder svg {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* Card body */
.s2-cat__body { min-width: 0; }
.s2-cat__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  line-height: 1.3;
  margin: 0 0 4px;
}
.s2-cat__desc {
  font-size: 13px;
  color: var(--s2-text-mute);
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.s2-cat__price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #047857; /* fix 2026-05-19: was #008786 (4.36) → #047857 (5.5:1 AA) */
  line-height: 1;
}
.s2-cat__price-from {
  font-size: 11px;
  color: var(--s2-text-mute);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Arrow chip */
.s2-cat__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt, #FAFAFA);
  color: var(--primary-dark, #067A55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, transform .2s, color .2s;
}
.s2-cat:hover .s2-cat__arrow {
  background: var(--primary-dark, #067A55);
  color: #fff;
  transform: translateX(2px);
}

/* Mobile tweaks */
@media (max-width: 520px) {
  .s2-cat { padding: 14px 16px; gap: 14px; }
  .s2-cat__icon--photo { width: 60px; height: 60px; }
  .s2-cat__icon--svg, .s2-cat__icon--placeholder { width: 48px; height: 48px; }
  .s2-cat__title { font-size: 16px; }
}

/* ==========================================================================
  7. FAQ
  ========================================================================== */
.s2-faqs {
  border-top: 1px solid var(--s2-line);
}
.s2-faqs details {
  border-bottom: 1px solid var(--s2-line);
  padding: 20px 0;
}
.s2-faqs summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  padding-right: 36px;
  position: relative;
}
.s2-faqs summary::-webkit-details-marker { display: none; }
.s2-faqs summary::after {
  content: "+";
  position: absolute;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-light, #E8F8F2);
  color: var(--primary-dark, #067A55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  transition: transform .2s;
}
.s2-faqs details[open] summary::after { content: "−"; }
.s2-faqs__body {
  padding-top: 12px;
  color: var(--text, #4B4F58);
  line-height: 1.7;
  font-size: 15px;
}

/* ==========================================================================
  8. SEO long-form + sticky TOC
  ========================================================================== */
.s2-longform { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) {
  .s2-longform { grid-template-columns: 240px 1fr; gap: 48px; }
}
.s2-toc {
  position: relative;
}
@media (min-width: 1024px) {
  .s2-toc { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; }
}
.s2-toc__title {
  font-family: var(--s2-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--s2-text-mute);
  margin: 0 0 12px;
}
.s2-toc__list { list-style: none; margin: 0; padding: 0; }
.s2-toc__list li { padding: 6px 0; }
.s2-toc__list a {
  font-size: 14px;
  color: var(--text, #4B4F58);
  text-decoration: none;
  line-height: 1.5;
  border-left: 2px solid transparent;
  padding-left: 12px;
  display: block;
  transition: border-color .15s, color .15s;
}
.s2-toc__list a:hover,
.s2-toc__list a.is-active {
  border-color: var(--primary-color, #09CA8F);
  color: var(--primary-dark, #067A55);
}

.s2-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text, #4B4F58);
}
.s2-content h2 { font-size: 24px; font-weight: 800; margin: 32px 0 14px; color: var(--text-dark); }
.s2-content h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; color: var(--text-dark); }
.s2-content p { margin: 0 0 16px; }
.s2-content ul, .s2-content ol { margin: 0 0 16px 22px; }
.s2-content li { margin-bottom: 6px; }
.s2-content a { color: #067A55 !important; text-decoration: underline; } /* explicit WCAG AA: 5.35:1 vs white */
.s2-content img { margin: 20px 0; border-radius: var(--s2-radius-card); }
.s2-content blockquote {
  border-left: 3px solid var(--primary-color, #09CA8F);
  background: var(--teal-light, #E8F8F2);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 17px;
  border-radius: 0 var(--s2-radius-card) var(--s2-radius-card) 0;
}

/* ==========================================================================
  9. STICKY CTA (bottom on mobile, side on desktop)
  ========================================================================== */
.s2-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--s2-line);
  padding: 12px 16px;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.23,1,.32,1);
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.s2-sticky-cta.is-visible { transform: translateY(0); }

.s2-sticky-cta__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
}
.s2-sticky-cta__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.s2-sticky-cta__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #4B4F58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s2-sticky-cta__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
}
.s2-sticky-cta__price-from {
  font-size: 10px;
  color: var(--s2-text-mute);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 3px;
}
.s2-sticky-cta__actions { display: flex; gap: 8px; flex-shrink: 0; }

.s2-sticky-cta__icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-light, #E8F8F2);
  color: var(--primary-dark, #067A55);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.s2-sticky-cta__icon-btn:hover { background: var(--primary-color, #09CA8F); color: #fff; }

@media (min-width: 1024px) {
  .s2-sticky-cta {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 360px;
    border-radius: var(--s2-radius-card);
    border: 1px solid var(--s2-line);
    border-top: 1px solid var(--s2-line);
    transform: translateY(calc(100% + 32px));
  }
}

/* ==========================================================================
  10. Hairline divider под секцией (брендбук signature)
  ========================================================================== */
.s2-sec--divider::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--s2-grad);
  opacity: .35;
}

/* ==========================================================================
  11. Reduced motion
  ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .s2-btn, .s2-doctor, .s2-equipment__card, .s2-cat, .s2-sticky-cta { transition: none; }
  .s2-btn:hover { transform: none; }
}

/* ==========================================================================
  12. Legacy helper output  normalize old class names inside .s2 (iter2c)
  The functions.php helpers (display_linked_prices_for_service, etc.) inject
  their own wrapper divs and h2 headings. Inside .s2 we suppress duplicate
  headings and re-skin the wrappers to match the v2 design.
  ========================================================================== */

/* Suppress duplicate section headings injected by legacy helpers */
.s2 .service-prices > h2,
.s2 .service-prices > .prices-service,
.s2 .service-faqs > h2 {
  display: none;
}

/* service-prices: match v2 section spacing */
.s2 .service-prices {
  margin: 0;
}

/* service-faqs: re-skin faq-list as v2 accordion (override components.css card style) */
.s2 .service-faqs {
  margin: 0;
}
.s2 .faq-list {
  border-top: 1px solid var(--s2-line);
  margin: 0;
}
.s2 .faq-item {
  /* Override components.css card style → flat divider style */
  border: none;
  border-bottom: 1px solid var(--s2-line);
  border-radius: 0;
  overflow: visible;
  margin: 0;
  padding: 20px 0;
}
.s2 .faq-question {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #2a3540 !important;  /* explicit dark  override any inherited light color */
  padding: 0 36px 0 0;
  position: relative;
  background: transparent !important;
}
.s2 .faq-question:hover { background: transparent !important; color: #2a3540 !important; }
.s2 .faq-question::-webkit-details-marker { display: none; }
.s2 .faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-light, #E8F8F2);
  color: var(--primary-dark, #067A55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  transition: background .2s;
  margin-left: 0;
  flex-shrink: 0;
}
.s2 .faq-item[open] > .s2 .faq-question::after,
.s2 .faq-item[open] .faq-question::after { content: "−"; background: var(--primary-dark, #067A55); color: #fff; }

/* Override the max-height: 0 trick from components.css  <details> handles open/close natively */
.s2 .faq-answer {
  max-height: none !important;
  overflow: visible !important;
  padding: 12px 0 0 !important;
  color: var(--text, #4B4F58);
  line-height: 1.7;
  font-size: 15px;
}
/* When item is NOT open, browser hides content of <details> natively  no need for max-height trick */

/* service-doctors: legacy class  doctors rendered via new s2-doctor cards
  so the old .service-doctors wrapper just needs clearance */
.s2 .service-doctors > h2 { display: none; }
.s2 .service-doctors { margin: 0; }
.s2 .doctors-grid { display: none; } /* Hide old grid  we render s2-doctors instead */

/* ==========================================================================
  13. Empty-state blocks  pricing / doctors (iter2c)
  ========================================================================== */

/* Shared empty state shell */
.s2-empty-pricing,
.s2-empty-doctors {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 40px 32px;
  background: var(--bg-alt, #FAFAFA);
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius-card);
  max-width: 640px;
}

/* Icon circle */
.s2-empty-pricing__icon,
.s2-empty-doctors__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--teal-light, #E8F8F2);
  color: var(--primary-dark, #067A55);
  margin-bottom: 4px;
}

/* Title */
.s2-empty-pricing__title,
.s2-empty-doctors__title {
  font-family: var(--font, 'Nunito', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark, #3A3A3A);
  margin: 0;
}

/* Subtext */
.s2-empty-pricing__sub,
.s2-empty-doctors__sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--s2-text-mute);
  margin: 0;
  max-width: 44ch;
}

/* CTA row */
.s2-empty-pricing__cta,
.s2-empty-doctors__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .s2-empty-pricing,
  .s2-empty-doctors { padding: 28px 20px; }
  .s2-empty-pricing__cta .s2-btn,
  .s2-empty-doctors__cta .s2-btn { width: 100%; justify-content: center; }
}

/* =========================================================================
 * ELEGANCE PATCH 2026-05-19  refine main nav + service hero to feel premium.
 * Added at the end of critical.css (or single-service-v2.css).
 * Goal: more whitespace, lighter typography, softer shadows, Apple-tier polish.
 * ========================================================================= */

/* --- 1. Main navigation: tone down the green "slab" ----------------- */

.main-nav {
  /* Lighter visual weight + subtle gradient instead of flat green slab */
  background: linear-gradient(180deg,
    var(--primary-color, #09ca8f) 0%,
    color-mix(in srgb, var(--primary-color, #09ca8f) 92%, black) 100%);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.main-menu > li > a {
  padding: 14px 14px;
  font-weight: 500;     /* was 600  lighter, less "shouty" */
  font-size: 14.5px;
  letter-spacing: .1px;
  color: rgba(255,255,255,.94);
  position: relative;
  transition: color .2s ease;
}

/* Hover: thin underline grows from center, no aggressive background flash */
.main-menu > li > a::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 0;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: width .25s ease, left .25s ease;
}
.main-menu > li:hover > a::before,
.main-menu > li.current-menu-item > a::before,
.main-menu > li.current-menu-parent > a::before,
.main-menu > li.current-menu-ancestor > a::before {
  width: 22px;
  left: calc(50% - 11px);
}
.main-menu > li:hover { background: transparent; }
.main-menu > li:hover > a { color: #fff; }

/* Active "Діагностика"  soft pill, not harsh white block */
.main-menu > li.current-menu-item > a,
.main-menu > li.current-menu-parent > a,
.main-menu > li.current-menu-ancestor > a {
  background: transparent;
  color: #fff;
  font-weight: 600;
}

/* Dropdown arrow  thinner, lower contrast */
.main-menu > li.menu-item-has-children > a::after {
  width: 4px;
  height: 4px;
  border-right-width: 1.2px;
  border-bottom-width: 1.2px;
  border-color: rgba(255,255,255,.7);
  margin-left: 6px;
}

/* --- 2. Sub-menu (dropdown)  more refined ------------------------- */

.main-menu .sub-menu {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.04);
  border: 1px solid rgba(15,38,60,.06);
  padding: 8px 0;
  background: #fff;
  min-width: 240px;
  overflow: hidden;
}
.main-menu .sub-menu li > a {
  padding: 10px 18px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-dark, #2a3540);
  transition: background .15s, color .15s, padding-left .2s;
}
.main-menu .sub-menu li > a:hover {
  background: #f6fbf9;
  color: var(--primary-color, #09ca8f);
  padding-left: 22px;
}

/* --- 3. Service hero (УЗД, МРТ category etc)  premium feel -------- */

.s2-hero {
  padding: 40px 0 64px;
}
@media (min-width: 1024px) { .s2-hero { padding: 56px 0 96px; } }

/* Text-first balance: 7fr text vs 5fr image  text has breathing room */
@media (min-width: 768px) {
  .s2-hero__grid {
    grid-template-columns: 7fr 5fr !important;
    gap: 56px !important;
  }
}
@media (min-width: 1280px) {
  .s2-hero__grid {
    grid-template-columns: 7fr 5fr !important;
    gap: 72px !important;
  }
}

/* Picture frame: rounded, soft shadow, gentle scale on entry */
.s2-hero__media {
  aspect-ratio: 4 / 3 !important;     /* less square, more cinematic */
  border-radius: 24px !important;
  box-shadow:
    0 30px 60px -20px rgba(15,38,60,.20),
    0 18px 36px -18px rgba(9,202,143,.18);
  overflow: hidden;
  position: relative;
  /* Subtle decorative blob behind the image */
  isolation: isolate;
}
.s2-hero__media::before {
  content: '';
  position: absolute;
  inset: -30px -30px auto auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(9,202,143,.18) 0%, transparent 70%);
  z-index: -1;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}
.s2-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.s2-hero__media:hover img { transform: scale(1.03); }

/* Body  let the text breathe */
.s2-hero__body { padding-top: 8px; }

.s2__mono-label {
  font-size: 12px;
  letter-spacing: .2em;
  font-weight: 700;
  color: var(--primary-dark, #067A55); /* fix 2026-05-19: was #09ca8f (2.1:1) → 4.6:1 AA */
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.s2__mono-label::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--primary-color, #09ca8f); /* decorative bar  contrast not required */
  border-radius: 2px;
}

.s2-hero__title {
  font-weight: 700 !important;    /* was 800  more refined */
  letter-spacing: -.5px !important;
  line-height: 1.05 !important;
  margin: 0 0 20px !important;
}

/* Lead paragraph  better reading rhythm, strip embedded <h2> */
.s2-hero__lead {
  font-size: 17px;
  line-height: 1.7;
  color: #4a5560;
  margin: 0 0 28px;
  max-width: 60ch;
}
.s2-hero__lead h2 {
  /* Some imported posts have a stray <h2> inside the lead  turn into subhead */
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-dark, #2a3540);
  margin: 0 0 12px;
  line-height: 1.3;
}

/* CTA stack: primary + ghost secondary */
.s2-hero__cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}
.s2-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s;
  line-height: 1;
}
.s2-btn--primary {
  background: var(--primary-color, #09ca8f);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(9,202,143,.55);
}
.s2-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(9,202,143,.7);
  background: color-mix(in srgb, var(--primary-color, #09ca8f) 92%, black);
  color: #fff;
}
.s2-btn--ghost {
  background: transparent;
  color: var(--primary-dark, #067A55); /* fix 2026-05-19: AA 4.6:1 vs white */
  border: 1.5px solid color-mix(in srgb, var(--primary-color, #09ca8f) 50%, transparent);
}
.s2-btn--ghost:hover {
  background: #f6fbf9;
  border-color: var(--primary-color, #09ca8f);
}

/* --- 5. Page background  pure white with subtle texture --------- */

body { background: #fcfdfd; }

/* --- 6. Mobile refinements ---------------------------------------- */

@media (max-width: 767px) {
  .s2-hero { padding: 24px 0 40px; }
  .s2-hero__grid { gap: 24px !important; }
  .s2-hero__media {
    aspect-ratio: 16 / 11 !important;
    border-radius: 18px !important;
  }
  .s2-hero__lead { font-size: 15.5px; line-height: 1.65; }
  .s2-hero__cta { width: 100%; }
  .s2-btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
  E-E-A-T Medical Review Byline
  ========================================================================== */
.s2-byline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -8px 0 18px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--ds-brand, #09ca8f) 6%, transparent);
  border-left: 3px solid var(--ds-brand, #09ca8f);
  border-radius: 0 6px 6px 0;
}

.s2-byline__icon {
  flex-shrink: 0;
  color: var(--ds-brand, #09ca8f);
}

.s2-byline__text {
  font-size: 13px;
  color: var(--ds-text-muted, #6e6e73);
  line-height: 1.5;
}

.s2-byline__link {
  color: var(--ds-text-primary, #1d1d1f);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s ease;
}

.s2-byline__link:hover {
  color: var(--ds-brand, #09ca8f);
}

.s2-byline__date {
  color: var(--ds-text-muted, #6e6e73);
}

/* ==========================================================================
  Mayo 6-Section Template + Sticky Sidebar
  ========================================================================== */
.mayo-wrap {
  background: #fafafa;
  border-top: 1px solid var(--s2-line, #E8E8EC);
  border-bottom: 1px solid var(--s2-line, #E8E8EC);
  padding: 56px 0;
}

@media (min-width: 1024px) {
  .mayo-wrap { padding: 72px 0; }
}

.mayo-wrap__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 960px) {
  .mayo-wrap__inner {
    grid-template-columns: 1fr 300px;
    gap: 64px;
    align-items: start;
  }
}

/* --- Mayo main column ----------------------------------------------------- */
.mayo-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section block */
.mayo-sec {
  padding: 28px 0;
  border-bottom: 1px solid var(--s2-line, #E8E8EC);
}

.mayo-sec:first-child {
  padding-top: 0;
}

.mayo-sec:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mayo-sec__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ds-text-primary, #1d1d1f);
  letter-spacing: -.3px;
  margin: 0 0 16px;
  line-height: 1.25;
}

/* Content within mayo sections (inherits entry-content styles) */
.mayo-sec__body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ds-text-primary, #1d1d1f);
  margin: 0 0 14px;
}

.mayo-sec__body p:last-child { margin-bottom: 0; }

.mayo-sec__body ul,
.mayo-sec__body ol {
  padding-left: 20px;
  margin: 0 0 14px;
}

.mayo-sec__body li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ds-text-primary, #1d1d1f);
  margin-bottom: 6px;
}

.mayo-sec__body ol li {
  padding-left: 4px;
}

.mayo-sec__body strong {
  font-weight: 600;
  color: var(--ds-text-primary, #1d1d1f);
}

/* --- Sticky Sidebar ------------------------------------------------------- */
.mayo-sidebar {
  /* Full width on mobile, positioned by grid on desktop */
}

.mayo-sidebar__sticky {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--s2-line, #E8E8EC);
  border-radius: 16px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 38, 60, .05);
}

@media (min-width: 960px) {
  .mayo-sidebar__sticky {
    position: sticky;
    top: 90px;
  }
}

/* Primary CTA inside sidebar */
.mayo-sidebar__cta {
  width: 100%;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  padding: 13px 20px;
}

/* Find doctor link */
.mayo-sidebar__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ds-text-primary, #1d1d1f);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--s2-line, #E8E8EC);
  transition: border-color .15s ease, background .15s ease;
}

.mayo-sidebar__link svg {
  color: var(--ds-text-muted, #6e6e73);
  flex-shrink: 0;
}

.mayo-sidebar__link:hover {
  border-color: var(--ds-brand, #09ca8f);
  background: color-mix(in srgb, var(--ds-brand, #09ca8f) 5%, transparent);
}

/* Related procedures */
.mayo-sidebar__related {
  padding: 12px 0 4px;
  border-top: 1px solid var(--s2-line, #E8E8EC);
  margin-top: 2px;
}

.mayo-sidebar__related-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ds-text-muted, #6e6e73);
  margin: 0 0 10px;
}

.mayo-sidebar__related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mayo-sidebar__related-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ds-text-primary, #1d1d1f);
  text-decoration: none;
  padding: 5px 0;
  transition: color .15s ease;
}

.mayo-sidebar__related-item svg {
  color: var(--ds-text-muted, #6e6e73);
  flex-shrink: 0;
  transition: color .15s ease;
}

.mayo-sidebar__related-item:hover {
  color: var(--ds-brand, #09ca8f);
}

.mayo-sidebar__related-item:hover svg {
  color: var(--ds-brand, #09ca8f);
}

/* PDF preparation link */
.mayo-sidebar__pdf {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ds-text-muted, #6e6e73);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--s2-line, #E8E8EC);
  transition: border-color .15s ease, color .15s ease;
}

.mayo-sidebar__pdf:hover {
  border-color: var(--ds-brand, #09ca8f);
  color: var(--ds-brand, #09ca8f);
}

/* --- Single Doctor page rating block ------------------------------------- */
.dsingle-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 16px;
  padding: 10px 14px;
  background: #fafafa;
  border: 1px solid var(--ds-line, rgba(15, 38, 60, .08));
  border-radius: 10px;
}

.dsingle-rating__score {
  font-size: 22px;
  font-weight: 700;
  color: var(--ds-text-primary, #1d1d1f);
  letter-spacing: -.3px;
  line-height: 1;
}

.dsingle-rating__stars {
  display: flex;
  gap: 2px;
  color: #f5a623;
}

.dsingle-rating__stars .dc2-star {
  width: 17px;
  height: 17px;
}

.dsingle-rating__count {
  font-size: 13px;
  color: var(--ds-text-muted, #6e6e73);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dsingle-rating__how {
  font-size: 12px;
  color: var(--ds-text-muted, #6e6e73);
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s ease;
}

.dsingle-rating__how:hover {
  color: var(--ds-brand, #09ca8f);
}

.dsingle-rating__new {
  font-size: 13px;
  color: var(--ds-text-muted, #6e6e73);
  font-style: italic;
}

/* dc2-lang chips reused on single-doctor page */
.doctor-meta-value.dc2-meta__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Mayo mobile adjustments */
@media (max-width: 767px) {
  .mayo-wrap { padding: 36px 0; }
  .mayo-sec { padding: 20px 0; }
  .mayo-sec__title { font-size: 18px; }
  .mayo-sidebar__sticky { position: static; }
  .s2-byline { flex-direction: column; align-items: flex-start; gap: 4px; }
}
