/**
 * Cards Slider Widget Styles
 * Full-bleed Swiper · header aligned to container.
 * Uses globals.css tokens only.
 *
 * @package HelloElementorChild
 */

.hec-cards {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
	box-sizing: border-box;
	font-family: var(--font-body);
	color: var(--color-ink);
	overflow: hidden;
}

.hec-cards__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	margin-bottom: 1.5rem;
	padding-inline: 1.5rem;
	box-sizing: border-box;
}

.hec-cards__heading {
	margin: 0;
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	color: var(--color-ink);
}

.hec-cards__nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.hec-cards__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--color-border);
	border-radius: 50%;
	background: var(--color-surface);
	color: var(--color-ink);
	cursor: pointer;
	transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.hec-cards__nav-btn:hover,
.hec-cards__nav-btn:focus {
	background: var(--color-ink) !important;
	border-color: var(--color-ink);
	color: var(--color-surface);
}

.hec-cards__nav-btn.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.hec-cards__nav-btn svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hec-cards__swiper {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	overflow: hidden;
}

.hec-cards__swiper .swiper-wrapper {
	align-items: stretch;
}

.hec-cards__slide {
	height: auto;
	display: flex;
	box-sizing: border-box;
}

.hec-cards__card {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--color-ink);
	text-decoration: none;
	color: var(--color-surface);
	isolation: isolate;
	box-sizing: border-box;
}

.hec-cards__card:not(a) {
	cursor: default;
}

.hec-cards__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

.hec-cards__card:hover .hec-cards__bg {
	transform: scale(1.05);
}

.hec-cards__shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(7, 59, 76, 0.05) 0%,
		rgba(7, 59, 76, 0.25) 45%,
		rgba(7, 59, 76, 0.88) 100%
	);
}

.hec-cards__content {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 2;
	padding: 1.5rem 1.25rem;
	box-sizing: border-box;
}

.hec-cards__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--color-surface);
}

.hec-cards__subtitle {
	margin: 0.4rem 0 0;
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: var(--font-weight-medium);
	line-height: 1.4;
	color: var(--color-frost);
	opacity: 0.9;
}

.hec-cards__pagination {
	margin-top: 1.25rem;
	position: static !important;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding-inline: 1.5rem;
	box-sizing: border-box;
}

.hec-cards__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0 !important;
	background: var(--color-border);
	opacity: 1;
	border-radius: var(--radius-pill);
	transition: width var(--transition-base), background var(--transition-base);
}

.hec-cards__pagination .swiper-pagination-bullet-active {
	width: 22px;
	background: var(--color-sea);
}

@media (max-width: 767px) {
	.hec-cards__header {
		padding-inline: 20px;
		margin-bottom: 1.15rem;
	}

	.hec-cards__nav {
		display: none;
	}

	.hec-cards__swiper {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
		overflow: hidden;
	}

	.hec-cards__slide {
		height: auto;
		box-sizing: border-box;
	}

	.hec-cards__card {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 5;
		border-radius: var(--radius-md);
	}

	.hec-cards__content {
		padding: 1.15rem 1rem;
	}

	.hec-cards__title {
		font-size: 1.35rem;
	}

	.hec-cards__pagination {
		padding-inline: 20px;
	}
}

@media (max-width: 480px) {
	.hec-cards__card {
		aspect-ratio: 1 / 1;
	}
}
