.message {
  border: 1px solid #d2d0d0;
  padding: 2em;
  box-shadow: -2px 2px 10px 0px rgba(#444, 0.4);
}

@supports(display: grid) {
    .message {
        display: none;
    }
}

.gallery {
    display: none;
    padding: 2rem;
}

@media screen and (min-width: 768px) {
    .gallery{
        padding: 4rem;
    }
}
    
@supports(display: grid) {
    .gallery{
        display: block;
    }
}

h1 {
    font-size: 2rem;
    margin: 0 0 1.5em;
}

.grid {
    display: grid;
    grid-gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 150px;
    grid-auto-flow: row dense;
}

.item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    background: #0c9a9a;
    background-repeat: no-repeat;
    color: #fff;
    grid-column-start: auto;
    grid-row-start: auto;
    color: #fff;
    background-size: contain; 
    background-position: center;
    box-shadow: -2px 2px 10px 0px rgba(#444, 0.4);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
    counter-increment: item-counter;
}
  
    .item:after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: black;
        opacity: 0.3;
        transition: opacity 0.3s ease-in-out;
    }
    
    .item:hover {
        transform: scale(1.05);
    }

        .item:hover:after {
            opacity: 0;
        }

.item--medium {
    grid-row-end: span 2;
}

.item--large {
    grid-row-end: span 3;
}

.item--full {
    grid-column-end: auto;
    grid-row-end: span 3;
}

@media screen and (min-width: 768px) {
    .item--full{
        grid-column: 1/-1;
    }
}
  
.item__details {
    position: relative;
    z-index: 1;
    padding: 15px;
    color: #444;
    background: #fff;
    letter-spacing: 1px;
    color: #828282;
}

.item__details:before {
      content: counter(item-counter);
      font-weight: bold;
      font-size: 1.1rem;
      padding-right: 0.5em;
      color: #444;
}


/* Modal */

.img-modal {
    display: none;
    position: fixed;
    z-index: 98;
    padding-top: calc(15vh);
    text-align: center;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
  }

  .img-modal img {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    /* max-height: calc(80vh); */
    /* max-width: 700%; */
  }

  .img-modal div {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
  }

  .img-modal img,
  .img-modal div {
    animation: zoom 0.6s;
  }

  .img-modal span {
    position: fixed;
    top: 80px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
  }

  @media only screen and (max-width: 700px) {
    .img-modal img {
      width: 100%;
    }
  }

  @keyframes zoom {
    0% {
      transform: scale(0);
    }

    100% {
      transform: scale(1);
    }
  }