.gallery > h3 {
  margin-block: 0 1.5rem;
}

.breadcrumb {
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.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 h2 {
    margin-block: 0 1.5rem;
  }

  .project-content h3 {
    margin-block: 2rem 0.75rem;
  }

  .project-content p {
    line-height: 1.6;
    margin-block: 0.75rem;
  }

  .project-content ul,
  .project-content ol {
    padding-left: 0;
    list-style-position: inside;
    margin-block: 0.5rem 1.5rem;
    line-height: 1.6;
  }

  .project-content li {
    margin-block: 0;
  }

  .project-content h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
  }

  .project-gallery {
    margin-block: 0 3rem;
  }

  .project-gallery h2 {
    margin-bottom: 1.5rem;
  }

  .gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  @media (max-width: 700px) {
    .gallery-grid {
      grid-template-columns: repeat(2, 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-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 90vw;
  }

  .lightbox img {
    max-width: 70vw;
    max-height: 70vh;
    border-radius: 0.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  }

  .lightbox-caption {
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.85;
    max-width: 60ch;
    margin: 0;
    padding: 0;
  }
  
  .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: 80vw;
  max-height: 70vh;
  border-radius: 0.5rem;
}
