/**
 * HFH footer: force readable column layout on tablet/mobile (Quick Links, Keep in touch, Take Action).
 * Astra often keeps 4 equal columns “inline” — too narrow; we use 2×2 then single column.
 */

/**
 * Footer column 1: logo assets were stretching to full grid cell width.
 * Preserve natural aspect ratio; cap size so alignment matches design intent.
 */
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .site-branding img,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .site-logo-img img,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .custom-logo-link img,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .elementor-widget-image img,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .wp-block-image img {
	width: auto !important;
	max-width: min(100%, 260px) !important;
	height: auto !important;
	max-height: 110px !important;
	object-fit: contain !important;
	object-position: left center;
	display: block;
}

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .elementor-widget-image .elementor-widget-container {
	width: fit-content !important;
	max-width: 100% !important;
}

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .elementor-widget-image {
	text-align: left;
}

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .site-branding,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 .ast-site-identity {
	text-align: left;
}

/* Tablet and down: two columns, minmax prevents crushed gutters */
@media (max-width: 921px) {
	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-primary-footer-inner-wrap.ast-builder-grid-row,
	.site-above-footer-wrap[data-section="section-above-footer-builder"] .site-above-footer-inner-wrap.ast-builder-grid-row,
	.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-below-footer-inner-wrap.ast-builder-grid-row {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		grid-column-gap: clamp(1rem, 4vw, 1.5rem) !important;
		grid-row-gap: clamp(1.25rem, 3vw, 2rem) !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-section,
	.site-above-footer-wrap[data-section="section-above-footer-builder"] .site-footer-section,
	.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section {
		min-width: 0 !important;
		width: 100% !important;
		max-width: none !important;
		margin-bottom: 0 !important;
	}

	/* Quick Links & other footer menus: avoid ugly mid-word breaks in narrow cells */
	.site-footer .widget_nav_menu .menu-item a,
	.site-footer .widget_nav_menu .menu-link {
		word-break: normal;
		overflow-wrap: break-word;
		hyphens: none;
	}

	/* Keep in touch: prefer whole words; break only if needed */
	.hfh-keep-in-touch__text {
		word-break: normal;
		overflow-wrap: break-word;
	}

	/* CTA labels stay on one line when there is room (fixes “d o n a t e” stacking) */
	.hfh-act-now__btn {
		white-space: nowrap;
		justify-content: center;
		max-width: 100%;
	}
}

/* Mobile: single column stack */
@media (max-width: 544px) {
	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-primary-footer-inner-wrap.ast-builder-grid-row,
	.site-above-footer-wrap[data-section="section-above-footer-builder"] .site-above-footer-inner-wrap.ast-builder-grid-row,
	.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-below-footer-inner-wrap.ast-builder-grid-row {
		grid-template-columns: 1fr !important;
		grid-row-gap: 2rem !important;
	}

	.hfh-act-now__btn {
		white-space: normal;
		text-align: center;
	}
}
