/* ================================================
   Holloway Filterable Gallery Widget — widget.css
   v1.3.0 — Equal-height grid + full lightbox
   ================================================ */

/* ── Reset & Wrapper ── */
.hgw-widget {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
.hgw-widget *,
.hgw-widget *::before,
.hgw-widget *::after {
	box-sizing: inherit;
}

/* ─────────────────────────────────────
   HEADER
───────────────────────────────────── */
.hgw-header {
	padding: 40px 40px 28px;
	text-align: center;
}
.hgw-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: #b91c1c;
	margin: 0 0 12px;
	display: block;
}
.hgw-headline {
	font-size: 34px;
	font-weight: 400;
	font-style: italic;
	line-height: 1.25;
	margin: 0 0 16px;
	color: #111;
}
.hgw-desc {
	font-size: 15px;
	color: #555;
	line-height: 1.75;
	max-width: 680px;
	margin: 0 auto;
}
.hgw-desc p { margin: 0; }

/* ─────────────────────────────────────
   FILTER BAR
───────────────────────────────────── */
.hgw-filters {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 40px 28px;
}
.hgw-filter-btn {
	padding: 8px 22px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	background: transparent;
	color: #666;
	border: 1.5px solid #ddd;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.18s ease;
	line-height: 1;
	white-space: nowrap;
}
.hgw-filter-btn:hover {
	color: #111;
	border-color: #aaa;
}
.hgw-filter-btn.hgw-active {
	background-color: #1e5fa5;
	color: #fff;
	border-color: #1e5fa5;
}

/* ─────────────────────────────────────
   GRID  — equal-height rows via CSS Grid
   Each cell uses a padding-bottom trick
   so every image has identical height
───────────────────────────────────── */
.hgw-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;              /* small gap so images breathe slightly */
	padding: 0;
}

/* ── Each grid cell ── */
.hgw-item {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	display: block;
	/* equal height: every item is a fixed-ratio box */
}

/* The inner padding-bottom box enforces the aspect ratio */
.hgw-item-inner {
	position: relative;
	width: 100%;
	padding-bottom: 72%;   /* ≈ 4:3 — change via Elementor control */
	overflow: hidden;
	background: #e8e8e8;   /* placeholder colour while loading */
}

.hgw-item img.hgw-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;       /* fills box, crops neatly — equal height guaranteed */
	object-position: center;
	display: block;
	transition: transform 0.38s ease;
}

/* ── Hover effects ── */
.hgw-grid[data-hover="zoom"]  .hgw-item:hover .hgw-img { transform: scale(1.07); }
.hgw-grid[data-hover="slide"] .hgw-item:hover .hgw-img { transform: translateY(-8px) scale(1.05); }
.hgw-grid[data-hover="fade"]  .hgw-item:hover .hgw-img { transform: scale(1.01); }

/* ── Overlay ── */
.hgw-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background 0.25s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	z-index: 1;
}
.hgw-item:hover .hgw-overlay {
	background: rgba(0,0,0,0.38);
}

/* ── Zoom icon ── */
.hgw-zoom-icon {
	width: 36px;
	height: 36px;
	color: #fff;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.22s ease, transform 0.22s ease;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.hgw-zoom-icon svg { width: 100%; height: 100%; }
.hgw-item:hover .hgw-zoom-icon { opacity: 1; transform: scale(1); }

/* ── Caption on hover ── */
.hgw-caption-hover {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.22s ease, transform 0.22s ease;
	text-align: center;
	padding: 0 16px;
	text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.hgw-item:hover .hgw-caption-hover { opacity: 1; transform: translateY(0); }

/* ── Hidden (load more) ── */
.hgw-item.hgw-hidden { display: none !important; }

/* Body scroll lock when lightbox is open */
body.hgw-lb-open { overflow: hidden !important; }

/* ─────────────────────────────────────
   LOAD MORE — hidden by default, JS shows it only when needed
───────────────────────────────────── */
.hgw-loadmore-wrap {
	padding: 32px 40px 40px;
	text-align: center;
	display: none;
}
.hgw-loadmore-btn {
	background: #1e5fa5;
	color: #fff;
	border: none;
	padding: 13px 40px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 3px;
	transition: background 0.18s ease, opacity 0.18s;
	line-height: 1;
}
.hgw-loadmore-btn:hover  { background: #154e8a; }
.hgw-loadmore-btn:disabled {
	opacity: 0.5;
	cursor: default;
	background: #999;
}

/* ─────────────────────────────────────
   LIGHTBOX
───────────────────────────────────── */
.hgw-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.92);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 80px;   /* room for nav arrows inside viewport */
	animation: hgwLbFadeIn 0.2s ease;
}
@keyframes hgwLbFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.hgw-lb-inner {
	position: relative;
	width: 100%;
	max-width: 960px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Top bar — counter left, close right */
.hgw-lb-topbar {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}
.hgw-lb-counter {
	color: rgba(255,255,255,0.6);
	font-size: 13px;
	letter-spacing: 1px;
	font-weight: 500;
}
.hgw-lb-actions {
	display: flex;
	gap: 4px;
}
.hgw-lb-action {
	background: none;
	border: none;
	color: rgba(255,255,255,0.7);
	cursor: pointer;
	padding: 6px;
	border-radius: 3px;
	transition: color 0.15s, background 0.15s;
	line-height: 0;
}
.hgw-lb-action:hover {
	color: #fff;
	background: rgba(255,255,255,0.12);
}
.hgw-lb-action svg { width: 20px; height: 20px; display: block; }

/* Image + figure */
.hgw-lb-figure {
	margin: 0;
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.hgw-lb-img {
	display: block;
	width: 100%;
	max-height: 75vh;
	object-fit: contain;
	border-radius: 2px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.6);
	animation: hgwImgSlide 0.18s ease;
}
@keyframes hgwImgSlide {
	from { opacity: 0; transform: scale(0.97); }
	to   { opacity: 1; transform: scale(1); }
}
.hgw-lb-caption {
	color: rgba(255,255,255,0.65);
	font-size: 13px;
	text-align: center;
	margin-top: 12px;
	min-height: 20px;
	letter-spacing: 0.3px;
}

/* Prev / Next arrows — sit outside the image horizontally */
.hgw-lb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.18);
	color: #fff;
	cursor: pointer;
	padding: 14px 12px;
	border-radius: 3px;
	transition: background 0.15s, border-color 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}
.hgw-lb-nav:hover {
	background: rgba(255,255,255,0.25);
	border-color: rgba(255,255,255,0.4);
}
.hgw-lb-nav svg { width: 22px; height: 22px; }
.hgw-lb-prev { right: calc(100% + 16px); }
.hgw-lb-next { left:  calc(100% + 16px); }

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
	.hgw-lightbox { padding: 60px 20px; }
	.hgw-lb-prev { right: auto; left: -52px; }
	.hgw-lb-next { left: auto; right: -52px; }
}

/* Mobile landscape */
@media (max-width: 768px) {
	.hgw-header   { padding: 28px 20px 20px; }
	.hgw-filters  { padding: 0 20px 20px; }
	.hgw-headline { font-size: 26px; }
	.hgw-grid     { grid-template-columns: repeat(2, 1fr); gap: 3px; }
	.hgw-lightbox { padding: 50px 12px; }
	.hgw-lb-prev  { left: -44px; }
	.hgw-lb-next  { right: -44px; }
	.hgw-lb-img   { max-height: 65vh; }
	.hgw-loadmore-wrap { padding: 24px 20px 32px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
	.hgw-header   { padding: 20px 16px 16px; }
	.hgw-filters  { padding: 0 16px 16px; gap: 4px; }
	.hgw-headline { font-size: 22px; }
	.hgw-filter-btn { padding: 7px 14px; font-size: 10.5px; }
	.hgw-grid     { grid-template-columns: repeat(1, 1fr); gap: 3px; }
	.hgw-lightbox { padding: 48px 8px; }
	.hgw-lb-prev  { left: 4px; background: rgba(0,0,0,0.5); border-color: transparent; }
	.hgw-lb-next  { right: 4px; background: rgba(0,0,0,0.5); border-color: transparent; }
	.hgw-lb-prev, .hgw-lb-next { top: auto; transform: none; bottom: -48px; }
	.hgw-lb-img   { max-height: 60vh; }
}
