html,
body {
  width: 100%;
  height: 100%;
  margin: 0px;
  padding: 0px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
* {
  margin: 0px;
  padding: 0px;
  font-family: "Inter", sans-serif;
}

body {
  box-sizing: border-box;
}

nav {
  width: 100%;
  background-color: rgb(46 65 130);
  display: flex;
  padding: 1em;
  justify-content: center;
  text-align: center;
}

nav * {
  color: white;
}

ul {
  display: flex;
  gap: 5em;
}

nav h1 {
  padding: 0.5em;
  border-radius: 0.2em;
}

.container {
  padding: 2em;
}

#show-case {
  width: 100%;
  height: 100dvh;
}

.title > h1 {
  margin-bottom: 0.5em;
}

.carousel-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  border: 1px solid #ddd;
  background-color: #fff;
  padding: 1em;
}

.main-image {
  position: relative;
}

.main-image img {
  width: 50em;
  height: 40em;
  object-fit: fill;
  transition: opacity 0.7s ease-in-out;
}

.main-image img.fade-out {
  opacity: 0;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 18px;
  padding: 10px;
  cursor: pointer;
  z-index: 1;
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

.thumbnails {
  display: flex;
  flex-direction: column;
  margin-left: 20px;
  overflow-y: auto;
  height: 40em;
  width: 100%;
}

.thumbnail {
  height: 20em;
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s;
  width: 100%;
}

.carousel-container .thumbnail.selected {
  border-color: rgb(165 81 152);
  box-shadow: 0 0 5px rgb(165 81 152);
}

.thumbnail:hover {
  border-color: rgb(165 81 152);
}

#gallery-container {
  width: 100%;
  height: 100dvh;
  margin-top: 100px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1em;
  padding: 1em 0 2em 0;
}

.gallery a {
  width: 100%;
}

.gallery .thumbnail {
  border: 2px solid gray;
  cursor: pointer;
  object-fit: fill;
  object-position: center;
}

.gallery .thumbnail:hover {
  border-color: rgb(165 81 152);
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media screen and (max-width: 1300px) {
  #show-case {
    height: 100dvh;
  }

  .thumbnails {
    display: none;
  }
  .main-image {
    width: 100%;
    height: 45em;
  }

  .main-image img {
    width: 100%;
    height: 45em;
  }
}

@media screen and (width: 1024px) and (height: 1366px) {
  #show-case {
    height: 40dvh;
  }

  .main-image {
    width: 100%;
  }

  .main-image img {
    width: 100%;
  }

  .thumbnails {
    display: none;
  }

  #gallery-container {
    width: 100%;
    height: 100dvh;
    margin-top: 200px;
  }
}

@media screen and (max-width: 1024px) and (min-height: 600px) {
  #show-case {
    height: 90dvh;
  }

  .main-image {
    width: 100%;
  }

  .main-image img {
    width: 100%;
  }

  .thumbnails {
    display: none;
  }

  #gallery-container {
    width: 100%;
    height: 100dvh;
    margin-top: 200px;
  }
}

@media screen and (max-width: 1000px) {
  #show-case {
    height: 55dvh;
  }

  .main-image {
    width: 100%;
  }

  .main-image img {
    width: 100%;
  }

  .thumbnails {
    display: none;
  }

  #gallery-container {
    width: 100%;
    height: 100dvh;
    margin-top: 200px;
  }
}

@media screen and (max-width: 800px) {
  #show-case {
    height: 60dvh;
  }

  .main-image {
    width: 100%;
  }

  .main-image img {
    width: 100%;
  }

  .thumbnails {
    display: none;
  }

  #gallery-container {
    width: 100%;
    height: 100dvh;
    margin-top: 200px;
  }
}

@media screen and (max-width: 600px) {
  #show-case {
    height: 30dvh;
  }

  .main-image {
    width: 100%;
    height: 20em;
  }

  .main-image img {
    width: 100%;
    height: 20em;
  }

  .thumbnails {
    display: none;
  }

  #gallery-container {
    width: 100%;
    height: 100dvh;
    margin-top: 200px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery .thumbnail {
    width: 10em;
    height: 10em;
  }
}
