.home-page {
  background: #0f0f0f;
}

.hero {
  position: relative;
}

.carousel {
  height: 100vh;
  min-height: 42rem;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #0f0f0f;
}

.carousel .list .item {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.carousel .list .item:nth-child(1) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.carousel .list .item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel .list .item .overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.56) 24%,
      rgba(0, 0, 0, 0.28) 46%,
      rgba(0, 0, 0, 0.10) 68%,
      rgba(0, 0, 0, 0.04) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0.05) 38%,
      rgba(0, 0, 0, 0.48) 100%
    );
}

.carousel .list .item .content {
  position: absolute;
  top: 42%;
  left: 8%;
  width: 34rem;
  max-width: calc(100% - 16%);
  transform: translateY(-50%);
  color: var(--color-white);
  z-index: 2;
  padding-right: 1rem;
}

.carousel .list .item .content::before {
  content: "";
  position: absolute;
  inset: -1.6rem 2rem -1.6rem -2rem;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.32) 0%,
    rgba(0, 0, 0, 0.18) 45%,
    rgba(0, 0, 0, 0.07) 72%,
    rgba(0, 0, 0, 0) 100%
  );
  filter: blur(16px);
  border-radius: 1.75rem;
  pointer-events: none;
}

.carousel .list .item .eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #ead0ad;
  margin-bottom: 0.95rem;
  font-weight: 600;
  text-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.45);
}

.carousel .list .item .title {
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  color: var(--color-white);
  margin-bottom: 0.45rem;
  text-shadow: 0 0.45rem 1.3rem rgba(0, 0, 0, 0.42);
}

.carousel .list .item .topic {
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: #f0d0ab;
  margin-bottom: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
  text-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.4);
}

.carousel .list .item .des {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  max-width: 31rem;
  margin-bottom: 1.45rem;
  text-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.45);
}

.carousel .list .item .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.carousel .list .item .buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.3rem;
  padding: 0.82rem 1.25rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.16);
}

.carousel .list .item .buttons a:nth-child(1) {
  background: rgba(255, 248, 240, 0.96);
  color: #161616;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.carousel .list .item .buttons a:nth-child(1):hover {
  transform: translateY(-3px);
  background: #ffffff;
  box-shadow: 0 0.95rem 1.9rem rgba(0, 0, 0, 0.2);
}

.carousel .list .item .buttons a:nth-child(2) {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.carousel .list .item .buttons a:nth-child(2):hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0.95rem 1.9rem rgba(0, 0, 0, 0.2);
}

.thumbnail {
  position: absolute;
  right: 5%;
  bottom: 2.6rem;
  display: flex;
  gap: 0.8rem;
  z-index: 3;
  overflow: hidden;
}

.thumbnail .item {
  width: 8.2rem;
  min-width: 8.2rem;
  height: 11rem;
  border-radius: 1.1rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0.9rem 1.8rem rgba(0, 0, 0, 0.22);
}

.thumbnail .item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.18) 50%,
    rgba(0, 0, 0, 0.68) 100%
  );
}

.thumbnail .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail .item .content {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
}

.thumbnail .item .title {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.thumbnail .item .description {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
}

.arrows {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.arrows button {
  width: 3.45rem;
  height: 3.45rem;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.18);
  color: var(--color-white);
  font-size: 1.55rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.18);
  transition: var(--transition);
}

.arrows button:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  transform: scale(1.04);
}

.carousel .time {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #f1cfaa, #a67c52);
  z-index: 5;
}

/* active slide animation */

.carousel .list .item:nth-child(1) .eyebrow,
.carousel .list .item:nth-child(1) .title,
.carousel .list .item:nth-child(1) .topic,
.carousel .list .item:nth-child(1) .des,
.carousel .list .item:nth-child(1) .buttons {
  transform: translateY(2rem);
  filter: blur(12px);
  opacity: 0;
  animation: showContent 0.55s 1 forwards;
}

.carousel .list .item:nth-child(1) .eyebrow {
  animation-delay: 0.4s;
}

.carousel .list .item:nth-child(1) .title {
  animation-delay: 0.6s;
}

.carousel .list .item:nth-child(1) .topic {
  animation-delay: 0.8s;
}

.carousel .list .item:nth-child(1) .des {
  animation-delay: 1s;
}

.carousel .list .item:nth-child(1) .buttons {
  animation-delay: 1.2s;
}

@keyframes showContent {
  to {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

/* next */
/* keep outgoing slide visible behind incoming expanding slide */

.carousel.next .list .item:last-child {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.carousel.next .list .item:last-child .content {
  animation: contentOut 0.5s linear 1 forwards !important;
}

.carousel.next .list .item:nth-child(1) {
  z-index: 2;
}

.carousel.next .list .item:nth-child(1) img {
  width: 10rem;
  height: 13rem;
  position: absolute;
  bottom: 2.3rem;
  left: 50%;
  border-radius: 1.2rem;
  animation: showImage 0.5s linear 1 forwards;
}

@keyframes showImage {
  to {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

.carousel.next .thumbnail .item:nth-last-child(1) {
  overflow: hidden;
  animation: showThumbnail 0.5s linear 1 forwards;
}

.carousel.next .thumbnail {
  animation: effectNext 0.5s linear 1 forwards;
}

@keyframes effectNext {
  from {
    transform: translateX(calc(-50% + 8rem));
  }
}

@keyframes showThumbnail {
  from {
    width: 0;
    opacity: 0;
  }
}

/* prev */

.carousel.prev .list .item:nth-child(2) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 3;
}

.carousel.prev .list .item:nth-child(2) img {
  animation: outFrame 0.5s linear 1 forwards;
  position: absolute;
  bottom: 0;
  left: 0;
}

@keyframes outFrame {
  to {
    width: 10rem;
    height: 13rem;
    bottom: 2.3rem;
    left: 50%;
    border-radius: 1.2rem;
  }
}

.carousel.prev .thumbnail .item:nth-child(1) {
  overflow: hidden;
  opacity: 0;
  animation: showThumbnail 0.5s linear 1 forwards;
}

.carousel.next .arrows button,
.carousel.prev .arrows button {
  pointer-events: none;
}

.carousel.prev .list .item:nth-child(2) .eyebrow,
.carousel.prev .list .item:nth-child(2) .title,
.carousel.prev .list .item:nth-child(2) .topic,
.carousel.prev .list .item:nth-child(2) .des,
.carousel.prev .list .item:nth-child(2) .buttons,
.carousel.next .list .item:last-child .eyebrow,
.carousel.next .list .item:last-child .title,
.carousel.next .list .item:last-child .topic,
.carousel.next .list .item:last-child .des,
.carousel.next .list .item:last-child .buttons {
  animation: contentOut 0.9s linear 1 forwards !important;
}

@keyframes contentOut {
  to {
    transform: translateY(-5rem);
    filter: blur(14px);
    opacity: 0;
  }
}

.carousel.next .time,
.carousel.prev .time {
  animation: runningTime 5s linear 1 forwards;
}

@keyframes runningTime {
  from {
    width: 100%;
  }
  to {
    width: 0;
  }
}

/* responsive */

@media screen and (max-width: 1100px) {
  .carousel {
    min-height: 40rem;
  }

  .carousel .list .item .content {
    top: 43%;
    left: 7%;
    width: 32rem;
    max-width: calc(100% - 14%);
  }

  .carousel .list .item .content::before {
    inset: -1.4rem 1.5rem -1.4rem -1.5rem;
  }

  .thumbnail {
    width: 88%;
  }

  .thumbnail .item {
    width: 8.5rem;
    min-width: 8.5rem;
    height: 11rem;
  }

  .arrows {
    right: 4%;
  }
}

@media screen and (max-width: 768px) {
  .carousel {
    min-height: 38rem;
    height: 100svh;
  }

  .carousel .list .item .overlay {
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.44) 0%,
        rgba(0, 0, 0, 0.28) 38%,
        rgba(0, 0, 0, 0.62) 100%
      );
  }

  .carousel .list .item .content {
    top: 43%;
    left: 5%;
    width: 92%;
    max-width: none;
    padding-right: 0;
  }

  .carousel .list .item .content::before {
    inset: -1.2rem 0.8rem -1.2rem -0.8rem;
    filter: blur(14px);
  }

  .carousel .list .item .eyebrow {
    font-size: 0.76rem;
    letter-spacing: 0.22em;
  }

  .carousel .list .item .des {
    font-size: 0.95rem;
    max-width: 100%;
    margin-bottom: 1.2rem;
  }

  .carousel .list .item .buttons {
    gap: 0.65rem;
  }

  .carousel .list .item .buttons a {
    min-width: 8.5rem;
    padding: 0.78rem 1.05rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .thumbnail {
    width: 92%;
    bottom: 1.2rem;
    gap: 0.7rem;
  }

  .thumbnail .item {
    width: 6.2rem;
    min-width: 6.2rem;
    height: 8rem;
    border-radius: 0.9rem;
  }

  .thumbnail .item .content {
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.55rem;
  }

  .thumbnail .item .title {
    font-size: 0.72rem;
  }

  .thumbnail .item .description {
    display: none;
  }

  .arrows {
    top: auto;
    right: 50%;
    bottom: 10.8rem;
    transform: translateX(50%);
    flex-direction: row;
  }

  .arrows button {
    width: 3rem;
    height: 3rem;
    font-size: 1.45rem;
  }
}

@media screen and (max-width: 520px) {
  .carousel {
    min-height: 36rem;
  }

  .carousel .list .item .content {
    top: 41%;
  }

  .carousel .list .item .title {
    font-size: 2rem;
  }

  .carousel .list .item .topic {
    font-size: 1.15rem;
  }

  .carousel .list .item .des {
    font-size: 0.9rem;
  }

  .thumbnail {
    display: none;
  }

  .arrows {
    bottom: 2rem;
  }
}
