/* ============================================================
   Страница «Врачи»: фильтр по направлению, сетка специалистов.
   Перенесено из инлайн-<style> макета «Врачи.html» — при сборке
   статичного контура этот блок не попал в шаблон, из-за чего
   фильтр и карточки оставались без стилей.
   ============================================================ */

/* Чистый скролл страницы — без стрелок сверху/снизу */
html::-webkit-scrollbar { width: 12px; }
html::-webkit-scrollbar-button,
html::-webkit-scrollbar-button:start:decrement,
html::-webkit-scrollbar-button:end:increment,
html::-webkit-scrollbar-button:vertical:start:decrement,
html::-webkit-scrollbar-button:vertical:end:increment,
html::-webkit-scrollbar-button:single-button,
html::-webkit-scrollbar-button:double-button {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
  background: transparent !important;
}
html::-webkit-scrollbar-track { background: #EDEEF1; }
html::-webkit-scrollbar-thumb {
  background: #C7C8CF;
  border-radius: 999px;
  border: 3px solid #EDEEF1;
  background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover { background: #A9AAB4; background-clip: padding-box; }

/* ============ Страница «Врачи» — фильтр ============ */
.doctors-filter-band {
  background: linear-gradient(120deg, #6F62C4 0%, #8678D4 45%, #9D8FDE 100%);
  padding: 38px 0;
  margin-top: 18px;
}
.doctors-filter-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.dfilter {
  position: relative;
}
.dfilter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 10px 4px;
}
.dfilter-control {
  position: relative;
  display: flex;
  align-items: center;
  background: #F5F5F7;
  border-radius: 16px;
  height: 64px;
  box-shadow: 0 14px 34px rgba(40, 26, 96, 0.20);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.dfilter-control:focus-within {
  background: #fff;
  box-shadow: 0 14px 34px rgba(40, 26, 96, 0.28);
}
/* custom dropdown */
.dfilter-select-wrap { padding: 0; }
.dfilter-native { display: none; }
.dfilter-trigger {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px 0 24px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  outline: none;
}
.dfilter-trigger-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dfilter-chevron {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}
.dfilter-select-wrap.open .dfilter-chevron {
  transform: rotate(180deg);
  color: var(--violet);
}
.dfilter-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 46px rgba(40, 26, 96, 0.22);
  z-index: 60;
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.dfilter-select-wrap.open .dfilter-dropdown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* scroll only when the list is long (>7 items) */
.dfilter-dropdown.is-scroll {
  max-height: 322px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #D9D4EC transparent;
}
.dfilter-dropdown.is-scroll::-webkit-scrollbar { width: 10px; }
.dfilter-dropdown.is-scroll::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
.dfilter-dropdown.is-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}
.dfilter-dropdown.is-scroll::-webkit-scrollbar-thumb {
  background: #D9D4EC;
  border-radius: 999px;
  border: 3px solid #fff;
  background-clip: padding-box;
}
.dfilter-dropdown.is-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
  background-clip: padding-box;
}
.dfilter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dfilter-option .dfilter-option-label { flex: 1 1 auto; }
.dfilter-option .dfilter-check {
  flex: 0 0 auto;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.dfilter-option:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.dfilter-option.selected {
  background: var(--violet);
  color: #fff;
}
.dfilter-option.selected .dfilter-check { opacity: 1; }
.dfilter-input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 22px 0 54px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  border-radius: 16px;
}
.dfilter-input::placeholder { color: var(--text-light); font-weight: 500; }
.dfilter-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.dfilter-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(96, 84, 177, 0.10);
  color: var(--violet);
  display: none;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.dfilter-clear:hover { background: rgba(96, 84, 177, 0.20); }
.dfilter-clear.is-visible { display: grid; }

/* ============ Сетка специалистов ============ */
.doctors-list-section {
  padding: 56px 0 56px;
  background: #F6F7F9;
}
.doctors-count {
  display: none;
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 26px 2px;
}
.doctors-count strong { color: var(--text); font-weight: 600; }
.doctors-more { text-align: center; margin-top: 16px; }
.doctors-more-btn {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600;
  color: var(--violet); padding: 8px 4px;
  transition: color 0.2s ease;
}
.doctors-more-btn:hover { color: var(--violet-hover); text-decoration: underline; }

.spec-card.is-hidden { display: none; }

/* Пустое состояние */
.doctors-empty {
  display: none;
  text-align: center;
  padding: 60px 24px 70px;
}
.doctors-empty.is-visible { display: block; }
.doctors-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}
.doctors-empty h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}
.doctors-empty p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 22px;
}

/* форму записи и CTA-блок разделяет стандартный ритм секций */

@media (max-width: 860px) {
  .doctors-filter-inner { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 720px) {
  .doctors-filter-band { padding: 28px 0; }
  .dfilter-control { height: 58px; }
  .dfilter-select, .dfilter-input { font-size: 16px; }
  .doctors-list-section { padding: 40px 0 44px; }
  .doctors-more { margin-top: 12px; }
}
