/* Videos gallery — grid tiles, posters only until lightbox */

.videos-page {
  width: 100%;
  margin: 0;
  padding: 0;
}

.videos-empty {
  margin: 1rem 0 0;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.45rem, 1.2vw, 0.7rem);
}

@media (max-width: 720px) {
  .videos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.videos-grid__button {
  position: relative;
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.videos-grid__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(20, 24, 28, 0.06);
}

.videos-grid__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(20, 24, 28, 0.05) 8%,
    rgba(20, 24, 28, 0.1) 18%,
    rgba(20, 24, 28, 0.05) 33%
  );
  background-size: 200% 100%;
  animation: videos-grid-shimmer 1.35s ease-in-out infinite;
  transition: opacity 0.35s ease;
}

.videos-grid__button.is-loaded .videos-grid__skeleton,
.videos-grid__button.is-broken .videos-grid__skeleton {
  opacity: 0;
  pointer-events: none;
}

@keyframes videos-grid-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.videos-grid__poster,
.videos-grid__poster-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.videos-grid__poster {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.videos-grid__poster.is-loaded {
  opacity: 1;
}

.videos-grid__poster-placeholder {
  background: linear-gradient(145deg, rgba(20, 24, 28, 0.08), rgba(20, 24, 28, 0.14));
}

.videos-grid__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.videos-grid__play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  padding-left: 0.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.videos-grid__button:hover .videos-grid__play-icon,
.videos-grid__button:focus-visible .videos-grid__play-icon {
  background: rgba(0, 0, 0, 0.72);
}

.videos-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.videos-load-more[hidden] {
  display: none !important;
}

.video-lightbox-error {
  margin: 0;
  padding: 1.25rem 1.5rem;
  color: #f5f5f5;
  font-size: 0.95rem;
  text-align: center;
}

.blog-video-card__error {
  margin: 0.5rem 0 0;
  color: var(--color-text-muted, #5c6670);
  font-size: 0.88rem;
  line-height: 1.4;
}

.video-lightbox-player video {
  object-fit: contain;
  background: #000;
}
