/* Clever Gallery. Colors and sizes come from the element's Style settings (CSS variables on .cgal). */
.cgal {
	--cgal-cols-d: 4; --cgal-cols-t: 3; --cgal-cols-p: 2; --cgal-gap: 10px; --cgal-radius: 8px; --cgal-bw: 0px;
	--cgal-border: #dcdcde; --cgal-bg: transparent; --cgal-cap: #50575e; --cgal-cap-size: 14px; --cgal-ratio: 1 / 1;
	--cgal-cols: var(--cgal-cols-d);
	box-sizing: border-box; width: 100%; background: var(--cgal-bg);
}
.cgal.has-bg { padding: var(--cgal-gap); border-radius: calc(var(--cgal-radius) + 4px); }
.cgal *, .cgal *::before, .cgal *::after { box-sizing: border-box; }
@media (max-width: 1024px) { .cgal { --cgal-cols: var(--cgal-cols-t); } }
@media (max-width: 600px)  { .cgal { --cgal-cols: var(--cgal-cols-p); } }

.cgal .cgal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cgal-cols), minmax(0, 1fr)); gap: var(--cgal-gap); }
.cgal .cgal-item { margin: 0; padding: 0; min-width: 0; }
.cgal .cgal-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cgal .cgal-tile {
	display: block; position: relative; overflow: hidden; border-radius: var(--cgal-radius); border: var(--cgal-bw) solid var(--cgal-border);
	background: #eef0f2; aspect-ratio: var(--cgal-ratio); line-height: 0; text-decoration: none; outline: none;
	transition: transform .25s ease, box-shadow .25s ease;
}
.cgal .cgal-tile img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border: 0; border-radius: 0; max-width: none; transition: transform .45s ease, opacity .25s ease, filter .25s ease; }
.cgal a.cgal-tile { cursor: zoom-in; }
.cgal a.cgal-tile:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #2271b1; }
.cgal .cgal-cap { margin: 0; color: var(--cgal-cap); font-size: var(--cgal-cap-size); line-height: 1.45; overflow-wrap: anywhere; }

/* Original shape (Grid) and Masonry: each photo keeps its own shape */
.cgal.cgal-natural .cgal-tile, .cgal.cgal-masonry .cgal-tile { aspect-ratio: auto; }
.cgal.cgal-natural .cgal-tile img, .cgal.cgal-masonry .cgal-tile img { height: auto; }
.cgal.cgal-natural .cgal-grid { align-items: start; }
/* Masonry: rows of 4px; gallery.js sets each photo's span from its shape (order stays left to right) */
.cgal.cgal-masonry .cgal-grid.is-masonry { grid-auto-rows: 4px; row-gap: 0; align-items: start; }
.cgal.cgal-masonry .cgal-grid.is-masonry .cgal-item { padding-bottom: var(--cgal-gap); }

/* Shadows */
.cgal.cgal-shadow-soft .cgal-tile { box-shadow: 0 2px 6px rgba(15,23,42,.10), 0 8px 22px rgba(15,23,42,.08); }
.cgal.cgal-shadow-strong .cgal-tile { box-shadow: 0 6px 14px rgba(15,23,42,.18), 0 18px 40px rgba(15,23,42,.18); }

/* Hover effects (mouse only) */
@media (hover: hover) {
	.cgal.cgal-hover-zoom a.cgal-tile:hover img { transform: scale(1.06); }
	.cgal.cgal-hover-lift a.cgal-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15,23,42,.22); }
	.cgal.cgal-hover-fade a.cgal-tile:hover img { opacity: .78; }
}
@media (prefers-reduced-motion: reduce) { .cgal .cgal-tile, .cgal .cgal-tile img { transition: none !important; } }

/* Editor note when there are no photos yet */
.cgal.cgal-empty-note { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: #50575e; background: #f6f7f7; border: 2px dashed #c3c4c7; border-radius: 10px; }
.cgal.cgal-empty-note .dashicons { font-size: 34px; width: 34px; height: 34px; color: #2271b1; }
.cgal.cgal-empty-note p { margin: 0; max-width: 420px; }

/* Full-screen view */
html.cgal-lock, html.cgal-lock body { overflow: hidden !important; }
.cgal-lb { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; background: #0b0d11; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; opacity: 0; transition: opacity .2s ease; touch-action: none; }
.cgal-lb.is-on { opacity: 1; }
.cgal-lb[hidden] { display: none; }
.cgal-lb-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; gap: 10px; flex: 0 0 auto; }
.cgal-lb-count { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .85; padding-left: 6px; }
.cgal-lb button { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .15s ease; box-shadow: none; }
.cgal-lb button:hover { background: rgba(255,255,255,.24); }
.cgal-lb button:focus-visible { outline: 2px solid #72aee6; outline-offset: 2px; }
.cgal-lb button svg { width: 24px; height: 24px; display: block; }
.cgal-lb-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 64px; overflow: hidden; }
.cgal-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; transition: transform .25s ease, opacity .2s ease; border-radius: 4px; }
.cgal-lb-img.is-loading { opacity: .35; }
.cgal-lb-prev, .cgal-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.cgal-lb .cgal-lb-prev { left: 10px; }
.cgal-lb .cgal-lb-next { right: 10px; }
.cgal-lb-cap { flex: 0 0 auto; min-height: 20px; margin: 0; padding: 12px 18px 18px; text-align: center; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.92); }
.cgal-lb-cap:empty { padding: 6px; }
@media (max-width: 600px) {
	.cgal-lb-stage { padding: 0; }
	.cgal-lb .cgal-lb-prev, .cgal-lb .cgal-lb-next { top: auto; bottom: 10px; transform: none; width: 42px; height: 42px; background: rgba(0,0,0,.45); }
	.cgal-lb-img { border-radius: 0; }
}
