/* Home template sections. */

.hero {
	position: relative;
}

.hero__slider {
	--swiper-pagination-color: var(--wp--preset--color--accent);
	--swiper-pagination-bullet-inactive-color: var(--wp--preset--color--border);
	--swiper-pagination-bullet-inactive-opacity: 1;
	--swiper-pagination-bullet-size: 8px;
	--swiper-pagination-bullet-horizontal-gap: 4px;

	overflow: hidden;
	border-radius: 16px;
	background: var(--wp--preset--color--surface);
}

.hero__slide {
	display: flex;
	position: relative;
	align-items: center;
	height: auto;
	min-height: clamp(360px, 40vw, 520px);
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

/* Until Swiper initialises, only the first slide should be visible. */
.hero__slider:not(.swiper-initialized) .hero__slide + .hero__slide {
	display: none;
}

.hero__track {
	align-items: stretch;
}

/* Slide artwork fills the frame; the copy sits on top of it. */
.hero__media {
	position: absolute;
	z-index: 0;
	inset: 0;
}

.hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__body {
	position: relative;
	z-index: 1;
	max-width: 34rem;
}

.hero__title {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--xx-large);
}

.hero__text {
	margin: 0 0 var(--wp--preset--spacing--30);
	max-width: 34ch;
	color: var(--wp--preset--color--muted);
}

.hero__dots.swiper-pagination {
	inset-inline-start: 50%;
	bottom: var(--wp--preset--spacing--30);
	width: auto;
	padding: 0.5rem 0.75rem;
	translate: -50% 0;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.7);
}

/* Product highlights */

.product-highlights__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wp--preset--spacing--20);
}

.product-card {
	flex-direction: row;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--35);
}

.product-card__media {
	flex: none;
	width: 150px;
}

.product-card__media img {
	width: 100%;
	height: auto;
	object-fit: contain;
}

.product-card__title {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--large);
}

.product-card__title a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.product-card__text {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.product-card__text p {
	margin: 0;
}

.product-card__meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: var(--wp--preset--spacing--10) 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Trust badges */

.features__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: var(--wp--preset--spacing--35) var(--wp--preset--spacing--30);
	border-block: 1px solid var(--wp--preset--color--border);
	list-style: none;
}

.features__item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

.features__item + .features__item {
	border-inline-start: 1px solid var(--wp--preset--color--border);
	padding-inline-start: var(--wp--preset--spacing--20);
}

.features__icon {
	color: var(--wp--preset--color--primary);
}

.features__text strong {
	display: block;
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.features__text small {
	color: var(--wp--preset--color--muted);
	font-size: 12px;
}

/* Educational content */

.home-guides {
	padding: var(--wp--preset--spacing--40);
	border-radius: 16px;
	background: var(--wp--preset--color--base);
}

.home-guides__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: var(--wp--preset--spacing--20);
}

.guide-card--featured .guide-card__title {
	font-size: var(--wp--preset--font-size--x-large);
}

/* Referral */

.referral__inner {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--40);
	border-radius: 14px;
	background: var(--wp--preset--color--highlight);
}

.referral__icon {
	color: var(--wp--preset--color--accent);
}

.referral__body {
	flex: 1;
}

.referral__title {
	margin: 0 0 0.25rem;
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--large);
}

.referral__text {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Newsletter */

.newsletter__inner {
	max-width: 42rem;
	margin-inline: auto;
	text-align: center;
}

.newsletter__title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 0.5rem;
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--x-large);
}

.newsletter__text {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
}

.newsletter__note {
	margin: var(--wp--preset--spacing--10) 0 0;
	color: var(--wp--preset--color--muted);
	font-size: 12px;
}

@media (max-width: 64em) {
	.home-guides__grid {
		grid-template-columns: 1fr 1fr;
	}

	.features__list {
		grid-template-columns: 1fr 1fr;
	}

	.features__item:nth-child(odd) {
		border-inline-start: 0;
		padding-inline-start: 0;
	}
}

@media (max-width: 48em) {
	.hero__slide {
		min-height: 300px;
		padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	}

	.hero__body {
		max-width: none;
	}

	.product-highlights__grid,
	.features__list {
		grid-template-columns: 1fr;
	}

	.features__item {
		border-inline-start: 0;
		padding-inline-start: 0;
	}

	.home-guides__grid {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.home-guides__grid > * {
		flex: 0 0 82%;
		scroll-snap-align: start;
	}

	.referral__inner {
		flex-direction: column;
		text-align: center;
	}
}
