body {
    background-color: black;
    color:#fff;
    font-family: Arial;
    text-align: center;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
  }
  
  li {
    float: left;
  }
  
  li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
  }
  
  /* Change the link color to #111 (black) on hover */
  li a:hover {
    background-color: #111;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  *:before, *:after {
    box-sizing: border-box;
  }
  
  img {
    max-width: 100%;
    display: block;
  }
  
  .grid {
    margin: 2rem auto;
  }
  
  .grid__container {
    display: grid;
    background-color: #000;
    border: 1px solid #000;
    grid-gap: 1px;
    justify-self: center; 
    max-width: 292px;
    height: auto;
    margin: 0 auto;
  }
  
  .grid__item {
    position: relative;
    text-align: center;
    background-color: #fff;
  }
  
  .grid__item:hover {
    background-color: #ff4b4c;
  }
  
  .grid__item:hover .grid__img::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 75, 76, 0.5);
  }
  
  .grid__item:hover .grid__img::after {
    content: '';
    display: block;
    position: absolute;
    border: 1px solid #ff4b4c;
    left: -11px;
    right: -11px;
    bottom: -11px;
    top: -11px;
  }
  
  .grid__img {
    position: relative;
    pointer-events: none;
    border: 10px solid #fff;
  }
  
  @media only screen and (min-width: 768px) {
    .grid__container {
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(4, 1fr);
      max-width: 583px;
    }
  }
  
  @media only screen and (min-width: 1024px) {
    
    .grid__container {
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: repeat(2, 1fr);
      max-width: 1165px;
    }
  }