/*
 * Site footer — brand + nav columns + newsletter (Gravity Forms), plus a
 * bottom legal bar. Typography (font family/weight for headings/paragraphs)
 * comes from theme.json; only layout, colors and the newsletter form
 * theming (which reuses the global Gravity Forms styles) live here.
 */

.site-footer {
	padding-top: clamp(32px, 4vw, 56px);
	/* Padding, not margin on the child — margin-bottom on the last child
	   collapses through a parent with no padding/border of its own, so the
	   gray never actually showed below the white bar. */
	padding-bottom: clamp(32px, 4vw, 56px);
	padding-left: var(--wp--preset--spacing--container);
	padding-right: var(--wp--preset--spacing--container);
}

.site-footer__top {
	display: grid;
	grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
	gap: clamp(24px, 4vw, 48px);
	padding-bottom: clamp(32px, 4vw, 48px);
}

.site-footer__logo {
	display: block;
	margin: 0 0 12px;
	width: 110px;
	aspect-ratio: 133 / 49;
	background: url('../images/LOGOBLUE.svg') left center / contain no-repeat;
}

.site-footer__tagline {
	margin: 0 0 16px;
	max-width: 260px;
	color: rgba(22, 22, 74, 0.6);
	font-size: 14px;
}

.site-footer__social {
	display: flex;
	gap: 10px;
}

.site-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--secondary);
	transition: opacity 0.2s ease;
}

.site-footer__social-link:hover {
	opacity: 0.8;
}

.site-footer__col-title {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--primary-dark);
}

.site-footer__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.site-footer__nav-list a {
	color: rgba(22, 22, 74, 0.6);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.2s ease;
}

.site-footer__nav-list a:hover {
	color: var(--wp--preset--color--primary);
}

.site-footer__newsletter-desc {
	margin: 0 0 16px;
	max-width: 260px;
	color: rgba(22, 22, 74, 0.6);
	font-size: 14px;
}

/* Force flex with equal flex-basis instead of relying on GF's own grid/width
   classes for this pair — guarantees a true 50/50 split regardless of what
   Gravity Forms does internally for gfield--width-half. */
.site-footer__col--newsletter .gf-inline-form .gform_wrapper .gform_fields {
	display: flex !important;
	gap: 10px;
	align-items: center;
}

.site-footer__col--newsletter .gf-inline-form .gform_wrapper .gfield {
	flex: 1 1 0 !important;
	width: auto !important;
	max-width: none !important;
	box-sizing: border-box;
}

/*
 * Padding trimmed down to match the button's natural (smaller) height — the
 * button stays its normal size, the email field shrinks to meet it. The
 * global .gfield rule in gravity-forms.css sets its own padding with
 * !important, so this needs !important too to actually win here.
 */
.site-footer__col--newsletter .gf-inline-form .gform_wrapper .gfield:not(.gfield--type-submit) {
	min-height: 0;
	padding: 0 16px !important;
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(22, 22, 74, 0.12);
}

.site-footer__col--newsletter .gf-inline-form .gform_wrapper input[type="email"] {
	font-size: 14px;
}

.site-footer__col--newsletter .gf-inline-form .gform_wrapper .gform_button,
.site-footer__col--newsletter .gf-inline-form .gform_wrapper .gform-button {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 18px;
	font-size: 14px;
}

/*
 * main's own style.css also defines .site-footer__bottom (white rounded
 * card, background/border-radius/max-width) — set every property here
 * explicitly instead of leaving gaps, so nothing bleeds through from there.
 */
.site-footer__bottom {
	background: var(--wp--preset--color--white);
	border-radius: 10px;
	box-sizing: border-box;
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto;
	padding: 20px clamp(20px, 4vw, 40px);
}

.site-footer__legal {
	margin: 0;
	color: rgba(22, 22, 74, 0.5);
	font-size: 13px;
}

.site-footer__legal-nav {
	display: flex;
	gap: 20px;
}

.site-footer__legal-nav a {
	color: rgba(22, 22, 74, 0.5);
	text-decoration: none;
	font-size: 13px;
	transition: color 0.2s ease;
}

.site-footer__legal-nav a:hover {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 1024px) {
	.site-footer__top {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.site-footer__top {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__brand,
	.site-footer__col--newsletter {
		grid-column: 1 / -1;
	}

	.site-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.site-footer__legal-nav {
		flex-wrap: wrap;
	}
}
