
/* ============================================
   gallery-details.css
============================================ */

/* Container grid */
#image-grid {
  display: grid;
  gap: 16px;                    
  grid-template-columns: repeat(3, 1fr); 
  align-items: start;
}

/* Make single item span full width and be visually larger */
#image-grid > .galleryDetails-item:only-child {
  grid-column: 1 / -1;           /* span all columns */
}

/* Make last row items (if less than 3) align left nicely */
#image-grid > .galleryDetails-item {
  display: block;
  width: 100%;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

/* Image container keeps ratio and covers area */
.galleryDetails-image-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f4f6;      
  aspect-ratio: 4 / 3;    
  display: block;
}

/* Image fit */
.gallery-details-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

/* Hover effect */
.galleryDetails-item:hover .gallery-details-image {
  transform: scale(1.05);
  will-change: transform;
}

@media (min-width: 1200px) {
  #image-grid > .galleryDetails-item:only-child .galleryDetails-image-container {
    aspect-ratio: 16 / 9;
    max-height: 60vh; 
  }
}

@media (max-width: 991px) {
  #image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* For single item on medium, make it a bit taller */
  #image-grid > .galleryDetails-item:only-child .galleryDetails-image-container {
    aspect-ratio: 16 / 9;
    max-height: 48vh;
  }
}

/* Small screens: 1 column */
@media (max-width: 576px) {
  #image-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #image-grid > .galleryDetails-item:only-child .galleryDetails-image-container {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
}

.gallery-details-image[onerror] {
  object-fit: contain;
  background: #eee;
}

.galleryDetails-item {
  cursor: pointer;
  outline: none;
}



/* ============================================
   MODAL OVERLAY 
============================================ */

.gd-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  /* same black tint */
  background: rgba(0, 0, 0, 0.78);

  /* new blur effect under tint */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 9999;
}

.gd-modal-overlay.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* container: make it very minimal — no frosted glass, no heavy border */
.gd-modal-content {
  position: relative;
  width: 92vw;
  max-width: 1100px;
  max-height: 85vh;
  background: transparent;            /* removed frosted/bg */
  border-radius: 8px;
  overflow: hidden;
  border: none;                       /* removed visible border */
  box-shadow: none;                   /* removed outer shadow (you had big card shadow) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;                       /* slight spacing so arrows / close don't stick to edges */
}

/* Slide wrapper (for animations) */
.gd-modal-slide {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  box-sizing: border-box;
  pointer-events: none;
}

/* Image box */
.gd-modal-img {
  width: 100%;
  max-height: 74vh;
  height: auto;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
  pointer-events: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6); /* small pop for image only */
}

/* Caption style (kept but will be commented out in HTML) */
.gd-modal-caption {
  margin-top: 10px;
  width: 100%;
  max-width: 96%;
  background: rgba(0,0,0,0.48);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 15px;
  color: #fff;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* Nav buttons — same look, still inside modal */
.gd-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45); /* darker circle so it blends with transparent card */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s ease, background 0.22s ease;
  z-index: 2000;
  pointer-events: auto;
}

.gd-nav-btn:hover { transform: translateY(-50%) scale(1.06); background: rgba(0,0,0,0.6); }

.gd-left { left: 12px; }
.gd-right { right: 12px; }

.gd-nav-btn svg { width: 22px; height: 22px; stroke: #fff; }

/* Close button */
.gd-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 34px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.25s ease;
  z-index: 2001;
}
.gd-modal-close:hover { transform: rotate(90deg); }

/* Anim classes for slide effect */
.gd-modal-slide .anim-img {
  transition: transform 320ms cubic-bezier(.22,.9,.3,1), opacity 240ms ease;
  will-change: transform, opacity;
  opacity: 1;
  transform: translateX(0) scale(1);
}

.gd-modal-slide.slide-in-left .anim-img  { transform: translateX(-18px) scale(1); opacity: 0; }
.gd-modal-slide.slide-in-right .anim-img { transform: translateX(18px)  scale(1); opacity: 0; }
.gd-modal-slide.fade-in .anim-img { opacity: 0; transform: scale(0.98); }

.gd-nav-btn.disabled {
  opacity: 0.28;
  pointer-events: none;
}

/* mobile tweak */
@media (max-width: 768px) {
  .gd-nav-btn { width: 44px; height: 44px; }
  .gd-left { left: 8px; } .gd-right { right: 8px; }
  .gd-modal-content { width: 96vw; padding: 6px; }
  .gd-modal-caption { font-size: 14px; padding: 8px; }
}
