/* /css/components/hero.css */

/* Основные переменные (если не определены глобально) */
:root {
  --gold: #c9a84c;
  --gold-d: #b08c2e;
  --txt2: #e0e0e0;
  --txt3: #a0a0a0;
  --bg: #0a0e17;
  --t: all 0.3s ease;
}

.he-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Фон-запасной вариант */
  background: linear-gradient(135deg, #0a1628, #0d2137 40%, #0a1628 70%, #071018);
}

/* Видео фон */
.he-hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Плавное появление видео */
  opacity: 0;
  animation: he-video-appear 1s ease forwards;
}

@keyframes he-video-appear {
  to {
    opacity: 1;
  }
}

/* Оверлей (второй слой) */
.he-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.7), rgba(13, 33, 55, 0.6) 40%, rgba(10, 22, 40, 0.7) 70%, rgba(7, 16, 24, 0.8));
  z-index: 1;
  pointer-events: none; /* Чтобы не мешать кликам */
}

/* Пузырьки (третий слой) */
.he-bubbles {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.he-bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.12);
  animation: he-rise linear infinite;
  will-change: transform, opacity; /* Для производительности */
}

@keyframes he-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-120vh) scale(0.8);
    opacity: 0;
  }
}

/* Контент (верхний слой) */
.he-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 1000px;
  width: 100%;
}

.he-badge {
  display: inline-block;
  background: rgba(201, 169, 98, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 32px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.he-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: #fff;
  margin-bottom: 24px;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

.he-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #ffffff;
  max-width: 700px;
  margin: 0 auto 40px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.6;
  opacity: 0.95;
}

.he-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #0a0e17;
  padding: 16px 40px;
  border-radius: 50px;
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--t);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}

.he-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
  background: linear-gradient(135deg, var(--gold-d), var(--gold));
}

.he-cta svg {
  transition: transform 0.3s ease;
}

.he-cta:hover svg {
  transform: translateX(5px);
}

.he-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
  padding: 40px 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 30px;
}

.he-stat {
  text-align: center;
}

.he-stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 2px 15px rgba(201, 168, 76, 0.3);
}

.he-stat-label {
  font-size: 0.8rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  font-weight: 500;
}

/* ===== МОБИЛЬНЫЕ УСТРОЙСТВА ===== */
@media (max-width: 768px) {
  /* Скрываем видео на мобильных */
  .he-hero-video {
    display: none;
  }
  
  /* Показываем постер как фон */
  .he-hero {
    background-image: url('../videos/hero_poster.jpg'); /* Путь может отличаться */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  /* Затемнение на мобильных делаем сильнее */
  .he-overlay {
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.9), rgba(13, 33, 55, 0.85) 40%, rgba(10, 22, 40, 0.9) 70%, rgba(7, 16, 24, 0.95));
  }
  
  /* Адаптация контента для мобильных */
  .he-content {
    padding: 100px 20px 60px;
  }
  
  .he-badge {
    font-size: 0.7rem;
    padding: 6px 16px;
  }
  
  .he-subtitle {
    margin-bottom: 30px;
  }
  
  .he-cta {
    padding: 14px 30px;
    font-size: 0.9rem;
  }
  
  /* Статистика в столбик на мобильных */
  .he-stats {
    flex-direction: column;
    gap: 30px;
    padding: 30px 20px;
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.3);
  }
  
  .he-stat-number {
    font-size: 2.2rem;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .he-content {
    padding: 80px 16px 40px;
  }
  
  .he-badge {
    margin-bottom: 24px;
  }
  
  .he-hero h1 {
    margin-bottom: 16px;
  }
  
  .he-stats {
    gap: 25px;
    padding: 25px 16px;
  }
}

/* Для устройств с низкой производительностью */
@media (prefers-reduced-motion: reduce) {
  .he-hero-video {
    display: none;
  }
  
  .he-bubble {
    animation: none;
    display: none;
  }
  
  .he-hero {
    background: linear-gradient(135deg, #0a1628, #0d2137 40%, #0a1628 70%, #071018);
  }
}

/* Высококачественные экраны (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .he-hero {
    background-image: url('../videos/hero_poster@2x.jpg'); /* Путь может отличаться */
  }
}