html, body, nav, div, figure, figcaption {
    margin: 0;
    padding: 0;
}

figcaption {
    font-size: 100%;
}

html {
    box-sizing: border-box;
    --vh: 1vh;
}

*, *::before, *::after {
    box-sizing: inherit;
}

html, body {
    overflow: hidden;
}

body {
  color: black;
  font-family: "Pretendard Variable", Pretendard, "Pretendard JP", BlinkMacSystemFont, -apple-system, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", Helvetica, Arial, sans-serif;
  background-color: #fafafa;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.nav {
  position: fixed;
  top: 0;
  padding-top: 17px;
  z-index: 1000;
}

.nav img {
  width: 20px;
  height: 20px;
}

#left {
  left: 0;
  padding-left: 20px;
}

#right {
  right: 0;
  padding-right: 20px;
}

#left img {
  transform: rotate(180deg);
}

.nav a img {
  filter: invert(0);
}

.nav a:hover img {
  filter: invert(1);
  cursor: default;
}

.slideshow-container {
  position: relative;
  max-width: 95%;
  margin: 5vh auto;
  height: calc(var(--vh, 1vh) * 90);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  display: none;
  width: 100%;
  height: calc(var(--vh, 1vh) * 85);
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.slide.active {
  display: flex;
}

.slide figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: auto;
}

.slide figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.slide figcaption {
  font-weight:400;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  line-height:1.3;
  margin-top: 1.2rem;
  width: 100%;
  min-height: 1.2em;
}

.slide figcaption:empty {
  visibility: hidden;
}

.slide.no-captions figcaption {
  min-height: 0;
  margin-top: 0;
  visibility: visible;
}

.slide.no-captions figcaption:empty {
  display: none;
}

.slide.s4 .top-row figure figcaption:empty,
.slide.s5 .top-row figure figcaption:empty,
.slide.s6 .top-row figure figcaption:empty {
  display: none;
}

figcaption span {
  font-weight: 500;
}

.slide-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 100;
}

.slide-nav.prev {
  left: 0;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26' fill='none' stroke='black' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='15,17 7,12 15,7'%3E%3C/polyline%3E%3C/svg%3E"), auto;
}

.slide-nav.next {
  right: 0;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26' fill='none' stroke='black' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='9,17 17,12 9,7'%3E%3C/polyline%3E%3C/svg%3E"), auto;
}

/*--------------- Media Queries ---------------*/

@media screen and (max-width: 780px) {
  .nav {
    display: none;
  }
  
  .slideshow-container {
    margin: 0 auto;
    height: calc(100dvh - 30px);
    overflow: hidden; 
  }
  
  .slide {
    flex-direction: column;
    justify-content: center;
  }

  .slide figure {
    padding-bottom:1.5em;
  }
  
  .slide figure img {
    max-height: 85dvh; 
    max-width: 90vw;
  }
  
  .slide figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    margin-top: 0;
    margin-bottom: 3vh;
  }

  .slide figcaption:empty {
    display: none;
  }
}

@media screen and (min-width: 781px) {
  .slideshow-container {
    max-width: 90%;
    height: calc(var(--vh, 1vh) * 85);
  }

  .slide figure img {
    max-height: calc(var(--vh, 1vh) * 85);
  }

  .slide.s1 figure {
    max-width: 80%;
  }

  .slide.s2h figure {
    max-width: 45%;
    min-width: 200px;
  }

  .slide.s2v {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
  }

  .slide.s2v figure {
    max-width: 35%;
    min-width: 200px;
  }

  .slide.s2v figure figcaption:empty {
    display: none;
  }

  .slide.s3 figure {
    max-width: 30%;
    min-width: 150px;
  }

  .slide.s4,
  .slide.s5,
  .slide.s6 {
    gap: 30px;
    height: 100%;
    justify-content: center;
  }

  .slide.s4 { 
    flex-direction: row; 
  }

  .slide.s4 figure {
    max-width: 23%; 
  }

  .slide.s4 figure img {
    max-height: calc(var(--vh, 1vh) * 80);
    object-fit: contain;
  }
  
  .slide.s5,
  .slide.s6 {
    flex-direction: column;
  }

  .slide.s5 .top-row,
  .slide.s5 .bottom-row {
    display: flex;
    justify-content: center;
    gap: 30px;
  }

  .slide.s5 .top-row figure {
    max-width: 88%;
  }

  .slide.s5 .bottom-row figure {
    max-width: 85%;
  }

  .slide.s5 figure img,
  .slide.s6 figure img {
    max-height: calc(var(--vh, 1vh) * 40);
    object-fit: contain;
  }

  .slide.s6 .top-row,
  .slide.s6 .bottom-row {
    display: flex;
    justify-content: center;
    gap: 30px;
  }

  .slide.s6 figure {
    max-width: 88%;
  }
}

@media screen and (min-width: 781px) and (max-width: 1366px) {
  .nav img {
    width: 18px;
    height: 18px;
  }
  
  .slideshow-container {
    margin: 5.3vh auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .slide figure {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    height: auto;
  }

  .slide figcaption {
    font-size: 0.8rem;
  }
}

@media screen and (min-width: 1367px) and (max-width: 2999px) {
  .nav img {
    width: 20px;
    height: 20px;
  }

  .slideshow-container {
    margin: 7vh auto;
  }

  .slide figure img {
    max-height: calc(var(--vh, 1vh) * 85);
  }
}

@media screen and (min-width: 3000px) {
  .nav {
    padding-top: 50px;
  }

  #left {
    padding-left: 50px;
  }

  #right {
    padding-right: 50px;
  }

  .nav img {
    width: 40px;
    height: 40px;
  }

  .slideshow-container {
    margin: 8vh auto;
  }

  .slide,
  .slide.s4,
  .slide.s5 .top-row,
  .slide.s5 .bottom-row,
  .slide.s6 .top-row,
  .slide.s6 .bottom-row {
    gap: 70px;
  }

  .slide.s5,
  .slide.s6 {
    gap: 60px;
  }

  .slide figcaption {
    font-size: 1rem;
    margin-top: 3rem;
  }
}