body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', Helvetica, sans-serif;
  background: white;
  color: #222;
  overflow-x: hidden;
  text-align: center;
}

.title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  font-family: 'Open Sans', Helvetica, sans-serif;
  color: black;
  margin-top:0px;
  margin-bottom:.4rem;
}

.subtitle {
  font-style: italic;
  color: black;
  margin-bottom: 2.4rem;
}

.grid-gallery {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 10px;
}

/* .grid-gallery h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 20px;
} */

.title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  font-family: 'Open Sans', Helvetica, sans-serif;
  color: black;
  margin-top:0px;
  margin-bottom:.4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px; /* Set row height */
  gap: 0.75rem;
}

.grid-item {
  overflow: hidden;
  border-radius: 6px;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.grid-item img:hover {
  transform: scale(1.03);
}

.gallery-footer {
  text-align: center;
  margin-top: 2rem;
}

.gallery-button {
  font-family: 'Open Sans', Helvetica, sans-serif;
  font-size:1rem;
  display: inline-block;
  padding: 12px 28px;
  background-color: #c9282d;
  color: white;
  text-decoration: none;
  /* font-weight: 600; */
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.gallery-button:hover {
    background-color: rgb(142, 27, 30);
}


/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
}

.close-btn {
  position: absolute;
  top: 20px;
  left: 30px;       /* 👈 moved from right to left */
  right: auto;      /* reset any previous right positioning */
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Responsive fallback */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* WORKING WORKING WORKING */
/* Small Devices - Phones (Portrait) */ /* Small phones (e.g. iPhone 13 Mini) */
@media only screen and (max-width: 479px) {

  .title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: black;
  margin-top:6px;
  margin-bottom:.4rem;
}

}

/* Medium Devices - Phones (iPad Mini portrait mode) */   /* Larger phones (e.g. iPhone Pro Max) */
@media only screen and (min-width: 480px) and (max-width: 767px) {

}

/* WORKING WORKING WORKING */
/* Some Tablets and Narrow Windows (Ipad Air 10.9" portrait, Chrome Browser, etc.) */ 
@media only screen and (min-width: 768px) and (max-width: 991px) {

}

/* WORKING WORKING WORKING */
/* Medium Tablets (like iPad Air 10.9" and iPad Mini landscape modes) */
@media only screen and (min-width: 992px) and (max-width: 1199px) {

  .grid-gallery {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 10px;
}

}

/* Large Tablets / Small Laptops (iPad Pro 12.9″, Surface Go, etc.) */
/* @media only screen and (min-width: 1200px) and (max-width: 1439px) {

} */


/* Small devices: mobile phones */
/* @media (max-width: 599px) {

} */

/* Hide mobile-only gallery on desktop */
.mobile-only {
  display: none;
}

/* Mobile view */
@media only screen and (max-width: 600px) {
  .mobile-only {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: calc(1140px / 10); /* adjust number of images to fill 1140px */
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .mobile-only .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}




/* Hide mobile-only gallery on desktop */
.mobile-only {
  display: none;
}

/* Mobile view: phones */
@media only screen and (max-width: 600px) {

  /* Original and duplicate grid layout */
  .gallery-grid,
  .mobile-only {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* same as desktop */
    grid-auto-rows: 114px;                /* adjust row height */
    gap: 0.75rem;
    width: 100%;
    height: auto;                         /* remove fixed 1140px height */
    margin-top: 0.5rem;
  }

  .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-only {
    display: grid;
  }

  .title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
}
