/* ============
  Global Styles 
   ============ */
/* colour pallette */
:root {
  --gbg-color: rgb(102, 102, 102);
  --gfont-color: rgb(255, 255, 255);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 1rem;
}
/* gallery styling */
.container {
  max-width: 100rem;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  /* Compensate for excess margin on outer gallery flex items */
  margin: -1rem -1rem;
}

.gallery-item {
  /* Minimum width of 24rem and grow to fit available space */
  flex: 1 0 24rem;
  /* Margin value should be half of grid-gap value as margins on flex items don't collapse */
  margin: 1rem;
  box-shadow: 0.3rem 0.4rem 0.4rem rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.gallery-image {
  display: block;
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
  transition: transform 400ms ease-out;
}

.gallery-image:hover {
  transform: scale(1.15);
}

@supports (display: grid) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1rem;
  }

  .gallery,
  .gallery-item {
    margin: 0;
  }
  .gallery-item {
    display: grid;
  }
  .gallery-text {
    grid-column-start: 1;
    justify-self: center;
    color: var(--gfont-color);
  }
}
@media only screen and (min-width: 680px){
    .gallery {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      grid-gap: 1rem;
    }
}