.merits--widgets {
  /* display: none; */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Чтобы виджеты не перекрывали клик по карточке */
  z-index: 100;
}

.merits--widgets .merits-top-left {
  position: absolute;
  top: 10px;
  left: -20px;


  /* ДОБАВЛЕНО: Теперь родитель подстраивается под содержимое */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1;
  /* Чтобы медали не прятались за фото */
}

.merits--experience {
  /* ИЗМЕНЕНО: Задаем ширину самой плашке, а не всему родительскому блоку */
  width: calc(100%);
  min-width: 75px;
  /* Гарантируем, что она не будет меньше 75px */

  background-color: rgba(0, 123, 255, 0.656);
  padding: 5px 10px;
  border-radius: 0 20px 20px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 25;
}

.merits--widgets .merits-top-left span {
  /* width: 100%; */
  /* text-align: end; */
  padding: 0 !important;
  border-radius: 0 !important;
  color: white !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  background-color: rgba(0, 0, 0, 0) !important;

}





.merits-bottom-right {
  display: none;
  position: absolute;
  bottom: 23px;
  right: -17px;
  background-color: rgba(255, 255, 255, 0.867);
  padding: 6px 12px;
  border-radius: 20px 0 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  font-size: 11px;
  font-weight: 500;
  color: #444;
  max-width: 250px;
  /* Ограничиваем ширину, чтобы текст красиво переносился, если нужно */

  line-height: 1.3;
  color: #005abb !important;
  text-align: start;
}

.merits-bottom-right p {
  margin: 0;
  font-size: 12px;
}

.merits-bottom-right span {
  font-size: 10px;
  color: #005abb !important;
  background-color: rgba(0, 0, 0, 0) !important;
  text-align: start !important;
  padding: 0 !important;
}

.merits--widgets .merits-top-left .medals {
  /* ИЗМЕНЕНО: Убираем absolute, чтобы медали двигались в потоке и растягивали родителя */
  position: relative;
  /* УБРАНО: top: 21px; right: 4px; */

  /* ДОБАВЛЕНО: Отступы для правильного позиционирования под плашкой */
  margin-top: 0;
  /* Задвигаем медали немного под синюю плашку */
  margin-left: 0;
  /* Сдвигаем вправо, чтобы они начинались от левого края фото, а не за ним */
  margin-right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: -1;

  /* ДОБАВЛЕНО: Адаптивность для большого количества медалей */
  flex-wrap: wrap;
  /* Позволяет медалям переноситься на новую строку */
  max-width: 200px;
  width: 100%;

  /* Ограничьте ширину под размер вашей карточки врача (настройте значение) */
  gap: 5px 0;
  /* Добавляет расстояние между рядами, если произойдет перенос */
}

/* Стилизация самих картинок медалей */
.merits--widgets .merits-top-left .medals img {
  /* Сбрасываем общие стили img из вашего CSS, если они мешают, 
       или переопределяем их здесь */
  width: 30px;
  /* Немного уменьшим размер для лучшего эффекта */
  height: auto;
  top: 0 !important;
  /* Эффект наложения */
  margin-left: -18px;
  /* Сдвигаем картинку влево, накладывая на предыдущую */

  /* Тень для объема и четкой границы между медалями */
  filter: drop-shadow(-2px 0 2px rgba(0, 0, 0, 0.3));

  /* Позиционирование для z-index */
  position: relative;
  transition: transform 0.2s ease;
  /* Анимация при наведении (опционально) */
}

/* Убираем отступ у первой медали, чтобы она не уезжала влево */
.merits--widgets .merits-top-left .medals img:first-child {
  margin-left: 0;
}

/* Устанавливаем z-index, чтобы каждая следующая медаль была НИЖЕ предыдущей 
   (первая - самая верхняя) */
.merits--widgets .merits-top-left .medals img:nth-child(1) {
  z-index: 8;
}

.merits--widgets .merits-top-left .medals img:nth-child(2) {
  z-index: 7;
}

.merits--widgets .merits-top-left .medals img:nth-child(3) {
  z-index: 6;
}

.merits--widgets .merits-top-left .medals img:nth-child(4) {
  z-index: 5;
}

.merits--widgets .merits-top-left .medals img:nth-child(5) {
  z-index: 4;
}

.merits--widgets .merits-top-left .medals img:nth-child(6) {
  z-index: 3;
}

.merits--widgets .merits-top-left .medals img:nth-child(7) {
  z-index: 2;
}

.merits--widgets .merits-top-left .medals img:nth-child(8) {
  z-index: 1;
}

.aladin-medals--articles {
  margin-left: 8px !important;
  margin-right: 19px !important;
}

.aladin-medals--articles img {
  margin-left: -23px !important;

}