/*
* CSS for Gallery
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
}

a,
a:link,
a:hover,
a:focus {
    text-decoration: none;
    color: #000;
}

.gallery-table {
  display: flex;
  display: -ms-flexbox;
  flex-wrap: wrap;
  -ms-flex-wrap: wrap;
}

.gallery-column {
  -ms-flex: 25%; 
  flex: 25%;
  max-width: 25%;
  padding: 0 4px;
}

.gallery-item {
  width: 100%;
  margin-top: 8px;
  vertical-align: middle;
  position: relative;
}

.gallery-item .item-rating {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(to top, transparent 0%, white 100%);
  z-index: 2;
  padding: 10px;
  width: 100%;
  text-align: right;
}

.item-rating object {
  width: 100px;
  height: 25px;
}

.gallery-item > a > figure {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-item > a > img {
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    width: 100%;
}

.gallery-item > a > figure > img {
    transition: all 0.3s;
}

/* .gallery-item > a > figure > img:hover {
    transform: scale(1.1);
} */

a:hover > figure > img {
  transform: scale(1.1);
}

.gallery-item a:link {
    overflow: hidden;
}

.gallery-item figcaption {
    visibility: hidden;
    width: 100%;
    font-size: 16px;
    background: linear-gradient(to bottom, transparent 0%, black 100%);
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 25px 15px 15px;
    transition: all 0.3s;
}

a:hover figcaption {
    visibility: visible;
}

/** 
* Modal style
**/
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  }
  
  /* Modal Content/Box */
  .modal-content {
    background-color: rgba(254,254,254,0.8);
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
  }

  .modal-body {
    margin-top: 42px;
    width: 100%;
    text-align: center;
    color: #000;
  }

  .modal-body img {
    max-width: 80%;
    max-height: 70vh;
  }

  .rating-block {
    width: 145px;
    margin: 0 auto;
    padding: 10px 0;
  }
  
  /* The Close Button */
  .close {
    display: block;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }


/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 800px) {
    .gallery-column {
      -ms-flex: 50%;
      flex: 50%;
      max-width: 50%;
    }

    .modal-content {
      width: 80%;
    }
    
  }
  
  /* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
  @media screen and (max-width: 600px) {
    .gallery-column {
      -ms-flex: 50%;
      flex: 100%;
      max-width: 100%;
    }

    .modal-content {
        width: 90%;
    }
  }

/* Larger */
@media screen and (min-width: 1025px) {

/*     .gallery-main {
        width: 80%;
        max-width: 1025px;
    } */
    
/*     .gallery-content {
        width: 100%;
    }
    
    .gallery-item {
        border: 1px solid black;
        width: 250px;
        height: 200px;
        display: inline-block
    } */

}

/* Inter 2 cols */
@media screen and (min-width: 769px) and (max-width: 1024px) {

/*     .gallery-main {
        border: 3px solid black;
        width: 80%;
    } */

/*     .gallery-item {
        width: 49%;
        height: 200px;
        display: inline-block
    } */

}

/* 1 cols */
@media screen and (max-width: 768px) {

/*     .gallery-main {
        border: 1px solid black;
        width: 90%;
    } */

/*     .gallery-item {
        display: block;
        width: 100%;
        height: 300px;
    } */

}

