* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
}

body {
  background: black;
  color: #fff;
  font-size: 16px;
  overflow: hidden;
  min-height: 100vh;
  position: relative;
}

header {
  position: fixed;
  width: 90vw;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 600px;
  z-index: 2;

  & img {
    width: 250px;
    transition: all 0.3s ease-in-out;
  }

  /*& nav {
        & ul {
            display: grid;
            grid-template-columns: repeat(3, 200px);
        }
    }*/
}

header img:hover {
  transform: scale(1.1);
  box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
  /*  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); */
}

header nav ul {
  display: flex;
  position: relative;
  left: 7%;
  gap: 48px;
}

header nav ul li {
  cursor: pointer;
  position: relative;
  padding: 5px 0;
  left: 150px;
  font-size: 16px;
}

header nav ul li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #beff1b;
  transition: width 0.5s ease;
}

header nav ul li:hover:after {
  width: 100%;
}

section {
  height: 100vh;
  background-image: radial-gradient(#000, rgb(228, 227, 227));
  position: relative;
  transition: background 0.5s ease-in-out;
  /* #000 #fff  ,  */

  & .list {
    width: 70vw;
    height: 100%;
    margin: auto;
    position: relative;

    & .item {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;

      & .car-img {
        position: absolute;
        width: 70%;
        top: 50%;
        transform: translateY(-50%);
        transition: all 0.3s ease-in-out;

        & img {
          width: 100%;
          transform: rotate(-15deg);
        }

        &::before {
          content: "";
          position: absolute;
          background-color: #000;
          width: 100%;
          height: 100px;
          top: 120%;
          left: 20px;
          border-radius: 50%;
          filter: blur(50px);
        }
      }

      & .content {
        position: absolute;
        right: -50px;
        top: 4%;
        width: 70%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: end;
        gap: 40px;

        & .car-information {
          font-weight: 500;
          font-size: 18px;
        }

        & h2 {
          font-size: 5rem;
          line-height: 1em;
          font-family: "Orbitron", sans-serif;
        }

        & .description {
          color: #d9d9d9;
          font-size: 14px;
          text-align: right;
          max-width: 500px;
        }

        & .information {
          position: relative;
          top: 5%;
          border-radius: 30px;
          height: 35px;
          width: 120px;
          text-transform: uppercase;
          border: 1px solid #fff;
          background-color: #beff1b;
          color: #000;
          cursor: pointer;
          font-weight: 600;
        }
      }
    }

    &::before {
      content: "";
      position: absolute;
      left: -9%;
      height: 200px;
      width: 120%;
      top: 50%;
      margin-top: -5px;
      border-top: 1px solid #d9d9d9;
    }
  }

  .arrows {
    width: 85vw;
    position: absolute;
    top: 50%;
    left: 51%;
    display: flex;
    transform: translate(-50%, -25px);
    justify-content: space-between;

    & button:nth-child(1) {
      & img {
        transform: scale(-1);
      }
    }

    & button {
      top: 60%;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      cursor: pointer;

      & img {
        width: 12px;
        margin-top: 4px;
      }
    }
  }

  .arrows button:hover {
    background-color: #d9d9d9;
  }

  .indicators {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    height: 200px;
    width: 90vw;
    display: flex;
    flex-direction: column;
    justify-content: end;
    /*    align-items: end;  // onde muda o numero 01 */
    gap: 15px;

    & .number {
      font-size: 3em;
      font-family: "Orbitron", sans-serif;
    }

    & ul {
      display: flex;
      gap: 10px;

      & li {
        width: 50px;
        height: 5px;
        background-color: #d9d9d9;
        border-radius: 30px;
        transition: 0.5s;
      }

      & .active:nth-child(1) {
        background-color: #fff;
      }
      & .active:nth-child(2) {
        background-color: yellow;
      }
      & .active:nth-child(3) {
        background-color: red;
      }
    }
  }

  /* .indicators ul li:nth-child(1) {
        background-color:  #ffffff;
    }
    .indicators ul li:nth-child(2) {
        background-color:  yellow;
    }
    .indicators ul li:nth-child(3) {
        background-color:  red;
    }*/
}

section {
  & .list {
    --calculation: 1;

    & .item {
      transform: translateX(calc(100vw * var(--calculation)));
      transition: 0.5s;
      opacity: 0;

      & .car-img {
        & img {
          transform: rotate(0);
          transition: 0.5s;
          transition-delay: 0.3s;
        }
      }

      & .content {
        & .car-information,
        h2,
        .description,
        .information {
          transform: translateX(calc(200px * var(--calculation)));
          transition: 0.7s;
          transition-delay: 0.3s;
          opacity: 0;
        }

        & h2 {
          transition-delay: 0.5s;
        }

        & .description {
          transition-delay: 0.7s;
        }

        & .information {
          transition-delay: 0.9s;
        }
      }
    }

    & .active {
      transform: translateX(0);
      transition: 0.5s;
      opacity: 1;

      & .car-img {
        & img {
          transform: rotate(-15deg);
        }
      }

      & .content {
        & .car-information,
        h2,
        .description,
        .information {
          transform: translateX(0);
          opacity: 1;
        }
      }
    }
  }
}

.content .btn-porsche {
  background-color: #d9d9d9 !important;
  border: none !important;
}

.content .info-lambor {
  color: #fff;
}

.content .btn-lambor {
  background-color: rgb(201, 201, 26) !important;
  border: none !important;
}

.content .info-ferrari {
  color: #fff;
}

.content .btn-ferrari {
  background: radial-gradient(rgb(199, 31, 31)) !important;
  border: none !important;
  color: #fff !important;
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  header {
    width: 95vw;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    margin-top: 0;
    top: 0;

    & img {
      width: 180px;
      justify-self: center;
    }

    & nav ul {
      left: 0;
      gap: 20px;
      justify-content: center;
      flex-wrap: wrap;

      & li {
        left: 0;
        font-size: 14px;
        padding: 8px 12px;
        border-radius: 15px;
        transition: all 0.3s ease;
      }

      & li:hover {
        background: rgba(255, 255, 255, 0.1);
      }
    }
  }

  section {
    padding-top: 140px;
    height: 100vh;
    overflow: hidden;

    & .list {
      width: 95vw;
      height: calc(100vh - 140px);

      & .item {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding: 20px;

        & .car-img {
          position: absolute;
          width: 100%;
          top: 70px;
          transform: none;
          margin-bottom: 20px;
          order: 1;
          flex-shrink: 0;

          & img {
            width: 85%;
            max-width: 320px;
            transform: rotate(0deg) !important;
            transition: all 0.3s ease;
          }

          &::before {
            top: 85%;
            left: 50%;
            transform: translateX(-50%);
            width: 60%;
            height: 60px;
          }
        }

        & .content {
          position: relative;
          right: 0;
          top: 0;
          width: 100%;
          align-items: center;
          text-align: center;
          gap: 15px;
          padding: 0 20px;
          order: 2;
          flex-shrink: 0;

          & .car-information {
            font-size: 16px;
            margin-bottom: 5px;
          }

          & h2 {
            font-size: clamp(2.5rem, 8vw, 3.5rem);
            line-height: 1.1em;
            margin-bottom: 10px;
          }

          & .description {
            text-align: center;
            max-width: 100%;
            font-size: clamp(12px, 3.5vw, 14px);
            line-height: 1.4;
            margin-bottom: 15px;
          }

          & .information {
            width: 140px;
            height: 42px;
            top: 0;
            margin-top: 10px;
            font-size: 14px;
            border-radius: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
          }

          & .information:active {
            transform: scale(0.95);
          }
        }
      }

      &::before {
        display: none;
      }
    }

    .arrows {
      width: 95vw;
      top: 65%;
      left: 50%;
      transform: translateX(-50%);
      z-index: 10;

      & button {
        width: 55px;
        height: 55px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;

        & img {
          width: 18px;
        }
      }

      & button:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.7);
      }
    }

    .indicators {
      width: 95vw;
      height: auto;
      top: auto;
      bottom: 40px;
      left: 50%;
      transform: translateX(-50%);
      align-items: center;
      z-index: 10;

      & .number {
        font-size: 2.2rem;
        margin-bottom: 15px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      }

      & ul {
        justify-content: center;

        & li {
          width: 45px;
          height: 4px;
          border-radius: 2px;
        }
      }
    }
  }
}

@media (max-width: 480px) {
  header {
    & img {
      width: 150px;
    }

    & nav ul {
      gap: 15px;

      & li {
        font-size: 12px;
        padding: 6px 10px;
      }
    }
  }

  section {
    padding-top: 100px;

    & .list {
      & .item {
        & .car-img {
          & img {
            width: 90%;
            max-width: 250px;
          }
        }

        & .content {
          gap: 15px;
          padding: 0 15px;

          & .car-information {
            font-size: 14px;
          }

          & h2 {
            font-size: 2.5rem;
          }

          & .description {
            font-size: 12px;
          }

          & .information {
            width: 120px;
            height: 38px;
            font-size: 12px;
          }
        }
      }
    }

    .arrows {
      & button {
        width: 45px;
        height: 45px;

        & img {
          width: 14px;
        }
      }
    }

    .indicators {
      bottom: 20px;

      & .number {
        font-size: 1.8rem;
      }

      & ul {
        & li {
          width: 35px;
          height: 3px;
        }
      }
    }
  }
}
