/**
 * Homepage History of AIBM section.
 *
 * @author Sameer Ali N
 * @package AIBM
 */

.aibm-home-history {
	--aibm-history-font: "Spoof", "Inter", sans-serif;

	padding: 0;
	background: #ffffff;
	font-family: var(--aibm-history-font);
}

.aibm-home-history,
.aibm-home-history *,
.aibm-home-history *::before,
.aibm-home-history *::after {
	box-sizing: border-box;
}

.aibm-home-history .aibm-home-history__card {
	display: grid;
	grid-template-columns: minmax(0, 589fr) minmax(0, 651fr);
	min-height: 760px;
	overflow: hidden;
	isolation: isolate;
	border-radius: 80px;
	background: #0f1396;
}

/* Image panel stretches to match the content height. */
.aibm-home-history .aibm-home-history__visual {
	position: relative;
	min-width: 0;
	min-height: 100%;
	overflow: hidden;
	background: #091424;
}

.aibm-home-history .aibm-home-history__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: center;
	transform: scale(1);
	transform-origin: center;
	transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stationary overlay matching the design. */
.aibm-home-history .aibm-home-history__visual::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	content: "";
	background: rgba(9, 20, 36, 0.45);
	pointer-events: none;
}

.aibm-home-history .aibm-home-history__content {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 100px 79px 80px 80px;
	background: #0f1396;
	color: #ffffff;
}

.aibm-home-history .aibm-home-history__inner {
	width: 100%;
	max-width: 490px;
	min-width: 0;
}

.aibm-home-history .aibm-home-history__title {
	margin: 0 0 32px;
	padding: 0;
	color: #ffffff;
	font-family: var(--aibm-history-font);
	font-size: 56px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: break-word;
}

.aibm-home-history .aibm-home-history__description {
	display: grid;
	gap: 24px;
	min-width: 0;
}

.aibm-home-history .aibm-home-history__description p {
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-family: var(--aibm-history-font);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: break-word;
}

/* Hover zoom remains inside the image panel. */
@media (hover: hover) and (pointer: fine) {
	.aibm-home-history
	.aibm-home-history__visual:hover
	.aibm-home-history__image {
		transform: scale(1.20);
	}
}

/* Smaller desktop screens. */
@media (max-width: 1279px) {
	.aibm-home-history .aibm-home-history__card {
		min-height: 680px;
		border-radius: 64px;
	}

	.aibm-home-history .aibm-home-history__content {
		padding: 72px 48px;
	}

	.aibm-home-history .aibm-home-history__title {
		font-size: 46px;
	}
}

/* Tablet: image above the blue content panel. */
@media (max-width: 991px) {
	.aibm-home-history .aibm-home-history__card {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		border-radius: 48px;
	}

	.aibm-home-history .aibm-home-history__visual {
		min-height: 0;
		height: 400px;
	}

	.aibm-home-history .aibm-home-history__content {
		padding: 56px 48px;
	}

	.aibm-home-history .aibm-home-history__inner {
		max-width: 680px;
	}

	.aibm-home-history .aibm-home-history__title {
		font-size: 42px;
	}
}

/* Mobile. */
@media (max-width: 767px) {
	.aibm-home-history .aibm-home-history__card {
		border-radius: 36px;
	}

	.aibm-home-history .aibm-home-history__visual {
		height: clamp(260px, 65vw, 360px);
	}

	.aibm-home-history .aibm-home-history__content {
		padding: 40px 28px;
	}

	.aibm-home-history .aibm-home-history__title {
		margin-bottom: 24px;
		font-size: 34px;
		line-height: 1.15;
	}

	.aibm-home-history .aibm-home-history__description {
		gap: 20px;
	}

	.aibm-home-history .aibm-home-history__description p {
		font-size: 15px;
		line-height: 1.75;
	}
}

/* Narrow phones. */
@media (max-width: 379px) {
	.aibm-home-history .aibm-home-history__card {
		border-radius: 28px;
	}

	.aibm-home-history .aibm-home-history__content {
		padding: 32px 22px;
	}

	.aibm-home-history .aibm-home-history__title {
		font-size: 30px;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.aibm-home-history .aibm-home-history__image,
	.aibm-home-history
	.aibm-home-history__visual:hover
	.aibm-home-history__image {
		transform: none;
		transition: none;
	}

	.aibm-home-history [data-aibm-animate] {
		opacity: 1;
		transform: none;
		transition: none;
		animation: none;
	}
}