.gallery{
  padding: 2rem 1rem;
}

/* GALLERY PAGE BUTTONS */

.page-select {
  display: flex;
  flex-direction: row;
  justify-content: center;
  text-align: center;
}

.page-select button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#page,#page2 {
  padding: 0.5rem 1rem;
}

#page p,#page2 p {
  font-size: 1rem;
}

#prev,#next,#prev2,#next2 {
  padding: 0rem 0.5rem;
  color: var(--text-light);
  background-color: var(--bg-dark);
  border: none;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  box-shadow: inset 0 1px 2px hsl(210, 24%, 23%), 0 1px 2px hsl(210, 24%, 10%);
  transition-duration: 0.1s;
  transition-timing-function: ease-in-out;
}

#prev:hover,#next:hover,#prev2:hover,#next2:hover {
  color: var(--btn-text-hover);
  border: none;
  transition-duration: 0.1s;
  box-shadow: inset 0 2px 2px hsl(210, 24%, 15%), 0 1px 2px hsl(210, 24%, 21%) ;
}

button#prev:disabled,button#next:disabled,button#prev2:disabled,button#next2:disabled {
  padding: 0rem 0.5rem;
  border-radius: 0.3rem;
  color: #f5f5f5ae;
  background-color: var(--blue-grey);
  border: hsl(210, 24%, 23%) 0.05rem solid;
  box-shadow: none;
  cursor: default;
}

.arrow {
  height: 37px;
  align-self: center;
  font-size: 1.5rem;
}

/* GALLERY CARDS */

.gallery .js-gallery {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--bg-dark);
  margin: 0rem 0rem 2rem 0rem;
  padding: 0rem 1rem;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  width: 22rem;
  height: 30rem;
  text-align: center;
  background-color: var(--text-light);
  border-radius: 0.3rem;
  margin: 1rem 1rem;
  padding: 0.5rem;
  position: relative;
  box-shadow: 0 10px 20px hsl(0, 0%, 22%);
}

.gallery-card:hover {
  background-color: var(--bg-light);
}

.gallery-card img {
  height: 66%;
  object-fit: cover;
  overflow: hidden;
  cursor:zoom-in;
}

.card-body {
  height: 33%;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0rem 0rem 0rem;
  cursor: pointer ;
}

.card-body p {
  height: 70%;
  margin: 0rem;
  padding: 0rem 0.2rem;
  font-size: 1.1rem;
  line-height: 1.3;
  align-content: center;
}

.card-body h5 {
  height: 30%;
  margin: 0rem;
  padding: 0rem;
  align-content: center;
  font-size: 1rem;
}

.gallery-card svg{
  position: absolute ;
  top: 50px;
  right: 50px;
  margin: -30px;
  color: var(--text-light);
  cursor: zoom-in;
  filter: 
  drop-shadow(-.25px -.25px 0px var(--bg-dark)) 
  drop-shadow(1px -.25px 0px var(--bg-dark)) 
  drop-shadow(1px 1px 0px var(--bg-dark))
  drop-shadow(-.25px 1px 0px var(--bg-dark))
}

/* GALLERY MODAL */

#modalGalleryContainer {
  height: 100%;
  width: 100%;
  background-color: #21252992;
  position: fixed;
  top: 0rem;
  z-index: 101;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.modal-content {
  height: 100vh;
  z-index: 102;
  align-self: center;
  object-fit: cover;
  justify-content: center;
  padding: 0rem;
}

.modal-body {
  max-height: 30vh;
  display: flex;
  background-image: linear-gradient(to bottom, var(--bg-dark), var(--bg-dark), var(--bg-dark), #212529c8);
  justify-content: flex-end;
  padding: 0.5rem;
  flex: 0 0 0;
}

.modal-text {
  height: auto;
  color: var(--text-light);
  text-align: center;
  padding: 0.5rem;
  align-self: center;
  justify-content: center;
}

#closeButton {
  height: 2.5rem;
  width: 2.5rem;
  z-index: 200;
  color: var(--text-light);
  background-color: #21252992;
  align-self: center;
  border: solid 1px var(--text-light);
  display: flex;
  justify-content: center;
  align-self: flex-start;
  cursor: pointer;
}

#closeButton svg {
  display: block;
  align-self: center;
}

.imgAndButtons {
  max-height: 85vh;
  display: flex;
  justify-content: center;
  padding: 0rem;
}

.imgAndButtons img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
  cursor: zoom-in;
}

.imgAndButtons button {
  height: 100%;
  align-self: center;
  background-color: #212529a8;
  color: var(--text-light);
}

/* Gallery Modal Image checkbox zoom function */

input[type="checkbox"] {
  display: none;
}

input[type="checkbox"]:not(:checked) ~ label > img {
  object-fit: contain;
}

input[type="checkbox"]:checked ~ label > img {
  transform: scale(2);
  cursor: zoom-out;
}

/* modal previous/next image in gallery Buttons */

#modalPrev,#modalNext {
  justify-content: center;
}

.imgAndButtons#modalPrev svg,.imgAndButtons#modalNext svg {
  text-align: center;
  display: block;
}

button#modalPrev:disabled,button#modalNext:disabled {
  padding: 0rem 0.5rem;
  border-radius: 0.3rem;
  color: #f5f5f557;
  background-color: #3d4248a8;
  border: var(--bg-dark) 0.05rem solid;
  cursor: default;
}

@media only screen and (max-width: 576px) {
  .imgAndButtons button,button#modalPrev:disabled,button#modalNext:disabled {
    position: absolute;
    height: 30%;
    background-color: #21252900;
    border: none;
    width: 14vw;
  }

  .imgAndButtons button#modalPrev {
    left: 0rem;
    z-index: 100;
  }

  .imgAndButtons button#modalNext {
    right: 0rem;
    z-index: 100;
  }
  }

@media only screen and (min-width: 1200px) {
  .imgAndButtons button {
    height: 30vh;
    width: 5vw;
  }
}

@media only screen and (min-width: 1566px) {
  .gallery-card {
    width: 30rem;
    height: 30rem;
  }

  .imgAndButtons button {
    width: 3vw;
  }

  .gallery-card img {
    height: 75%;
  }

  .card-body {
    height: 25%;
  }

  .card-body p {
    font-size: 1.3rem;
  }

  .card-body h5 {
    font-size: 1.2rem;
  }
}

@media only screen and (min-width: 1616px) {
  .gallery-card {
    margin: 1rem 1.5rem;
  }
}