/* home-enhanced.css - исправленная версия с корректной прокруткой */

/* Обеспечиваем прокрутку для всей страницы */
html, body {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 100vh;
  /* занимает минимум всю высоту */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 20px 20px;
  overflow-y: auto;
  /* разрешаем прокрутку внутри, если нужно */
  text-align: center;
  box-sizing: border-box;
}

/* Фоновое изображение */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../img/addvert.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.7) contrast(1.1);
  z-index: -2;
}

/* Эффект затемнения */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
  backdrop-filter: blur(3px);
  z-index: -1;
}

/* Заголовок */
.hero h1 {
  font-size: 5rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 3px;
  animation: fadeInDown 1s ease-out;
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

/* Подзаголовок */
.hero .subtitle {
  font-size: 1.6rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.2s both;
  opacity: 0.95;
  font-weight: 300;
  letter-spacing: 1px;
}

/* Блок преимуществ */
.benefits-block {
  max-width: 1000px;
  margin: 0 auto 20px;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  border-radius: 70px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.benefits-header {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.benefits-title {
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.benefits-highlight {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}

.free-word {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd700, #ffaa00, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  display: inline-block;
  margin: 0 10px;
  position: relative;
  animation: freePulse 2s ease-in-out infinite;
}

.free-word::before {
  content: '⭐';
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px gold);
  animation: starRotate 3s linear infinite;
}

.free-word::after {
  content: '⭐';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px gold);
  animation: starRotate 3s linear infinite reverse;
}

.benefits-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 5px;
}

.benefit-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 15px 0;
  font-size: 1.2rem;
  text-align: left;
  line-height: 1.5;
  padding: 5px 10px;
  border-radius: 50px;
  transition: all 0.3s;
}

.benefit-row:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
}

.benefit-row i {
  font-size: 2.2rem;
  color: #ffd700;
  min-width: 50px;
  text-align: center;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

.benefit-row strong {
  color: #ffd700;
  font-weight: 700;
  font-size: 1.3rem;
}

.glowing-text {
  animation: softGlow 3s ease-in-out infinite;
}

.action-row {
  display: none;
}

/* Город */
.city-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 15px 0;
}

.current-city {
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 25px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
  font-size: 1rem;
}

.current-city:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-city-change {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 10px 20px;
  border-radius: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-city-change:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* Кнопки авторизации */
.auth-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 5;
}

.btn-login,
.btn-register,
.btn-cabinet {
  padding: 12px 40px !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  border-radius: 60px !important;
  transition: all 0.3s !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  min-width: 240px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.btn-login {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(5px);
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
}

.btn-register,
.btn-cabinet {
  background: linear-gradient(135deg, #ff6b35, #ff8c5a) !important;
}

.btn-register {
  animation: pulseRegister 2s infinite ease-in-out !important;
}

@keyframes pulseRegister {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 53, 0.5);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.8), 0 0 40px #ffaa00;
    background: linear-gradient(135deg, #ff8c5a, #ff6b35);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 53, 0.5);
  }
}

.btn-register:hover,
.btn-cabinet:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  animation: none !important;
}

/* Стрелка-указатель */
.arrow-to-register {
  position: absolute;
  bottom: 100px;
  right: 40px;
  animation: pointToRegister 2s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
  display: none;
}

.arrow-to-register i {
  font-size: 60px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  transform: rotate(-15deg);
}

@keyframes pointToRegister {
  0%, 100% {
    transform: rotate(-15deg) translateY(0);
  }

  50% {
    transform: rotate(-10deg) translateY(-10px);
  }
}

/* Анимации */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softGlow {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
  }

  50% {
    box-shadow: 0 15px 50px rgba(255, 107, 53, 0.4), 0 0 30px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.35);
  }
}

@keyframes freePulse {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1);
  }

  50% {
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
  }
}

@keyframes starRotate {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Медиа-запросы (без вложенных дубликатов) */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: 30px 15px;
    overflow-y: auto;
  }

  .hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
  }

  .hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .benefits-block {
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 40px;
  }

  .benefits-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
  }

  .benefits-title {
    font-size: 1.1rem;
  }

  .benefits-highlight {
    font-size: 1.5rem;
    flex-wrap: wrap;
  }

  .free-word {
    font-size: 2.2rem;
    margin: 5px 0;
  }

  .free-word::before,
  .free-word::after {
    font-size: 1.2rem;
  }

  .free-word::before {
    left: -20px;
  }

  .free-word::after {
    right: -20px;
  }

  .benefits-subtitle {
    font-size: 1.1rem;
  }

  .benefit-row {
    font-size: 1.1rem;
    gap: 15px;
    margin: 12px 0;
    padding: 5px 10px;
  }

  .benefit-row i {
    font-size: 2rem;
    min-width: 45px;
  }

  .benefit-row strong {
    font-size: 1.2rem;
  }

  .city-container {
    width: 100%;
    justify-content: center;
    margin: 10px 0;
  }

  .auth-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
  }

  .btn-login,
  .btn-register,
  .btn-cabinet {
    min-width: 260px;
    font-size: 1.2rem !important;
    padding: 12px 30px !important;
  }

  .arrow-to-register {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .benefits-block {
    padding: 15px 20px;
  }

  .free-word::before,
  .free-word::after {
    display: none;
  }

  .benefit-row {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 8px;
  }

  .benefit-row:hover {
    transform: translateY(-5px);
  }

  .city-container {
    flex-direction: column;
    background: transparent;
    gap: 6px;
  }

  .current-city,
  .btn-city-change {
    width: 100%;
    justify-content: center;
  }
}