/**
 * Energy Coast UTC — mobile optimization (touch targets, overflow, layout).
 * No WP admin content changes required.
 */

/* ——— Overflow & text scaling ——— */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	overflow-x: clip;
}

.l-canvas,
#page-content,
#page-footer {
	max-width: 100%;
	overflow-x: clip;
}

/* ——— Parallax / fixed backgrounds (iOS jank + gap under header) ——— */
@media (max-width: 1023.98px) {
	.l-section.parallax_ver > .l-section-img,
	.l-section.parallax_fixed > .l-section-img,
	.l-section.with_img > .l-section-img {
		background-attachment: scroll !important;
	}

	#page-content .us_custom_221461f7,
	#page-content .us_custom_92157aa3,
	#page-content .us_custom_89c39cd8,
	#page-content .us_custom_4431b62f {
		background-attachment: scroll !important;
	}
}

/* ——— Hero / panel spacing ——— */
@media (max-width: 767.98px) {
	#page-content .us_custom_cf389674,
	#page-content .us_custom_4b261ef8 {
		margin: 1.25rem 0 !important;
		padding: 1.15rem !important;
	}

	#page-content .vc_column-inner.us_custom_7c9c8e3f,
	#page-content .vc_column-inner.us_custom_028de37e {
		padding-top: 2.75rem !important;
		padding-bottom: 2.75rem !important;
	}

	#page-content h1.vc_custom_heading,
	#page-content .us_custom_777a5a5b {
		font-size: clamp(1.45rem, 6.5vw, 2rem) !important;
		line-height: 1.2 !important;
	}

	#page-content .wpb_text_column,
	#page-content .w-text,
	#page-content .extcol {
		font-size: 1rem;
		line-height: 1.6;
	}

	#page-content .us_custom_89c39cd8 .w-separator.size_custom,
	#page-content .us_custom_4431b62f .w-separator.size_custom {
		height: 220px !important;
		min-height: 0 !important;
	}
}

/* ——— CTA buttons — min 44px touch target ——— */
@media (max-width: 767.98px) {
	#page-content a.w-btn[class*="us-btn-style"],
	#page-content button.w-btn[class*="us-btn-style"],
	#page-content .layout_2134 .ecutc-staff-email-btn,
	form.w-form-row[role="search"] .ecutc-a11y-search-submit {
		min-height: 44px;
		padding-top: 0.72rem !important;
		padding-bottom: 0.72rem !important;
	}

	#page-content .w-btn-wrapper.align_justify .w-btn {
		width: 100%;
	}
}

/* ——— Staff grid — beat Impreza inline absolute layout on narrow screens ——— */
@media (max-width: 767.98px) {
	#page-content #us_grid_1.layout_2134 .w-grid-item,
	#page-content .layout_2134 .w-grid-item {
		height: auto;
	}

	#page-content #us_grid_1.layout_2134 .w-grid-item-h,
	#page-content .layout_2134 .w-grid-item-h {
		display: flex !important;
		flex-direction: column !important;
		min-height: 0 !important;
		height: auto !important;
	}

	#page-content #us_grid_1.layout_2134 .ecutc-staff-card__main,
	#page-content .layout_2134 .ecutc-staff-card__main {
		display: grid !important;
		grid-template-columns: 1fr !important;
		grid-template-rows: auto auto minmax(0, 1fr) !important;
	}

	#page-content #us_grid_1.layout_2134 .ecutc-staff-card__main::after,
	#page-content .layout_2134 .ecutc-staff-card__main::after {
		display: none;
	}

	#page-content #us_grid_1.layout_2134 .usg_post_image_1,
	#page-content .layout_2134 .usg_post_image_1 {
		position: relative !important;
		grid-column: 1 !important;
		grid-row: 1 !important;
		left: auto !important;
		top: auto !important;
		right: auto !important;
		bottom: auto !important;
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 1 / 1 !important;
		max-height: 280px;
	}

	#page-content #us_grid_1.layout_2134 .usg_post_title_1,
	#page-content .layout_2134 .usg_post_title_1 {
		position: relative !important;
		grid-column: 1 !important;
		grid-row: 2 !important;
		left: auto !important;
		top: auto !important;
		right: auto !important;
		bottom: auto !important;
		align-self: start !important;
		padding: 0.85rem 1rem 0.25rem !important;
		font-size: 1.05rem !important;
	}

	#page-content #us_grid_1.layout_2134 .usg_post_custom_field_1,
	#page-content .layout_2134 .usg_post_custom_field_1 {
		position: relative !important;
		grid-column: 1 !important;
		grid-row: 3 !important;
		left: auto !important;
		top: auto !important;
		right: auto !important;
		bottom: auto !important;
		display: flex !important;
		flex-direction: column;
		justify-content: flex-end;
		min-height: 0;
		overflow: hidden;
		padding: 0 1rem 1rem !important;
		font-size: 0.875rem !important;
		line-height: 1.45 !important;
	}

	#page-content #us_grid_1.layout_2134 .ecutc-staff-card__main:not(:has(.usg_post_custom_field_1 .w-post-elm-value:not(:empty))) .usg_post_title_1,
	#page-content .layout_2134 .ecutc-staff-card__main:not(:has(.usg_post_custom_field_1 .w-post-elm-value:not(:empty))) .usg_post_title_1 {
		grid-row: 2 / span 2 !important;
		padding-bottom: 1rem !important;
	}

	#page-content #us_grid_1.layout_2134 .ecutc-staff-card__main:not(:has(.usg_post_custom_field_1 .w-post-elm-value:not(:empty))),
	#page-content .layout_2134 .ecutc-staff-card__main:not(:has(.usg_post_custom_field_1 .w-post-elm-value:not(:empty))) {
		grid-template-rows: auto minmax(0, 1fr) !important;
	}

	#page-content #us_grid_1.layout_2134 .ecutc-staff-card__footer .ecutc-staff-email-btn,
	#page-content .layout_2134 .ecutc-staff-card__footer .ecutc-staff-email-btn {
		border-radius: 0 0 11px 11px;
	}
}

/* ——— Footer columns — stack & touch-friendly links ——— */
@media (max-width: 767.98px) {
	#page-footer .color_footer-bottom .us_custom_20437ce5,
	#page-footer .color_footer-bottom .us_custom_5fd581cf,
	#page-footer .color_footer-bottom .us_custom_d2199d32 {
		margin-left: 0 !important;
		margin-top: 1.5rem !important;
		padding-right: 0 !important;
	}

	#page-footer .color_footer-bottom .us_custom_20437ce5:first-child,
	#page-footer .color_footer-bottom .g-cols > .wpb_column:first-child .us_custom_20437ce5 {
		margin-top: 0 !important;
	}

	#page-footer .color_footer-bottom .w-menu.style_links .menu-item > a {
		min-height: 44px;
		padding: 0.55em 0;
	}

	#page-footer .w-socials.style_colored .w-socials-item-link {
		min-width: 44px;
		min-height: 44px;
	}
}

/* ——— Impreza tabs — larger tap targets ——— */
@media (max-width: 767.98px) {
	.w-tabs-section-header,
	.w-tabs-section-header button {
		min-height: 48px;
	}

	.w-tabs-section-header .w-tabs-section-title,
	.w-tabs-section-header .w-tabs-item-title {
		font-size: 0.95rem;
		line-height: 1.35;
	}
}

/* ——— WP File Download action buttons ——— */
@media (max-width: 767.98px) {
	.wpfd-content a.table-download-category,
	.wpfd-content a.downloadlink,
	.wpfd-content a.openlink,
	.wpfd-content .col-download a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0.5rem 0.85rem !important;
	}
}
