@media screen and (max-width:715px) {
  .slider {
    width: 100%;
    overflow: hidden;
    position: relative;
  }

  .slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
  }

  .slider-item {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f0f0f0;
  }

  .slider-img {
    max-width: 100%;
    object-fit: cover;
  }

  .slider-text {
    width: 100%;
    padding: 10px;
    position: absolute;
    top: 20%;
    text-align: center;
    color: white;
    z-index: 9999;
  }
}

@media only screen and (min-width:716px) and (max-width:5000px) {
  .slider {
    width: 100%;
    overflow: hidden;
    position: relative;
  }

  .slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
  }

  .slider-item {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f0f0f0;
  }

  .slider-img {
    max-width: 100%;
    object-fit: cover;
  }

  .slider-text {
    width: 100%;
    padding: 20px;
    z-index: 9999;
    position: absolute;
    top: 40%;
    text-align: center;
    color: white;
  }
}