/* hero.css — hero-слайдер, маска, SVG-волна, блок преимуществ.
   Без JS-фреймворков: чистый CSS-слайдер + минимум JS в app.js. */

/* ===== Hero-слайдер ===== */
.hero-slider {
  position: relative;
  width: 100%;
  height: clamp(320px, 55vh, 640px);
  overflow: hidden;
  background: var(--color-primary);
}
.hero-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}
.hero-slider__slide--active {
  opacity: 1;
  z-index: 2;
}
.hero-slider__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Маска-оверлей: градиент фирменного синего (читаемость текста + узнаваемость) */
.hero-slider__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(41, 45, 150, 0.78) 0%,
    rgba(41, 45, 150, 0.45) 45%,
    rgba(41, 45, 150, 0.15) 100%
  );
  z-index: 1;
}

.hero-slider__caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8%;
  max-width: 900px;
}
.hero-slider__title {
  color: #fff;
  font-size: clamp(1.3rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  margin-bottom: 18px;
  max-width: 720px;
}
.hero-slider__subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  margin-bottom: 22px;
  max-width: 600px;
}
.hero-slider__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), background var(--transition);
}
.hero-slider__btn:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

/* Стрелки навигации */
.hero-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background var(--transition);
}
.hero-slider__arrow:hover {
  background: rgba(255, 255, 255, 0.45);
}
.hero-slider__arrow--prev { left: 16px; }
.hero-slider__arrow--next { right: 16px; }

/* Точки навигации */
.hero-slider__dots {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all var(--transition);
}
.hero-slider__dot--active {
  background: var(--color-accent);
  width: 28px;
  border-radius: 5px;
}

/* ===== SVG-волна (переход слайдер -> контент) ===== */
.hero-wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 60px;
  z-index: 4;
  pointer-events: none;
}
.hero-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== Блок преимуществ (бывший #frontpage-boxes) ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.feature:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.feature__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  color: var(--color-primary);
}
.feature:hover .feature__icon {
  color: var(--color-accent);
}
.feature__icon svg {
  width: 100%;
  height: 100%;
}
.feature__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Адаптив */
@media (max-width: 700px) {
  .hero-slider { height: clamp(260px, 45vh, 400px); }
  .hero-slider__caption { padding: 0 6%; }
  .hero-slider__arrow { display: none; }
  .hero-slider__dots { bottom: 40px; }
}
