/* Image Box Slider — frontend styles
   Class prefix: ibs- (Image Box Slider) */

.ibs-wrapper {
	--ibs-gap: 24px;
	--ibs-desc-lines: 3;
	position: relative;
	box-sizing: border-box;
}

.ibs-wrapper *,
.ibs-wrapper *::before,
.ibs-wrapper *::after {
	box-sizing: inherit;
}

.ibs-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}

.ibs-heading {
	margin: 0;
	font-size: 26px;
	font-weight: 700;
	color: #16233f;
	line-height: 1.3;
}

.ibs-nav {
	display: flex;
	gap: 12px;
	flex-shrink: 0;
}

.ibs-arrow {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background-color: #2455a4;
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.ibs-arrow:hover {
	transform: translateY(-1px);
}

.ibs-arrow:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}

.ibs-arrow svg {
	width: 44%;
	height: 44%;
	display: block;
	pointer-events: none;
}

.ibs-arrow:focus-visible,
.ibs-card-link:focus-visible,
.ibs-dot:focus-visible {
	outline: 2px solid #2455a4;
	outline-offset: 2px;
}

.ibs-track-wrap {
	position: relative;
	overflow: hidden;
}

.ibs-track {
	display: flex;
	gap: var(--ibs-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 4px;
	margin: 0;
}

.ibs-track::-webkit-scrollbar {
	display: none;
	height: 0;
}

.ibs-card {
	scroll-snap-align: start;
	flex-shrink: 0;
	flex-basis: calc((100% - (var(--ibs-gap) * 3)) / 4);
	max-width: calc((100% - (var(--ibs-gap) * 3)) / 4);
	background-color: #ffffff;
	border: 1.5px solid #2455a4;
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ibs-card-img {
	height: 200px;
	overflow: hidden;
	border-radius: 14px 14px 0 0;
	flex-shrink: 0;
}

.ibs-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ibs-card-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex-grow: 1;
}

.ibs-card-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #16233f;
	line-height: 1.4;
}

.ibs-card-desc {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.65;
	color: #5b6472;
	display: -webkit-box;
	-webkit-line-clamp: var(--ibs-desc-lines);
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ibs-card-link {
	margin-top: auto;
	padding-top: 4px;
	font-size: 14px;
	font-weight: 700;
	color: #2455a4;
	text-decoration: none;
	width: fit-content;
}

.ibs-card-link:hover {
	text-decoration: underline;
}

.ibs-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.ibs-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background-color: #d7deea;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, width 0.2s ease, border-radius 0.2s ease;
}

.ibs-dot.is-active {
	background-color: #2455a4;
	width: 22px;
	border-radius: 5px;
}

/* Fallback breakpoints — used only if this CSS ever renders without
   Elementor's own "Visible Cards" responsive control output. Kept in
   sync with that control's own defaults (4 / 2 / 1). */
@media (max-width: 1024px) {
	.ibs-card {
		flex-basis: calc((100% - var(--ibs-gap)) / 2);
		max-width: calc((100% - var(--ibs-gap)) / 2);
	}
}

@media (max-width: 767px) {
	.ibs-top {
		flex-wrap: wrap;
	}

	.ibs-heading {
		font-size: 21px;
	}

	.ibs-card {
		flex-basis: 100%;
		max-width: 100%;
	}

	.ibs-card-img {
		height: 180px;
	}

	.ibs-arrow {
		width: 38px;
		height: 38px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ibs-track {
		scroll-behavior: auto;
	}
}
