/* ==========================================================================
   Photo Gallery  [oh_gallery]
   ========================================================================== */

.oh-gallery__header {
	margin-bottom: clamp(32px, 4vw, 48px);
}

.oh-gallery__header > * {
	margin: 0;
}

.oh-gallery__header .oh-heading {
	margin-top: 20px;
}

.oh-gallery__header .oh-lead {
	margin-top: 20px;
}

/* Φίλτρα */
.oh-gallery__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: clamp(32px, 4vw, 48px);
}

.oh-gallery .oh-gallery__filter {
	padding: 11px 22px;
	border: 1px solid rgba(var(--oh-color-primary-rgb), 0.3);
	border-radius: 0;
	background: transparent;
	color: var(--oh-color-dark);
	font-family: var(--oh-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.oh-gallery .oh-gallery__filter:hover,
.oh-gallery .oh-gallery__filter:focus-visible {
	border-color: var(--oh-color-primary);
	background: transparent;
	color: var(--oh-color-primary);
}

.oh-gallery .oh-gallery__filter.is-active {
	border-color: var(--oh-color-primary);
	background: var(--oh-color-primary);
	color: #fff;
}

/* Masonry grid (CSS columns: οι φωτογραφίες κρατούν τις αναλογίες τους) */
.oh-gallery {
	--oh-gallery-gap: 20px;
}

.oh-gallery .oh-gallery__grid {
	column-count: 3;
	column-gap: var(--oh-gallery-gap);
}

/* inline-block + margin με αυξημένο specificity: το Astra/Elementor μηδενίζουν το margin των <figure> */
.oh-gallery .oh-gallery__grid .oh-gallery__item {
	position: relative;
	display: inline-block;
	width: 100%;
	margin: 0 0 var(--oh-gallery-gap) !important;
	padding: 0;
	overflow: hidden;
	vertical-align: top;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	background-color: var(--oh-color-sage);
	cursor: zoom-in;
}

.oh-gallery .oh-gallery__grid .oh-gallery__item[hidden] {
	display: none;
}

.oh-gallery .oh-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hover: απαλό zoom + σκούρο gradient + icon */
.oh-gallery__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(22, 30, 24, 0) 50%, rgba(22, 30, 24, 0.45) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.oh-gallery__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	color: #fff;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.oh-gallery__item:hover .oh-gallery__img,
.oh-gallery__item:focus-within .oh-gallery__img {
	transform: scale(1.04);
}

.oh-gallery__item:hover::after,
.oh-gallery__item:focus-within::after,
.oh-gallery__item:hover .oh-gallery__zoom,
.oh-gallery__item:focus-within .oh-gallery__zoom {
	opacity: 1;
	transform: none;
}

/* Εμφάνιση μετά από φίλτρο */
.oh-gallery__item.is-entering {
	animation: oh-gallery-in 0.45s ease both;
}

@keyframes oh-gallery-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 991px) {
	.oh-gallery {
		--oh-gallery-gap: 16px;
	}

	.oh-gallery .oh-gallery__grid {
		column-count: 2;
	}
}

@media (max-width: 575px) {
	.oh-gallery {
		--oh-gallery-gap: 12px;
	}

	.oh-gallery__filters {
		gap: 8px;
	}

	.oh-gallery .oh-gallery__filter {
		padding: 9px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.oh-gallery .oh-gallery__img,
	.oh-gallery__item.is-entering {
		transition: none;
		animation: none;
	}
}
