body{
    background-color: #000;
    color: #fff;
}

/* ----------------------------------- */
/*            Hero section             */
/* ----------------------------------- */
.video-gallery_hero {
    height: var(--viewport-section-height);
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    position: relative;
    top: 0;
    transition: opacity 0.4s ease-out;
}

.video-gallery_hero > picture {
  position: absolute;
  inset: 0; /* top 0 right 0 bottom 0 left 0*/
  width: 100%;
  height: 100%;
  z-index: -1;
}

.video-gallery_hero_bg {
  width: 100%;
  height: 100%;
  object-fit: cover; /* similar to background-size: cover */
  z-index: -1; /* if set to 0 the border of the hero-content is not seen anymore as by default has 0 z-index */
}

.video-gallery_hero_bg_overlay {
    background: rgba(0, 0, 0, 0.3); /* dark overlay */
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-gallery_hero h1 {
  position: relative;
  z-index: 2; /* text will be above the dark overlay */
  color: #fff;
  text-transform: uppercase;
  font-size: clamp(2rem, 2vw, 4rem);
  letter-spacing: 1.5px;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
}

/* alignment of h1, paragraph + line border */
.video-gallery_hero_content {
  margin-top: calc(var(--viewport-section-height) * 0.17);
  margin-left: 19.5vw;
  border-left: 1px solid white;
  padding-left: 1rem;
  position: absolute;
}

/* scroll down arrow */
.scroll_arrow_container {
  position: absolute;
  bottom: 80px;

  /* center horizontally */
  left: 50%;
  transform: translateX(-50%);

  width: 32px;
  height: 32px;
  background-color: #ccc;
  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;
  transition: background-color 0.3s;
  animation: upNdown 3s infinite linear;
  z-index: 2;
}

.scroll_arrow_container:hover {
  background-color: #aaa;
}

.scroll_arrow_container img {
  width: 22px;
  height: auto;
}

@keyframes upNdown {
  0%, 100% {
    transform: translateX(-50%) translateY(0); 
  }
  50% { 
    transform: translateX(-50%) translateY(-15px); 
  }
}

/* ----------------------------------- */
/*            Showcase section         */
/* ----------------------------------- */
.video-gallery_showcase{
  width: 100%;
  max-width: 100%;
  position: relative;
  padding: 70px 40px;
}

.video-gallery_showcase_heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    font-size: clamp(1.8rem, 3vw, 3rem);
    white-space: nowrap;
}

.video-gallery_showcase_content{
  width: 100%;
  max-width: 100%;
  position: relative;
}

.video_grid {
  display: grid;
  column-gap: 5rem;
  row-gap: 2rem;
  grid-template-columns: 1fr; /* + media queries for 2/3 cols */
}

.video_item {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  /* max-width: 450px; -- in case I don't want full width of the grid cell for each video item */ 
  margin: 0 auto; /* this fills up the whole grid cell */
}

.video_title {
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 1.3vw, 1.4rem);
  font-weight: 350;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.3rem;

  height: 2.6em;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.video_frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 5px;
  background: #000;
}

.video_frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video_frame--placeholder {
  position: relative;
  cursor: pointer;
}

.video_frame--placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lazy load animation for the thumbnails */
.video_frame--placeholder img.lazy-loaded {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
  will-change: opacity, transform;
}

/* When JS adds .is-visible, they pop in */
.video_frame--placeholder img.lazy-loaded.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* play button overlay */
.video_play_btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video_play_btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ----------------------------------- */
/*            Media Queries            */
/* ----------------------------------- */
@media (min-width: 600px) {
  .video_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .video_grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .video-gallery_hero_content {
    margin-left: 16vw;
  }
}