@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* --- NEW FIX 1: Stops borders/padding from pushing the screen too wide --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* --- Ensured this covers html as well as body for mobile browsers --- */
html {
  width: 100%;
}

/* --- Confine the horizontal hiding ONLY to the body --- */
body {
  overflow-x: clip;
  width: 100%;
  position: relative;
}

body {
  margin: 0;
  background: linear-gradient(135deg,
      #0e0a1b 0%,
      #0e0a1b 25%,
      #0e0a1b 50%,
      #0e0a1b 75%,
      #0e0a1b 100%);
  font-family: Poppins;
  color: white;
}

/* custom scroll bar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
}

::selection {
  background: rgb(0, 123, 255, 0.3);
}

.content {
  max-width: 90%;
  margin: auto;
  padding: 0 30px;
}

.navbar {
  position: fixed;
  width: 90%;
  z-index: 9999;
  padding: 25px 0;
  transition: all 0.3s ease;
  margin-left: 5%;
  margin-top: 0%;
  border-radius: 100px;
}

.navbar.sticky {
  background: rgba(50, 12, 111, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0px 0;
  box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  margin-top: 2%;
  z-index: 999;
}

.navbar.sticky #logo {
  width: 100px;
  padding-top: 10px;
}

.navbar .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo a {
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  text-decoration: none;
}

.navbar .menu-list {
  display: inline-flex;
}

.menu-list li {
  list-style: none;
}

.menu-list li a {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  margin-left: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.menu-list li a:hover {
  color: #007bff;
}

#logo {
  width: 120px;
}

.icon {
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: none;
}

.menu-list .cancel-btn {
  position: absolute;
  right: 30px;
  top: 20px;
}

@media (max-width: 1230px) {
  .content {
    padding: 0 60px;
  }
}

@media (max-width: 1100px) {
  .content {
    padding: 0 40px;
  }
}

@media (max-width: 900px) {
  .content {
    padding: 0 30px;
  }
}

@media (max-width: 868px) {
  body.disabled {
    overflow: hidden;
  }

  .icon {
    display: block;
  }

  .icon.hide {
    display: none;
  }

  .navbar .menu-list {
    position: fixed;
    height: 100vh;
    width: 100%;
    max-width: 400px;

    /* --- NEW FIX 2: Pushes the menu way further to the left so it stops peeking --- */
    left: -150vw;

    top: 0px;
    display: block;
    padding: 40px 0;
    margin: 0;
    text-align: center;
    background: rgba(14, 10, 27, 0.99);
    transition: all 0.3s ease;
    z-index: 99999;
  }

  .navbar.show {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 15px 15px !important;
    width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .navbar.show .menu-list {
    left: 0%;
  }

  .navbar .menu-list li {
    margin-top: 45px;
  }

  .navbar .menu-list li a {
    font-size: 23px;
    margin-left: -100%;
    transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  .navbar.show .menu-list li a {
    margin-left: 0px;
  }
}

@media (max-width: 380px) {
  .navbar .logo a {
    font-size: 27px;
  }
}

:root {
  --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
  --item1-filter: blur(30px);
  --item1-zIndex: 11;
  --item1-opacity: 0;

  --item2-transform: translateX(0);
  --item2-filter: blur(0px);
  --item2-zIndex: 10;
  --item2-opacity: 1;

  --item3-transform: translate(50%, 10%) scale(0.8);
  --item3-filter: blur(10px);
  --item3-zIndex: 9;
  --item3-opacity: 1;

  --item4-transform: translate(90%, 20%) scale(0.5);
  --item4-filter: blur(30px);
  --item4-zIndex: 8;
  --item4-opacity: 1;

  --item5-transform: translate(120%, 30%) scale(0.3);
  --item5-filter: blur(40px);
  --item5-zIndex: 7;
  --item5-opacity: 0;
}

/* carousel */
.carousel {
  width: 100%;
  position: relative;
  height: 760px;
  overflow: hidden;
  clip-path: inset(0);
  margin-top: 0%;
}

.carousel .list {
  position: absolute;
  width: 1140px;
  max-width: 90%;
  height: 80%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 3%;
}

.carousel .list .item {
  position: absolute;
  left: 0%;
  width: 70%;
  height: 100%;
  font-size: 15px;
  transition: left 0.5s, opacity 0.5s, width 0.5s;
}

.carousel .list .item:nth-child(n + 6) {
  opacity: 0;
}

.carousel .list .item:nth-child(2) {
  z-index: 10;
  transform: translateX(0);
}

.carousel .list .item img {
  width: 50%;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: right 1.5s;
}

.carousel .list .item .introduce {
  opacity: 0;
  pointer-events: none;
}

.carousel .list .item:nth-child(2) .introduce {
  opacity: 1;
  pointer-events: auto;
  width: 400px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.5s;
}

.carousel .list .item .introduce .title {
  font-size: 2em;
  font-weight: 500;
  line-height: 1em;
}

.carousel .list .item .introduce .topic {
  font-size: 4em;
  font-weight: 500;
}

.carousel .list .item .introduce .des {
  font-size: small;
  color: #fff;
}

.carousel .list .item .introduce .seeMore {
  font-family: Poppins;
  margin-top: 1.2em;
  padding: 5px 0;
  border: none;
  border-bottom: 1px solid #555;
  background-color: transparent;
  font-weight: bold;
  letter-spacing: 3px;
  transition: background 0.5s;
  color: white;
}

.carousel .list .item .introduce .seeMore:hover {
  background: #eee;
  color: #333;
}

.carousel .list .item:nth-child(1) {
  transform: var(--item1-transform);
  filter: var(--item1-filter);
  z-index: var(--item1-zIndex);
  opacity: var(--item1-opacity);
  pointer-events: none;
}

.carousel .list .item:nth-child(3) {
  transform: var(--item3-transform);
  filter: var(--item3-filter);
  z-index: var(--item3-zIndex);
}

.carousel .list .item:nth-child(4) {
  transform: var(--item4-transform);
  filter: var(--item4-filter);
  z-index: var(--item4-zIndex);
}

.carousel .list .item:nth-child(5) {
  transform: var(--item5-transform);
  filter: var(--item5-filter);
  opacity: var(--item5-opacity);
  pointer-events: none;
}

/* animation text in item2 */
.carousel .list .item:nth-child(2) .introduce .title,
.carousel .list .item:nth-child(2) .introduce .topic,
.carousel .list .item:nth-child(2) .introduce .des,
.carousel .list .item:nth-child(2) .introduce .seeMore {
  opacity: 0;
  animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

@keyframes showContent {
  from {
    transform: translateY(-30px);
    filter: blur(10px);
  }

  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0px);
  }
}

.carousel .list .item:nth-child(2) .introduce .topic {
  animation-delay: 1.2s;
}

.carousel .list .item:nth-child(2) .introduce .des {
  animation-delay: 1.4s;
}

.carousel .list .item:nth-child(2) .introduce .seeMore {
  animation-delay: 1.6s;
}

/* next click */
.carousel.next .item:nth-child(1) {
  animation: transformFromPosition2 0.5s ease-in-out 1 forwards;
}

@keyframes transformFromPosition2 {
  from {
    transform: var(--item2-transform);
    filter: var(--item2-filter);
    opacity: var(--item2-opacity);
  }
}

.carousel.next .item:nth-child(2) {
  animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}

@keyframes transformFromPosition3 {
  from {
    transform: var(--item3-transform);
    filter: var(--item3-filter);
    opacity: var(--item3-opacity);
  }
}

.carousel.next .item:nth-child(3) {
  animation: transformFromPosition4 0.9s ease-in-out 1 forwards;
}

@keyframes transformFromPosition4 {
  from {
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    opacity: var(--item4-opacity);
  }
}

.carousel.next .item:nth-child(4) {
  animation: transformFromPosition5 1.1s ease-in-out 1 forwards;
}

@keyframes transformFromPosition5 {
  from {
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
  }
}

/* previous */
.carousel.prev .list .item:nth-child(5) {
  animation: transformFromPosition4 0.5s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(4) {
  animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(3) {
  animation: transformFromPosition2 0.9s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(2) {
  animation: transformFromPosition1 1.1s ease-in-out 1 forwards;
}

@keyframes transformFromPosition1 {
  from {
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    opacity: var(--item1-opacity);
  }
}

/* detail  */
.carousel .list .item .detail {
  opacity: 0;
  pointer-events: none;
}

/* showDetail */
.carousel.showDetail .list .item:nth-child(3),
.carousel.showDetail .list .item:nth-child(4) {
  left: 100%;
  opacity: 0;
  pointer-events: none;
}

.carousel.showDetail .list .item:nth-child(2) {
  width: 100%;
}

.carousel.showDetail .list .item:nth-child(2) .introduce {
  opacity: 0;
  pointer-events: none;
}

.carousel.showDetail .list .item:nth-child(2) img {
  right: 50%;
}

.carousel.showDetail .list .item:nth-child(2) .detail {
  opacity: 1;
  width: 50%;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
  pointer-events: auto;
}

.carousel.showDetail .list .item:nth-child(2) .detail .title {
  font-size: 4em;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
  display: flex;
  gap: 10px;
  width: 100%;
  border-top: 1px solid #5553;
  margin-top: 20px;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div {
  width: 90px;
  text-align: center;
  flex-shrink: 0;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:nth-child(1) {
  font-weight: bold;
}

.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button {
  font-family: Poppins;
  background-color: transparent;
  border: 1px solid #5555;
  margin-left: 5px;
  padding: 5px 10px;
  letter-spacing: 2px;
  font-weight: 500;
  color: white;
}

.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button:nth-child(2) {
  background-color: #693EFF;
  color: #eee;
}

.carousel.showDetail .list .item:nth-child(2) .detail .title,
.carousel.showDetail .list .item:nth-child(2) .detail .des,
.carousel.showDetail .list .item:nth-child(2) .detail .specifications,
.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
  opacity: 0;
  animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

.carousel.showDetail .list .item:nth-child(2) .detail .des {
  animation-delay: 1.2s;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
  animation-delay: 1.4s;
}

.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
  animation-delay: 1.6s;
}

.arrows {
  position: absolute;
  left: 12.3%;
  top: 65%;
  width: 110px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

#prev,
#next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: monospace;
  border: 1px solid #fff;
  font-size: large;
  background-color: transparent;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

#prev:hover,
#next:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

#back {
  position: absolute;
  z-index: 100;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  border: none;
  border-bottom: 1px solid #555;
  font-family: Poppins;
  font-weight: bold;
  letter-spacing: 3px;
  background-color: transparent;
  padding: 10px;
  color: white;
  opacity: 0;
  transition: opacity 0.5s;
}

.carousel.showDetail #back {
  opacity: 1;
}

.carousel.showDetail #prev,
.carousel.showDetail #next {
  opacity: 0;
  pointer-events: none;
}

.carousel::before {
  width: 500px;
  height: 300px;
  content: '';
  background-image: linear-gradient(70deg, #DC422A, blue);
  position: absolute;
  z-index: -1;
  border-radius: 20% 30% 80% 10%;
  filter: blur(100px);
  top: 50%;
  left: 50%;
  transform: translate(-10%, -50%);
  transition: 1s;
}

.carousel.showDetail::before {
  transform: translate(-100%, -50%) rotate(90deg);
  filter: blur(130px);
}

@media screen and (max-width: 991px) {

  /* ipad, tablets */
  .carousel .list .item {
    width: 90%;
  }

  .carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    overflow: auto;
  }

  .carousel.showDetail .list .item:nth-child(2) .detail .title {
    font-size: 2em;
  }
}

@media screen and (max-width: 767px) {

  /* mobile */
  .section1 {
    overflow: hidden;
  }

  .carousel {
    height: 600px;
    overflow: hidden;
  }

  .carousel .list .item {
    width: 100%;
    font-size: 10px;
  }

  .carousel .list {
    height: 100%;
    max-width: 100%;
  }

  /* Text on top, full width, contained */
  .carousel .list .item:nth-child(2) .introduce {
    width: 85%;
    max-width: 85%;
    position: absolute;
    top: 28%;
    left: 5%;
    transform: none;
    z-index: 5;
    box-sizing: border-box;
  }

  .carousel .list .item .introduce .title {
    font-size: 1.4em;
  }

  .carousel .list .item .introduce .topic {
    font-size: 2.6em;
  }

  .carousel .list .item .introduce .des {
    font-size: 11px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Image below the text */
  .carousel .list .item img {
    width: 55%;
    max-width: 250px;
    position: absolute;
    right: 50%;
    top: auto;
    bottom: 15%;
    transform: translateX(50%);
    left: auto;
  }

  /* Arrows under the text, above the image */
  .arrows {
    top: auto;
    bottom: 1%;
    left: 50%;
    transform: translateX(-50%);
    gap: 15px;
    z-index: 10;
  }

  #prev,
  #next {
    width: 35px;
    height: 35px;
    font-size: medium;
  }

  /* Detail view adjustments */
  .carousel.showDetail .list .item:nth-child(2) .detail {
    backdrop-filter: blur(10px);
    font-size: small;
    width: 90%;
    left: 5%;
    right: auto;
    text-align: left;
  }

  .carousel .list .item:nth-child(2) .introduce .des,
  .carousel.showDetail .list .item:nth-child(2) .detail .des {
    height: 100px;
    overflow: auto;
  }

  .carousel.showDetail .list .item:nth-child(2) .detail .checkout {
    display: flex;
    width: max-content;
    float: right;
  }
}

/* NEW NAVBAR FIXES FOR PHONES */
@media (max-width: 480px) {

  /* 1. Reduce the aggressive horizontal padding */
  .content {
    padding: 0 15px;
  }

  /* 2. Let the navbar take up a bit more screen width */
  .navbar {
    width: 94%;
    margin-left: 3%;
    padding: 15px 0;
  }

  /* 3. Scale down the image logo if you are using one */
  #logo {
    width: 90px;
  }

  /* 4. Scale down the text logo if you are using text instead of an image */
  .navbar .logo a {
    font-size: 22px;
  }

  /* 5. Adjust the sticky navbar to match */
  .navbar.sticky {
    width: 94%;
    margin-left: 3%;
    padding: 10px 0;
    margin-top: 10px;
  }

  /* 6. Stop the logo from pushing itself out of alignment */
  .navbar.sticky #logo {
    padding-top: 0;
    width: 80px;
  }
}