/**
 * Homepage banner layout:
 * - Left: feature slider
 * - Right: 2 stacked banners
 */

.sanomart-home-banner {
	margin: 1rem 0 1.5rem;
}

.sanomart-home-banner__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

.sanomart-home-banner__feature {
	position: relative;
	overflow: hidden;
	border-radius: 0.5rem;
	background: #f6f8fb;
}

/* Giữ đúng tỉ lệ khung, ảnh không crop */
.sanomart-banner-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.sanomart-home-banner__link {
	display: block;
}

.sanomart-banner-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	background: #fff;
}

.sanomart-home-banner__slides {
	display: flex;
	transition: transform 0.35s ease;
	will-change: transform;
}

.sanomart-home-banner__slide {
	min-width: 100%;
	flex: 0 0 100%;
}

.sanomart-home-banner__control {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: 999px;
	background: rgba(42, 59, 143, 0.85);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 2;
}

.sanomart-home-banner__control--prev {
	left: 0.5rem;
}

.sanomart-home-banner__control--next {
	right: 0.5rem;
}

.sanomart-home-banner__feature:hover .sanomart-home-banner__control,
.sanomart-home-banner__feature:focus-within .sanomart-home-banner__control {
	opacity: 1;
	pointer-events: auto;
}

.sanomart-home-banner__dots {
	position: absolute;
	left: 50%;
	bottom: 0.65rem;
	transform: translateX(-50%);
	display: inline-flex;
	gap: 0.4rem;
	z-index: 2;
}

.sanomart-home-banner__dot {
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	cursor: pointer;
}

.sanomart-home-banner__dot.is-active {
	background: var( --sanomart-secondary );
}

.sanomart-home-banner__right {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

/* Mobile — giữ tỉ lệ gốc ảnh, không crop */
@media (max-width: 767px) {
	.sanomart-banner-media {
		aspect-ratio: auto;
		height: auto;
	}

	.sanomart-banner-media img {
		width: 100%;
		height: auto;
		object-fit: contain;
		object-position: center center;
	}
}

/* Desktop */
@media (min-width: 992px) {
	.sanomart-home-banner__grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		align-items: stretch;
	}

	.sanomart-home-banner__right {
		grid-template-rows: 1fr 1fr;
	}

	.sanomart-home-banner__feature .sanomart-banner-media {
		aspect-ratio: 2 / 1;
		height: 103%;
	}

	.sanomart-home-banner__right .sanomart-banner-media {
		aspect-ratio: 2 / 1;
	}
}
