.project-hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 1rem;
  }
  
  
  .project-content {
    margin-block: 2rem 3rem;
  }
  
  .project-content h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
  }
  
  .project-gallery h2 {
    margin-bottom: 1.5rem;
  }

  .gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  
  .gallery-grid figure {
    aspect-ratio: 3/4; /* or 1 / 1 for squares */
    overflow: hidden;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5; /* fallback background */
  }
  
  .gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crops image neatly */
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .gallery-grid img:hover {
    transform: scale(1.05);
  }
  
  

  /* Lightbox overlay */
.lightbox {
    display: none; /* hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
  }
  
  .lightbox img {
    max-width: 70%;   /* narrower, leaves breathing room */
    max-height: 70%;  /* shorter, avoids edge-to-edge */
    border-radius: 0.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6); /* optional: softer edges */
  }
  
  .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
  }
  
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
  }
  
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  
  .lightbox-prev:hover,
  .lightbox-next:hover,
  .lightbox-close:hover {
    color: #6d9bcc; /* brand accent */
  }
  
  .lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.85;
    background: rgba(0,0,0,0.5);
    padding: 0.25rem 0.6rem;
    border-radius: 0.4rem;
    pointer-events: none;
  }
  

/* On touch devices (mobile), disable image zoom on hover */
@media (hover: none) {
  .gallery-grid img {
    transform: none !important;
  }

  .gallery-grid img:hover {
    transform: none !important;
  }
}

.lightbox-video {
  display: none;
  max-width: 80%;
  max-height: 80%;
  border-radius: 0.5rem;
}
