/* carousel */
.carousel-hero-section {
  height: 650px;
  overflow: hidden;
  position: relative;
}

.carousel-hero-section .list .item {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0 0 0 0;
}

.carousel-hero-section .list .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

.carousel-hero-section .list .item .content {
  position: absolute;
  top: 20%;
  width: 1140px;
  max-width: 80%;
  left: 50%;
  transform: translateX(-50%);
  padding-right: 30%;
  box-sizing: border-box;
  color: #fff;
  text-shadow: 0 5px 10px #0004;
}

.carousel-hero-section .list .item .author {
  font-weight: bold;
}

.carousel-hero-section .list .item .author a {
  color: #fff;
}

.carousel-hero-section .list .item .title,
.carousel-hero-section .list .item .topic {
  font-size: 2em;
  font-weight: bold;
  line-height: 1.3em;
}

.carousel-hero-section .list .item .topic {
  color: #f1683a;
}

.carousel-hero-section .list .item .buttons {
  display: grid;
  grid-template-columns: repeat(2, 130px);
  grid-template-rows: 40px;
  gap: 5px;
  margin-top: 20px;
}

.carousel-hero-section .list .item .buttons button {
  border: none;
  background-color: #eee;
  letter-spacing: 3px;

  font-weight: 500;
}

.carousel-hero-section .list .item .buttons button:nth-child(2) {
  background-color: transparent;
  border: 1px solid #fff;
  color: #eee;
}

/* thumbail */
.thumbnail-hero-section {
  position: absolute;
  bottom: 120px;
  left: 50%;
  width: max-content;
  z-index: 100;
  display: flex;
  gap: 25px;
}

.thumbnail-hero-section .item {
  width: 170px;
  height: 230px;
  flex-shrink: 0;
  position: relative;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset;
  border: 3px solid #fff;
}

.thumbnail-hero-section .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  filter: brightness(0.9);

}

.thumbnail-hero-section .item .content {
  color: #fff;
  position: absolute;
  bottom: 10px;
  padding: 0 10px;
  font-size: 14px !important;
}

.thumbnail-hero-section .item .content-dark {
  position: absolute;
  height: 80px;
  width: 100%;
  bottom: 0px;
  padding: 0 10px;
  background-color: #000;
  filter: blur(3px);
  opacity: 0.3;
}

.thumbnail-hero-section .item .content .title {
  font-weight: 500;
}

.thumbnail-hero-section .item .content .title a {
  color: #fff;
}

.thumbnail-hero-section .item .content .description {
  font-weight: 300;
}

/* arrows */
.arrows {
  position: absolute;
  top: 87%;
  left: 50%;
  z-index: 100;
  width: 300px;
  max-width: 30%;
  display: flex;
  gap: 10px;
  align-items: center;
}

.arrows button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #eee4;
  border: none;
  color: #fff;
  font-family: monospace;
  font-weight: bold;
  transition: .5s;
}

.arrows button:hover {
  background-color: #fff;
  color: #000;
}

/* animation */
.carousel-hero-section .list .item:nth-child(1) {
  z-index: 1;
}

/* animation text in first item */

.carousel-hero-section .list .item:nth-child(1) .content .author,
.carousel-hero-section .list .item:nth-child(1) .content .title,
.carousel-hero-section .list .item:nth-child(1) .content .topic,
.carousel-hero-section .list .item:nth-child(1) .content .des,
.carousel-hero-section .list .item:nth-child(1) .content .buttons {
  transform: translateY(50px);
  filter: blur(20px);
  opacity: 0;
  animation: showContent .5s 1s linear 1 forwards;
}

@keyframes showContent {
  to {
      transform: translateY(0px);
      filter: blur(0px);
      opacity: 1;
  }
}

.carousel-hero-section .list .item:nth-child(1) .content .title {
  animation-delay: .9s !important;
}

.carousel-hero-section .list .item:nth-child(1) .content .topic {
  animation-delay: 1.1s !important;
}

.carousel-hero-section .list .item:nth-child(1) .content .des {
  animation-delay: 1s !important;
}

.carousel-hero-section .list .item:nth-child(1) .content .buttons {
  animation-delay: 1.8s !important;
}

/* create animation when next click */
.carousel-hero-section.next .list .item:nth-child(1) img {
  width: 170px;
  height: 230px;
  position: absolute;
  bottom: 120px;
  left: 50%;
  border-radius: 30px;
  animation: showImage .3s linear 1 forwards;
}

@keyframes showImage {
  to {
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 0;
  }
}

.carousel-hero-section.next .thumbnail-hero-section .item:nth-last-child(1) {
  overflow: hidden;
  animation: showThumbnail .5s linear 1 forwards;
}

.carousel-hero-section.prev .list .item img {
  z-index: 100;
}

@keyframes showThumbnail {
  from {
      width: 0;
      opacity: 0;
  }
}

.carousel-hero-section.next .thumbnail-hero-section {
  animation: effectNext .5s linear 1 forwards;
}

@keyframes effectNext {
  from {
      transform: translateX(150px);
  }
}

/* running time */

.carousel-hero-section .time {
  position: absolute;
  z-index: 1000;
  width: 0%;
  height: 3px;
  background-color: #f1683a;
  left: 0;
  top: 0;
}

.carousel-hero-section.next .time,
.carousel-hero-section.prev .time {
  animation: runningTime 2s linear 1 forwards;
}

@keyframes runningTime {
  from {
      width: 100%
  }

  to {
      width: 0
  }
}


/* prev click */

.carousel-hero-section.prev .list .item:nth-child(2) {
  z-index: 2;
}

.carousel-hero-section.prev .list .item:nth-child(2) img {
  animation: outFrame 0.5s linear 1 forwards;
  position: absolute;
  bottom: 0;
  left: 0;
}

@keyframes outFrame {
  to {
      width: 170px;
      height: 230px;
      bottom: 120px;
      left: 50%;
      border-radius: 8px;
  }
}

.carousel-hero-section.prev .thumbnail-hero-section .item:nth-child(1) {
  overflow: hidden;
  opacity: 0;
  animation: showThumbnail .5s linear 1 forwards;
}

.carousel-hero-section.next .arrows button,
.carousel-hero-section.prev .arrows button {
  pointer-events: none;
}

.carousel-hero-section.prev .list .item:nth-child(2) .content .author,
.carousel-hero-section.prev .list .item:nth-child(2) .content .title,
.carousel-hero-section.prev .list .item:nth-child(2) .content .topic,
.carousel-hero-section.prev .list .item:nth-child(2) .content .des,
.carousel-hero-section.prev .list .item:nth-child(2) .content .buttons {
  animation: contentOut 1.5s linear 1 forwards !important;
}

@keyframes contentOut {
  to {
      transform: translateY(-150px);
      filter: blur(20px);
      opacity: 0;
  }
}

@media screen and (max-width: 678px) {
  .carousel-hero-section .list .item .content {
      padding-right: 0;
  }

  .carousel-hero-section .list .item .content .title {
      font-size: 30px;
  }
}

@media only screen and (max-width: 770px) {

  .carousel-hero-section .list .item .content {
      left: 43%;
      top: 32%;
  }

  .carousel-hero-section .list .item .title,
  .carousel-hero-section .list .item .topic {
      font-size: 1.5em !important;
      font-weight: bold;
      line-height: 1.3em;
      width: 54% !important;
  }
}