/* ========================================
   CSS ДЛЯ КНОПКИ И МОДАЛКИ
   ШРИФТЫ: IriskaFree, Golos Text, Raleway ONLY!!!
   ======================================== */

/* ИМПОРТ ШРИФТОВ */
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;600;700;900&family=Raleway:wght@400;600;700&display=swap');

/* ОБЁРТКА КНОПКИ */
.ai-button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 60px 0;
  position: relative;
}

/* КНОПКА - ОГРОМНАЯ И ЯРКАЯ */
.ai-button {
  display: inline-block;
  padding: 22px 60px;
  font-family: 'Golos Text', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #4CBDD6 0%, #213546 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 30px rgba(76, 189, 214, 0.35),
    0 0 20px rgba(76, 189, 214, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 100;
  text-transform: none;
  letter-spacing: 0.5px;

  /* АНИМАЦИЯ ПУЛЬСА */
  animation: buttonPulse 2s ease-in-out infinite;
}

/* ПУЛЬС СВЕЧЕНИЯ */
@keyframes buttonPulse {
  0% {
    box-shadow: 
      0 10px 30px rgba(76, 189, 214, 0.35),
      0 0 20px rgba(76, 189, 214, 0.2);
  }
  50% {
    box-shadow: 
      0 15px 40px rgba(76, 189, 214, 0.5),
      0 0 30px rgba(76, 189, 214, 0.4);
  }
  100% {
    box-shadow: 
      0 10px 30px rgba(76, 189, 214, 0.35),
      0 0 20px rgba(76, 189, 214, 0.2);
  }
}

/* ЭФФЕКТ БЛЕСКА ПРИ НАВЕДЕНИИ */
.ai-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255,255,255,0.5), 
    transparent
  );
  transition: left 0.6s ease-in-out;
  pointer-events: none;
  z-index: 2;
}

.ai-button:hover::before {
  left: 100%;
  animation: none;
}

/* ВНУТРЕННИЙ ГАЛО ПРИ НАВЕДЕНИИ */
.ai-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  border-radius: 50px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ai-button:hover::after {
  opacity: 1;
}

/* HOVER ЭФФЕКТ */
.ai-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 20px 50px rgba(76, 189, 214, 0.5),
    0 0 40px rgba(76, 189, 214, 0.6),
    inset 0 0 20px rgba(255,255,255,0.2);
}

.ai-button:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 15px 35px rgba(76, 189, 214, 0.4),
    0 0 25px rgba(76, 189, 214, 0.3);
}

/* ========================================
   МОДАЛЬНОЕ ОКНО С КАЛЕНДАРЁМ
   ======================================== */

/* ОВЕРЛЕЙ (ПОЛУПРОЗРАЧНЫЙ ФОН) */
.modal-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(33, 53, 70, 0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ПОКАЗАТЬ МОДАЛКУ */
.modal-bg.show {
  display: flex !important;
  pointer-events: auto !important;
  opacity: 1;
  animation: fadeInBackground 0.3s ease-out;
}

@keyframes fadeInBackground {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(4px);
  }
}

/* СОДЕРЖИМОЕ МОДАЛКИ */
.modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 35px;
  width: 90%;
  max-width: 920px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 
    0 30px 90px rgba(33, 53, 70, 0.4),
    0 0 40px rgba(76, 189, 214, 0.2);
  animation: slideUpModal 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(76, 189, 214, 0.15);
  font-family: 'Raleway', sans-serif;
}

/* АНИМАЦИЯ ПОЯВЛЕНИЯ МОДАЛКИ */
@keyframes slideUpModal {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ТИПОГРАФИЯ В МОДАЛКЕ */
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content h5,
.modal-content h6 {
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
}

.modal-content p,
.modal-content span,
.modal-content div {
  font-family: 'Raleway', sans-serif;
}

/* КНОПКА ЗАКРЫТИЯ */
.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 32px;
  color: #4CBDD6;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  border-radius: 50%;
  font-family: 'Raleway', sans-serif;

  /* HOVER ФОН */
  background: linear-gradient(135deg, rgba(76, 189, 214, 0.1), rgba(76, 189, 214, 0.05));
}

.modal-close:hover {
  color: #213546;
  transform: scale(1.3) rotate(90deg);
  background: linear-gradient(135deg, rgba(76, 189, 214, 0.2), rgba(76, 189, 214, 0.1));
  box-shadow: 0 4px 12px rgba(76, 189, 214, 0.15);
}

/* IFRAME КАЛЕНДАРЯ */
.modal-content iframe {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(76, 189, 214, 0.1);
}

/* ========================================
   АДАПТИВ - МОБИЛЬНЫЕ УСТРОЙСТВА
   ======================================== */

@media (max-width: 1024px) {
  .ai-button-wrapper {
    margin: 50px 0;
  }

  .ai-button {
    padding: 20px 50px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .ai-button-wrapper {
    margin: 40px 0;
  }

  .ai-button {
    width: 100%;
    max-width: 100%;
    padding: 18px 40px;
    font-size: 16px;
    font-weight: 800;
  }

  .modal-content {
    padding: 28px 20px;
    width: 95%;
    border-radius: 16px;
  }

  .modal-content iframe {
    height: 500px !important;
    border-radius: 10px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
    font-size: 28px;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .ai-button-wrapper {
    margin: 35px 0;
  }

  .ai-button {
    font-size: 15px;
    padding: 16px 32px;
    font-weight: 700;
  }

  .modal-content {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .modal-content iframe {
    height: 400px !important;
  }

  .modal-close {
    font-size: 24px;
    width: 32px;
    height: 32px;
  }
}

/* СКРОЛЛБАР ДЛЯ МОДАЛКИ */
.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f0f4f8;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4CBDD6, #213546);
  border-radius: 10px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #3ba5c0, #1a2840);
}

/* УБРАТЬ ПУЛЬС ЕСЛИ КНОПКА В ФОКУСЕ */
.ai-button:focus {
  outline: none;
  animation: none;
}

.ai-button:focus-visible {
  outline: 2px solid #4CBDD6;
  outline-offset: 3px;
}