/* Page sections built from native group blocks. */
.entry-content > .gh-section {
	margin-inline: 0 !important;
	max-width: none !important;
	padding-block: clamp(2.5rem, 6vw, 5rem);
	padding-inline: 0;
	width: auto !important;
}

.entry-content > .gh-section:nth-of-type(even) {
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 100vmax var(--wp--preset--color--white);
	clip-path: inset(0 -100vmax);
}

.entry-content > .gh-section.is-layout-constrained > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
}

.entry-content > .gh-section > :is(p, ul, ol, .wp-block-details) {
	max-width: 70ch !important;
}

.entry-content > .gh-section:nth-of-type(even) {
	background: var(--wp--preset--color--white);
}

.gh-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}

.gh-row > .gh-block {
	flex: 1 1 320px;
	margin-block-start: 0 !important;
	min-width: 0;
}

.gh-section h1 {
	font-size: var(--wp--preset--font-size--headline);
	max-width: 22ch;
}

.gh-section h2 {
	margin-bottom: 1.25rem;
	max-width: 30ch;
}

.gh-section .wp-block-image img {
	display: block;
	height: auto;
	max-width: 100%;
}

.gh-item {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-block: 1.25rem;
}

.gh-item h3 {
	margin-bottom: 0.5rem;
}

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-block: 0.25rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--subtitle);
	font-weight: 700;
	min-height: 44px;
	padding-block: 0.6rem;
}

.gh-map {
	border: 0;
	display: block;
	width: 100%;
}

.entry-content .wp-block-list {
	padding-left: 1.25rem;
}

.entry-content .wp-block-buttons {
	margin-top: 1.5rem;
}

.gh-hero {
	align-items: start;
	padding-block: clamp(2.5rem, 7vw, 6rem);
}

.gh-hero h1 {
	max-width: 14ch;
}

.gh-grid {
	align-items: start;
}

.gh-grid > .gh-block {
	flex: 1 1 220px;
}

.gh-riqueza {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	padding: 1.5rem;
}

.gh-riqueza-title {
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--title);
	font-weight: 700;
	line-height: 1.1;
	margin: 0 0 1rem;
}

.gh-riqueza {
	box-sizing: border-box;
	max-width: 100%;
}

.gh-riqueza table {
	border: 0;
	margin-bottom: 1.25rem;
	table-layout: fixed;
}

.gh-riqueza td,
.gh-riqueza th {
	overflow-wrap: anywhere;
}

.gh-section-photo {
	padding-block: 0;
}

/* Space above and below the page content. Pages built from sections carry their own space. */
.ast-plain-container.ast-no-sidebar #primary {
	padding-block: 2.5rem 4rem;
}

.ast-plain-container.ast-no-sidebar #primary:has(.entry-content > .gh-section) {
	padding-block: 0;
}

body.woocommerce-shop.ast-plain-container.ast-no-sidebar #primary {
	padding-bottom: 4rem;
}

/* Photos */
.gh-page-photo {
	margin: 0 0 2rem;
}

.gh-page-photo img,
.gh-banner-photo img,
.gh-side-photo img {
	display: block;
	height: auto;
	width: 100%;
}

.gh-banner-photo {
	margin: 0;
}

.gh-banner-photo img {
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.gh-side-photo {
	margin: 0;
}

/* Story section: a centered text column over a soil and roots drawing. Use once per page. */
.entry-content > .gh-section.gh-story {
	isolation: isolate;
	padding-bottom: calc(clamp(2.5rem, 6vw, 5rem) + 6rem);
	position: relative;
}

.gh-story::before {
	background:
		url("../img/roots-left.svg") left top / auto 100% no-repeat,
		url("../img/roots-right.svg") right top / auto 100% no-repeat,
		url("../img/soil-strata.svg") left bottom / 600px 140px repeat-x;
	content: "";
	inset: 0 calc(50% - 50vw);
	pointer-events: none;
	position: absolute;
	z-index: -1;
}

.entry-content > .gh-section.gh-story.is-layout-constrained > *,
.entry-content > .gh-story.wp-block-group > * {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 42rem !important;
}

/* A story band inside a plain page (for example after a product list): its own white band and space. */
.entry-content > .gh-story:not(.gh-section) {
	isolation: isolate;
	margin-top: clamp(3rem, 6vw, 4.5rem);
	padding-block: clamp(2.5rem, 6vw, 4.5rem) calc(clamp(2.5rem, 6vw, 4.5rem) + 6rem);
	position: relative;
}

.entry-content > .gh-story:not(.gh-section)::before {
	background-color: var(--wp--preset--color--white);
}

.entry-content > .gh-story:not(.gh-section) > :first-child {
	margin-top: 0;
}

.entry-content > .gh-story:not(.gh-section) h2 {
	font-size: var(--wp--preset--font-size--subtitle);
	margin: 2.5rem 0 0.75rem;
}

/* The page ends with the band: no page space below it. */
.ast-plain-container.ast-no-sidebar #primary:has(.entry-content > .gh-story:last-child) {
	padding-bottom: 0;
}

.gh-story .gh-lead {
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--subtitle);
	line-height: 1.5;
}

@media (max-width: 1100px) {
	.gh-story::before {
		background: url("../img/soil-strata.svg") left bottom / 600px 140px repeat-x;
	}
}

/* Line icons. Add "gh-icon gh-icon--<name>" to a group; the icon shows above its content. */
.gh-icon::before {
	background: center / contain no-repeat;
	content: "";
	display: block;
	height: 4rem;
	margin-bottom: 1.25rem;
	width: 4rem;
}

.gh-item.gh-icon::before {
	height: 3rem;
	margin-bottom: 1rem;
	width: 3rem;
}

.gh-icon--innovation::before { background-image: url("../img/icon-innovation.svg"); }
.gh-icon--quality::before { background-image: url("../img/icon-quality.svg"); }
.gh-icon--sustainability::before { background-image: url("../img/icon-sustainability.svg"); }
.gh-icon--productivity::before { background-image: url("../img/icon-productivity.svg"); }
.gh-icon--profitability::before { background-image: url("../img/icon-profitability.svg"); }
.gh-icon--pin::before { background-image: url("../img/icon-pin.svg"); }
.gh-icon--phone::before { background-image: url("../img/icon-phone.svg"); }
.gh-icon--mail::before { background-image: url("../img/icon-mail.svg"); }

/* Pillars: three or two columns with a top rule. */
.gh-pillars {
	display: grid;
	gap: 2.5rem 3rem;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	margin-top: 2.5rem;
}

.gh-pillars > .gh-pillar {
	border-top: 1px solid var(--wp--preset--color--line);
	margin: 0;
	padding-top: 1.75rem;
}

.gh-pillar h3 {
	font-size: var(--wp--preset--font-size--title);
	margin: 0 0 0.25rem;
}

.gh-pillar .gh-pillar-lead {
	color: var(--wp--preset--color--humus);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--subtitle);
	line-height: 1.3;
	margin: 0 0 1rem;
}

.gh-pillar .wp-block-image {
	margin: 0 0 1.5rem;
}

/* Quality seals on the home page: logos at a fixed height, not at full column width. */
.gh-seals .wp-block-image img {
	height: 7.5rem;
	object-fit: contain;
	object-position: left center;
	width: auto;
}

.gh-pillar .wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}
