/* gallery.css — photo and video gallery shortcode styles */

/* ---- Photo gallery ---- */

.bl-gallery {
	line-height: 0;
}

/* 3-item: large featured left (2/3) + 2 stacked right (1/3) */
.bl-gallery--3 {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 6px;
}

.bl-gallery--3 .bl-gallery__featured {
	aspect-ratio: 4 / 3;
}

.bl-gallery--3 .bl-gallery__side {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bl-gallery--3 .bl-gallery__side .bl-gallery__thumb {
	flex: 1;
}

/* 2-item: equal columns */
.bl-gallery--2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.bl-gallery--2 .bl-gallery__thumb {
	aspect-ratio: 4 / 3;
}

/* 1-item: full width */
.bl-gallery--1 .bl-gallery__featured {
	display: block;
}

.bl-gallery--1 .bl-gallery__featured img {
	aspect-ratio: 16 / 9;
}

/* Shared anchor + image rules */
.bl-gallery__featured,
.bl-gallery__thumb {
	display: block;
	overflow: hidden;
	border-radius: 8px;
}

.bl-gallery__featured img,
.bl-gallery__thumb img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	transition: transform 200ms ease;
}

.bl-gallery__featured:hover img,
.bl-gallery__thumb:hover img {
	transform: scale( 1.03 );
}

/* ---- Video gallery ---- */

.bl-vgallery {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.bl-vgallery__item {
	flex: 1;
	min-width: 140px;
}

.bl-vgallery__thumb {
	position: relative;
	margin: 0;
	padding: 0;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #111;
	display: block;
}

.bl-vgallery__thumb a {
	display: block;
	width: 100%;
	height: 100%;
}

.bl-vgallery__thumb img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	opacity: 0.85;
	transition: opacity 200ms ease;
}

.bl-vgallery__thumb a:hover img {
	opacity: 0.7;
}

/* Yellow play-button circle */
.bl-vgallery__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: 44px;
	height: 44px;
	background: #f5c518;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: transform 200ms ease;
}

.bl-vgallery__thumb a:hover .bl-vgallery__play {
	transform: translate( -50%, -50% ) scale( 1.1 );
}

.bl-vgallery__play svg {
	width: 18px;
	height: 18px;
	color: #111;
	display: block;
	margin-left: 2px; /* optical center for triangle */
}

/* Duration badge */
.bl-vgallery__dur {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba( 0, 0, 0, 0.72 );
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	line-height: 1.4;
	pointer-events: none;
}

/* Title and description */
.bl-vgallery__info {
	padding-top: 0.5rem;
	line-height: 1.4;
}

.bl-vgallery__title {
	font-size: 0.9rem;
	font-weight: 600;
	color: #111827;
	margin: 0 0 4px;
}

.bl-vgallery__desc {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0;
}

/* ---- Responsive ---- */

@media ( max-width: 600px ) {
	.bl-gallery--3 {
		grid-template-columns: 1fr;
	}

	.bl-gallery--3 .bl-gallery__side {
		flex-direction: row;
	}

	.bl-vgallery {
		flex-direction: column;
	}
}
