/**
 * blog.hu import galériák (ul.blh-gallery)
 * Első kép látszik, a többi Fancybox lightboxban nyílik.
 */

#tartalom ul.blh-gallery,
.site-main ul.blh-gallery {
	position: relative;
	display: block;
	list-style: none;
	padding: 0;
	margin: 1.5rem 0;
}

#tartalom ul.blh-gallery > li,
.site-main ul.blh-gallery > li {
	display: none;
	margin: 0;
	padding: 0;
}

#tartalom ul.blh-gallery > li:first-child,
.site-main ul.blh-gallery > li:first-child {
	display: flex;
	position: relative;
	overflow: hidden;
	justify-content: center;
	margin: 2em 0 !important;
}

#tartalom ul.blh-gallery > li:first-child img,
.site-main ul.blh-gallery > li:first-child img {
	max-height: 400px;
	width: auto;
	max-width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.blh-gallery-trigger {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0 0 8px 8px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	padding: 12px 20px;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	cursor: pointer;
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.35s ease, opacity 0.3s ease;
}

#tartalom ul.blh-gallery:hover .blh-gallery-trigger,
#tartalom ul.blh-gallery:focus-within .blh-gallery-trigger,
.site-main ul.blh-gallery:hover .blh-gallery-trigger,
.site-main ul.blh-gallery:focus-within .blh-gallery-trigger {
	transform: translateY(0);
	opacity: 1;
}

.blh-gallery-trigger:focus,
.blh-gallery-trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -3px;
	transform: translateY(0);
	opacity: 1;
}

#tartalom ul.blh-gallery > li:first-child a:focus,
#tartalom ul.blh-gallery > li:first-child a:focus-visible,
.site-main ul.blh-gallery > li:first-child a:focus,
.site-main ul.blh-gallery > li:first-child a:focus-visible {
	outline: 3px solid #25367c;
	outline-offset: 3px;
}

/* Érintőképernyőn mindig látható a CTA */
@media (hover: none) {
	.blh-gallery-trigger {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Fancybox vezérlők: látható fókuszkeret (WCAG 2.4.7) */
.fancybox__container .f-button:focus,
.fancybox__container .f-button:focus-visible,
.fancybox__container button:focus,
.fancybox__container button:focus-visible,
.fancybox__container a:focus,
.fancybox__container a:focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 2px !important;
	box-shadow: none !important;
}
