@font-face {
    font-family: 'HelveticaNeueCyr Thin';
    src: url('../fonts/helveticaneuecyr_thin.otf') format('opentype');
    font-weight: 300; /* Тонкое начертание */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HelveticaNeueCyr Roman';
    src: url('../fonts/helveticaneuecyr_roman.otf') format('opentype');
    font-weight: normal; /* Обычное начертание */
    font-style: normal;
    font-display: swap;
}

.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  text-align: left;
}

/* Сброс transform и выравнивание из breadcrumbs.css — блок в одну линию слева */
#contactPopup .response-options,
.popup-content .response-options,
#contactPopup .consent-and-submit,
.popup-content .consent-and-submit,
#contactPopup .consent-option,
.popup-content .consent-option {
  transform: none !important;
}

#contactPopup .response-options,
.popup-content .response-options {
  flex-direction: row !important;
  justify-content: flex-start !important;
  padding-left: 0 !important;
  gap: 5ch;
}

#contactPopup .custom-box,
.popup-content .custom-box {
  display: inline-block !important;
  visibility: visible !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid #ccc !important;
  background-color: #fff !important;
  flex-shrink: 0 !important;
}

.popup-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out; 
}

.popup-close:hover {
  transform: rotate(30deg) scale(1.2); /* Подрыгивание на 10 градусов */
}


.popup-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #333;
}

.popup-subtext {
  font-family: 'HelveticaNeueCyr Roman', Arial, sans-serif;
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.popup-label {
  font-family: 'HelveticaNeueCyr Roman', Arial, sans-serif;
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: gray;
  font-weight: bold;
}

#contactForm input,
#contactForm textarea {
  width: 95%;
  padding: 10px;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

#contactForm textarea {
  resize: vertical;
  min-height: 100px;
}

.file-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 15px 0;
}

.file-attach {
  font-family: 'HelveticaNeueCyr Roman', Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}

.file-attach img {
  width: 20px;
  height: 20px;
}

.response-options {
  display: flex;
  gap: 5ch;
  margin-bottom: 20px;
}

.response-option {
  font-family: 'HelveticaNeueCyr Roman', Arial, sans-serif;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.response-option input {
  display: none;
}

.contact-input {
  width: 95% !important; /* Принудительно */
  min-width: 95% !important;
  max-width: 95% !important;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  display: block !important;
}

.custom-box {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  margin-right: 8px;
  display: inline-block;
  box-sizing: border-box;
  background-color: transparent;
  position: relative;
}

input:checked + .custom-box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background-color: #D50032;
  transform: translate(-50%, -50%);
  border-radius: 1px;
}

.consent-option {
  font-family: 'HelveticaNeueCyr Roman', Arial, sans-serif;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #333;
  cursor: pointer;
}

.consent-option input {
  display: none;
}

.consent-and-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.send-button {
  background-color: #D50032;
  color: white;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, 95% 0, 100% 15%, 100% 100%, 0 100%);
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.send-button:hover {
  background-color: #a40028;
}

/* Стиль для ссылки */
.privacy-link {
  color: #00A9CE; /* Цвет текста */
  text-decoration: none; /* Убираем стандартное подчеркивание */
  border-bottom: 1px solid transparent; /* Добавляем прозрачную границу */
  margin-top: 2px;
}

/* Стиль для ссылки при наведении */
.privacy-link:hover {
  text-decoration: none; /* Убираем стандартное подчеркивание */
  border-bottom: 1px solid #00A9CE; /* Цвет и толщина подчеркивания */
}

/* Стили для попапа успешной отправки */
#successPopup .popup-content {
  width: 394px; /* Ширина попапа */
  height: 296px; /* Высота попапа */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Вертикальное центрирование */
  align-items: center; /* Горизонтальное центрирование */
  text-align: center; /* Центрирование текста */
}

#successPopup .popup-heading {
  font-size: 30px; /* Размер шрифта */
  margin-bottom: 10px; /* Отступ снизу */
}

#successPopup .popup-subtext {
  font-size: 14px; /* Размер шрифта */
  margin-bottom: 20px; /* Отступ снизу */
}

#successPopup .send-button {
  width: 224px; /* Ширина кнопки */
  height: 50px; /* Высота кнопки */
  font-size: 16px; /* Размер шрифта */
  margin-top: 10px; /* Отступ сверху */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .popup-overlay {
    align-items: center !important;
    padding: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .popup-content {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    margin: 10px auto !important;
    padding: 20px 15px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
  
  /* Крестик всегда виден и доступен */
  .popup-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
    background: white !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    font-size: 24px !important;
    margin: 0 !important;
  }
  
  .popup-heading {
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-top: 0 !important;
    margin-right: 40px !important;
    padding-right: 0 !important;
  }
  
  .popup-subtext {
    font-size: 12px !important;
    margin-bottom: 15px !important;
  }
  
  .popup-label {
    font-size: 12px !important;
    margin-bottom: 5px !important;
  }
  
  #contactForm input,
  #contactForm textarea {
    width: 100% !important;
    padding: 8px !important;
    font-size: 14px !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
  }
  
  #contactForm textarea {
    min-height: 80px !important;
  }
  
  .response-options {
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
    align-items: flex-start !important;
  }
  
  .response-option {
    font-size: 13px !important;
  }
  
  .contact-input {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }
  
  .consent-and-submit {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
    margin-top: 15px !important;
  }
  
  .consent-option {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }
  
  .send-button {
    width: auto !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    align-self: flex-start !important;
  }
  
  .file-row {
    margin: 10px 0 !important;
  }
  
  .file-attach {
    font-size: 13px !important;
  }
  
  /* Попап успешной отправки для мобильных */
  #successPopup .popup-content {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    height: auto !important;
    max-height: calc(100vh - 20px) !important;
    padding: 30px 20px !important;
  }
  
  #successPopup .popup-heading {
    font-size: 24px !important;
  }
  
  #successPopup .popup-subtext {
    font-size: 13px !important;
  }
  
  #successPopup .send-button {
    width: 100% !important;
    max-width: 250px !important;
    height: 45px !important;
    font-size: 14px !important;
  }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
  .popup-overlay {
    padding: 0 !important;
  }
  
  .popup-content {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    margin: 10px auto !important;
    padding: 15px 12px !important;
    border-radius: 8px !important;
  }
  
  .popup-close {
    width: 35px !important;
    height: 35px !important;
    font-size: 24px !important;
  }
  
  .popup-heading {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }
  
  .popup-subtext {
    font-size: 11px !important;
    margin-bottom: 12px !important;
  }
  
  .popup-label {
    font-size: 11px !important;
  }
  
  #contactForm input,
  #contactForm textarea {
    padding: 7px !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
  }
  
  .response-option {
    font-size: 12px !important;
  }
  
  .consent-option {
    font-size: 10px !important;
  }
  
  .send-button {
    width: auto !important;
    padding: 9px 16px !important;
    font-size: 12px !important;
    align-self: flex-start !important;
  }
  
  #successPopup .popup-heading {
    font-size: 20px !important;
  }
  
  #successPopup .popup-subtext {
    font-size: 12px !important;
  }
  
  #successPopup .send-button {
    height: 40px !important;
    font-size: 13px !important;
  }
}