.doctors-section {
  background: #ffffff;
  padding: 10px 0;
  font-family: 'Open Sans', sans-serif;
}
.doctors-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.doctors-container {
  max-width: 1200px;
  margin: 0 auto;
}

.doctors-section .doctors-title {
  font-size: 32px;
  margin: 40px 0;
  text-align: center;
  color: #000000;
  font-family: 'Open Sans', sans-serif;
}
@media (max-width: 980px) {
  .doctors-section .doctors-title {
    font-size: 28px;
    margin: 35px 0;
  }
}

@media (max-width: 864px) {
  .doctors-section .doctors-title {
    font-size: 28px;
    margin: 35px 0;
  }
}

@media (max-width: 792px) {
  .doctors-section .doctors-title {
    font-size: 26px;
    margin: 32px 0;
  }
}

@media (max-width: 500px) {
  .doctors-section .doctors-title {
    font-size: 22px;
    margin: 28px 0;
  }
}

@media (max-width: 375px) {
  .doctors-section .doctors-title {
    font-size: 24px;
    margin: 24px 0;
  }
}



/* === Список докторов === */
.doctors-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0px 0px;    
  max-width: 100%;       
  box-sizing: border-box;
  justify-content: flex-start;
  margin-bottom: 10px;
}


.doctors-list::-webkit-scrollbar { display: none; }

.doctor-card {
  flex: 0 0 auto;              
  width: clamp(200px, 25vw, 360px);
  background: #F9F9F9;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-snap-align: start;
  padding: 20px;
  box-sizing: border-box;
}

.doctor-card img {
  width: 100%;
  max-width: 237px;
  aspect-ratio: 237 / 264;
  height: auto;

  object-fit: cover;
  object-position: center top;

  border-radius: 10px;
  margin-bottom: 20px;
  display: block;
}

.doctor-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.3;
}

.doctor-subtitle {
  font-size: 16px;
  color: #555;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

.doctors-button {
  display: inline-block;      
  margin: 40px auto 0;       
  padding: 12px 32px;        
  background-color: #B77F41;
  color: white;
  border-radius: 999px;
  text-align: center;        
  font-size: 24px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.doctors-button:hover { background-color: #A06D38; }

.doctor-card{
        
  text-decoration: none;  
  color: inherit;         
}
.doctor-card:hover{
  text-decoration: none;
}
/* === Мобильная адаптация === */
@media (max-width: 1010px){
  .doctor-card img {
    max-width: 207px;
  }
}

@media (max-width: 847px){
  .doctor-card img {
    max-width: 180px;
    margin-bottom: 16px;
  }
}

@media (max-width: 600px){
  .doctor-card img {
    max-width: 140px;
  }
}

@media (max-width: 375px){
  .doctor-card img {
    max-width: 120px;
    margin-bottom: 12px;
  }
}

/* Читаемые размеры шрифтов */
@media (max-width: 1168px) {
  .doctor-title { font-size: 18px; }
  .doctor-subtitle { font-size: 14px; }
}

@media (max-width: 980px) {
  .doctor-title { font-size: 16px; }
  .doctor-subtitle { font-size: 14px; }
}

@media (max-width: 604px) {
  .doctor-title { font-size: 15px; line-height: 1.3; }
  .doctor-subtitle { font-size: 13px; line-height: 1.3; }
}

@media (max-width: 504px) {
  .doctor-title { font-size: 14px; }
  .doctor-subtitle { font-size: 12px; }
}

@media (max-width: 432px) {
  .doctor-title { font-size: 13px; line-height: 1.3; }
  .doctor-subtitle { font-size: 11px; line-height: 1.3; }
}

@media (max-width: 375px) {
  .doctor-title { font-size: 12px; }
  .doctor-subtitle { font-size: 10px; }
}

/* === Карусель врачей === */
.doctors-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doctors-carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.doctors-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* Переопределяем ширину карточки внутри карусели */
.doctors-carousel-track .doctor-card {
    flex: 0 0 calc(33.333% - 14px);
    width: calc(33.333% - 14px); /* перебиваем clamp */
    margin: 0 7px;
    box-sizing: border-box;
}

.doctors-prev,
.doctors-next {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .3s;
    z-index: 10;
}

.doctors-prev:hover,
.doctors-next:hover {
    background-color: #A06D38;
}

.doctors-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

@media (max-width: 768px) {
    .doctors-carousel-track .doctor-card {
        flex: 0 0 calc(50% - 14px);
        width: calc(50% - 14px);
    }
    .doctors-prev,
    .doctors-next {
        display: none !important;
    }
    .doctors-wrapper .btn-primary {
        margin-top: 24px;
    }
    .doctors-carousel-wrapper {
        gap: 0px;
    }

}

@media (max-width: 480px) {
    .doctors-prev,
    .doctors-next {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    .doctors-prev,
    .doctors-next {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
}
.doctors-section .doctors-subtitle {
    font-size: 18px;
    text-align: center;
    color: #555;
    margin: -20px 0 30px;
    font-family: 'Open Sans', sans-serif;
}

@media (max-width: 980px) {
    .doctors-section .doctors-subtitle { font-size: 16px; }
}

@media (max-width: 792px) {
    .doctors-section .doctors-subtitle { font-size: 15px; }
}

@media (max-width: 500px) {
    .doctors-section .doctors-subtitle { font-size: 14px; }
}

@media (max-width: 375px) {
    .doctors-section .doctors-subtitle { font-size: 13px; margin: -16px 0 20px; }
}