.gallery-grid-pattern {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  grid-auto-rows: 80px;
  /* grid-auto-rows: repeat(auto-fit, minmax(200px, 1fr)); */
  align-content: flex-start;
  justify-content: center;
  align-items: flex-start;
  justify-items: center;
}

.card {
  /* background-color: rgb(51, 66, 66); */
  background: none;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: rgb(130, 130, 130);
  /* width: 100%;
  height: 100%; */
  width: fit-content;
  height: fit-content;
  /* max-height: 100%; */
  /* change height and width to fit-content using images */
  /* max-width: 100%; */
  /* border-radius: 4px; */
  transition: all 500ms;
  overflow: show;
  /* background-size: contain;  */
  /* used to be: cover */
  margin: 0.2rem;
  padding: 0.5rem;
  text-align: center;
  justify-self: center;
  align-self: center;
  justify-content: center;
}

.buttonzoomimage {
  background-color: none;
  width: 100%;
  cursor: zoom-in;
  cursor: -moz-zoom-in;
  /* max-height: 500px; */
}

.buttonzoomcaption {
  display: none;
  font-size: 0.9rem;
  text-align: center;
  align-self: center;
  background-color: rgb(40, 40, 40);
  margin: 0 0 3rem 0;
  padding: 0.5rem;
  width: fit-content;
  cursor: text;
}

.card img {
  width: auto;
  height: auto;
}

.card p {
  /* color: transparent; */
  display: none;
  font-size: 0.9rem;
  text-align: center;
  align-self: center;
  background-color: rgb(40, 40, 40);
  margin-top: 1rem;
  padding: 0.5rem;
  width: fit-content;
  cursor: text;
}

.card:hover p {
  display: block;
}

.card:hover {
  transform: translateY(-3px) scale(1.15);
  padding: 0;
  z-index: 2;
  justify-self: start;
  align-self: start;
}

/* ======= MEDIA QUERIES ======= ======= MEDIA QUERIES =======  */
/* For extremely small screen devices (480px and below) PORTRAIT TINY */
@media only screen and (max-width: 480px) {
  .gallery-grid-pattern {
    gap: 0.5rem;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .card {
    justify-self: center;
    align-self: center;
    width: fit-content;
  }

  /* .buttonzoomimage {
    justify-content: center;
    align-content: center;
  } */

  .buttonzoomimage {
    /* max-height: 500px; */
  }

  .buttonzoomcaption {
    display: block;
    background: none;
  }

  .buttonzoomcaption p {
    font-size: 0.96rem;
    color: hsl(0, 0%, 18%);
  }

  .darkmode .buttonzoomcaption p {
    color: hsl(48, 3%, 70%);
  }

  .buttonzoomimage img {
    max-height: 500px;
  }

  .card:hover p {
    display: none;
  }

  .card:hover {
    transform: translateY(0) scale(1.1);
    padding: 0;
    margin: 0 0 2rem 0;
    z-index: 2;
    justify-self: center;
    align-self: center;
  }
}

/* For extremely small screen devices (481px and above) PORTRAIT PHONE */
@media only screen and (min-width: 481px) {
  .gallery-grid-pattern {
    gap: 0.5rem;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .card {
    justify-self: center;
    align-self: center;
    width: fit-content;
  }

  /* .buttonzoomimage {
    justify-content: center;
    align-content: center;
  } */

  .buttonzoomimage {
    /* max-height: 500px; */
  }

  .buttonzoomcaption {
    display: block;
    background: none;
  }

  .buttonzoomcaption p {
    font-size: 0.96rem;
  }

  .buttonzoomimage img {
    /* max-height: 500px; */
  }

  .card:hover p {
    display: none;
  }

  .card:hover {
    transform: translateY(0) scale(1.1);
    padding: 0;
    margin: 0 0 2rem 0;
    z-index: 2;
    justify-self: center;
    align-self: center;
  }
}

/* Small screen devices (600px and above) PORTRAIT TABLET */
@media only screen and (min-width: 600px) {
  .gallery-grid-pattern {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    grid-auto-rows: auto;
    /* grid-auto-rows: repeat(auto-fit, minmax(200px, 1fr)); */
    align-content: flex-start;
    justify-content: center;
    align-items: flex-start;
    justify-items: center;
  }

  .card p {
    display: none;
  }
  .card:hover p {
    /* display: none; */
    display: block;
  }

  .buttonzoomcaption {
    display: none;
    /* display: block; */
  }

  .card:hover .buttonzoomcaption p {
    /* display: none; */
    display: block;
  }
}

/* Medium screen devices (768px and above) LANDSCAPE TABLET  */
@media only screen and (min-width: 768px) {
  .gallery-grid-pattern {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    grid-auto-rows: 50px;
    /* grid-auto-rows: repeat(auto-fit, minmax(200px, 1fr)); */
    align-content: flex-start;
    justify-content: center;
    align-items: flex-start;
    justify-items: center;
  }
}

/* Big screen devices (1024px and above) LANDSCAPE LAPTOP */
@media only screen and (min-width: 1024px) {
  .gallery-grid-pattern {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    grid-auto-rows: 80px;
    /* grid-auto-rows: repeat(auto-fit, minmax(200px, 1fr)); */
    align-content: flex-start;
    justify-content: center;
    align-items: flex-start;
    justify-items: center;
  }
}

/* Extra big screen devices (1201px and above) LANDSCAPE TV */
@media only screen and (min-width: 1201px) {
  .gallery-grid-pattern {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    grid-auto-rows: 80px;
    /* grid-auto-rows: repeat(auto-fit, minmax(200px, 1fr)); */
    align-content: flex-start;
    justify-content: center;
    align-items: flex-start;
    justify-items: center;
  }
}

/* ======= MEDIA QUERIES ======= ======= MEDIA QUERIES =======  */

@media screen and (min-width: 600px) {
  .card-tall-2 {
    grid-row: span 2 / auto;
  }

  .card-tall-3 {
    grid-row: span 3 / auto;
  }

  .card-tall-4 {
    grid-row: span 4 / auto;
  }

  .card-tall-5 {
    grid-row: span 5 / auto;
  }

  .card-tall-6 {
    grid-row: span 6 / auto;
  }

  .card-tall-7 {
    grid-row: span 7 / auto;
  }

  .card-tall-8 {
    grid-row: span 8 / auto;
  }

  .card-tall-9 {
    grid-row: span 9 / auto;
  }

  .card-tall-10 {
    grid-row: span 10 / auto;
  }

  .card-wide-2 {
    grid-column: span 2 / auto;
  }

  .card-wide-3 {
    grid-column: span 3 / auto;
  }

  .card-wide-4 {
    grid-column: span 4 / auto;
  }

  .card-wide-5 {
    grid-column: span 5 / auto;
  }

  .card-wide-6 {
    grid-column: span 6 / auto;
  }

  .card-wide-7 {
    grid-column: span 7 / auto;
  }

  .card-wide-8 {
    grid-column: span 8 / auto;
  }

  .card-wide-9 {
    grid-column: span 9 / auto;
  }

  .card-wide-10 {
    grid-column: span 10 / auto;
  }
}
