/* Block Giải pháp chuyên biệt (Figma 289:847) */

.block-solutions {
	margin-bottom: 0;
}

.block-solutions__title {
	padding-inline: var(--gutter);
	font-size: clamp(22px, 1.88vw, 36px);
	font-weight: 900;
	line-height: 1.22;
	text-align: center;
	text-transform: uppercase;
	color: var(--color-text);
}

.block-solutions__grid {
	display: grid;
	margin-top: clamp(28px, 2.6vw, 50px);
}

/* Desktop: 2 khối chia đôi; rê chuột / focus vào khối nào thì khối đó rộng ra 60%, khối kia thu về 40%.
   Rê chuột đè focus (focus 1 khối, rê khối kia: khối đang rê rộng ra). */
@media (min-width: 768px) {
	.block-solutions__grid {
		display: flex;
	}

	.solution-panel {
		flex: 0 1 50%;
		min-width: 0;
		transition: flex-basis 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.block-solutions__grid:focus-within .solution-panel {
		flex-basis: 40%;
	}

	.block-solutions__grid .solution-panel:focus-within {
		flex-basis: 60%;
	}
}

@media (min-width: 768px) and (hover: hover) {
	.block-solutions__grid:hover .solution-panel {
		flex-basis: 40%;
	}

	.block-solutions__grid .solution-panel:hover {
		flex-basis: 60%;
	}
}

.solution-panel {
	position: relative;
	display: grid;
	align-items: end;
	min-height: clamp(460px, 46.9vw, 900px);
	padding: clamp(40px, 6.2vw, 120px) clamp(20px, 3vw, 56px);
	overflow: hidden;
	color: #fff;
	text-align: center;
	isolation: isolate;
}

.solution-panel > picture,
.solution-panel__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
}

.solution-panel__image {
	object-fit: cover;
	transition: transform 0.6s;
}

.solution-panel:hover .solution-panel__image {
	transform: scale(1.03);
}

/* Gradient tối dần xuống dưới để chữ dễ đọc. */
.solution-panel::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(0, 33, 82, 0) 35%, rgba(0, 33, 82, 0.85) 100%);
}

/* Lớp tối phủ lên khối không được chọn (nằm trên cả chữ, như Figma). */
.solution-panel::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}

@media (min-width: 768px) and (hover: hover) {
	.block-solutions__grid:not(:hover, :focus-within) .solution-panel:nth-child(2)::after,
	.block-solutions__grid:is(:hover, :focus-within) .solution-panel:not(:hover, :focus-within)::after {
		opacity: 1;
	}
}

.solution-panel__content {
	display: grid;
	justify-items: center;
	gap: 16px;
}

.solution-panel__title {
	font-size: clamp(26px, 3.13vw, 60px);
	font-weight: 700;
	line-height: 1.22;
	text-transform: uppercase;
	text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

/* Desktop: cỡ chữ tiêu đề theo bề rộng khối (cqi = 1% bề rộng nội dung khối; lúc chia đôi bằng 3.13vw như Figma):
   khối co / giãn thì chữ nhỏ / to dần theo, không bị xuống dòng giữa lúc chuyển. */
@supports (font-size: 1cqi) {
	@media (min-width: 768px) {
		.solution-panel {
			container-type: inline-size;
		}

		.solution-panel__title {
			font-size: clamp(18px, 7.1cqi, 60px);
		}
	}
}

.solution-panel__text {
	max-width: 14em;
	font-size: var(--fs-body-lg);
	font-weight: 300;
	line-height: 1.25;
}

.solution-panel__button {
	margin-top: 8px;
}
