/* Gallery Grid */
/* Container */
.cgl-gallery{
  --cgl-col: 4;
  --cgl-gap: 0px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;   /* ✅ centers all the items */
  gap: var(--cgl-gap);
  margin: 0 auto;
  max-width:1600px;         /* you already had this, keep or adjust */
  width:100%;
}

.cgl-item{
  flex: 0 0 calc((100% - (var(--cgl-col) - 1) * var(--cgl-gap)) / var(--cgl-col));
  height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
	padding: 5px;
}


.cgl-item img.cgl-thumb{
  width:100%;
  height: 160px;
  object-fit:contain;      /* no crop */
  object-position:center;
  display:block;
  margin:0 !important;
	cursor: pointer;
}

/* MOBILE FIX: prevent 100% stretched items */
@media (max-width: 700px) {
  .cgl-gallery {
    justify-content: center;   /* ✅ keep thumbs centered */
  }
  .cgl-item {
    flex: 0 0 auto !important; /* ✅ natural width only */
	margin-bottom: 10px
  }
	.cgl-item:last-child {
		margin-bottom: 0px
	}
  .cgl-item img.cgl-thumb {
    /*height: 130px;             /* ✅ optional: smaller mobile height */
    width: auto;
  }
}



.cgl-item img.cgl-thumb:hover { box-shadow: 0 4px 7px rgba(0,0,0,0.3); transform: scale(1.02); } .cgl-item img.cgl-thumb { transition: all 0.2s ease-out; } .cgl-alt-title { display: block; font-weight: 400; font-style:italic; font-size: 14px; font-family: 'MinionProRegular'; } /* Lightbox */ #cgl-lightbox{ position:fixed; inset:0; background: white; display:none; align-items:center; justify-content:center; z-index:999999; } #cgl-lightbox.open{ display:flex; } .cgl-stage{ position:relative; width:100vw; height:100vh; display:flex; align-items:center; justify-content:center; } .cgl-media{ max-width: 1000px; max-height: 70vh; border: none; } #cgl-close{ position:absolute; top: 0; right: 20px; font-size:28px; color:#fff; cursor:pointer; user-select:none; } #cgl-close:before { content: "\f00d"; font-family: FontAwesome; color: black; font-size: 25px; margin-top: 6px; display: block; } .cgl-nav{ position:absolute; top:50%; transform:translateY(-50%); font-size:40px; color:#fff; cursor:pointer; user-select:none; padding:8px 14px; } #cgl-prev{ left:40px; } #cgl-next{ right:40px; } #cgl-next::before { content: "\f105"; font-family: FontAwesome; color: black; font-size: 30px; display: block; } #cgl-prev::before { content: "\f104"; font-family: FontAwesome; color: black; font-size: 30px; display: block; } .cgl-caption{ position:absolute; right:53px; bottom:5em; max-width:50vw; color:#000; font-size:11px; line-height:1.4; text-align:right; opacity:1; font-family: 'MinionProRegular'; } .cgl-caption p{ margin:0; } .cgl-hidden{ display:none !important; } /* Loader animation */ #cgl-loader { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 4px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: cgl-spin 0.8s linear infinite; display: none; z-index: 10; } @keyframes cgl-spin { to { transform: rotate(360deg); } }