/**
 * Section: list pages (Figma Solution / List 10661:66303 and Feature / List
 * 10665:69312): a large centred title, then the entries on a dark notched
 * panel.
 */

.hb-section.hb-section--list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--80);
	margin-top: var(--wp--preset--spacing--60);
	padding: 0;
}

.hb-section.hb-section--list > * {
	margin-block: 0;
}

.hb-list-head.hb-list-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--50);
	text-align: center;
}

.hb-list-head.hb-list-head > * {
	margin: 0;
}

.hb-list-head__title.hb-list-head__title {
	max-width: 40.25rem;
	letter-spacing: -0.0556em;
	line-height: 1;
}

.hb-list-head p {
	max-width: 34.625rem;
	letter-spacing: -0.04em;
	line-height: 1.3;
}

/* Solution rows: text and illustration, sides alternating. */
.hb-list-rows.hb-list-rows {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--90);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hb-list-rows > li {
	margin: 0;
}

.hb-list-row.hb-list-row {
	display: grid;
	grid-template-columns: minmax(0, 422fr) minmax(0, 603fr);
	align-items: center;
	gap: var(--wp--preset--spacing--80);
}

.hb-list-rows > li:nth-child(even) .hb-list-row {
	grid-template-columns: minmax(0, 603fr) minmax(0, 422fr);
}

.hb-list-rows > li:nth-child(even) .hb-list-row__media {
	order: -1;
}

.hb-list-row.hb-list-row > * {
	margin: 0;
}

.hb-list-row__text.hb-list-row__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--70);
}

.hb-list-row__head.hb-list-row__head {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

.hb-list-row__text.hb-list-row__text > *,
.hb-list-row__head.hb-list-row__head > * {
	margin: 0;
}

.hb-list-row__title.hb-list-row__title {
	letter-spacing: -0.042em;
	line-height: 1;
}

.hb-list-row__title a {
	color: inherit;
	text-decoration: none;
}

.hb-list-row__title a:hover,
.hb-list-row__title a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.hb-list-row__excerpt.hb-list-row__excerpt p {
	margin: 0;
	letter-spacing: -0.04em;
	line-height: 1.3;
}

.hb-list-row__more.hb-list-row__more {
	padding-bottom: var(--wp--preset--spacing--10);
	border-bottom: 1px solid currentColor;
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.25;
	text-decoration: none;
}

.hb-list-row__more:hover,
.hb-list-row__more:focus-visible {
	color: var(--wp--preset--color--accent);
}

.hb-list-row__media.hb-list-row__media {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--md);
}

.hb-list-row__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Feature illustrations whose UI overflows the 603 x 473 box (swapped in by
 * inc/block-filters.php), with the offsets of the homepage sections. */
.hb-list-row__media.hb-list-row__media:is(.hb-list-row__media--publish, .hb-list-row__media--promote, .hb-list-row__media--sell) {
	position: relative;
	overflow: visible;
	aspect-ratio: 603 / 473;
	border-radius: 0;
}

.hb-list-row__media:is(.hb-list-row__media--publish, .hb-list-row__media--promote, .hb-list-row__media--sell) img {
	position: absolute;
	max-width: none;
	height: auto;
	object-fit: initial;
}

.hb-list-row__media--publish img {
	top: -34.8837%;
	left: -18.2421%;
	width: 119.2371%;
}

.hb-list-row__media--promote img {
	top: -26.4271%;
	left: 0;
	width: 111.1111%;
}

.hb-list-row__media--sell img {
	top: -16.9133%;
	left: -8.2919%;
	width: 116.5837%;
}

/* Focus rings stay visible on the dark panel. */
.hb-panel--ticket a:focus-visible {
	outline-color: var(--wp--preset--color--accent);
}

@media (max-width: 1023.98px) {
	.hb-list-row.hb-list-row,
	.hb-list-rows > li:nth-child(even) .hb-list-row {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--60);
	}

	.hb-list-rows > li:nth-child(even) .hb-list-row__media {
		order: 0;
	}

	.hb-list-rows.hb-list-rows {
		gap: var(--wp--preset--spacing--80);
	}
}

/* Filter bar (Figma tab bar 10665:69705): white bar, tabs hug their labels. */
.hb-filter.hb-filter {
	align-self: center;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--base);
	box-shadow: 30px 34px 47px rgb(0 0 0 / 0.1);
}

.hb-filter__list.hb-filter__list {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-height: 3.375rem;
	margin: 0;
	padding: 0 1rem 0 0.5rem;
	list-style: none;
}

.hb-filter__list li {
	flex: none;
	margin: 0;
}

.hb-filter__list a {
	display: block;
	padding: calc(0.5rem - 1px) calc(1.5rem - 1px);
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--sm);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.25;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color var(--wp--custom--transition), background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}

.hb-filter__list a:hover {
	border-color: var(--wp--preset--color--border);
}

.hb-filter__list a:is([aria-current="true"], [aria-current="page"]) {
	border-color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* Feature groups on the dark panel (Figma "switch" 10665:69321): the rows are
 * 1090 wide and the dashed rules between them run the whole panel width, so
 * each group, not the panel, carries the side padding. */
.hb-feature-groups.hb-feature-groups {
	padding: 6.375rem 0;
	overflow-x: clip;
}

.hb-feature-group.hb-feature-group {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
	padding-inline: clamp(var(--wp--preset--spacing--50), 8.5%, 6.9375rem);
	scroll-margin-top: calc(var(--wp--custom--header--offset) + 2rem);
}

.hb-feature-group.hb-feature-group > * {
	margin: 0;
}

.hb-feature-group:not([hidden]) ~ .hb-feature-group:not([hidden]) {
	margin-top: 5.25rem;
	padding-top: calc(5.25rem + 1px);
}

.hb-feature-group:not([hidden]) ~ .hb-feature-group:not([hidden])::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: url("../../images/shapes/line-dashed-panel.png") 0 0 / 1313px 2px repeat-x;
	transform: rotate(180deg);
}

/* Category: 24px icon and 28px label (Figma item 10698:8400). */
.hb-feature-group__title.hb-feature-group__title {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-height: 2rem;
	font-weight: 400;
	letter-spacing: -0.05rem;
	line-height: 0.9286;
}

.hb-feature-group__title::before {
	content: "";
	flex: none;
	width: 1.5536rem;
	height: 1.5536rem;
	margin-inline: -0.0268rem;
	background-color: currentColor;
	-webkit-mask: var(--hb-icon) center / contain no-repeat;
	mask: var(--hb-icon) center / contain no-repeat;
}

.hb-feature-group__title.has-icon--publish { --hb-icon: url("../../icons/feature-publish-24.svg"); }
.hb-feature-group__title.has-icon--promote { --hb-icon: url("../../icons/feature-promote-24.svg"); }
.hb-feature-group__title.has-icon--sell { --hb-icon: url("../../icons/feature-sell-24.svg"); }

/* Cards: four 266px columns, the card padding hanging outside the row so the
 * texts line up with the category label. */
.hb-ghost-grid.hb-ghost-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
	max-width: none;
	margin: 0 calc(-1 * var(--wp--preset--spacing--50));
	padding: 0;
	list-style: none;
}

.hb-ghost-grid > li {
	margin: 0;
}

/* Ghost card (Figma wrapper-ghost, dark): the whole card is the link. */
.hb-ghost-card.hb-ghost-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	height: 100%;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--sm);
	transition: background-color var(--wp--custom--transition);
}

.hb-ghost-card.hb-ghost-card > * {
	margin: 0;
}

.hb-ghost-card:hover,
.hb-ghost-card:focus-within {
	background-color: var(--wp--preset--color--primary-hover);
}

/* Titles take two lines, so the descriptions of a row line up. */
.hb-ghost-card__title.hb-ghost-card__title {
	min-height: 2em;
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1;
}

.hb-ghost-card__title a {
	color: inherit;
	text-decoration: none;
}

.hb-ghost-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hb-ghost-card__text p {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--wp--preset--color--muted);
	letter-spacing: -0.05rem;
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

@media (max-width: 1023.98px) {
	.hb-ghost-grid.hb-ghost-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781.98px) {
	.hb-feature-groups.hb-feature-groups {
		padding: 5.5rem 0;
	}

	.hb-feature-group.hb-feature-group {
		padding-inline: var(--wp--preset--spacing--50);
	}

	.hb-feature-group:not([hidden]) ~ .hb-feature-group:not([hidden]) {
		margin-top: var(--wp--preset--spacing--70);
		padding-top: calc(var(--wp--preset--spacing--70) + 1px);
	}

	.hb-ghost-grid.hb-ghost-grid {
		gap: var(--wp--preset--spacing--20);
		margin-inline: calc(-1 * var(--wp--preset--spacing--40));
	}

	.hb-ghost-card.hb-ghost-card {
		padding: var(--wp--preset--spacing--40);
	}
}

@media (max-width: 599.98px) {
	/* The four tabs share the width of the screen. */
	.hb-filter.hb-filter {
		align-self: stretch;
	}

	.hb-filter__list.hb-filter__list {
		justify-content: space-between;
		gap: var(--wp--preset--spacing--10);
		padding-inline: var(--wp--preset--spacing--20);
	}

	.hb-filter__list a {
		padding-inline: var(--wp--preset--spacing--20);
		font-size: var(--wp--preset--font-size--small);
	}

	.hb-ghost-grid.hb-ghost-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.hb-ghost-card__title.hb-ghost-card__title {
		min-height: 0;
	}
}

@media (max-width: 374.98px) {
	.hb-filter__list.hb-filter__list {
		gap: 2px;
		padding-inline: var(--wp--preset--spacing--10);
	}

	.hb-filter__list a {
		padding-inline: 0.375rem;
	}
}
