/**
 * BK Tech Box Image CSS
 * Author: Bùi Đức Hạnh (https://buhaweb.com/)
 * Prefix: bdh-bk-
 * Kit 4 Global Design System Compliant
 */

.bdh-bk-box-image {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* ====================================================
   GRID LAYOUT
   ==================================================== */
.bdh-bk-box-image__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 20px;
	row-gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

@media (max-width: 1024px) {
	.bdh-bk-box-image__grid {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 16px;
		row-gap: 16px;
	}
}

@media (max-width: 767px) {
	.bdh-bk-box-image__grid {
		grid-template-columns: repeat(1, 1fr);
		column-gap: 14px;
		row-gap: 14px;
	}
}

/* ====================================================
   BOX ITEM & MEDIA
   ==================================================== */
.bdh-bk-box-image__item {
	position: relative;
	height: 220px;
	border-radius: 16px;
	overflow: hidden;
	box-sizing: border-box;
	transform: translateZ(0);
	transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.bdh-bk-box-image__card {
	display: flex;
	position: relative;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	border-radius: inherit;
}

.bdh-bk-box-image__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
	z-index: 1;
}

.bdh-bk-box-image__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
	transform: scale(1) translateZ(0);
	backface-visibility: hidden;
	will-change: transform;
}

/* Hover Zoom In (contained inside the box) */
.bdh-bk-box-image__item:hover .bdh-bk-box-image__img {
	transform: scale(1.08) translateZ(0);
}

/* ====================================================
   GRADIENT OVERLAY
   ==================================================== */
.bdh-bk-box-image__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(to top, rgba(15, 30, 45, 0.92) 0%, rgba(15, 30, 45, 0.55) 35%, rgba(0, 0, 0, 0) 75%);
	transition: opacity 0.45s cubic-bezier(0.25, 1, 0.5, 1);
	opacity: 1;
	pointer-events: none;
	border-radius: inherit;
}

/* Disappear gradient on hover */
.bdh-bk-box-image__item:hover .bdh-bk-box-image__overlay {
	opacity: 0;
}

/* ====================================================
   CONTENT & TEXT OVERLAY (HIGHEST PRIORITY)
   ==================================================== */
.bdh-bk-box-image__content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 22px 20px;
	box-sizing: border-box;
	text-align: center;
	pointer-events: none;
}

.bdh-bk-box-image__title {
	font-size: var(--e-global-typography-fc3ef67-font-size, 18px);
	font-weight: 700;
	line-height: 1.35em;
	color: var(--e-global-color-8d5d81d, #FFFFFF);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin: 0;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	transition: color 0.3s ease, transform 0.3s ease;
}

.bdh-bk-box-image__subtitle {
	font-size: var(--e-global-typography-79e5d5b-font-size, 14px);
	font-weight: 400;
	line-height: 1.45em;
	color: var(--e-global-color-14ec4f2, #F8F9FA);
	margin: 6px 0 0 0;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
