@import url('https://use.fontawesome.com/releases/v6.4.2/css/all.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: #eaeaea;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* ----------------- CONTAINER ----------------- */
.container {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #f5f5f5;
  box-shadow: 0 30px 50px #dbdbdb;
  overflow: hidden;
  border-radius: 20px;
}

.slide .item {
  width: 180px;
  height: 250px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 20px;
  box-shadow: 0 30px 50px #505050;
  background-position: center;
  background-size: cover;
  transition: 0.5s;
}

/* ----------------- SLIDE POSITION ----------------- */
.slide .item:nth-child(1),
.slide .item:nth-child(2) {
  top: 0;
  left: 0;
  transform: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.slide .item:nth-child(3) {
  left: 55%;
}

.slide .item:nth-child(4) {
  left: calc(55% + 200px);
}

.slide .item:nth-child(5) {
  left: calc(55% + 400px);
}

.slide .item:nth-child(n + 6) {
  left: calc(55% + 600px);
  opacity: 0;
}

/* ----------------- CONTENT ----------------- */
.item .content {
  position: absolute;
  top: 50%;
  left: 10%;
  max-width: 300px;
  color: #eee;
  transform: translateY(-50%);
  font-family: system-ui;
  display: none;
}

.slide .item:nth-child(2) .content {
  display: block;
}

.content .name {
  font-size: 2rem;
  text-transform: uppercase;
  font-weight: bold;
  color: #F4EDE1;
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
  animation: animate 1s ease-in-out 1 forwards;
}

.content .des {
  margin-top: 10px;
  margin-bottom: 20px;
  color: #E8DFD3;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
  animation: animate 1s ease-in-out 0.3s 1 forwards;
}

.content button {
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-weight: 500;
  opacity: 0;
  animation: animate 1s ease-in-out 0.6s 1 forwards;
}

@keyframes animate {
  from {
    opacity: 0;
    transform: translateY(100px);
    filter: blur(33px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ----------------- BUTTON ----------------- */
.button {
  width: 100%;
  text-align: center;
  position: absolute;
  bottom: 20px;
}

.button button {
  width: 40px;
  height: 35px;
  border-radius: 8px;
  border: 1px solid #000;
  cursor: pointer;
  margin: 0 5px;
  background: #fff;
  transition: 0.3s;
}

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

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 768px) {
  .container {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .slide .item {
    width: 120px;
    height: 180px;
  }

  .slide .item:nth-child(3) {
    left: 60%;
  }

  .slide .item:nth-child(4) {
    left: calc(60% + 150px);
  }

  .item .content {
    left: 5%;
    width: 80%;
  }

  .content .name {
    font-size: 1.5rem;
  }

  .content .des {
    font-size: 0.9rem;
  }

  .button {
    bottom: 10px;
  }
}

@media (max-width: 480px) {
  .slide .item {
    width: 90px;
    height: 130px;
  }

  .content .name {
    font-size: 1.2rem;
  }

  .content .des {
    font-size: 0.8rem;
  }

  .content button {
    padding: 8px 15px;
    font-size: 0.8rem;
  }
}

/* === FINAL RESPONSIVE FIX === */
@media (max-width: 900px) {
  .slide .item {
    width: 140px;
    height: 200px;
  }

  .slide .item:nth-child(3) {
    left: 65%;
  }

  .slide .item:nth-child(4) {
    left: calc(65% + 140px);
  }

  .slide .item:nth-child(5) {
    left: calc(65% + 280px);
  }

  .slide .item:nth-child(n + 6) {
    left: calc(65% + 420px);
  }

  .item .content {
    left: 8%;
    width: 85%;
  }
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .slide .item {
    width: 100px;
    height: 140px;
  }

  .slide .item:nth-child(3) {
    left: 70%;
  }

  .slide .item:nth-child(4) {
    left: calc(70% + 110px);
  }

  .slide .item:nth-child(5) {
    left: calc(70% + 220px);
  }

  .slide .item:nth-child(n + 6) {
    left: calc(70% + 330px);
  }

  .item .content {
    left: 6%;
    width: 88%;
  }

  .content .name {
    font-size: 1.3rem;
  }

  .content .des {
    font-size: 0.85rem;
  }

  .content button {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .slide .item {
    width: 80px;
    height: 110px;
  }

  .slide .item:nth-child(3) {
    left: 75%;
  }

  .slide .item:nth-child(4) {
    left: calc(75% + 90px);
  }

  .slide .item:nth-child(5) {
    left: calc(75% + 180px);
  }

  .slide .item:nth-child(n + 6) {
    left: calc(75% + 270px);
  }

  .content .name {
    font-size: 1.1rem;
  }

  .content .des {
    font-size: 0.75rem;
  }

  .content button {
    padding: 7px 12px;
    font-size: 0.7rem;
  }
}

/* === FULLSCREEN SLIDER DI HP === */
@media (max-width: 768px) {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000; /* bisa ganti warna latar belakang */
  }

  .container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    background: #f5f5f5;
  }

  .button {
    bottom: 30px;
  }
}

/* === PERBAIKAN FULLSCREEN DAN POSISI TOMBOL DI HP === */
@media (max-width: 768px) {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
  }

  .container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  
  .item .content {
    position: absolute;
    top: 50%;
    left: 8%;
    transform: translateY(-50%);
    width: 80%;
  }

  
  .button {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
  }

  .button button {
    width: 45px;
    height: 38px;
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .item .content {
    top: 45%;
    transform: translateY(-45%);
  }

  .button {
    bottom: 25px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1300px; /* biar pas di monitor besar */
    aspect-ratio: 16 / 9;
  }

  .slide .item {
    width: 200px;
    height: 280px;
  }

  .slide .item:nth-child(3) {
    left: 60%;
  }

  .slide .item:nth-child(4) {
    left: calc(60% + 220px);
  }

  .slide .item:nth-child(5) {
    left: calc(60% + 440px);
  }

  .slide .item:nth-child(n + 6) {
    left: calc(60% + 660px);
    opacity: 0;
  }

  .item .content {
    left: 12%;
    max-width: 380px;
  }

  .content .name {
    font-size: 2.2rem;
  }

  .content .des {
    font-size: 1rem;
  }

  .button {
    bottom: 25px;
  }
}

@media (min-width: 1024px) {
  html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* biar nggak scroll */
    background: #000; /* biar latar belakang rapi, bisa ganti warna */
  }

  .container {
    position: fixed;
    inset: 0;               /* tempel ke seluruh layar */
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .item .content {
    left: 10%;
    max-width: 400px;
  }

  .button {
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
  }
}
