* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
h1 {
  font-size: 40px;
  font-family: sans-serif;
  text-align: center;
}
h2 {
  font-size: 30px;
  font-family: sans-serif;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}
.container {
  width: 85%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 10px;
  margin: auto;
  padding: 20px;
  border: 3px solid red;
  margin-bottom: 50px;
  /* margin-top: 20px; */
}
.grid-image {
  border: 2px solid black;
  background-size: cover;
   border-radius: 10px;
}
.wide {
  grid-column: span 2;
}
.tall {
  grid-row: span 2;
}

.grid-image:nth-child(1) {
  background-image: url(../assets/images/cat-1.jpg);
}
.grid-image:nth-child(2) {
  background-image: url(../assets/images/Dog-2.jpg);
}
.grid-image:nth-child(9) {
  background-image: url(../assets/images/Nature-9.jpg);
}
.grid-image:nth-child(3) {
  background-image: url(../assets/images/Girl-3.jpg);
}
.grid-image:nth-child(4) {
  background-image: url(../assets/images/Flower-4.jpg);
}
.grid-image:nth-child(5) {
  background-image: url(../assets/images/Girl-5.jpg);
}
.grid-image:nth-child(6) {
  background-image: url(../assets/images/Flowers-6.jpg);
}
.grid-image:nth-child(7) {
  background-image: url(../assets/images/Dog-7.jpg);
}
.grid-image:nth-child(8) {
  background-image: url(../assets/images/Flowers-8.jpg);
}
.grid-image:nth-child(10) {
  background-image: url(../assets/images/cat-10.jpg);
}
.grid-image:nth-child(11) {
  background-image: url(../assets/images/Girl-11.jpg);
}
.grid-image:nth-child(12) {
  background-image: url(../assets/images/Nature-12.jpg);
}
.grid-image:nth-child(13) {
  background-image: url(../assets/images/Nature-13.jpg);
}
.grid-image:nth-child(14) {
  background-image: url(../assets/images/Nature-14.jpg);
}
.grid-image:nth-child(15) {
  background-image: url(../assets/images/Flower-15.jpg);
}
.grid-image:nth-child(16) {
  background-image: url(../assets/images/cat-16.jpg);
}
.grid-image:nth-child(17) {
  background-image: url(../assets/images/Boy-17.jpg);
}
.grid-image:nth-child(18) {
  background-image: url(../assets/images/Dog-18.jpg);
}
.grid-image:nth-child(19) {
  background-image: url(../assets/images/House-19.jpg);
}
.grid-image:nth-child(20) {
  background-image: url(../assets/images/Flower-20.jpg);
}
.grid-image:nth-child(21) {
  background-image: url(../assets/images/Study-21.jpg);
}

@media (max-width: 800px) {
  .container {
    grid-template-columns: repeat(4, 1fr);
    background-size: cover;
  }
  .wide {
    grid-column: span 2;
  }
}
@media (max-width: 600px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
    background-size: cover;
  }
  .wide {
    grid-column: span 1;
  }
  .tall {
    grid-row: span 1;
  }
}
@media (max-width: 500px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
    background-size: cover;
  }
  .wide {
    grid-column: span 1;
  }
  .tall {
    grid-row: span 1;
  }
}
@media (max-width: 350px) {
  .container {
    grid-template-columns: repeat(1, 1fr);
    background-size: cover;
  }
  .wide {
    grid-column: span 1;
  }
  .tall {
    grid-row: span 1;
  }
}

/* Curve Image Grid Gallery */
.collage {
  border: 3px solid red;
  padding: 20px;
  width: 85%;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  grid-template-areas:
    "..   two two    two    three  four ..    .."
    "one  two two    two    five   five six   .."
    "..   two two    two    five   five seven eight"
    "nine ten eleven eleven twelve ..   ..    .."
    "..   ..  eleven eleven ..     ..   ..    ..";
}

.collage > div {
  overflow: hidden;
  border-radius: 0.5rem;
 
}

.collage img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid black;
  border-radius: 10px;
}

.collage :nth-child(1) {
  grid-area: one;
}

.collage :nth-child(2) {
  grid-area: two;
}

.collage :nth-child(3) {
  grid-area: three;
}

.collage :nth-child(4) {
  grid-area: four;
  background-color: #ffecc3;
  border-bottom-right-radius: 100%;
}

.collage :nth-child(5) {
  grid-area: five;
}

.collage :nth-child(6) {
  grid-area: six;
  background-color: #ccf0ee;
  border-top-right-radius: 100%;
}

.collage :nth-child(7) {
  grid-area: seven;
}

.collage :nth-child(8) {
  grid-area: eight;
  background-color: #cdd7f0;
  border-radius: 100%;
}

.collage :nth-child(9) {
  grid-area: nine;
  background-color: #ffdce0;
  border-top-left-radius: 100%;
}

.collage :nth-child(10) {
  grid-area: ten;
}

.collage :nth-child(11) {
  grid-area: eleven;
}

.collage :nth-child(12) {
  grid-area: twelve;
}

/* Spannig image gallery */
.spanning-image {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 10px;
  align-items: start;
  justify-items: center;
  margin: auto;
  width: 85%;
  border: 3px solid red;
  padding: 20px;
}
.spanning-image img {
  border: 2px solid black;
  width: 100%;
   border-radius: 10px;
}
.spanning-image img:nth-child(6) {
  grid-column: span 5;
}


/* Row and Col spa imag gallery */
.Row-Col-span {
  width: 85%;
  border: 3px solid red;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px;
  gap: 20px;
}
.Row-Col-span img {
  width: 100%;
  border: 2px solid black;
   border-radius: 10px;
}
.Row-Col-span img:nth-child(3) {
   grid-column: span 2;
    grid-row: span 2;  
}
.Row-Col-span img:nth-child(6) {
   grid-column: span 2;
    grid-row: span 2; 
}
.Row-Col-span img:nth-child(12) {
   grid-column: span 2;
    grid-row: span 2;  
}
.Row-Col-span img:nth-child(16) {
   grid-column: span 2;
    grid-row: span 2;  
}
