.to-who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 карточек в ряд */
  gap: 60px; /* Немного уменьшим gap для 3 карточек */
  margin-bottom: 40px;
}

/* Стили для кнопки */
.to-who-card .btn-more {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: linear-gradient(135deg, #1189BF, #1189BF);
  border: none;
  border-radius: 40px;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-transform: none;
  margin-top: auto; /* Прижимает кнопку к низу */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.to-who-card .btn-more i {
  transition: transform 0.3s ease;
}

.to-who-card .btn-more:hover i {
  transform: translateX(5px);
}

/* Эффект блеска */
.to-who-card .btn-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: skewX(-25deg);
  animation: btnShine 3s infinite;
  z-index: -1;
}

@keyframes btnShine {
  0% {
    left: -150%;
  }
  20% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.to-who-block {
  background: #f9fbff;
  padding: 90px 0;
  text-align: center;
}

.to-who-block h2 {
  font-size: 42px;
  margin-bottom: 12px;
  color: #1189BF;
}

.to-who-block p {
  color: #000;
  font-size: 18px;
  margin-bottom: 80px;
}

.to-who-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 20px 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  transition: .35s;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  border: 1px solid rgba(17, 137, 2191, 0.9);
}

.to-who-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
  border-color: rgba(37, 99, 235, 0.2);
}

.to-who-icon-circle {
  /* width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(145deg, #eef4ff, #ffffff);
  box-shadow:
    6px 6px 14px rgba(0,0,0,.08),
    -6px -6px 14px rgba(255,255,255,1);
  display: flex;
  align-items: center;
  justify-content: center; */
  margin-bottom: 20px;
}

.to-who-icon-circle img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-top: -70px;
}

.to-who-card h3 {
  font-size: 19px;
  margin-bottom: 12px;
  line-height: 1.3;
  color: #000;
  font-weight: 600;
}

.to-who-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #000;
  margin-bottom: 20px;
  flex: 1; /* Занимает доступное пространство */
}

/* Адаптивность */
@media (max-width: 1200px) {
  .to-who-grid {
    gap: 15px; /* Уменьшаем gap на средних экранах */
  }
  
  .to-who-card {
    padding: 25px 15px;
  }
}

@media (max-width: 992px) {
  .to-who-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 карточки на планшете */
    gap: 40px;
  }
  
  .to-who-block h2 {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .to-who-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 карточки на маленьком планшете */
    gap: 50px;
  }
  
  .to-who-block {
    padding: 60px 0;
  }
  
  .to-who-block h2 {
    font-size: 32px;
  }
  
  .to-who-block p {
    font-size: 16px;
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .to-who-grid {
    grid-template-columns: 1fr; /* 1 карточка на мобильном */
    gap: 50px;
    max-width: 350px;
    margin: 0 auto;
    padding-bottom: 40px;
  }
  
  .to-who-card {
    padding: 30px 20px;
  }
  
  .to-who-block h2 {
    font-size: 28px;
  }

    .to-who-block p {
    margin-bottom: 60px;
  }
}

.diagnostic-modal {
    max-width: 550px;
    width: 95%;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 20px;
    padding: 30px;
    max-height: 90vh; /* Ограничиваем высоту */
    overflow-y: auto; /* Включаем скролл внутри модалки */
    position: relative;
}

.diagnostic-modal::-webkit-scrollbar {
    width: 6px;
}

..diagnostic-modal::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.diagnostic-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FDBD24, #1189BF);
    border-radius: 10px;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    padding-right: 30px; /* Место для крестика */
}

.main-modal-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.modal-info {
    display: flex;
    align-items: flex-start; /* Выравнивание по верхнему краю */
    gap: 15px;
    background: #e8f4ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #1189BF;
}

.info-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0; /* Иконка не сжимается */
}

.modal-info-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.modal-info-text .highlight {
    color: #FDBD24;
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
    margin-top: 5px;
}

.modal-manager {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff3e0;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #FDBD24;
}

.modal-manager p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.modal-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 15px;
}

/* Стили для формы */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1189BF;
}

select.form-control {
    cursor: pointer;
    background-color: white;
}

.btn-primary i {
    font-size: 18px;
}

.success-message {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
    border: 1px solid #c3e6cb;
}

.success-message i {
    margin-right: 8px;
    color: #28a745;
}

/* ===================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ
=================================== */

/* Планшеты */
@media (max-width: 768px) {
    .diagnostic-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh; /* На мобильных занимает весь экран */
        border-radius: 0; /* Убираем скругление */
        padding: 20px;
        margin: 0;
    }
    
    .main-modal-title {
        font-size: 22px;
        padding-right: 35px; /* Больше места для крестика */
    }
    
    .modal-info {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }
    
    .info-icon {
        font-size: 36px;
    }
    
    .modal-info-text {
        font-size: 15px;
    }
    
    .modal-info-text .highlight {
        font-size: 17px;
        display: block; /* На всю ширину */
        padding: 5px 0;
    }
    
    .modal-manager {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }
    
    .modal-manager p {
        font-size: 15px;
    }
    
    .modal-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .btn-primary {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    /* Крестик на мобильных */
    .close-modal {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .diagnostic-modal {
        padding: 15px;
    }
    
    .main-modal-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .modal-info {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .modal-info-text {
        font-size: 14px;
    }
    
    .modal-info-text .highlight {
        font-size: 16px;
    }
    
    .modal-manager {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .modal-manager p {
        font-size: 14px;
    }
    
    .form-group {
        /*margin-bottom: 12px;*/
    }
    
    .form-label {
        font-size: 13px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 14px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .diagnostic-modal {
        padding: 12px;
    }
    
    .main-modal-title {
        font-size: 18px;
    }
    
    .modal-info {
        padding: 10px;
    }
    
    .info-icon {
        font-size: 30px;
    }
    
    .modal-info-text {
        font-size: 13px;
    }
    
    .modal-info-text .highlight {
        font-size: 15px;
    }
    
    .btn-primary {
        padding: 10px;
        font-size: 13px;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 900px) and (orientation: landscape) {
    .diagnostic-modal {
        max-height: 95vh;
        padding: 15px 20px;
    }
    
    .modal-info,
    .modal-manager {
        padding: 10px 15px;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    /* Делаем форму компактнее */
    .registration-form {
        gap: 8px;
    }
}

/* Стили для сообщения об успехе */
#modalDiagnostic .success-message {
    display: none;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 15px;
    border: 2px solid #28a745;
    animation: successPulse 2s infinite;
}

#modalDiagnostic .success-message i {
    font-size: 40px;
    color: #28a745;
    margin-bottom: 10px;
    display: block;
}

#modalDiagnostic .success-message span {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

#modalDiagnostic .success-message-small {
    font-size: 14px;
    margin: 5px 0 0;
    color: #155724;
    opacity: 0.9;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}