*, *:before, *:after {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}


.gallery .container {
  margin: 0 auto;
  padding-right: .8em;
  padding-left: .8em;
  width: 100%;
  height: auto;
  max-width: 1260px;
  background: #fff;
 }
.main-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.name {
  text-transform:uppercase;
  font-weight: 800;
  font-size: 2em;
  line-height: 1;
  margin: 0 0 1.5em;
}
.name span {
  font-weight: 300;
}

.gallery img {
    max-width: 100%;
}
.gallery-img {
  display: block;
  width: 100%;
}
.gallery {
    /* Max out the height within its container */
    width: 100%;
    height: auto;
    /* Add flexbox styles */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-container {
  margin-bottom: 3em;
  text-align: center;
  margin-left: .8em;    /* these margins depend on the .photo-container width in @media */
  margin-right: .8em;
}

.photo-overlay h2 {
  text-transform:uppercase;
  font-size: 1.5em;
  line-height: .4;
}
.photo-overlay p {
  font-size: .9375em;
  margin: 0 0 1.5em;
  line-height: 1.4;
}

.button {
  display: block;
  width: 70%;
  margin: auto;
  text-decoration: none;
  color: #4a89ca;
  text-transform:uppercase;
  font-weight: 700;
  border: 2px solid #4a89ca;
  padding: .4em 0;
  border-radius: .5em;
}

/* -- Row 2 Styles --------- */
.photo {
  position: relative;
  line-height: 0;
  overflow: hidden;
  margin-bottom: 2.5em;
}
.photo-overlay {
  color: #fff;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding-left: 1.2em;
  padding-right: 1.2em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0, .5);
}
.photo-overlay h2 {
  margin-top: 0;
}

/* -- Row 3 Styles --------- */
.slide .button {
  background: rgba(74,137,202, .8);
  color: #fff;
  margin: 0;
  padding: 1.2em 2em;
}
.slide .photo-overlay {
  opacity: 1;
  background: #345d88;
}



/* -- Row 3 --------- */
.slide .photo-overlay,
.slide img {
  transition: transform .6s ease-out;
}
.slide .photo-overlay {
  transform: translateX(-100%);    /* this hides our overlay to the left */
}
.slide:hover .photo-overlay {
  transform: translateX(0);
}
.slide:hover img {
  transform: translateX(100%);    /* this takes the image to the right */
}



/* =================================
  Media Queries
==================================== */
@media (min-width: 0) and (max-width: 768px) {
.container {
  padding: 0 1.225em 2.5em;
}
}

@media (min-width: 1024px) {
.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.photo-container {
  margin-bottom: 3em;
  text-align: center;
  width: 25%;  
  flex-grow: 1;
}
}


@media (min-width: 1600px) {
.photo-container {
  margin-bottom: 4em;
  width: 30%;
}
.gallery h2 {
  line-height: 1;
}
}

/* Logo Slider */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-250px * 7));
  }
}
.slider {
  height: 100px;
  margin: auto;
  overflow: hidden;
  position: relative;
  width: auto;
}
.slider .slide-track {
  animation: scroll 40s linear infinite;
  display: flex;
  width: calc(250px * 14);
}
.slider .slide {
  height: 100px;
  width: 250px;
}