/* --- Общие стили --- */
.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-image: url("/images/bg.jpg"); /* 👈 сюда твой фон */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: blur(0px);
  transform: scale(1.1); /* чтобы не было краёв */
  
  z-index: -1;
  overflow: hidden;
  
}

/* затемнение (чтобы текст читался) */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.35),
    rgba(0,0,0,0.75)
  );
}
body {
 font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;

  color: #ffffff;
  width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;

  background: transparent; /* 👈 ВАЖНО */
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* Header с анимацией */
header h1 {
  margin: 40px 0 10px;
  font-size: 3.5em;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeIn 1s forwards;
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Секции видео --- */
.video-section {
  width: 100vw;
  padding: 10px 0;
  box-sizing: border-box;
}

.video-section h2 {
  font-size: 1.6em;
  margin-bottom: 5px;
  text-align: center;
}

/* --- Карусель --- */
.carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 30px; /* было 40px, уменьшаем расстояние от заголовка секции */
  position: relative; /* для абсолютного позиционирования кнопок, если нужно */
}

/* --- Кнопки управления --- */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px; /* немного под каруселью */
  pointer-events: auto; /* чтобы кнопки были кликабельны поверх других элементов */
  z-index: 2; /* выше, чем видео, но не мешает полноэкранному режиму */
  position: relative;
}

.carousel-controls button {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s;
}

.carousel-controls button:hover {
  background: #555;
}

/* --- Размеры и оформление видео --- */
.carousel.vertical-carousel .video-item {
  width: 150px;
  height: 250px;
}

.carousel.horizontal-carousel .video-item,
.carousel.edits-carousel .video-item {
  width: 250px;
  height: 150px;
}

.carousel .video-item {
  background: #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
  border-radius: 10px;
}

.video-item.active {
  transform: scale(1.15);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  background: #aaa;
  z-index: 1;
}

/* --- Footer --- */
footer {
  margin: 50px 0;
  font-size: 1.2em;
  text-align: center;
}

footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}
.video-section {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  will-change: opacity, transform;
}

/* когда секция видима */
.video-section.show {
  opacity: 1;
  transform: translateY(0);
}
.video-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;

  background: rgb(255, 255, 255);
}

/* превью-фон */
.video-item::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transition: transform 0.35s ease;
  transform: scale(1);
}

/* hover эффект */
.video-item:hover::before {
  transform: scale(1.05);
}

/* активное видео (если у тебя есть .active) */
.video-item.active::before {
  transform: scale(1.08);
}
.video-item::after {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 20px;

  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.35),
    transparent 60%
  );

  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;

  filter: blur(25px);
  z-index: 0;
  pointer-events: none;
}
.video-item.active {
  box-shadow:
    0 0 0 1px rgb(255, 255, 255),
    0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 40px rgb(255, 255, 255);
}
/* --- Адаптивность --- */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.5em;
  }
  .video-section {
    margin-bottom: 0px; /* было больше → уменьшаем */
  }

  .video-section h2 {
    font-size: 1.4em;
    margin-bottom: 10px;
  }

  /* --- Карусель --- */
  .carousel {
    gap: 15px;
    margin-top: 10px;
  }

  .carousel.vertical-carousel .video-item {
    width: 110px;
    height: 180px;
  }

  .carousel.horizontal-carousel .video-item,
  .carousel.edits-carousel .video-item {
    width: 130px;
    height: 85px;
  }

  /* --- Кнопки --- */
  .carousel-controls {
    margin-top: 12px;
  }

  .carousel-controls button {
    padding: 5px 10px;
    font-size: 0.85em;
  }

  /* --- Активное видео --- */
  .video-item.active {
    transform: scale(1.08);
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2em;
  }
  .video-section {
    margin-bottom: -10px;
  }

  .video-section h2 {
    font-size: 1.2em;
    margin-bottom: 8px;
  }

  /* --- Карусель --- */
  .carousel {
    gap: 12px;
    margin-top: 8px;
  }

  .carousel.vertical-carousel .video-item {
    width: 95px;
    height: 160px;
  }

  .carousel.horizontal-carousel .video-item,
  .carousel.edits-carousel .video-item {
    width: 115px;
    height: 70px;
  }

  /* --- Кнопки --- */
  .carousel-controls {
    margin-top: 10px;
  }

  .carousel-controls button {
    padding: 4px 8px;
    font-size: 0.8em;
  }

  /* --- Активное видео --- */
  .video-item.active {
    transform: scale(1.03);
  }
}
