.home-doctors {
  padding: 48px 0;
  background: #fff;
}

.home-doctors-title {
  margin: 0;
  color: var(--smd-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.home-doctors-subtitle {
  max-width: 980px;
  margin-top: 12px;
  margin-bottom: 28px;
  color: var(--smd-muted);
  font-size: 15px;
  line-height: 1.7;
}

.doctors-slider {
  position: relative;
  padding: 0 54px;
}

.doctors-viewport {
  overflow: hidden;
}

.doctors-grid {
  display: flex;
  gap: 20px;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.doctor-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: auto;
  flex: 0 0 calc((100% - 60px) / 4);
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  border: 1px solid #e8ecf0;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.doctor-card__profile-link {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
}

.doctor-card__profile-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--smd-primary) 35%, transparent);
  outline-offset: 3px;
}

.doctor-card:hover {
  border-color: var(--smd-blue);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--smd-primary) 10%, transparent);
  transform: translateY(-2px);
}

.doctor-card__photo {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #edf5fb;
  object-fit: cover;
}

.doctor-card__photo-link {
  display: block;
  color: inherit;
}

.doctor-card__name a {
  color: inherit;
}

.doctor-card__name a:hover,
.doctor-card__name a:focus-visible {
  color: var(--smd-blue);
}

.doctor-card__badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 14px;
  border-radius: 50px;
  background: var(--smd-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.doctor-card__name {
  width: 100%;
  min-height: 3.1em;
  margin: 0 0 6px;
  color: var(--smd-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.doctor-card__specialties {
  width: 100%;
  min-height: 4.8em;
  margin-bottom: 12px;
  color: var(--smd-muted);
  font-size: 13px;
  line-height: 1.4;
}

.doctor-card__price {
  margin-top: auto;
  margin-bottom: 16px;
  color: var(--smd-blue);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.doctor-card__button {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #25d366;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.doctor-card__button:hover,
.doctor-card__button:focus-visible {
  background: var(--smd-brand-brown-hover);
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--smd-brand-brown) 30%, transparent);
  transform: translateY(-1px);
}

.doctors-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--smd-line);
  border-radius: 50%;
  background: #fff;
  color: var(--smd-text);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.doctors-arrow:hover,
.doctors-arrow:focus-visible {
  border-color: #b8d7ea;
  color: var(--smd-blue);
  transform: translateY(-1px);
}

.doctors-arrow:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.doctors-arrow--prev {
  left: 0;
}

.doctors-arrow--next {
  right: 0;
}

.doctors-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1024px) {
  .doctors-slider {
    padding: 0 48px;
  }

  .doctor-card {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 768px) {
  .home-doctors {
    padding: 38px 0;
  }

  .doctors-slider {
    padding: 0;
  }

  .doctors-viewport {
    overflow: visible;
  }

  .doctors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    transform: none !important;
    transition: none;
  }

  .doctor-card {
    width: auto;
    min-height: 0;
    padding: 12px 8px;
    border-radius: 12px;
  }

  .doctor-card__photo {
    width: 60px;
    height: 60px;
  }

  .doctor-card__badge,
  .doctors-arrow {
    display: none;
  }

  .doctor-card__name {
    display: -webkit-box;
    min-height: 2.7em;
    margin-bottom: 5px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .doctor-card__specialties {
    display: -webkit-box;
    min-height: 0;
    max-height: 2.7em;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .doctor-card__price {
    margin-top: 6px;
    margin-bottom: 7px;
    font-size: 12px;
  }

  .doctor-card__button {
    min-height: 32px;
    padding: 7px 6px;
    border-radius: 10px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .home-doctors {
    padding: 28px 0;
  }

  .home-doctors-title {
    font-size: 22px;
  }

  .home-doctors-subtitle {
    margin-top: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.45;
  }
}
