/* ==========================================================================
   Highlights Slider — infinite auto-scroll carousel
   Desktop: single track, side-by-side cards
   Mobile:  dual tracks (opposite directions), image-overlay cards
   ========================================================================== */

.hm-highlights {
	margin-top: 16px;
}

/* Mobile: reorder to appear after secondary grid */
@media (max-width: 767px) {
	.hm-home-columns__main {
		display: flex;
		flex-direction: column;
	}

	.hm-highlights {
		order: 2;
	}

	.hm-secondary-col {
		order: 1;
	}
}

.hm-highlights__wrapper {
	background: #ffffff;
	border-radius: var(--hm-radius-lg);
	padding: 15px;
	display: flex;
	flex-direction: column;
	gap: 15px;
	overflow: hidden;
	cursor: grab;
}

.hm-highlights__wrapper:active {
	cursor: grabbing;
}

/* ==========================================================================
   Shared — track & nav
   ========================================================================== */

.hm-highlights__track {
	display: flex;
	will-change: transform;
}

.hm-highlights__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.hm-highlights__arrow {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	line-height: 0;
	transition: opacity var(--hm-transition-fast);
}

.hm-highlights__arrow:hover {
	opacity: 0.85;
}

.hm-highlights__arrow svg {
	display: block;
	width: 36.592px;
	height: 33.936px;
}

/* Shared card base */
.hm-highlights__card {
	flex-shrink: 0;
	min-width: 0;
}

.hm-highlights__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ==========================================================================
   ██ MOBILE — dual tracks with image-overlay cards
   ========================================================================== */

.hm-highlights__mobile {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.hm-highlights__desktop {
	display: none;
}

/* ── Header: title + red dot ── */
.hm-highlights__header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.hm-highlights__header-title {
	font-family: var(--hm-font-primary);
	font-weight: 900;
	font-size: 32px;
	line-height: 1;
	color: var(--hm-color-primary);
	margin: 0;
	text-box-trim: both;
	text-box-edge: cap alphabetic;
}

.hm-highlights__header-dot {
	width: 13.25px;
	height: 13.25px;
	border-radius: 50%;
	background: var(--hm-color-accent);
	flex-shrink: 0;
}

/* ── Viewports ── */
.hm-highlights__viewport {
	overflow: hidden;
}

.hm-highlights__viewport--top {
	height: 187px;
	display: flex;
	align-items: center;
}

/* ── Mobile tracks ── */
.hm-highlights__mobile .hm-highlights__track {
	gap: 15px;
}

/* ── Mobile card — image overlay style ── */
.hm-highlights__mobile .hm-highlights__card {
	position: relative;
	width: calc((100% - 15px) / 2);
	height: 131px;
	border-radius: 14px;
	overflow: hidden;
}

.hm-highlights__viewport--bottom .hm-highlights__card {
	height: 134px;
}

/* Image fills entire card */
.hm-highlights__mobile .hm-highlights__media {
	position: absolute;
	inset: 0;
	border-radius: 14px;
	overflow: hidden;
	display: block;
	text-decoration: none;
}

/* Dark overlay for text readability */
.hm-highlights__mobile .hm-highlights__media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
	border-radius: 14px;
	pointer-events: none;
}

/* Title overlaid at bottom */
.hm-highlights__mobile .hm-highlights__content {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 1;
	padding: 10px;
	display: flex;
	flex-direction: column;
	pointer-events: none;
}

.hm-highlights__mobile .hm-highlights__title {
	font-family: var(--hm-font-primary);
	font-weight: 700;
	font-size: 11px;
	line-height: 13px;
	color: #ffffff;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-box-trim: both;
	text-box-edge: cap alphabetic;
}

.hm-highlights__mobile .hm-highlights__title a {
	color: inherit;
	text-decoration: none;
	pointer-events: auto;
}

/* Hide excerpt & category badge on mobile */
.hm-highlights__mobile .hm-highlights__excerpt {
	display: none;
}

.hm-highlights__mobile .hm-card-md__category {
	display: none;
}

/* ── Center scaling on top track ── */
.hm-highlights__viewport--top .hm-highlights__card {
	transition: transform 0.5s ease;
	z-index: 1;
}

.hm-highlights__viewport--top .hm-highlights__card.is-center {
	transform: scale(1.42);
	z-index: 2;
}

/* Larger title for center card */
.hm-highlights__viewport--top .hm-highlights__card.is-center .hm-highlights__title {
	font-size: 14px;
	line-height: 16px;
}

/* ==========================================================================
   ██ TABLET+ — switch to desktop layout
   ========================================================================== */

@media (min-width: 768px) {
	.hm-highlights__mobile {
		display: none;
	}

	.hm-highlights__desktop {
		display: block;
	}

	.hm-highlights__wrapper {
		padding: 16px;
		gap: 21px;
	}
}

/* ── Desktop track ── */
.hm-highlights__desktop .hm-highlights__track {
	gap: 30px;
}

/* ── Desktop card — side-by-side (image + text) ── */
.hm-highlights__desktop .hm-highlights__card {
	display: flex;
	gap: 7px;
	height: 135px;
	width: calc((100% - 30px) / 2);
}

.hm-highlights__desktop .hm-highlights__media {
	flex: 0 0 45%;
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	display: block;
	text-decoration: none;
}

.hm-highlights__desktop .hm-highlights__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	overflow: hidden;
	justify-content: center;
}

.hm-highlights__desktop .hm-highlights__title {
	font-family: var(--hm-font-primary);
	font-weight: 700;
	font-size: 16px;
	line-height: 20px;
	color: var(--hm-color-primary);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-box-trim: both;
	text-box-edge: cap alphabetic;
}

.hm-highlights__desktop .hm-highlights__title a {
	color: inherit;
	text-decoration: none;
}

.hm-highlights__desktop .hm-highlights__excerpt {
	font-family: var(--hm-font-primary);
	font-weight: 300;
	font-size: 14px;
	line-height: 17px;
	color: var(--hm-color-primary);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Category badge — scaled down for smaller images */
.hm-highlights__desktop .hm-card-md__category {
	transform: scale(0.64);
	transform-origin: 0% 100%;
}

/* ── Desktop: 3 cards at ≥1024px ── */
@media (min-width: 1024px) {
	.hm-highlights__desktop .hm-highlights__track {
		gap: 49px;
	}

	.hm-highlights__desktop .hm-highlights__card {
		width: calc((100% - 98px) / 3);
	}
}
