html,
body,
main {
  margin: 0;
  padding: 0;
}

body {
  background-color: #111;
  background-size: cover;
  
  padding: 10px;
  position: relative;
  color: white;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

h1 {
  font-size: 2em;
  text-transform: uppercase;
  text-align: center;
}

a {
  color: white;
}

a:hover,
a:focus {
  color: var(--primary-color);
}

main > section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main .slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}

main .slider .minia {
  height: 180px;
  width: 320px;
  background-size: cover;
  background-position: center;
  background-size: 100%;
  background-repeat: no-repeat;
  backdrop-filter: brightness(100%);
  transition: transform 0.2s ease;
  cursor: pointer;
  border: 10px solid transparent;
  box-sizing: border-box;
}

main .slider .minia:hover,
main .slider .minia:focus {
  transform: scale(105%);
  border: 10px solid var(--primary-color);
}

/*play button*/
main .slider .minia:hover::after,
main .slider .minia:focus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  transform: translate(-50%, -50%);
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 30px solid white;
}

main .slider .minia video {
  width: 100%;
  height: 100%;
}

.cache {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
}

.cache #video {
  position: absolute;
  width: 70vw;
  height: calc(9 / 16 * 70vw);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
}

footer {
  margin-top: 20px;
}

@media only screen and (min-width: 1500px) {
  main .slider {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media only screen and (max-width: 1150px) {
  main .slider {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 710px) {
  main .slider {
    grid-template-columns: 1fr;
  }

  main .slider .minia {
    width: 94vw;
    height: calc(9 / 16 * 94vw);
  }

  .cache #video {
    width: 100vw;
    height: calc(9 / 16 * 100vw);
  }
}
