/* =========================================
   Общая секция Hero (хедер + welcome)
   ========================================= */

.hero {
  position: relative;
  background-color: #150027;
  overflow: hidden
}

/* Фоновое изображение welcome.png (оверлей) – фиксированное */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #150027;
  background-image: url('../../img/welcome.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-attachment: scroll; 
  background-blend-mode: overlay;
  pointer-events: none;
}

/* Декоративный эллипс поверх фона, под контентом */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 100%;
  height: 100%;
  background: url('../../img/Ellipse 3.png') no-repeat top center;
  background-size: auto;
  pointer-events: none;
  opacity: 0.7;
}

/* =========================================
   Welcome – контент
   ========================================= */
.welcome {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 20px 60px;
}

/* --- Декоративные плашки --- */
.welcome__badge {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.welcome__badge-inner {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.welcome__badge-icon {
  position: absolute;
  top: -5px;
  left: -14px;
  width: 14px;
  height: 14px;
  z-index: 1;
}

.welcome__badge-label {
  background-color: #471C60;
  border-radius: 10px;
  padding: 6px 16px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #FFFFFF;
  line-height: 1.2;
  white-space: nowrap;
  display: flex;
  align-items: center;
  margin-top: 6px;
}

/* Координаты */
.welcome__badge--programmer {
  top: 20%;
  left: 17%;
  animation: floatProgrammer 15s ease-in-out infinite;
}

.welcome__badge--photographer {
  top: 0%;
  right: 30%;
  animation: floatPhotographer 25s ease-in-out infinite;
}

.welcome__badge--designer {
  bottom: 73%;
  right: 15%;
  animation: floatDesigner 18s ease-in-out infinite;
}

/* Анимации */
@keyframes floatProgrammer {
  0%   { transform: translate(0, 0) rotate(0deg); }
  10%  { transform: translate(22px, -8px) rotate(0.5deg); }
  20%  { transform: translate(10px, -20px) rotate(-0.3deg); }
  30%  { transform: translate(-15px, -15px) rotate(0.7deg); }
  40%  { transform: translate(-25px, 2px) rotate(-0.2deg); }
  50%  { transform: translate(-12px, 18px) rotate(0.4deg); }
  60%  { transform: translate(8px, 24px) rotate(-0.6deg); }
  70%  { transform: translate(20px, 10px) rotate(0.3deg); }
  80%  { transform: translate(14px, -10px) rotate(-0.5deg); }
  90%  { transform: translate(-5px, -18px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes floatPhotographer {
  0%   { transform: translate(0, 0) rotate(0deg); }
  8%   { transform: translate(-18px, 14px) rotate(-0.4deg); }
  16%  { transform: translate(5px, -22px) rotate(0.6deg); }
  24%  { transform: translate(22px, -6px) rotate(-0.2deg); }
  32%  { transform: translate(-10px, 18px) rotate(0.7deg); }
  40%  { transform: translate(-24px, -12px) rotate(-0.5deg); }
  48%  { transform: translate(15px, 20px) rotate(0.3deg); }
  56%  { transform: translate(8px, -16px) rotate(-0.6deg); }
  64%  { transform: translate(-20px, -8px) rotate(0.4deg); }
  72%  { transform: translate(18px, 10px) rotate(-0.3deg); }
  80%  { transform: translate(-6px, -20px) rotate(0.5deg); }
  88%  { transform: translate(12px, 16px) rotate(-0.2deg); }
  96%  { transform: translate(-14px, -4px) rotate(0.1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes floatDesigner {
  0%   { transform: translate(0, 0) rotate(0deg); }
  12%  { transform: translate(16px, -12px) rotate(0.3deg); }
  24%  { transform: translate(-8px, -20px) rotate(-0.4deg); }
  36%  { transform: translate(-20px, 4px) rotate(0.2deg); }
  48%  { transform: translate(-4px, 18px) rotate(-0.5deg); }
  60%  { transform: translate(18px, 14px) rotate(0.6deg); }
  72%  { transform: translate(10px, -8px) rotate(-0.3deg); }
  84%  { transform: translate(-14px, -16px) rotate(0.1deg); }
  96%  { transform: translate(6px, 8px) rotate(-0.2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome__badge {
    animation: none;
  }
}

/* --- Основной заголовок (три строки) --- */
.welcome__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.welcome__line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.welcome__logo,
.magic-frame__img {
  height: 90px;
  width: auto;
  display: block;
}

.welcome__colon {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 80px;
  color: #ffffff;
  line-height: 1;
  display: block;
}

.welcome__text {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 80px;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
}

.welcome__subtitle {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: #ffffff;
  line-height: 1.4;
  margin: 0 auto;
  max-width: 600px;
}

/* --- Карточки статистики --- */
.welcome__cards {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.welcome__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 40px;
  border: 2px solid #BD39FA;
  border-radius: 20px;
  background: transparent;
  min-width: 200px;
  box-sizing: border-box;
}

.welcome__card-number {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 42px;
  color: #FFCD02;
  line-height: 1.2;
  margin-bottom: 8px;
}

.welcome__card-text {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #FFFFFF;
  line-height: 1.4;
  text-align: center;
}

/* --- Магическая палочка Frame5 + звездочки --- */
.magic-frame {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.magic-frame__img {
  display: block;
  height: 90px;
  width: auto;
}

.sparkle {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: 0;
  animation: sparkleFly 2s ease-out infinite;
}

.sparkle img {
  width: 100%;
  height: 100%;
  display: block;
}

.sparkle--1 { animation-delay: 0s; }
.sparkle--2 { animation-delay: 0.4s; }
.sparkle--3 { animation-delay: 0.8s; }
.sparkle--4 { animation-delay: 1.2s; }
.sparkle--5 { animation-delay: 1.6s; }

@keyframes sparkleFly {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.5) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(calc(-50% - 15px), -20px) scale(1.2) rotate(45deg);
  }
  50% {
    opacity: 0.8;
    transform: translate(calc(-50% + 10px), -40px) scale(0.8) rotate(90deg);
  }
  80% {
    opacity: 0.2;
    transform: translate(calc(-50% - 5px), -70px) scale(0.5) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + 15px), -100px) scale(0) rotate(270deg);
  }
}

/* =========================================
   НОВАЯ ЧАСТЬ: поиск, меню, видео
   ========================================= */

/* Отступ сверху */
.welcome__search-section {
  margin-top: 60px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Строка поиска */
.welcome__search-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 950px;
  width: 100%;
  margin-bottom: 30px;
}

/* Стиль для автоматически печатающегося текста */
.welcome__search-input.auto-typing {
  color: rgba(0, 0, 0, 0.5);   /* чёрный полупрозрачный */
}

.welcome__search-input {
  flex: 1;
  max-width: 760px;
  height: 65px;
  padding: 0 25px;
  border: none;
  border-radius: 15px;
  background: #FFFFFF;
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: rgba(0, 0, 0, 0.5); 
  outline: none;
}

.welcome__search-input::placeholder {
  color: #999;
}

.welcome__search-btn {
  width: 180px;
  height: 65px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(90deg, #FFCD02 0%, #A18F07 100%);
  color: #000000;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.welcome__search-btn:hover {
  opacity: 0.9;
}

/* Меню категорий */
.welcome__tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 50px;
}

.welcome__tag {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s;
}

.welcome__tag--active,
.welcome__tag:hover {
  color: #FFCD02;
}

/* Блок видео */
.welcome__video-block {
  position: relative;
  width: calc(100% + 40px);
  height: 800px;
  margin-left: -20px;
  margin-right: -20px;
  overflow: hidden;
  border-radius: 0;
}

.welcome__video-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.welcome__video-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: #fff;
  width: 90%;
  max-width: 700px;
}

.welcome__video-title {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 36px;
  margin-bottom: 15px;
  white-space: pre-line;
}

.welcome__video-desc {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 30px;
  white-space: pre-line;
}

.welcome__video-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Общие стили кнопок видео */
.welcome__video-btn {
  padding: 12px 30px;
  border: none;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}

/* Кнопка "СДЕЛАТЬ ЗАПРОС" (градиент) */
.welcome__video-btn--request {
  background: linear-gradient(180deg, #9142FF 0%, #3F0294 100%);
  color: #ffffff;
}
.welcome__video-btn--request:hover {
  opacity: 0.9;
}

/* Кнопка "ПРОМО" (белая с чёрным текстом) */
.welcome__video-btn--promo {
  background: #ffffff;
  color: #000000;
}
.welcome__video-btn--promo:hover {
  background: #f0f0f0;
}

/* Активное состояние */
.welcome__video-btn--active.welcome__video-btn--request {
  box-shadow: 0 0 8px rgba(145, 66, 255, 0.6);
}
.welcome__video-btn--active.welcome__video-btn--promo {
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* =========================================
   Адаптив: планшеты (≤1024px)
   ========================================= */
@media (max-width: 1024px) {
  .hero::before {
    background-attachment: scroll;
  }

  .welcome {
    padding-bottom: 50px;
  }

  .welcome__top {
    gap: 4px;                /* немного уменьшаем отступы между строками */
    margin-bottom: 28px;
  }

  .welcome__line {
    gap: 6px;                /* уменьшаем зазор между элементами */
    flex-wrap: nowrap;       /* запрещаем перенос внутри строки */
  }

  .welcome__logo,
  .magic-frame__img {
    height: 55px;            /* компактнее */
  }

  .welcome__colon {
    font-size: 52px;
  }

  .welcome__text {
    font-size: 52px;
    white-space: nowrap;      /* без переносов */
  }

  .welcome__subtitle {
    font-size: 18px;
    max-width: 500px;
  }

  .welcome__cards {
    gap: 20px;
    margin-top: 30px;
  }

  .welcome__card {
    padding: 20px 30px;
    min-width: 180px;
  }

  .welcome__card-number {
    font-size: 36px;
  }

  .welcome__card-text {
    font-size: 14px;
  }

  .welcome__search-row {
    flex-direction: row;       /* оставляем в строку */
    max-width: 100%;
    gap: 10px;
  }

  .welcome__search-input {
    max-width: 100%;
    width: auto;
    flex: 1;
    height: 56px;
    font-size: 16px;
    line-height: 56px;
    padding: 0 20px;
    -webkit-appearance: none;
    appearance: none;
    padding-block: 0;
    padding-inline: 20px;
    box-sizing: border-box;
  }

  .welcome__search-btn {
    width: auto;
    flex-shrink: 0;
    height: 56px;
    line-height: 56px;
    font-size: 16px;
    padding: 0 25px;
    max-width: none;
  }

  .welcome__tags {
    gap: 20px;
  }

  .welcome__video-block {
    height: 400px;
  }
}

/* =========================================
   Адаптив: мобильные (≤640px)
   ========================================= */
@media (max-width: 640px) {
  .welcome {
    padding-bottom: 40px;
  }

  .welcome__top {
    gap: 2px;
    margin-bottom: 24px;
  }

  .welcome__line {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .welcome__logo,
  .magic-frame__img {
    height: 50px;
    max-width: 90%;
    width: auto;
    display: block;
  }

  .welcome__colon {
    font-size: 38px;
  }

  .welcome__text {
    font-size: 38px;
    white-space: normal;
    word-break: break-word;
    width: 100%;
    text-align: center;
    line-height: 1.2;
  }

  .welcome__subtitle {
    font-size: 16px;
    max-width: 100%;
    padding: 0 10px;
  }

  .welcome__cards {
    gap: 15px;
    margin-top: 24px;
  }

  .welcome__card {
    padding: 15px 20px;
    min-width: 150px;
  }

  .welcome__card-number {
    font-size: 28px;
  }

  .welcome__card-text {
    font-size: 12px;
  }

  .welcome__badge {
    display: none;
  }

  .welcome__search-section {
    margin-top: 40px;
  }

  .welcome__search-row {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    gap: 10px;
  }

/* Поле ввода: гарантированная высота через min-height + padding */
  .welcome__search-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #3F098A;
    outline: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* вместо height используем min-height и паддинги */
    min-height: 56px;
    padding: 12px 20px;    /* вертикальные отступы создают объём */
    line-height: 1.2;      /* обычный межстрочный интервал */
    margin: 0;
  }

  .welcome__search-btn {
    height: 56px;
    line-height: 56px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    border: none;
    border-radius: 15px;
    cursor: pointer;
  }

  .welcome__tags {
    gap: 15px;
    margin-bottom: 30px;
  }

  .welcome__video-block {
    height: 400px;
  }

  .welcome__video-title {
    font-size: 24px;
  }

  .welcome__video-desc {
    font-size: 14px;
  }
}

