.gallery {
  width: 100%;
  height: 500px;
  border: 0 solid red;
  overflow: hidden;
  padding: 0;
}

.gallery-container {
  align-items: center;
  display: flex;
  height: 500px;
  margin: 0 auto;
  /*max-width: 1000px;*/
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 0 solid orange;
}

.gallery-item {
  max-height: 500px;
  opacity: 0;
  position: absolute;
  transition: all 0.3s ease-in-out;
  /*max-width: 50%;*/
  z-index: 0;
  border: 0 solid blue;
}

.gallery-item-1 {
  left: 15%;
  opacity: .4;
  transform: translateX(-50%);
}

.gallery-item-2,
.gallery-item-4 {
  height: auto;
  max-height: 500px;
  opacity: 1;
  width: 800px;
  z-index: 1;
}

.gallery-item-2 {
  left: 30%;
  transform: translateX(-50%);
}

.gallery-item-3 {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25), 0 0 100px rgba(255, 255, 255, 0.1);
  height: auto;
  max-height: 500px;
  opacity: 1;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  z-index: 2;
}

.gallery-item-4 {
  left: 70%;
  transform: translateX(-50%);
}

.gallery-item-5 {
  left: 85%;
  opacity: .4;
  transform: translateX(-50%);
}

.gallery-controls {
  position: absolute;
  justify-content: center;
  width: 100%;
  text-align: center;
  border:0 solid red;
  margin-top: -300px;
  z-index: 1000;
  color: #ffcc06;
}

.gallery-controls button {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  font-size: 60px;
  margin: 0 20px;
  padding: 0 12px;
  text-transform: capitalize;
  color: #ffcc06;
}

.gallery-controls button:focus {
  outline: none;
}

.gallery-controls-previous {
  position: relative;
  border: 0 solid orange !important;
  left: -220px;
}
/*
.gallery-controls-previous::before {
  border: solid #ffcc06;
  border-width: 0 2px 2px 0;
  content: '';
  display: inline-block;
  height: 4px;
  left: -10px;
  padding: 2px;
  position: absolute;
  top: 0;
  transform: rotate(135deg) translateY(-50%);
  transition: left 0.15s ease-in-out;
  width: 4px;
}
*/
.gallery-controls-previous:hover::before {
  left: -18px;
}

.gallery-controls-next {
  position: relative;
  border: 0 solid red !important;
  right: -220px;
}
/*
.gallery-controls-next::before {
  border: solid #ffcc06;
  border-width: 0 2px 2px 0;
  content: '';
  display: inline-block;
  height: 4px;
  padding: 2px;
  position: absolute;
  right: -10px;
  top: 50%;
  transform: rotate(-45deg) translateY(-50%);
  transition: right 0.15s ease-in-out;
  width: 4px;
}
*/
.gallery-controls-next:hover::before {
  right: -18px;
}

.gallery-nav {
  bottom: -15px;
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  position: absolute;
  width: 100%;
}

.gallery-nav li {
  background: #ccc;
  border-radius: 50%;
  height: 10px;
  margin: 0 16px;
  width: 10px;
}

.gallery-nav li.gallery-item-selected {
  background: #555;
}

@media only screen and (max-width: 768px) and (orientation: portrait) {

  .gallery, .gallery-container {
    max-width: 100%;
    height: 250px;
    border: 0 solid blue;
  }

  .gallery-controls {
    margin-top: -160px;
  }

  .gallery-controls button {
    font-size: 40px;
  }

  .gallery-controls-previous{
    left: -130px;
  }

  .gallery-controls-next{
    right: -130px;
  }

  .gallery-item-1, .gallery-item-2, .gallery-item-3, .gallery-item-4{
    width: 100%;
    max-width: 100%;
  }

}

@media only screen and (max-width: 768px) and (orientation: landscape) {

  .gallery, .gallery-container {
    max-width: 100%;
    height: 380px;
    border: 0 solid red;
  }

  .gallery-controls {
    margin-top: -220px;
  }

  .gallery-controls button {
    font-size: 50px;
  }

  .gallery-controls-previous{
    left: -270px;
  }

  .gallery-controls-next{
    right: -270px;
  }

  .gallery-item-1, .gallery-item-2, .gallery-item-3, .gallery-item-4{
    width: 100%;
    max-width: 100%;
  }

}
