@import url('https://fonts.googleapis.com/css2?family=Advent+Pro&family=Dancing+Script&display=swap');
:root{
  --font-size:1.3rem;
  --color-text: #fffae1;
  --bg-color: #221c17;
}
* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  color: var(--color-text);
  background: var(--bg-color);
  font-family: 'Advent Pro',sans-serif;
  font-size: var(--font-size);
  height: auto;
  line-height: 1;
  padding: 2rem;
  width: 100%;
  font-weight: bold;
}
h1{
  position: relative;
  margin-left: 25%;
  margin-right: 25%;
  border-bottom: 1px solid var(--color-text);
  text-align: center;
}
.video {
  position: relative;
  padding-top: 4.1%;
  padding-bottom: 51.95%;
  height: 0;
}
.video iframe {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  min-height: 0;
}

.video-gallery {
  margin-top: 10%;
  position: relative;
  width: 100%;
}
.video-gallery .video {
  animation: 1200ms fadeOut ease;
  animation-fill-mode: both;
  grid-column-start: 1;
  grid-row-start: 1;
  grid-row-end: 6;
  max-height: 19.5em;
  opacity: 0;
  transition: all 300ms ease;
}
.video-gallery input[type=radio] {
  font-size: 0;
  height: 0;
  opacity: 0;
  padding: 0;
  position: fixed;
  width: 0;
}
.video-gallery input {
  grid-column-start: 1;
  grid-row-start: 1;
}
.video-gallery label {
  border-radius: 50px;
  cursor: pointer;
  color: var(--color-text);
  font-size: var(--font-size);
  font-weight: 400;
  grid-column-start: 2;
  margin: 0 !important;
  padding: 1rem 0 1rem 3rem;
  position: relative;
  /* border-bottom: 1px solid var(--color-text); */
  background: linear-gradient(to top, #fffae12c, transparent);
}
.video-gallery label:last-of-type {
  border: 0 none;
}
.video-gallery input[type=radio]:checked + label {
  color: #E41F35 !important;
}
.video-gallery input[type=radio]:checked + label:before {
  content: "▶";
  
  padding: 0 5px 0 0px;
  position: relative;
}

.grid-row {
  display: block;
  height: 56vw;
  max-height: 19.5em;
  position: relative;
}
.grid-row label {
  left: calc(50% + 16px);
  position: relative;
  width: calc(50% - 16px);
}
.grid-row .video {
  padding: 0;
  position: absolute;
  top: 0;
  width: 0;
}
.grid-row:after {
  content: "";
  clear: both;
  display: table;
}

#video-1:checked ~ .video-1, #video-2:checked ~ .video-2, #video-3:checked ~ .video-3, #video-4:checked ~ .video-4, #video-5:checked ~ .video-5 {
  animation: 1200ms fadeIn ease;
  animation-fill-mode: both;
  opacity: 1;
  width: 50%;
}

@keyframes fadeOut {
  0% {
    display: block;
    height: 56vw;
    opacity: 1;
    width: 50%;
  }
  25% {
    display: block;
    height: 56vw;
    opacity: 1;
    width: 50%;
  }
  49% {
    display: block;
    height: 56vw;
    opacity: 0;
    width: 50%;
  }
  50% {
    display: none;
    height: 0;
    opacity: 0;
    width: 0;
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0;
    width: 0;
  }
  49% {
    display: none;
    height: 0;
    opacity: 0;
    width: 0;
  }
  50% {
    display: block;
    height: 56vw;
    opacity: 0;
    width: 50%;
  }
  100% {
    display: block;
    height: 56vw;
    opacity: 1;
    width: 50%;
  }
}
@supports (display: grid) {
  .grid-row {
    align-items: start;
    display: grid;
    grid-column-gap: 16px;
    grid-row-gap: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
    width: 100%;
  }
  .grid-row label {
    left: auto;
    width: 100%;
  }
  .grid-row .video {
    position: relative;
    width: 100%;
  }
  @keyframes fadeOut {
    0% {
      display: block;
      height: 56vw;
      opacity: 1;
      width: 100%;
    }
    25% {
      display: block;
      height: 56vw;
      opacity: 1;
      width: 100%;
    }
    49% {
      display: block;
      height: 56vw;
      opacity: 0;
      width: 100%;
    }
    50% {
      display: none;
      height: 0;
      opacity: 0;
      width: 0;
    }
  }
  @keyframes fadeIn {
    0% {
      opacity: 0;
      width: 0;
    }
    49% {
      display: none;
      height: 0;
      opacity: 0;
      width: 0;
    }
    50% {
      display: block;
      height: 56vw;
      opacity: 0;
      width: 100%;
    }
    100% {
      display: block;
      height: 56vw;
      opacity: 1;
      width: 100%;
    }
  }
}

@media (max-width: 767px) {
  .video-gallery {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  
  .video-gallery label {
    left: auto;
    order: 2;
    width: 60%;
    font-size: 20px;
    text-align: center;
    padding: 1rem 0px 1rem 0rem;
  }
  .video-gallery .video {
    
    order: 1;
    padding-top: 1%;
    position: relative;
    top: auto;
    width: 100%;
  }

  @media (max-width: 400px) {
    h1{
      font-size: 20px;
    }
    .video-gallery label {
      width: 80%;
      font-size: 13px;
    }
  }

  #video-1:checked ~ .video-1, #video-2:checked ~ .video-2, #video-3:checked ~ .video-3, #video-4:checked ~ .video-4, #video-5:checked ~ .video-5, #video-6:checked ~ .video-6 {
    width: 100%;
  }

  @keyframes fadeOut {
    0% {
      display: block;
      height: 56vw;
      opacity: 1;
    }
    25% {
      display: block;
      height: 56vw;
      opacity: 1;
    }
    49% {
      display: block;
      height: 56vw;
      opacity: 0;
    }
    50% {
      display: none;
      height: 0;
      opacity: 0;
    }
  }
  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    49% {
      display: none;
      height: 0;
      opacity: 0;
    }
    50% {
      display: block;
      height: 56vw;
      opacity: 0;
    }
    100% {
      display: block;
      height: 56vw;
      opacity: 1;
    }
  }
}