body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f8fafc;
}

h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.hero-title {
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  margin-bottom: 0.25rem;
}

/* Уменьшаем высоту hero секции с голубым фоном */
.gradient-bg {
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding-bottom: 0;
  height: 350px; /* Фиксированная высота */
  display: flex;
  flex-direction: column;
}

.gradient-bg .max-w-7xl {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.gradient-bg .text-center {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-content-wrapper {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Удаляю неиспользуемые стили */
.gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(120deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
  z-index: 1;
}

/* Простая анимация для фона */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(120deg, 
    rgba(79, 70, 229, 0.05) 0%, 
    rgba(124, 58, 237, 0.05) 25%, 
    rgba(79, 70, 229, 0.1) 50%, 
    rgba(124, 58, 237, 0.05) 75%, 
    rgba(79, 70, 229, 0.05) 100%);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  z-index: 1;
}

.gradient-bg > div {
  position: relative;
  z-index: 2;
}

/* Удаляю неиспользуемые стили для плавающих иконок */
.floating-course-icon:nth-child(1) {
  display: none;
}

.floating-course-icon:nth-child(2) {
  display: none;
}

.floating-course-icon:nth-child(3) {
  display: none;
}

.floating-course-icon:nth-child(4) {
  display: none;
}

.floating-course-icon:nth-child(5) {
  display: none;
}

.floating-course-icon:nth-child(6) {
  display: none;
}

@keyframes float-icon {
  0% { transform: none; }
  100% { transform: none; }
}

/* Улучшенный дизайн карточек */
.course-card {
  transition: all 0.3s ease;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  background: white;
  border: 1px solid #f1f5f9; /* тонкая рамка */
  position: relative;
}

.course-card:hover {
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 6px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #e2e8f0;
}

.course-card:hover .course-icon-container {
  transform: scale(1.05);
}

.course-card:hover h3 {
  color: #4f46e5; /* indigo-600 */
}

/* Унифицированный стиль кнопок для курсов */
.course-button {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.875rem 1.5rem;
  border: none;
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 0.5rem;
  color: white;
  background-color: #4f46e5; /* indigo-600 для всех кнопок */
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.course-button:hover {
  background-color: #4338ca; /* indigo-700 при наведении */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.course-button:hover .fa-arrow-right {
  transform: translateX(4px);
}

.course-button .fa-arrow-right {
  transition: transform 0.3s ease;
}

.course-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

/* Вторичная кнопка для "Подробнее" */
.course-button-secondary {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.875rem 1rem;
  border: 1px solid #e2e8f0;
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 0.5rem;
  color: #4f46e5; /* indigo-600 */
  background-color: white;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.course-button-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.course-button-secondary:hover .fa-info-circle {
  transform: scale(1.1);
}

.course-button-secondary .fa-info-circle {
  transition: transform 0.3s ease;
}

.course-button-secondary:active {
  transform: translateY(0);
}

/* Стили для модальных окон */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.active .modal-backdrop {
  opacity: 1;
}

.modal-content {
  background-color: white;
  border-radius: 1rem;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 50;
  position: relative;
}

.modal.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
  border-radius: 9999px;
}

.modal-close:hover {
  color: #1e293b;
  background-color: #f1f5f9;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.modal-section {
  margin-bottom: 1.5rem;
}

.modal-section-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1e293b;
  display: flex;
  align-items: center;
}

.modal-section-title i {
  margin-right: 0.5rem;
  color: #4f46e5;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    max-height: 85vh;
    border-radius: 0.75rem;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-header h3 {
    font-size: 1.25rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 0.75rem 1rem;
  }
}

/* Стили для иконок в карточках */
.course-icon-container {
  padding: 0.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background-color: #f3f4f6; /* Унифицированный светло-серый фон */
}

.course-icon-container i {
  color: #4f46e5; /* Унифицированный цвет иконок - indigo-600 */
  transition: all 0.3s ease;
}

.course-card:hover .course-icon-container {
  transform: scale(1.02);
  background-color: #eef2ff; /* При наведении фон становится светло-индиго */
}

/* Удаляю анимацию галочек
.course-card .fa-check-circle {
  transition: transform 0.2s ease;
}

.course-card:hover .fa-check-circle {
  transform: scale(1.1);
}
*/

.typing-test {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1515879218367-8466d910aaa4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80');
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
  /* Уменьшаем высоту синего фона только снизу */
  padding-top: 40px;
  padding-bottom: 10px;
}

/* Уменьшаем внутренние отступы для секции typing-test */
.typing-test .max-w-7xl {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

/* Уменьшаем отступ между курсами и кнопками */
.course-card .mt-8 {
  margin-top: 1rem;
}

/* Уменьшаем отступ между списком и кнопками */
.course-card .mt-6 {
  margin-top: 1rem;
}

/* Уменьшаем отступ между элементами списка */
.course-card ul.space-y-3 {
  margin-top: 0.5rem;
}

/* Уменьшаем отступ между заголовком и описанием */
.course-card .mt-6:first-of-type {
  margin-top: 0.5rem;
}

.typing-test h2,
.typing-test h3 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.typing-test p,
.typing-test li {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.progress-ring {
  transition: stroke-dashoffset 0.5s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.section-padding {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (max-width: 640px) {
  .section-padding {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

.card-padding {
  padding: 1.75rem;
}

.nav-link {
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #4f46e5;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

footer {
  background: linear-gradient(to right, #1e293b, #0f172a);
}

.footer-column h4 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: #4f46e5;
}

.gradient-bg p.text-indigo-100 {
  color: #4b5563; /* gray-600 */
}

.gradient-bg a.text-white {
  color: white;
}

.gradient-bg a.bg-indigo-700\/30 {
  background-color: #4f46e5; /* indigo-600 */
}

.gradient-bg a.hover\:bg-indigo-700\/50:hover {
  background-color: #4338ca; /* indigo-700 */
} 

/* Стили для космической анимации */
.star {
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate;
  position: absolute;
}

@keyframes twinkle {
  0% { opacity: 0.2; }
  100% { opacity: 0.8; }
}

.ufo {
  position: absolute;
  animation: ufoMove 30s infinite alternate ease-in-out;
}

@keyframes ufoMove {
  0% { transform: translateX(-100vw) translateY(20vh) rotate(-5deg); }
  100% { transform: translateX(100vw) translateY(10vh) rotate(5deg); }
}

.astronaut {
  position: absolute;
  animation: astronautFloat 15s infinite alternate ease-in-out;
}

@keyframes astronautFloat {
  0% { transform: translateX(0) translateY(0) rotate(0deg); }
  100% { transform: translateX(100px) translateY(-50px) rotate(10deg); }
}

.error-animation {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-25px) rotate(2deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.error-shadow {
  animation: shadow 6s ease-in-out infinite;
  transform-origin: center;
  filter: blur(10px);
}

@keyframes shadow {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(0.8);
    opacity: 0.15;
  }
    100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

.error-text {
  text-shadow: 3px 3px 0 rgba(79, 70, 229, 0.2);
  background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 3s ease-in-out infinite alternate;
}

@keyframes textShine {
  0% {
    filter: brightness(1) saturate(1);
  }
  100% {
    filter: brightness(1.2) saturate(1.3);
  }
}

.button-glow {
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(79, 70, 229, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
  }
}

/* Стили для эффекта печатания текста */
.typing-effect {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: inherit;
  visibility: hidden; /* Скрываем до начала анимации */
}

/* Показываем текст, когда начинается анимация */
.typing-effect.typing-started {
  visibility: visible;
}

/* Курсор во время печатания */
.typing-effect::after {
  content: '|';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  height: 80%;
  color: #4f46e5;
  font-weight: 400;
  animation: blink-cursor 0.8s ease infinite;
  opacity: 0; /* Начально скрыт */
  -webkit-text-fill-color: #4f46e5; /* Чтобы курсор был видимым */
  display: inline-block;
  vertical-align: middle;
  transition: opacity 0.5s ease;
}

/* Показываем курсор только когда анимация началась */
.typing-effect.typing-started::after {
  opacity: 1;
}

/* Состояние завершенного печатания - плавно скрываем курсор */
.typing-effect.typing-complete::after {
  opacity: 0;
  animation: none;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Улучшенные стили для блоков статистики */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 0 auto;
  padding: 0;
}

.stats-container .stat-block {
  flex: 0 1 auto;
  padding: 0;
}

/* Убираем разделители между блоками, так как используем отдельные блоки с фоном */
.stats-container .stat-block:not(:last-child)::before {
  display: none;
}

.stat-block {
  background: none;
  border: none;
  text-align: center;
  position: relative;
  margin-bottom: 0.5rem;
  padding: 0;
  transition: none;
}

.stat-block:hover {
  transform: none;
}

/* Убираем нижнюю линию, так как теперь используем фон */
.stat-block::after {
  display: none;
}

/* Уменьшаем размер цифр в статистике */
.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f8fafc;
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.2);
  margin-bottom: 0.2rem;
}

.stat-block:hover .stat-number {
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.2);
  border-color: transparent;
}

/* Уменьшаем размер подписей в статистике */
.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.4rem;
  background-color: rgba(240, 244, 255, 0.85);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.stat-block:hover .stat-label {
  background-color: rgba(240, 244, 255, 0.85);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.1);
}

/* Уменьшаем внутренние отступы в hero секции */
.gradient-bg .max-w-7xl {
  padding-top: 1rem;  /* Увеличиваем с 0.75rem */
  padding-bottom: 1rem; /* Увеличиваем с 0.75rem */
}

/* Увеличиваем расстояние между заголовком и подзаголовком */
.hero-title {
  margin-bottom: 0.5rem; /* Увеличиваем с 0.25rem */
}

/* Отступ между секциями hero и courses */
#courses {
  padding-top: 1.5rem; /* Увеличиваем верхний отступ для заголовка "Наши курсы" */
  margin-top: -0.5rem; /* Уменьшаем отрицательный отступ */
}

/* Стиль для подзаголовка в hero блоке */
.gradient-bg p.mt-2 {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #4b5563; /* gray-600 */
}

/* Отступы для кнопок в hero блоке */
.gradient-bg .mt-4 {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Меньший вертикальный отступ между hero и courses */
.fade-in-after-typing {
  margin-bottom: 0.5rem; /* Добавляем небольшой отступ снизу */
}

/* Восстанавливаем стили для мобильных устройств */
@media (max-width: 640px) {
  .gradient-bg {
    height: 400px;
  }

  .stats-container {
    flex-direction: row;
    flex-wrap: nowrap; /* Запрещаем перенос */
    gap: 0.5rem; /* Уменьшаем отступы между блоками */
    justify-content: center;
    padding: 0 0.5rem; /* Добавляем небольшие отступы по бокам */
  }

  .hero-content-wrapper {
    gap: 0.75rem;
  }

  .stat-block {
    flex: 1; /* Равномерное распределение пространства */
    min-width: 0; /* Позволяет блокам сжиматься */
  }

  .stat-number {
    width: 45px; /* Уменьшаем размер блока */
    height: 32px;
    font-size: 1.1rem; /* Уменьшаем размер шрифта */
    margin: 0 auto 0.2rem; /* Центрируем блок */
  }

  .stat-label {
    font-size: 0.6rem; /* Уменьшаем размер шрифта */
    padding: 0.15rem 0.25rem;
    white-space: nowrap; /* Запрещаем перенос текста */
  }
}

/* Добавляем стили для очень маленьких экранов */
@media (max-width: 360px) {
  .stats-container {
    gap: 0.25rem; /* Еще меньше отступы */
  }

  .stat-number {
    width: 40px;
    height: 30px;
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.55rem;
    padding: 0.1rem 0.2rem;
  }
}

/* Стили для плавного появления элементов после печатания */
.fade-in-after-typing {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  /* Удаляем зависимость от класса typing-complete */
}

/* Добавляем класс для одновременного показа элементов с печатанием */
.typing-started ~ .fade-in-after-typing,
.show-content .fade-in-after-typing {
  opacity: 1;
  transform: translateY(0);
} 

/* Стили для блоков статистики */
.stats-container .stat-block {
  flex: 1;
  position: relative;
  padding: 0 1.5rem;
} 

/* Дублирующиеся стили удалены */ 