.modal-button {
  font-weight: bold;
  color: #e7da19 !important;
  /* Белый цвет, как в футере */
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  display: inline;
}

.modal-button[data-modal="modal1"] {
  font-size: 1.25rem;
  /* 20px примерно */
  font-weight: 900;
  color: #000000 !important;
}

@media (max-width: 600px) {
  .modal-button[data-modal="modal1"] {
    font-size: inherit;
    font-weight: inherit;
  }
}

.modal-text {
  text-align: left;
  text-indent: 2em;
}

.email-contact {
  margin-top: 20px;
  text-align: center;
}

.modal-button:hover {
  color: #0056b3;
  /* Синий цвет при наведении */
  text-decoration: none;
}

.modal {
  display: none;
  /* Скрыто по умолчанию */
  position: fixed;
  /* Фиксированное положение */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  /* Полупрозрачный фон */
  z-index: 1;
}

.modal-window {
  position: absolute;
  top: 50%;
  /* Центрирование по вертикали */
  left: 50%;
  /* Центрирование по горизонтали */
  transform: translate(-50%, -50%);
  /* Смещение для центрирования */
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid rgba(173, 169, 186, 0.8);
  /* Толщина, цвет и прозрачность рамки */
  width: 70%;
  /* Ширина окна */
  max-width: 800px;
  /* Максимальная ширина */
  height: 50%;
  /* Увеличенная высота */
  overflow: auto;
  /* Убрать прокрутку */
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  /* Тень */
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 40px;
  color: #8a0606;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #000;
}

.modal-window iframe {
  height: 80vh;
  /* Высота iframe подстраивается под окно */
  min-height: 400px;
  width: 100%;
}

/*окно надписи*/

#modal1 .modal-window {
  position: absolute;
  top: 50%;
  left: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
  margin: 0;
  max-height: 95vh;
  min-height: 500px;
  max-width: 800px;
  padding: 5px;
  height: auto;
  /* Подстраивается под содержимое */
  overflow: hidden;
  /* Убираем прокрутку для окна */
  border: none;
}

#modal1 .modal-window iframe {
  height: calc(95vh - 80px);
  /* Высота iframe = max-height окна минус padding и заголовок */
  min-height: 400px;
  width: 100%;
  overflow-y: auto;
  /* Прокрутка только внутри iframe */
  display: block;
}

/*изменить шрифт одного из окон*/
.modal-button[data-modal="modal2"] {
  font-size: 1rem;
  /* 12px */
}

#modal2 .modal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #cadff3;
  padding: 20px;
  border-radius: 12px;
  width: 95vw;
  max-width: 600px;
  max-height: 80vh;
  height: auto;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 2;
}


@media (max-width: 768px) {
  #modal2 .modal-window {
    height: auto;
  }
}

@media (max-width: 768px) {
  .modal-window {
    width: 95vw;
    height: 85vh;
    border-radius: 12px;
    padding: 16px;
    max-width: none;
  }

  .close-btn {
    font-size: 32px;
    top: 10px;
    right: 10px;
  }
}

/*внутри модвльного окна*/
/* Стили для кнопок внутри модального окна */
.btn-modal-telegram,
.btn-modal-whatsapp {
  display: inline-block;
  padding: 12px 20px;
  font-size: 18px;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  margin-top: 10px;
}

.modal-buttons-wrapper {
  display: flex;
  flex-direction: column;
  /* вертикально */
  align-items: center;
  /* по центру горизонтально */
  gap: 10px;
  /* расстояние между кнопками */
}

.button-container {
  width: 100%;
  display: flex;
  justify-content: center;
  /* центрируем кнопку внутри контейнера */
}

.modal-title {
  text-align: center;
  margin-bottom: 1rem;
  color: rgb(46, 128, 8);
  /* по желанию */
}

.btn-modal-telegram {
  background-color: #0088cc;
}

.btn-modal-whatsapp {
  background-color: #25d366;
}

.btn-modal-telegram:hover {
  background-color: #66bce7;
}

.btn-modal-whatsapp:hover {
  background-color: #7ef0a5;
}
