/*
 * ECDI phone-layout fixes (Nov 2026).
 * Loaded after every theme stylesheet. Everything is inside max-width: 767px,
 * Enfold's own phone breakpoint, so tablet and desktop rendering is unchanged.
 */
@media only screen and (max-width: 767px) {

	/* ---------- Readability ---------- */

	/* Theme default is 13px; 15px is comfortable on a phone. Raising the base size keeps
	   blocks that set their own size (hero text, headings) at the size the theme gives them. */
	.responsive body#top {
		font-size: 15px;
	}
	.responsive #top #main .entry-content-wrapper,
	.responsive #top #main .tab_inner_content {
		line-height: 1.6;
	}

	/* Justified text leaves big gaps between words on a narrow column. */
	.responsive #top #main [style*="text-align: justify"],
	.responsive #top #main [style*="text-align:justify"],
	.responsive #top #main [align="justify"],
	.responsive #top .fullsize .template-blog .post .entry-content-wrapper {
		text-align: left !important;
	}

	/* Text pasted from Word carries Times New Roman inline; use the site font instead. */
	.responsive #top #main .entry-content-wrapper [style*="font-family"] {
		font-family: inherit !important;
	}

	/* Home "About Us" block is right-aligned for the desktop two-column layout. */
	.responsive #top #main .avia_textblock [style*="text-align: right"] {
		text-align: left !important;
	}
	.responsive #top #main .hr-short.hr-right .hr-inner {
		left: 0;
		right: auto;
		margin-left: 0;
	}

	/* Top bar (company name + phone) */
	.responsive #header_meta .phone-info {
		font-size: 13px;
	}
	.responsive #header_meta .phone-info a {
		display: inline-block;
		padding: 6px 0;
	}

	/* Breadcrumbs: 11px text with 15px-tall links. Let the bar grow when a long trail wraps
	   (the last crumb used to fall below the grey bar), and give the links a taller tap area
	   through line-height (the theme makes them blocks, so vertical padding shifts them). */
	.responsive #top .title_container .container {
		height: auto;
		min-height: 0;
	}
	.responsive #top .title_container .breadcrumb {
		position: relative;
		top: auto;
		right: auto;
		margin: 0;
		width: auto;
	}
	.responsive #top .breadcrumb,
	.responsive #top .breadcrumb .breadcrumb-trail,
	.responsive #top .breadcrumb .breadcrumb-title {
		font-size: 13px;
		line-height: 24px;
	}
	.responsive #top .breadcrumb a {
		padding: 0 3px;
		line-height: 28px;
	}
	.responsive #top .breadcrumb .sep,
	.responsive #top .breadcrumb .trail-end {
		line-height: 28px;
	}

	/* ---------- Footer ---------- */

	.responsive #footer .news-title {
		font-size: 14px;
		line-height: 1.45;
	}
	.responsive #footer .news-time {
		font-size: 12px;
	}
	.responsive #footer .news-wrap li {
		padding: 6px 0;
	}
	.responsive #footer .news-link {
		display: block;
		min-height: 44px;
	}
	/* Articles without a photo show an empty dark square; keep the spacing, hide the box. */
	.responsive #footer .news-thumb.no-news-thumb {
		visibility: hidden;
	}
	.responsive #footer .widget {
		padding-bottom: 10px;
	}
	.responsive #footer a[href^="tel:"],
	.responsive #footer a[href^="mailto:"],
	.responsive .socket_color a {
		display: inline-block;
		padding: 6px 0;
	}

	/* ---------- Product tabs (Overview / Features & Benefits / Literature) ---------- */

	/* Box padding plus inner padding left a 270px text column; give the text the full width. */
	.responsive #top .tabcontainer .tab_content {
		padding: 10px 16px;
	}
	.responsive #top .tabcontainer .tab {
		font-size: 15px;
		padding: 14px 16px;
	}

	/* Purchase / quote buttons: stacked full width instead of one left, one right. */
	.responsive #top #main .avia-button-wrap {
		display: block;
		float: none;
		text-align: center;
		margin: 0 0 12px;
	}
	.responsive #top #main .avia-button-wrap .avia-button {
		display: block;
		width: 100%;
		float: none;
		margin: 0;
		font-size: 15px;
		box-sizing: border-box;
	}

	/* ---------- Home page ---------- */

	/* Icon list (Quality and Integrity, careers, ...) inherits the site's arrow bullet image. */
	.responsive #top .avia-icon-list > li {
		list-style: none;
	}

	/* "Select by Application": six 16%-wide images with hover-only labels.
	   Show them as a two-column grid of tiles with visible labels. */
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 16px 14px;
		margin: 0 !important;
		width: 100% !important;
	}
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] > div[style*="width: 16%"] {
		width: auto !important;
		float: none !important;
	}
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] .tooltips,
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] .tooltips a {
		display: block;
		width: 100%;
	}
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] img {
		display: block;
		width: 100%;
		height: auto !important;
		aspect-ratio: 1 / 1;
		object-fit: cover;
		border-radius: 4px;
	}
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a::after {
		display: block;
		padding: 8px 0 0;
		font-size: 14px;
		font-weight: 600;
		line-height: 1.3;
		text-align: center;
		color: #fff;
	}
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a[href="/drinking-water/"]::after { content: "Drinking Water"; }
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a[href="/Power/"]::after { content: "Power"; }
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a[href="/municipal-wastewater-treatment/"]::after { content: "Municipal Wastewater"; }
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a[href="/metal-mining/"]::after { content: "Metal & Mining"; }
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a[href="/chemical/"]::after { content: "Chemical"; }
	.responsive #top #main .avia_textblock > div[style*="margin: 0px 30px"] a[href="/semiconductor/"]::after { content: "Semiconductor"; }

	/* ---------- Hub pages (About ECD, Solve, Control, Chemical, ...) ---------- */

	/* These pages have no body text: their sub-page links live in the sidebar, which the
	   theme hides on phones, leaving only a comment form. Show the sidebar under the page. */
	.responsive #top #main .container:has(#respond) > .sidebar {
		display: block !important;
		width: 100%;
		margin: 20px 0 0;
		padding: 0;
		border: 0;
		float: none;
	}
	.responsive #top #main .container:has(#respond) > .sidebar .inner_sidebar {
		margin: 0;
	}
	.responsive #top #main .container:has(#respond) > .sidebar .widget li a {
		display: block;
		padding: 8px 0;
		font-size: 15px;
	}
	.responsive #top #main .container:has(#respond) > .content {
		padding-bottom: 0;
		margin-bottom: 0;
		min-height: 0;
	}
	.responsive #top #main .container:has(#respond) > .sidebar {
		padding-top: 10px;
	}
	.responsive #top #main .sidebar select {
		width: 100%;
		max-width: 100%;
	}
	/* The WordPress comment form has no backend on this site. */
	.responsive #top #main .comment-entry,
	.responsive #top #main #comments,
	.responsive #top #main #respond,
	.responsive #top #main .comment_meta_container,
	.responsive #top #main .comment-container {
		display: none !important;
	}

	/* ---------- Forms ---------- */

	/* iPhone zooms the page when a field under 16px gets focus. */
	.responsive #top input[type="text"],
	.responsive #top input[type="email"],
	.responsive #top input[type="tel"],
	.responsive #top input[type="url"],
	.responsive #top input[type="number"],
	.responsive #top input[type="search"],
	.responsive #top select,
	.responsive #top textarea {
		font-size: 16px !important;
	}
	.responsive #top .gform_wrapper .gfield_label {
		font-size: 14px;
	}
	.responsive #top .gform_wrapper input[type="text"],
	.responsive #top .gform_wrapper input[type="email"],
	.responsive #top .gform_wrapper input[type="tel"],
	.responsive #top .gform_wrapper select,
	.responsive #top .gform_wrapper textarea {
		width: 100% !important;
		min-height: 44px;
	}
}
