@import "../../style.css";

body {
  margin: 0;
}

.portfolio {
  padding-bottom: 6.25rem;
  text-align: center;
  background: #BBC6C7;
}

.portfolio-heading {
  padding-top: 1.5em;
  margin: 0;
  font-size: 2.45em;
  color:  white;
  text-transform: uppercase;
  font-family: Arsenal, sans-serif;
}

.portfolio-subline {
  line-height: 1.2em;
  padding: 1.25em 0 4em;
  color:   white;
  font-style: italic;
  font-weight: bold;
}

.gallery {
  font-size: 0;
  max-width: 1170px;
  margin: 0 auto;
  position: relative;
}

.image-container {
  display: inline-block;
  vertical-align: top;
  margin: 0.9rem;
  position: relative;
  cursor: pointer;
}

.preview {
  max-width: 360px;
  width: 100%;
  object-fit: cover;
}

.image-container:after {
  width: 100%;
  height: 100%;
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  background: #2bc2d4;
  opacity: 0;
  transition: all 450ms ease-out;
  transform: rotateY(90deg);
}

.image-container:hover:after {
  opacity: 0.9;
  transform: rotateY(0deg);
}

.hover-buttons {
  width: 90px;
  height: 40px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  display: none;
}

.image-container:hover .hover-buttons {
  display: inline-block;
}

.zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 1px solid #fff;
  box-sizing: border-box;
  border-radius: 5px;
  z-index: 1;
}

.zoom:hover {
  background: #2bc2d4;
}

.zoom:after {
  display: inline-block;
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.zoom:after {
  content: "+";
  font-size: 25px;
}

.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.9;
  background: #fff;
  display: none;
}

.overlay.active {
  display: block;
}

.popup {
  position: fixed;
  width: 100%;
  max-width: 1170px;
  border: 1px solid grey;
  padding: 0.5rem;
  box-sizing: border-box;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.8);
  display: none;
}

.popup.active {
  display: block;
}

.full-image {
  width: 1170px;
  max-width: 100%;
  max-height: 550px;
  object-fit: cover;
  display: none;
}

.full-image.active {
  display: block;
}

.close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.45rem;
  height: 2.45rem;
  line-height: 2.45rem;
  background: #2bc2d4;
  color: white;
  border-radius: 5px;
}

.close:after {
  content: "+";
  transform: rotate(45deg);
  display: inline-block;
  font-size: 1.6rem;
  vertical-align: middle;
}

.close:hover {
  cursor: pointer;
}

@media (min-width: 700px) {
  .preview {
    max-height: 260px;
    min-height: 260px;
  }
}