/* ------------------------------------------------------------------
   SmallGroupCorner – block styles and small layout helpers.
   Colors, type and spacing come from theme.json presets.
   ------------------------------------------------------------------ */

/* Keep the footer at the bottom so no white strip shows below it. */
.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.wp-site-blocks > main {
	flex: 1 0 auto;
}
.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

:where(.wp-site-blocks) a:focus-visible,
:where(.wp-site-blocks) button:focus-visible {
	outline: 2px solid var(--wp--preset--color--green);
	outline-offset: 3px;
}

/* ---------- Group: cards ---------- */
.wp-block-group.is-style-card {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--linen);
	border-radius: var(--wp--custom--radius--medium);
	overflow: hidden;
}
.wp-block-group.is-style-card-cream {
	background-color: var(--wp--preset--color--cream);
	border-radius: var(--wp--custom--radius--medium);
	overflow: hidden;
}
.wp-block-group.is-style-card:where(:not([style*="padding"])),
.wp-block-group.is-style-card-cream:where(:not([style*="padding"])) {
	padding: clamp(1.5rem, 3vw, 2.25rem);
}
/* Cards with a background colour set in the editor keep that colour. */
.wp-block-group.is-style-card.has-background,
.wp-block-group.is-style-card-cream.has-background {
	border-color: transparent;
}
.wp-block-group.has-background[class*="is-style-card"] {
	border-radius: var(--wp--custom--radius--medium);
}
.is-style-card .wp-block-post-featured-image img {
	border-radius: 0;
}
.wp-block-group.is-radius-large {
	border-radius: var(--wp--custom--radius--large);
}

/* ---------- Paragraph: eyebrow + pill ---------- */
p.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
}
p.is-style-eyebrow:where(:not(.has-text-color)) {
	color: var(--wp--preset--color--green-text);
}
p.is-style-pill {
	display: block;
	width: fit-content;
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.3em 1em;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	line-height: 1.5;
}
p.is-style-pill:where(:not(.has-background)) {
	background-color: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--ink);
}
p.is-style-pill.has-text-align-center {
	margin-inline: auto;
}
p.is-style-pill a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Forms (WPForms, MailPoet) ---------- */
.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel,
.wpforms-container .wpforms-field-label-inline {
	color: inherit !important;
	font-weight: 600;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container textarea,
.mailpoet_form input[type="text"],
.mailpoet_form input[type="email"] {
	width: 100% !important;
	max-width: 100% !important;
	border: 1px solid var(--wp--preset--color--stone) !important;
	border-radius: var(--wp--custom--radius--small) !important;
	padding: 0.8rem 1rem !important;
	font: inherit !important;
	color: var(--wp--preset--color--ink) !important;
	background: var(--wp--preset--color--white) !important;
}
.wpforms-container button[type="submit"],
.mailpoet_form input[type="submit"] {
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--white) !important;
	border: 0 !important;
	border-radius: var(--wp--custom--radius--pill) !important;
	padding: 0.95rem 1.6rem !important;
	font: inherit !important;
	font-weight: 600 !important;
	height: auto !important;
	cursor: pointer;
}
.has-ink-background-color .wpforms-container button[type="submit"],
.has-ink-background-color .mailpoet_form input[type="submit"] {
	background: var(--wp--preset--color--gold) !important;
	color: var(--wp--preset--color--ink) !important;
}

/* ---------- Lists ---------- */
ul.is-style-pills,
.wp-block-categories.is-style-pills {
	list-style: none;
	padding: 0;
	margin-left: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}
ul.is-style-pills > li,
.wp-block-categories.is-style-pills > li {
	margin: 0;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--linen);
	border-radius: var(--wp--custom--radius--pill);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.4;
}
ul.is-style-pills > li {
	padding: 0.5rem 1.1rem;
}
.wp-block-categories.is-style-pills > li > a {
	display: inline-block;
	padding: 0.6rem 1.15rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.wp-block-categories.is-style-pills > li:hover,
.wp-block-categories.is-style-pills > li.current-cat {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
}
.wp-block-categories.is-style-pills > li:hover > a,
.wp-block-categories.is-style-pills > li.current-cat > a {
	color: var(--wp--preset--color--white);
}

ul.is-style-checklist {
	list-style: none;
	padding-left: 0;
}
ul.is-style-checklist > li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.65rem;
}
ul.is-style-checklist > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.3rem;
	height: 1.3rem;
	background-color: var(--wp--preset--color--green);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

ul.is-style-plain {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
ul.is-style-plain > li {
	margin: 0 0 0.6rem;
}
ul.is-style-plain a {
	color: inherit;
	text-decoration: none;
}
ul.is-style-plain a:hover {
	text-decoration: underline;
}

/* ---------- Images ---------- */
.wp-block-image.is-style-rounded-sm img {
	border-radius: 10px;
}
.wp-block-image.is-style-rounded-lg img {
	border-radius: var(--wp--custom--radius--large);
}

/* ---------- Details: FAQ ---------- */
.wp-block-details.is-style-faq summary,
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.35;
	min-height: 2rem;
}
.wp-block-details.is-style-faq > :not(summary) {
	color: var(--wp--preset--color--charcoal);
}
.wp-block-details.is-style-faq:last-child {
	border-bottom: 0;
}

/* ---------- Header / navigation ---------- */
.site-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--green-text);
}
.site-header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--green-text);
	font-weight: 600;
}

/* ---------- Resource category hero ---------- */
.sgc-category-hero a {
	color: inherit;
}
.sgc-category-hero a:hover {
	color: var(--wp--preset--color--white);
}
.sgc-category-hero .wp-block-term-description p {
	margin: 0;
}

/* ---------- Footer ---------- */
@media (min-width: 600px) {
	.sgc-footer-nav .wp-block-navigation__container {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.6rem 2.5rem;
	}
}
.site-footer a {
	color: var(--wp--preset--color--linen);
}
.site-footer a:hover {
	color: var(--wp--preset--color--white);
}

/* ---------- Buttons on dark backgrounds ---------- */
.has-ink-background-color .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color),
.has-deep-background-color .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--preset--color--cream);
}

/* ---------- Query loop cards ---------- */
.wp-block-post-template .is-style-card {
	height: 100%;
}
/* Posts without a featured image get a branded placeholder instead of a blank area. */
.wp-block-post-template .is-style-card:not(:has(.wp-block-post-featured-image))::before {
	content: "";
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--wp--preset--color--forest) url("../images/icon.png") center / 72px no-repeat;
}
.wp-block-post-template .is-style-card .wp-block-post-title {
	margin-top: 0;
}
.wp-block-post-excerpt__more-text {
	display: none;
}

/* The duplicate leading H1 in older posts is removed in functions.php. */
.single .wp-block-post-content > :first-child {
	margin-block-start: 0;
}

/* ---------- Author box ---------- */
.sgc-author-box .wp-block-post-author {
	align-items: center;
	gap: 1rem;
}
.sgc-author-box .wp-block-post-author__avatar img {
	border-radius: 999px;
}
.sgc-author-box .wp-block-post-author__name {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	margin: 0;
}
.sgc-author-box .wp-block-post-author__byline {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--green-text);
	margin: 0;
}
.sgc-author-box .wp-block-post-author__bio {
	color: var(--wp--preset--color--charcoal);
	margin-top: 0.35rem;
}

/* ---------- Search ---------- */
.wp-block-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.8rem 1.2rem;
	font: inherit;
	background: var(--wp--preset--color--white);
}
.wp-block-search .wp-block-search__button {
	border-radius: var(--wp--custom--radius--pill);
	margin-left: 0.5rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.sgc-hide-mobile {
		display: none !important;
	}
}
