.gallery {
  width: 100%;
}

.gallery img {
  width: 100%;
  height: auto;
}

.gallery .dev {
  color: #000;
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  text-align: start;
  line-height: 1.5;
}

.gallery .dev span {
  color: #777;
  font-weight: 400;
}

.gallery .dev1 {
  background-color: #D5B016;
}

.gallery .dev2 {
  background-color: #CAD900;
}

.gallery .dev3 {
  background-color: #60D089;
}

.gallery .dev4 {
  background-color: #5DBA00;
}

.gallery .dev5 {
  background-color: #00BAAC;
}

.gallery .dev6 {
  background-color: #F0A6B5;
}

.gallery-container {
  display: flex;
  align-items: center;
  height: 320px;
  margin: 0 auto;
  max-width: 1080px;
  position: relative;
  padding: 0 0 200px;
}

.gallery-item {
  width: 192px;
  height: 240px;
  max-width: 240px;
  max-height: 240px;
  position: absolute;
  transition: all 0.3s ease-in-out;
  z-index: 0;
  border-radius: 10px;
  background-size: contain;
}

.gallery-item::after {
  content: " ";
  width: 0;
  height: 0;
  border-style: solid;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-top: 20px solid #555555;
  border-bottom: 0;
  display: inline-block;
  position: absolute;
  bottom: -20px;
  left: 50%;
  opacity: 0;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  transition: opacity 0.3s ease-in-out;
}

.gallery-item + .gallery-item-message {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  transition: display 0.3s ease-in-out;
  background-color: #fff;
  padding: 25px 20px;
  width: 100%;
  max-width: 750px;
  box-sizing: border-box;
  line-height: 1.7;
}

.gallery-item + .gallery-item-message p {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 25px;
}

.gallery-item + .gallery-item-message small {
  background-color: #009D41;
  color: #fff;
  padding: 5px 1em;
  margin: 5px;
  font-size: 14px;
  font-weight: 400;
}

.gallery-item.dev1::after {
  border-top-color: #D5B016;
}

.gallery-item.dev2::after {
  border-top-color: #CAD900;
}

.gallery-item.dev3:after {
  border-top-color: #60D089;
}

.gallery-item.dev4::after {
  border-top-color: #5DBA00;
}

.gallery-item.dev5::after {
  border-top-color: #00BAAC;
}

.gallery-item.dev6::after {
  border-top-color: #F0A6B5;
}

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

.gallery-item-1 img {
  width: auto;
  height: 80%;
  transition: all 0.3s ease-in-out;
  position: relative;
  top: 10%;
}

.gallery-item-2, .gallery-item-4 {
  width: 216px;
  height: 270px;
  max-width: 216px;
  max-height: 270px;
  z-index: 1;
}

.gallery-item-2 img, .gallery-item-4 img {
  width: auto;
  height: 75%;
  transition: all 0.3s ease-in-out;
  position: relative;
  top: 10%;
}

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

.gallery-item-3 {
  width: 280px;
  height: 340px;
  max-width: 280px;
  max-height: 340px;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  z-index: 2;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.gallery-item-3::after {
  opacity: 1;
}

.gallery-item-3 + .gallery-item-message {
  display: inline-block;
}

.gallery-item-3 img {
  width: auto;
  height: 80%;
  transition: all 0.3s ease-in-out;
  position: relative;
  top: 10%;
}

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

.gallery-item-4 p {
  left: 30px !important;
}

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

.gallery-item-5 p {
  left: 10% !important;
}

.gallery-item-5 img {
  width: auto;
  height: 80%;
  transition: all 0.3s ease-in-out;
  position: relative;
  top: 10%;
}

.gallery-item-6 {
  left: 15%;
  opacity: 0;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
}

.gallery-item-6 img {
  opacity: 0;
}

.gallery-controls {
  display: flex;
  justify-content: space-between;
  margin: 25px auto;
  height: 100px;
  position: absolute;
  max-width: 1100px;
  top: 25%;
  left: 0;
  right: 0;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}

.gallery-controls button {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.38889vw;
  text-transform: capitalize;
  color: #c5c5c6;
}

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

.gallery-controls-previous::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 15px solid #c5c5c6;
  border-left: 0;
}

.gallery-controls-next {
  position: relative;
}

.gallery-controls-next::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 15px solid #c5c5c6;
  border-right: 0;
}

.slider_card_button {
  margin: -6.94444vw auto 0;
  padding: 8.33333vw 0 0;
}

.slider_card_button div p {
  display: inline-block;
  text-align: left;
}

@media (max-width: 767px) {
  .gallery .dev {
    left: 5%;
    bottom: 5%;
  }
  .gallery-container {
    padding-bottom: 250px;
    height: 101.33333vw;
    max-height: 380px;
  }
  .gallery-item + .gallery-item-message {
    width: 80%;
    padding-bottom: 25px;
  }
  .gallery-item + .gallery-item-message p {
    font-size: 18px;
    margin: 0 4vw 6.66667vw;
  }
  .gallery-item-1 {
    opacity: 0;
  }
  .gallery-item-2, .gallery-item-4 {
    height: 300px;
    max-width: none;
    max-height: none;
  }
  .gallery-item-2 p, .gallery-item-4 p {
    opacity: 0;
    transition: none;
  }
  .gallery-item-3 {
    min-width: 260px;
    min-height: 340px;
    max-width: none;
    max-height: none;
  }
  .gallery-item-3 img {
    height: 80%;
    transition: none;
    top: 10%;
  }
  .gallery-item-5 {
    opacity: 0;
  }
  .gallery-controls {
    max-width: 360px;
    z-index: 2;
  }
  .gallery-controls-previous::before {
    border-right: 15px solid #fff;
  }
  .gallery-controls-next::before {
    border-left: 15px solid #fff;
  }
  .slider_card_button div p {
    font-size: 14px;
    margin-top: 40px !important;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .gallery-container {
    max-width: 760px;
    padding: 0 0 240px;
  }
  .gallery-item {
    width: 131px;
    height: 164px;
  }
  .gallery-item + .gallery-item-message {
    width: 85%;
    padding-bottom: 3.75vw;
  }
  .gallery-item-1 {
    left: 15%;
  }
  .gallery-item-2, .gallery-item-4 {
    width: 148px;
    height: 196px;
  }
  .gallery-item-3 {
    width: 228px;
    height: 272px;
  }
  .gallery-item-5 {
    left: 85%;
  }
  .gallery-controls-previous::before {
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid #c5c5c6;
  }
  .gallery-controls-next::before {
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 10px solid #c5c5c6;
  }
}
