/* Hastora Gallery: public page */
.hg-wrap {
	--hg-navy: #0B3A4A;
	--hg-navy-deep: #082C39;
	--hg-gold: #D4A04C;
	--hg-gold-light: #F2CD7E;
	--hg-line: #E7E3DA;
	width: 100%;
}
.hg-wrap *, .hg-wrap *::before, .hg-wrap *::after { box-sizing: border-box; }

/* Let the gallery use the full page width when the theme wraps page content in a narrow article. */
article:has(> .prose > .hg-wrap), article:has(.hg-wrap) { max-width: none !important; padding: 0 !important; }
article:has(.hg-wrap) > header { display: none; }
article:has(.hg-wrap) .prose { max-width: none !important; }

/* Hero */
.hg-hero {
	padding: 9.5rem 1.5rem 5rem;
	text-align: center;
	color: #fff;
	background: linear-gradient(135deg, var(--hg-navy-deep) 0%, var(--hg-navy) 100%);
}
.hg-eyebrow { margin: 0 0 1rem; color: var(--hg-gold-light); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; }
.hg-title { margin: 0 0 1rem; color: #fff; font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: clamp(2.6rem, 1.6rem + 4vw, 4.75rem); line-height: 1.05; }
.hg-sub { max-width: 620px; margin: 0 auto; color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; line-height: 1.7; }
.hg-hero::after { content: ""; display: block; width: 56px; height: 2px; margin: 2rem auto 0; background: var(--hg-gold); }

/* Body */
.hg-body { max-width: 1400px; margin: 0 auto; padding: 4.5rem 2rem 6rem; background: #fff; }
.hg-none { text-align: center; color: #5A727C; }
.hg-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 2.5rem; }
.hg-filter {
	padding: 0.7rem 1.4rem; border: 1px solid var(--hg-line); border-radius: 999px; background: #fff;
	color: var(--hg-navy); font: 600 0.78rem/1 inherit; font-family: inherit; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.hg-filter span { margin-left: 0.4rem; opacity: 0.6; }
.hg-filter:hover { border-color: var(--hg-navy); }
.hg-filter.is-active { background: var(--hg-navy); border-color: var(--hg-navy); color: #fff; }

.hg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.hg-item {
	position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0; overflow: hidden; border-radius: 14px;
	aspect-ratio: 4 / 3; background: #0F2A35; cursor: pointer;
	box-shadow: 0 8px 24px rgba(3, 47, 64, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hg-item[hidden] { display: none; }
.hg-item:hover, .hg-item:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(3, 47, 64, 0.16); }
.hg-item:focus-visible { outline: 3px solid var(--hg-gold); outline-offset: 2px; }
.hg-item img, .hg-item video { width: 100%; height: 100%; margin: 0; object-fit: cover; display: block; transition: transform 0.5s ease; }
.hg-item:hover img, .hg-item:hover video { transform: scale(1.05); }
.hg-play {
	position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
	display: flex; align-items: center; justify-content: center; border-radius: 50%;
	background: rgba(8, 44, 57, 0.72); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5);
}
.hg-play svg { width: 26px; height: 26px; margin-left: 3px; }
.hg-cap {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem 1rem 0.85rem; text-align: left;
	background: linear-gradient(0deg, rgba(8, 44, 57, 0.85), rgba(8, 44, 57, 0)); color: #fff; font-size: 0.9rem;
}

/* Lightbox */
.hg-lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 4.5rem 4rem; background: rgba(4, 22, 29, 0.94); }
.hg-lightbox[hidden] { display: none; }
.hg-lb-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 0; }
.hg-lb-stage img, .hg-lb-stage video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); background: #000; }
.hg-lb-cap { position: absolute; left: 0; right: 0; bottom: 1.1rem; margin: 0; padding: 0 1rem; text-align: center; color: #fff; font-size: 0.95rem; }
.hg-lb-close, .hg-lb-nav {
	position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; line-height: 1; transition: background-color 0.2s ease;
}
.hg-lb-close:hover, .hg-lb-nav:hover { background: rgba(212, 160, 76, 0.9); color: #082C39; }
.hg-lb-close { top: 1rem; right: 1rem; width: 46px; height: 46px; font-size: 2rem; }
.hg-lb-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 2.4rem; padding-bottom: 4px; }
.hg-lb-prev { left: 1rem; }
.hg-lb-next { right: 1rem; }
body.hg-lock { overflow: hidden; }

@media (max-width: 640px) {
	.hg-hero { padding: 8rem 1.25rem 3.5rem; }
	.hg-body { padding: 3rem 1rem 4rem; }
	.hg-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
	.hg-item { border-radius: 10px; }
	.hg-play { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
	.hg-lightbox { padding: 4rem 0.75rem 4.5rem; }
	.hg-lb-nav { top: auto; bottom: 0.9rem; margin: 0; width: 44px; height: 44px; }
	.hg-lb-prev { left: 1rem; }
	.hg-lb-next { right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.hg-item, .hg-item img, .hg-item video { transition: none; }
}
