.heroForm {
  max-width: 550px;
  width: 100%;
  
  &__item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px;
    height: 550px; 
    background-color: #091242;
    color: #ffffff;
    border-radius: 20px;
    

    
    &--main {   
      h3 {
        font-size: 32px;
        margin-bottom: 20px;
        font-weight: 600;
      }

      &__input {
        display: flex;
        flex-direction: column;

        input {
          outline: none;
          border: none;
          border: 1px solid #E0E0E0;
          background-color: transparent;
          padding: 15px 20px;
          color: white;
          font-size: 18px;
          margin-bottom: 20px;
          opacity: 0.9;

          &::placeholder {
            color: white;
            font-size: 18px;
          }
        }
        .calendar__input {
          display: flex;
          input {
            margin-bottom: 0;
          }
        }
        .transport__type {
          display: flex;
          align-items: center;
          margin-top: 20px;

          
          
          &--text {
            font-size: 18px;
            margin-right: 30px;
          }
          input {
            margin-bottom: 0;
            width: 20px;
            height: 20px;
          }
          div {
            display: flex;
            div {
              input {
                margin-right: 5px;
              }
            }
            p {
              font-size: 15px;
              margin-right: 20px;
            }
          }
        }
      }

      .checkbox__form {
        margin-top: -10px;
        input {
          width: 50px;
          height: 50px;
        }
      }
    }
    .primary {
      background-color: #FFDA56;
      font-size: 18px;
      font-weight: 500;
      padding: 15px 20px;
      transition: all 0.3s ease;
      color: #23212A;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: none;
      width: 100%;
      
      &:hover {
        opacity: 0.7;
      }

      .button-icon {
        width: 20px;
        height: 20px;
        stroke-width: 2;
      }

      &__secondary {
        background-color: #FFDA56;
        color: #23212A;
      }
    }

    &--button {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      
      .secondary {
        width: 48%;
        background-color: transparent;
        outline: none;
        border: none;
        border: 1px solid #E0E0E0;
        font-size: 18px;
        font-weight: 500;
        padding: 14px 20px;
        background-color: transparent;
        color: #ffffff;
      }
      .primary__secondary {
        width: 48%;
      }
      
    }
  } 
}

.heroForm__item.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out forwards;
}

.heroForm__item.previous {
  display: block;
  animation: slideInLeft 0.5s ease-in-out forwards;
}

.heroForm__item.next {
  display: block;
  animation: slideInRight 0.5s ease-in-out forwards;
}

h2,
input,
button,
.required { /* Added .required here */
  animation: fadeIn 0.5s ease-in-out; /* Removed forwards */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Animation for sliding in from the left */
@keyframes slideInLeft {
  from {
    transform: translateX(-50%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Animation for sliding in from the right */
@keyframes slideInRight {
  from {
    transform: translateX(50%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media screen and (max-width:1366px){
  .heroForm {
    
    &__item {
      padding: 40px;
      height: 500px; 
      &--main {   
        h3 {
          font-size: 28px;
          margin-bottom: 15px;
        }
        &__input {

          input {
            padding: 15px 15px;
            color: white;
            font-size: 17px;
            margin-bottom: 15px;

            &::placeholder {
              font-size: 16px;
            }
          }
          .transport__type {
            margin-top: 15px;
            &--text {
              font-size: 17px;
              margin-right: 20px;
            }
            div {
              div {
                input {
                  margin-right: 3px;
                }
              }
              p {
                margin-right: 15px;
              }
            }
          }
        }

      }
      .primary {
        padding: 12px 16px;
      }

      &--button {
        
        .secondary {
          padding: 12px 16px;
        }
      }
    } 
  }
}

@media screen and (max-width:600px){
  .heroForm {
    
    &__item {
      padding: 30px;
      height: 500px; 

    
      &--main {   
        h3 {
          font-size: 24px;
          margin-bottom: 10px;
        }
        &__input {

          input {

            &::placeholder {
              font-size: 15px;
            }
          }
          .transport__type {
            margin-top: 15px;
            &--text {
              font-size: 16px;
              margin-right: 20px;
            }
            div {
              align-items: center;
              div {
                input {
                  margin-right: 3px;
                  width: 15px;
                  height: 15px;
                }
              }
              p {
                margin-right: 10px;
              }
            }
          }
        }
        .checkbox__form {
          margin-top: -10px;
          input {
            transform: scale(1.4);
            width: 30px;
            height: 30px;
          }
        }

      }
      .primary {
        padding: 12px 16px;
      }

      &--button {
        
        .secondary {
          padding: 12px 16px;
        }
      }
    } 
    &__item--second {
      height: 450px;
    }
  }
}

@media screen and (max-width:400px){
  .heroForm {
    
    &__item {
      padding: 30px 20px;
      &--main {   
        &__input {

          .transport__type {
            div {
              div {
                input {
                  width: 10px;
                  height: 10px;
                }
                p {
                  font-size: 13px;
                }
              }
            }
          }
        }
      }
    }
  }
}

