html {
	box-sizing: border-box;
}

*,
*:before,
*:after {
	box-sizing: inherit;
}

body {
  background: #F2F2F5;
  color: #507AF8;
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  counter-reset: project; /*for number counter - descending*/
}

img {
	max-width: 100%;
	height: auto;
}

.wrap {
  margin: 0 auto;
  max-width: 1000px;
  width: 100%;
}

h1, h2, h3 {
  font-family: monospace;
}

h1 {
  text-align: center;
  margin: 50px 0;
}

/* --------- COUNTER --------- */

.text::before{
  counter-increment: project; /* Decrement the value of project counter by 1 */
  content: "(" counter(project) ")";
  background-color: #507AF8;
  color:#f2f2f5;
  font-size: 0.6rem;
  position: absolute;
  left:0;
  top:0;
}*/

/* --------- GALLERY --------- */

.gallery-wrap,
#gallery {
  overflow: hidden;
}

#gallery {
  margin: 1%;
  margin-top: 80px;
}

/* --------- FILTERS --------- */
#filterTop, #filterBottom {
	margin: 1%;
	padding: 0;
	list-style: none;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  z-index: 999;
}

#filterTop, #gradientTop{
  position: fixed;
  top: 10px;
  left: 0;
  width: 100vw;
}

#filterBottom, #gradientBottom{
    position: fixed;
    bottom: 10px;
    left: 0;
    width: 100vw;
}

#gradientTop{
    top: 0;
    height: 100px;
    padding: 0;
    margin: 0;
    background: linear-gradient(0deg,rgba(242, 242, 245, 0) 0%, rgba(242, 242, 245, 1) 43%);
    z-index: 990;
}

#gradientBottom{
    bottom: 0;
    height: 100px;
    padding: 0;
    margin: 0;
    background: linear-gradient(0deg,rgba(242, 242, 245, 1) 54%, rgba(242, 242, 245, 0) 100%);
    z-index: 990;
}

#filterTop li , #filterBottom li{
  float: left;
}

#filterTop li span , #filterBottom li span, #filterBottom li span a{
  display: block;
  padding: 5px 20px;
  text-decoration: none;
  color: #507AF8;
  cursor: pointer;
  text-transform: lowercase;
  transition: all ease-in-out 0.25s;
}

#filterTop li:hover span, #filterBottom li:hover span, #filterBottom li:hover a{
  color: hotpink;
  filter: blur(2px);
}

#filterTop li span.active, #filterBottom li span.active {
  background: #507AF8;
  color:#fff;
}

a:hover{
  color: hotpink;
  cursor: pointer;
}


/* --------- GALLERY ITEM --------- */

.gallery-item {
  float: left;
  width: 25%;
  padding: 5px;
  position: relative;
  z-index: 10;
  display: none;
}

.inside {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.details, 
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  opacity: 0;
}

.details {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-left: 25px;
  padding-right: 25px;
  padding-bottom: 15px;
  z-index: 2;
  transition: all 0.2s ease-in-out;
  overflow: scroll;
  scrollbar-color: #507AF8 white;
  scrollbar-width: thin;
  h2 {
    color: #507AF8;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
  }
  p {
    color: #507AF8;
    text-align: left;
    font-size: 0.8em;
    line-height: 1.2;
    margin: 0;
    text-transform: lowercase;
    padding-top: 15px;
  }
  .type{
    margin:0;
    padding-top: 10px;
    color: rgb(154, 160, 171);
    font-family: sans-serif;
  }
  .year {
    margin:0;
    padding:0;
    color: rgb(154, 160, 171);
    font-family: sans-serif;
  }
}

.inside img {
  float: left;
  width: 100%;
}

.overlay {
  background: rgba(242, 242, 245, 1);
  z-index: 1;
  transition: all 0.3s ease-in-out;
  filter: blur(5px);
}

.gallery-item:hover .details,
.gallery-item:hover .overlay {
  opacity: 1;
}

@media (max-width: 30em) {
  .wrap {
    padding-left: 1em;
    padding-right: 1em;
  }
  
  .gallery-item {
    float: none;
    width: 100%;
  }
}
