/******************************************************
GENERAL STYLES
******************************************************/

* {
  box-sizing: border-box;
}

body {
  background: #efefef;
  font-family: "Nunito", sans-serif;
}

.wrapper {
  width: 400px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 50px;
  background: #fff;
  display: flex;
  flex-direction: column;
}

section {
  display: flex;
  /* gap: 22px; */
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/******************************************************
    HEADER
    ******************************************************/

header {
  width: 100%;
  background: #d8d8d8;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

header ul {
  text-align: center;
  margin: 0;
  padding: 2em 0 1em 0;
}

header ul li {
  display: inline-block;
  list-style-type: none;
}

header ul li a {
  text-decoration: none;
  display: block;
  padding: 10px 20px;
  border-radius: 3px;
  font-family: "Nunito", sans-serif;
  margin-top: 1em;
  background: #fff;
  color: #343333;
  font-weight: bold;
  box-shadow: 2px 2px 10px #888;
}

h3 {
  text-align: center;
  font-family: "Nunito", sans-serif;
  font-size: 1.5em;
  padding-bottom: 30px;
}

/******************************************************
    GALLERY SECTION
    ******************************************************/

.one,
.three {
  width: 100%;
}

.rowOne {
  /* width: 100%; */
  width: 33.333333333%;
  margin: 0;
  vertical-align: bottom;
}

.rowOne img {
  width: 100%;
  display: block;
}

/* .rowOne{
            float: left;
            width: 33.333333333%;
            padding: 3px 6px;
    } */

.up {
  margin-top: 8em;
}

.bigRow {
  width: 100%;
  height: 0px;
  overflow: hidden;
  margin: 15px 0 0 0;
  padding: 0 -6px;
}

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

.picture {
  position: relative;
  overflow: hidden;
}

.overlay {
  color: #343333;
  position: absolute;
  top: 70px;
  /* right: 6px; */
  bottom: 0;
  /* left: 6px; */
  padding-left: 20px;
  padding-right: 20px;

  display: flex; /* For centering text inside .photo-overlay */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 1em;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
}

.picture .overlay {
  transition: transform 1s ease-out;
  transform: translateY(110%);
}

.picture:hover .overlay {
  transform: translateX(0);
}

/******************************************************
    CUBE SECTION
    ******************************************************/

.cContainer {
  background: #fff;
}

.cubeContainer {
  width: 94.999999%;
  max-width: 200px;
  /*text-align: center;*/
  margin: 4em auto 4.5em;
  box-shadow: 0 18px 40px 5px rgba(0, 0, 0, 0.4);
  perspective: 800px;
}

.cube {
  transition: transform 2s ease-in-out;
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  cursor: pointer;
}

.cube:hover {
  transform: rotateY(-270deg);
}

.front,
.back,
.left,
.right {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
}

.front {
  transform: translateZ(-100px);
}

.back {
  transform: translateZ(-100px) rotateY(270deg);
  transform-origin: center left;
}

.left {
  transform: rotateY(-270deg) translateX(100px);
  transform-origin: top right;
}

.right {
  transform: translateZ(100px) rotateY(180deg);
}

/******************************************************
    MEDIA QUERIES
    ******************************************************/

/* @media only screen and (min-width: 320px) {
    .up {
      margin-top: 4em;
    }
    body {
      background: palegreen;
    }
  } */

@media only screen and (min-width: 480px) {
  .wrapper {
    width: 480px;
  }

  .overlay {
    top: 80px;
    font-size: 0.7em;
  }
  header ul li a {
    margin: 0 1em;
  }

  .up {
    margin-top: 0.5em;
  }

  .container {
    padding: 0 10px 10px 10px;
  }

  section {
    gap: 6px;
  }

  .bigRow {
    margin: 5px 0 0 0;
  }
  .cContainer {
    padding-top: 10px;
  }
}

@media only screen and (min-width: 650px) {
  .up {
    margin-top: 0.5em;
  }
  .wrapper {
    width: 620px;
  }
  .overlay {
    top: 70px;
    font-size: 0.85em;
  }

  section {
    gap: 11px;
  }

  .bigRow {
    margin: 10px 0 0 0;
  }
  .container {
    padding: 12px 20px 20px 20px;
  }

  header ul li a {
    margin: 0 2em;
    padding: 1em;
  }
  .cube {
    width: 150px;
    height: 150px;
  }
  .front {
    transform: translateZ(-75px);
  }

  .back {
    transform: translateZ(-75px) rotateY(270deg);
    transform-origin: center left;
  }

  .left {
    transform: rotateY(-270deg) translateX(75px);
    transform-origin: top right;
  }

  .right {
    transform: translateZ(75px) rotateY(180deg);
  }

  .cubeContainer {
    max-width: 150px;
    margin-left: 2.7em;
    float: left;
  }
}
@media only screen and (min-width: 850px) {
  .up {
    margin-top: 0.5em;
  }

  .wrapper {
    width: 800px;
  }
  .overlay {
    top: 130px;
    font-size: 0.95em;
  }

  .bigRow {
    margin: 10px 0 0 0;
  }

  .cube {
    width: 180px;
    height: 180px;
  }
  .front {
    transform: translateZ(-90px);
  }

  .back {
    transform: translateZ(-90px) rotateY(270deg);
    transform-origin: center left;
  }

  .left {
    transform: rotateY(-270deg) translateX(90px);
    transform-origin: top right;
  }

  .right {
    transform: translateZ(90px) rotateY(180deg);
  }

  .cubeContainer {
    max-width: 180px;
    margin-left: 4em;
    float: left;
  }
}

@media only screen and (min-width: 1200px) {
  .up {
    margin-top: 0.5em;
  }
  .wrapper {
    width: 900px;
  }
  .overlay {
    top: 150px;
    font-size: 1em;
  }

  .bigRow {
    margin: 15px 0 0 0;
  }

  .container {
    padding: 30px;
  }
  .cube {
    width: 200px;
    height: 200px;
  }
  section {
    gap: 16px;
  }
  .front {
    transform: translateZ(-100px);
  }

  .back {
    transform: translateZ(-100px) rotateY(270deg);
    transform-origin: center left;
  }

  .left {
    transform: rotateY(-270deg) translateX(100px);
    transform-origin: top right;
  }

  .right {
    transform: translateZ(100px) rotateY(180deg);
  }

  .cubeContainer {
    max-width: 200px;
    margin-left: 4.7em;
    float: left;
  }
}
