/* ============================================================
   Приём врачей — page-specific styles
   ============================================================ */

/* Mark current nav link */
.nav-main a.is-current {
  color: var(--violet);
  font-weight: 600;
}
.nav-main a.is-current::after { transform: scaleX(1); }

/* ---------- Breadcrumbs + Title ---------- */
.page-head {
  padding: 14px 0 10px;
  text-align: center;
}
/* .breadcrumbs — канон в styles.css (не дублировать) */
.page-title {
  font-size: clamp(27px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

/* ---------- HERO BANNER ---------- */
.priem-hero {
  padding: 8px 0 0;
}
.priem-hero-wrap {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, #FFF0F0 0%, #F1EAFC 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}
.priem-hero-figure {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  min-height: 560px;
}
.priem-hero-figure .priem-hero-blob {
  position: absolute;
  width: 78%;
  height: auto;
  left: -6%;
  top: 2%;
  z-index: 1;
  pointer-events: none;
}
.priem-hero-doctors {
  position: relative;
  z-index: 2;
  max-height: 560px;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  object-position: bottom center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.priem-hero-figure .priem-hero-blob {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.priem-hero-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-xl);
  padding: 44px 44px 40px;
  margin: 28px 28px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-self: stretch;
  justify-content: center;
}
.priem-hero-title {
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-wrap: pretty;
}
.priem-hero-sub {
  font-size: 17px;
  color: var(--text);
  margin: 0;
  opacity: 1;
  line-height: 1.55;
}
.priem-hero-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}
.hpill {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hpill-ico {
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: 0 4px 14px rgba(48, 30, 110, 0.10);
  display: grid;
  place-items: center;
  color: var(--violet);
  flex-shrink: 0;
}
.hpill-ico svg { width: 24px; height: 24px; }
.hpill-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hpill-text strong {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.hpill-text span {
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.priem-hero-card .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- УСЛУГИ ---------- */
.priem-services { padding: var(--section-pad) 0 0; }

.serv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.serv-card {
  background: #FFF0EF;
  border-radius: var(--r-lg);
  padding: 22px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--text);
  will-change: transform, background-color;
  transition:
    background-color 320ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 320ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 320ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.serv-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, #7B69D8 0%, #6054B1 60%, #4F44A0 100%);
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: inherit;
}
.serv-card > * { position: relative; z-index: 1; }
.serv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(96, 84, 177, 0.35);
}
.serv-card:hover::before { opacity: 1; }
.serv-card:hover .serv-name { color: #fff; }
.serv-card:hover .serv-desc { color: #fff; opacity: 0.85; }
.serv-card:hover .serv-thumb { background: rgba(255,255,255,0.18); }
.serv-card:hover .serv-arrow {
  background: rgba(255,255,255,0.95);
  color: var(--violet);
}
.serv-thumb {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  transition: background-color 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.serv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.serv-card:hover .serv-thumb img { transform: scale(1.08); }
.serv-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}
.serv-meta { flex: 1; min-width: 0; }
.serv-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.15;
  text-wrap: balance;
  transition: color 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.serv-desc {
  font-size: 14px;
  color: var(--text);
  opacity: 1;
  line-height: 1.45;
  margin: 0;
  max-width: 90%;
  transition:
    color 280ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.serv-arrow {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: #F9BBB7;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  transition:
    transform 0.4s ease,
    background-color 0.4s ease,
    color 0.4s ease;
}
.serv-arrow svg { transition: transform 0.4s ease; }
.serv-card:hover .serv-arrow {
  background: #fff;
  color: var(--violet);
  transform: scale(1.06);
}
.serv-card:hover .serv-arrow svg { transform: none; }

/* Featured card behaves identically to others now (kept as alias) */
.serv-card--feature { /* no extra styles — default serv-card hover applies */ }

/* Whole-card link overlay */
.serv-card--link { cursor: pointer; }
.serv-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
}
.serv-card--link .serv-arrow { position: relative; z-index: 6; }

/* CTA banner — spans 2 columns in the grid */
.serv-cta {
  grid-column: span 2;
  background:
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(176, 159, 233, 0.55) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 0% 0%, rgba(255, 255, 255, 0.7) 0%, transparent 60%),
    linear-gradient(135deg, #EFEAFB 0%, #E5DDF5 100%);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  position: relative;
  min-height: 220px;
  isolation: isolate;
}
/* Decorative dot pattern */
.serv-cta::before {
  content: "";
  position: absolute;
  top: -40px;
  right: 40%;
  width: 220px;
  height: 220px;
  background-image: radial-gradient(circle, rgba(96, 84, 177, 0.18) 1.5px, transparent 1.8px);
  background-size: 14px 14px;
  opacity: 0.55;
  z-index: 0;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 75%);
  pointer-events: none;
}
/* Floating soft orb */
.serv-cta::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(232, 222, 250, 0.4) 60%, transparent 80%);
  filter: blur(2px);
  z-index: 0;
  pointer-events: none;
}
.serv-cta-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 460px;
  position: relative;
  z-index: 2;
}
.serv-cta-text h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}
.serv-cta-phone {
  font-size: 22px;
  font-weight: 700;
  color: var(--violet-deep);
  letter-spacing: -0.01em;
  transition: color 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
}
.serv-cta-phone:hover { color: var(--violet); transform: translateX(2px); }
.serv-cta-btn {
  align-self: flex-start;
  height: 48px;
  padding: 0 22px;
  background: linear-gradient(140deg, #2563EB 0%, #7C3AED 50%, #9333EA 100%);
  box-shadow: 0 12px 28px rgba(96, 84, 177, 0.28);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}
.serv-cta-btn:hover {
  background: linear-gradient(140deg, #2563EB 0%, #7C3AED 50%, #9333EA 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(96, 84, 177, 0.38);
}
.serv-cta-mx {
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  display: grid; place-items: center;
}
.serv-cta-mx img { width: 26px; height: 26px; }

.serv-cta-photo {
  position: relative;
  width: 320px;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 2;
}
.serv-cta-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(48, 30, 110, 0.18);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.serv-cta:hover .serv-cta-photo img {
  transform: scale(1.02) translateY(-2px);
}

/* ---------- ЛИЦЕНЗИИ ---------- */
.licenses-section { padding: 0; margin-top: var(--section-pad); }
.licenses-bg {
  background: var(--bg-soft);
  padding: var(--section-pad-tight) 0;
}
.licenses-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.license-card {
  flex: 0 0 calc((100% - 72px) / 4);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0;
  gap: 14px;
}
.license-thumb {
  width: 100%;
  aspect-ratio: 0.72;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(48, 30, 110, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  cursor: pointer;
}
.license-thumb::before {
  /* Header band */
  content: "";
  position: absolute;
  top: 10%; left: 14%; right: 14%;
  height: 12%;
  background:
    linear-gradient(180deg, rgba(48,30,110,0.15) 0%, rgba(48,30,110,0.05) 100%);
  border-radius: 2px;
}
.license-thumb::after {
  /* Text lines simulation */
  content: "";
  position: absolute;
  top: 26%; left: 14%; right: 14%; bottom: 14%;
  background-image:
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px),
    linear-gradient(rgba(48,30,110,0.12) 1.5px, transparent 1.5px);
  background-repeat: no-repeat;
  background-size:
    100% 1.5px, 88% 1.5px, 95% 1.5px, 92% 1.5px, 70% 1.5px,
    100% 1.5px, 86% 1.5px, 94% 1.5px, 80% 1.5px;
  background-position:
    0 5%, 0 14%, 0 23%, 0 32%, 0 41%,
    0 56%, 0 65%, 0 74%, 0 83%;
}
.license-thumb:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(48, 30, 110, 0.18);
}

/* Real PDF page rendered into the thumb */
.license-thumb--pdf,
.license-thumb--img {
  display: block;
  background: #fff;
  text-decoration: none;
  overflow: hidden;
  aspect-ratio: auto;
  height: auto;
  min-height: 200px;
  padding: 0;
}
.license-thumb--pdf::before,
.license-thumb--pdf::after,
.license-thumb--img::before,
.license-thumb--img::after { content: none; display: none; }
.license-thumb--pdf canvas,
.license-thumb--img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}
.license-thumb--fallback {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 13px;
  aspect-ratio: 0.72;
  min-height: 0;
}
.license-card figcaption {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 180px;
}
.licenses-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--block-gap);
}

/* ---------- FAQ ---------- */
.container-narrow {
  max-width: 880px;
}
.faq-section .section-title { margin-bottom: var(--title-gap); }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-soft);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    background-color 360ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 360ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 360ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Soft violet glow that fades in when item is open */
.faq-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(124, 92, 230, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #F3EEFB 0%, #ECE3F7 100%);
  opacity: 0;
  transition: opacity 360ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}
/* Left accent bar that grows when opened */
.faq-item::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--violet) 0%, #9B85E8 100%);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
  transition: height 420ms cubic-bezier(0.34, 1.2, 0.64, 1);
  z-index: 1;
}
.faq-item:hover {
  background-color: #F3EEFB;
}
.faq-item:hover::after { height: 32%; }

.faq-item[open] {
  box-shadow: 0 12px 32px rgba(96, 84, 177, 0.10);
}
.faq-item[open]::before { opacity: 1; }
.faq-item[open]::after { height: 56%; }

.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: color 280ms cubic-bezier(0.4, 0, 0.2, 1),
              padding 360ms cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary > span:first-child {
  transition: transform 360ms cubic-bezier(0.34, 1.2, 0.64, 1);
}
.faq-item:hover > summary { color: var(--violet); }
.faq-item[open] > summary {
  color: var(--violet-deep);
  padding-bottom: 14px;
}
.faq-item[open] > summary > span:first-child {
  transform: translateX(6px);
}

/* Toggle: single icon that morphs (rotate) instead of swapping two */
.faq-toggle {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: var(--violet);
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  transition:
    background-color 360ms cubic-bezier(0.4, 0, 0.2, 1),
    color 280ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 420ms cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 360ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(96, 84, 177, 0.08);
}
.faq-toggle .faq-plus,
.faq-toggle .faq-close { display: none; }
/* Build the plus/X from two bars so we can rotate one smoothly */
.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 1.25px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1.4);
}
.faq-toggle::before { transform: translate(-50%, -50%) rotate(0deg); }
.faq-toggle::after  { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item:hover .faq-toggle {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 6px 16px rgba(96, 84, 177, 0.25);
}
.faq-item[open] .faq-toggle {
  background: var(--violet);
  color: #fff;
  transform: rotate(180deg);
  box-shadow: 0 6px 16px rgba(96, 84, 177, 0.30);
}
.faq-item[open] .faq-toggle::before { transform: translate(-50%, -50%) rotate(45deg); }
.faq-item[open] .faq-toggle::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Answer reveal — grid-rows trick gives true height animation */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 28px;
}
.faq-answer p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  max-width: 720px;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 320ms cubic-bezier(0.4, 0, 0.2, 1) 80ms,
    transform 420ms cubic-bezier(0.34, 1.2, 0.64, 1) 80ms,
    padding 420ms cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item[open] .faq-answer {
  grid-template-rows: 1fr;
}
.faq-item[open] .faq-answer p {
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 22px;
}
.faq-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.faq-hidden { display: none; }
.faq-expanded .faq-hidden { display: block; }
.faq-more-btn {
  background: transparent;
  border: 0;
  color: var(--violet);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 0;
  position: relative;
  cursor: pointer;
  transition: color 0.2s ease;
}
.faq-more-btn::after { content: none; display: none; }
.faq-more-btn:hover { color: var(--violet-hover); text-decoration: underline; }
.faq-more-btn:hover::after { transform: none; }

/* ---------- СПЕЦИАЛИСТЫ ---------- */
.specialists-section { padding: 0; margin-top: var(--section-pad); }
.specialists-bg {
  background: var(--bg-soft);
  padding: var(--section-pad-tight) 0;
}
.specialists-section .section-title { margin-bottom: 32px; }

/* .spec-tabs / .spec-tab — канон в styles.css (не дублировать) */

/* Мобильный выпадающий фильтр специалистов — скрыт на десктопе,
   показывается вместо ряда табов на узких экранах (см. media ≤720px). */
.spec-tabs-select { display: none; }
.spec-tabs-select .custom-select-trigger {
  width: 100%;
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.spec-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.spec-card {
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 0;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  cursor: pointer;
}
a.spec-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
a.spec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(48, 30, 110, 0.12);
}
.spec-card:hover {
}
.spec-card.is-hidden { display: none; }
.spec-grid.is-expanded .spec-card.is-hidden { display: flex; }

/* Photo zoom on card hover */
.spec-photo img {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.spec-card:hover .spec-photo img {
  transform: translateX(-50%) scale(1.06);
}

/* Transition states for tab switching */
.spec-grid .spec-card {
  transition:
    opacity 220ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 380ms cubic-bezier(0.34, 1.2, 0.64, 1);
}
/* Phase 1 — all cards fade & lift down briefly */
.spec-grid.is-switching .spec-card {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  pointer-events: none;
}
/* Phase 2 — visible cards arrive with stagger */
.spec-grid.is-entering .spec-card {
  animation: specEnter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
@keyframes specEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spec-grid .spec-card,
  .spec-grid.is-entering .spec-card {
    animation: none !important;
    transition: opacity 120ms ease;
    transform: none;
  }
}
.spec-card-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
}
.spec-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.spec-stage {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.spec-stage strong { color: var(--text); font-weight: 600; }
.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.spec-tag {
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.spec-photo {
  background: linear-gradient(180deg, #F4EFFA 0%, #ECE2F3 100%);
  border-radius: 14px;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  width: 100%;
  flex-shrink: 0;
}
.spec-photo img {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: top center;
}

/* "Записаться" overlay link */
.spec-book {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(0);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--violet-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  transition:
    opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 360ms cubic-bezier(0.34, 1.2, 0.64, 1),
    background-color 280ms cubic-bezier(0.4, 0, 0.2, 1),
    color 200ms ease;
  box-shadow: 0 8px 22px rgba(48, 30, 110, 0.18);
  pointer-events: auto;
}
.spec-book svg {
  transition: transform 320ms cubic-bezier(0.34, 1.4, 0.64, 1);
}
.spec-card:hover .spec-book {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.spec-book:hover {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 12px 26px rgba(96, 84, 177, 0.35);
}
.spec-book:hover svg { transform: translate(2px, -2px); }

/* На тач-устройствах (планшеты/телефоны) ховера нет — показываем кнопку
   «Записаться» сразу, чтобы она не пропадала. На телефоне ≤720px вместо неё
   используется .spec-book-m (см. медиазапрос ниже), здесь — для планшетов.
   Дублируем по ширине (721–1024px), чтобы кнопка была видна и в адаптивном
   просмотре на десктопе. */
@media (hover: none),
       (min-width: 721px) and (max-width: 1024px) {
  .spec-book {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
}
.spec-photo.is-empty {
  background:
    repeating-linear-gradient(135deg,
      rgba(96,84,177,0.06) 0 12px,
      transparent 12px 24px),
    linear-gradient(180deg, #F4EFFA 0%, #ECE2F3 100%);
}

.specialists-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--block-gap);
}

/* Booking section sits at the bottom of this page — give it breathing room
   before the footer (on the main page it's followed by .care-section). */
.booking-section {
  padding-bottom: var(--section-pad);
}

/* На ноутбуке (1181–1280) опускаем блоб-сердечко к низу блока */
@media (min-width: 1181px) and (max-width: 1280px) {
  .priem-hero-figure .priem-hero-blob { top: auto; bottom: 0; }
}
/* ---------- Responsive ---------- */@media (max-width: 1180px) {
  .priem-hero-wrap { grid-template-columns: 1fr; min-height: auto; }
  /* min-width:0 — чтобы фото-фигура не «распирала» грид-трек шире обёртки
     (иначе карточка съезжает вправо: левый отступ больше правого). */
  .priem-hero-wrap > * { min-width: 0; }
  .priem-hero-figure { min-height: 280px; }
  /* На адаптиве декоративный блоб-сердечко скрываем — на узких экранах он смотрится плохо */
  .priem-hero-figure .priem-hero-blob { display: none; }
  .priem-hero-card { padding: 32px; margin: 0 20px 20px; }
  .serv-grid { grid-template-columns: repeat(2, 1fr); }
  .serv-cta { grid-column: span 2; }
  /* Сертификаты/лицензии: одна строка с горизонтальной прокруткой (без 2+ рядов) */
  .licenses-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: none;
    margin: 0;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: thin;
  }
  .licenses-grid > .license-card { flex: 0 0 auto; width: 220px; }
  .spec-grid > .spec-card { flex-basis: calc((100% - 20px) / 2); }
}
/* На узких телефонах (≤400) уменьшаем подзаголовок и текст кнопки баннера,
   чтобы всё гармонично помещалось на 320. */
@media (max-width: 400px) {
  .priem-hero-sub { font-size: 14px; line-height: 1.45; }
  .priem-hero-card .btn { font-size: 14px; padding: 0 16px; height: 46px; }
}
@media (max-width: 720px) {
  /* h2 в hero не должен конкурировать с h1 (.page-title ≈ 27px) */
  .priem-hero-title { font-size: 22px; line-height: 1.2; }
  .priem-hero-card { padding: 24px; gap: 18px; margin: 0 16px 16px; }
  .priem-hero-card .btn { width: 100%; align-self: stretch; }
  .priem-hero-pills { grid-template-columns: 1fr; }
  .serv-grid { grid-template-columns: 1fr; gap: 12px; }
  /* Компактные плашки услуг на мобильном: иконка слева, текст справа */
  .serv-card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 14px;
  }
  .serv-thumb { width: 60px; height: 60px; border-radius: 14px; }
  .serv-foot { margin-top: 0; flex: 1; align-items: center; gap: 12px; }
  .serv-name { font-size: 17px; margin: 0 0 3px; }
  .serv-desc { font-size: 12.5px; max-width: 100%; }
  .serv-arrow { width: 36px; height: 36px; }
  .serv-cta { grid-column: span 1; grid-template-columns: 1fr; padding: 24px; }
  .serv-cta-photo { width: 100%; height: 200px; }
  /* Лицензии на узких экранах — одна строка с горизонтальным скроллом */
  .licenses-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: none;
    margin: 0;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
  .licenses-grid > .license-card {
    flex: 0 0 auto;
    width: 62%;
    max-width: 240px;
    scroll-snap-align: start;
  }
  .spec-grid { gap: 12px; }
  .spec-grid > .spec-card { flex-basis: 100%; }
  /* Табы-фильтры заменяются компактным выпадающим списком */
  .spec-tabs, .proc-price-tabs { display: none !important; }
  .spec-tabs-select { display: block; margin-bottom: 28px; }
  .faq-item > summary { padding: 18px 20px; font-size: 15px; }
  .faq-answer { padding: 0 20px 18px; }

  /* Компактная карточка врача (ТЗ): фото слева ~92px, инфо справа,
     постоянная кнопка «Записаться» (ховер-оверлей на тач не работает) */
  .spec-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
  .spec-photo {
    order: -1; width: 92px; min-width: 92px; height: 92px;
    aspect-ratio: 1 / 1; margin-top: 0; border-radius: 14px; align-self: center;
  }
  .spec-photo img { object-position: top center; }
  .spec-card-head { min-height: 0; flex: 1 1 auto; gap: 5px; justify-content: center; }
  .spec-name { font-size: 16px; }
  .spec-tags { margin-top: 2px; }
  .spec-book { display: none; }            /* ховер-кнопка не нужна на телефоне */
  .spec-card-head .spec-book-m {
    display: inline-flex; align-items: center; gap: 6px;
    align-self: flex-start; margin-top: 6px;
    height: 36px; padding: 0 16px; border-radius: 999px;
    background: var(--violet); color: #fff;
    font-size: 13.5px; font-weight: 600; text-decoration: none;
    transition: background 0.2s ease;
  }
  .spec-card-head .spec-book-m:hover { background: var(--violet-hover); }
}
/* кнопка скрыта вне мобильного (на случай если осталась в DOM после ресайза) */
.spec-book-m { display: none; }

/* ---------- LICENSE LIGHTBOX ---------- */
.lic-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 16, 28, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 40px 80px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lic-lightbox.is-open { opacity: 1; }
.lic-lightbox[hidden] { display: none; }

.lic-lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
}
.lic-lb-stage img {
  max-width: min(900px, 100%);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.lic-lb-stage figcaption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
}

.lic-lb-close,
.lic-lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  padding: 0;
}
.lic-lb-close:hover,
.lic-lb-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}
.lic-lb-nav:disabled {
  opacity: 0.25;
  cursor: default;
}
.lic-lb-close { top: 20px; right: 20px; }
.lic-lb-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.lic-lb-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.lic-lb-prev:hover:not(:disabled),
.lic-lb-next:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }

.lic-lb-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
}

@media (max-width: 720px) {
  .lic-lightbox { padding: 24px 12px; }
  .lic-lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lic-lb-prev  { left: 8px; width: 40px; height: 40px; }
  .lic-lb-next  { right: 8px; width: 40px; height: 40px; }
  .lic-lb-stage img { max-height: calc(100vh - 120px); }
}
