body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #08012e;
}

.heading {
  text-align: center;
  margin-bottom: 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: rgb(228, 205, 3);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px hwb(0 96% 3% / 0.938);
  text-align: center;
}

.card img {
  width: 100%;
  border-radius: 10px;
}

.card h3 {
  margin: 10px 0 5px;
}

.card p {
  font-weight: bold;
  margin-bottom: 10px;
}

.card button {
  padding: 8px 12px;
  border: none;
  background: #08012e;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.card button:hover {
  background: #d69303;
}

/* Modal Background */
.modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(192, 225, 233, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

/* Modal Box */
.modal-box {
  background: rgb(228, 205, 3);
  width: 90%;
  max-width: 400px;
  padding: 15px;
  border-radius: 10px;
  position: relative;
  text-align: center;
}

.modal-box img {
  width: 100%;
  border-radius: 10px;
}

.close-btn {
  position: absolute;
  right: 12px;
  top: 10px;
  cursor: pointer;
  font-size: 22px;
  font-weight: bold;
}

/* Tablet: 2 per row */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 per row */
@media (max-width: 500px) {
  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Card hover lift */
#gallery .card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

/* Image styling + transition */
#gallery .card img {
  display: block;
  width: 100%;
  height: 180px;              /* change as needed */
  object-fit: cover;
  border-radius: 10px;
  transition: transform var(--trans), filter var(--trans), box-shadow var(--trans);
  will-change: transform;
  transform-origin: center center;
  backface-visibility: hidden;
}

/* Image hover effect */
#gallery .card:hover img {
  transform: scale(1.08) rotate(-0.5deg);
  filter: contrast(1.03) saturate(1.06) brightness(0.98);
  box-shadow: 0 12px 30px #f5f5f7e8;
}

/* Title and location subtle motion and color on hover */
#gallery .card h3 {
  margin: 6px 0 2px;
  font-size: 1.05rem;
  transition: transform 280ms ease, color 280ms ease;
  color: hsl(225, 17%, 91%);
  transform-origin: center;
}

#gallery .card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  transition: transform 280ms ease, color 280ms ease;
}

/* Move text slightly on hover to feel lively */
#gallery .card:hover h3 {
  transform: translateY(-6px);
  color: var(--accent);
}
#gallery .card:hover p {
  transform: translateY(-4px);
  color: #374151;
}


#gallery .card:hover button {
  transform: translateY(-6px) scale(1.02);
}

/* Modal image nice hover zoom */
.modal-bg .modal-box img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform var(--trans), filter var(--trans);
}
.modal-bg .modal-box img:hover {
  transform: scale(1.02);
  filter: saturate(1.05) brightness(1.02);
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root { --trans: 0ms; }
  * { transition: none !important; animation: none !important; }
}