/* ==========================================================================
   VIDEOS SECTION (ВИДЕО С ТУРНИРОВ)
   ========================================================================== */

.videos {
  position: relative;
}

/* ==========================================================================
   FEATURED VIDEO (Главное видео)
   ========================================================================== */

.videos__featured {
  margin-bottom: var(--space-3xl);
}

.videos__player {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.videos__thumbnail {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.videos__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.videos__thumbnail:hover img {
  transform: scale(1.05);
}

/* Оверлей с кнопкой Play */
.videos__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.videos__thumbnail:hover .videos__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    rgba(255, 118, 0, 0.1) 100%
  );
}

/* Кнопка Play */
.videos__play {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 50%;
  color: var(--color-white);
  font-size: 1.5rem;
  box-shadow: 0 8px 30px rgba(255, 118, 0, 0.5);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.videos__play:hover {
  transform: scale(1.15);
  box-shadow: 0 12px 40px rgba(255, 118, 0, 0.6);
}

.videos__play i {
  margin-left: 4px; /* чуть вправо для центрирования визуально */
}

/* Информация о видео */
.videos__info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-2xl);
  z-index: 1;
}

.videos__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.videos__tag--final {
  background: var(--color-primary);
  color: var(--color-white);
}

.videos__tag--semi {
  background: var(--color-secondary);
  color: var(--color-white);
}

.videos__tag--best {
  background: #9b59b6;
  color: var(--color-white);
}

.videos__tag--training {
  background: #27ae60;
  color: var(--color-white);
}

.videos__tag--kids {
  background: #e67e22;
  color: var(--color-white);
}

.videos__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.videos__meta {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.videos__meta span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

.videos__meta i {
  color: var(--color-primary);
}

.videos__embed {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.videos__embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ==========================================================================
   VIDEO GRID (Миниатюры)
   ========================================================================== */

.videos__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

/* Карточка видео */
.video-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* Миниатюра */
.video-card__thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card:hover .video-card__thumbnail img {
  transform: scale(1.1);
}

/* Кнопка Play на миниатюре */
.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 118, 0, 0.9);
  border-radius: 50%;
  color: var(--color-white);
  font-size: 1rem;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 118, 0, 0.4);
}

.video-card:hover .video-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Длительность */
.video-card__duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-white);
}

/* Контент карточки */
.video-card__content {
  padding: var(--space-lg);
}

.video-card__content .video-card__tag {
  margin-bottom: var(--space-sm);
}

.video-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card__meta {
  display: flex;
  gap: var(--space-md);
}

.video-card__meta span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

.video-card__meta i {
  color: var(--color-primary);
}

/* ==========================================================================
   MORE BUTTON
   ========================================================================== */

.videos__more {
  text-align: center;
  margin-top: var(--space-3xl);
}

/* Тёмная outline кнопка (для секции с серым фоном) */
.btn--outline-dark {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn--outline-dark::before {
  display: none;
}

.btn--outline-dark:hover {
  background: var(--color-secondary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .videos__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .videos__play {
    width: 65px;
    height: 65px;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .videos__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .videos__title {
    font-size: var(--text-lg);
  }

  .videos__meta {
    gap: var(--space-md);
  }

  .videos__play {
    width: 55px;
    height: 55px;
    font-size: 1rem;
  }

  .video-card__play {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .videos__info {
    padding: var(--space-lg);
  }

  .videos__title {
    font-size: var(--text-base);
  }

  .videos__meta span {
    font-size: var(--text-xs);
  }

  .video-card__content {
    padding: var(--space-md);
  }

  .video-card__title {
    font-size: var(--text-sm);
  }
}

/* ==========================================================================
   VIDEO PLAYER (NATIVE <video>)
   ========================================================================== */

.videos__embed {
  aspect-ratio: 16 / 9;
  background: #000;
}

.videos__embed video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Кастомизация контролов видео (опционально) */
.videos__embed video::-webkit-media-controls-panel {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

/* Активная карточка */
.video-card--active {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.video-card--active .video-card__play {
  opacity: 1;
  background: var(--color-primary);
}

/* Главный плеер - контейнер */
.videos__player {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

/* Превью */
.videos__thumbnail {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.videos__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Встраиваемое видео */
.videos__embed {
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.videos__embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.video-card__tag--quarter {
  background: rgba(156, 39, 176, 0.1);
  color: #9c27b0;
}

.videos__tag--quarter {
  background: rgba(156, 39, 176, 0.15);
  color: #9c27b0;
}