/* Device-specific header pieces (desktop/tablet vs mobile render of the original). */
@media (max-width: 767px) { .ech-d-only { display: none !important; } }
@media (min-width: 768px) { .ech-m-only { display: none !important; } }

/* Background slideshows */
.bgGallerySlideHolder { position: absolute; inset: 0; }
.bgGallerySlideHolder .bgGallerySlide { position: absolute; inset: 0; background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; opacity: 0; transition: opacity 1s ease-in-out; }
.bgGallerySlideHolder .bgGallerySlide.ech-on { opacity: 1; }

/* Entrance animation used on the original */
[data-ech-anim] { opacity: 0; transform: translateY(30px); transition: opacity 1.5s ease, transform 1.5s ease; }
[data-ech-anim].ech-in { opacity: 1; transform: none; }

/* Form states */
form[data-ech-form].ech-sending input[type=submit] { opacity: .6; pointer-events: none; }

/* reCAPTCHA row of the original only takes space on phones */
@media (min-width: 768px) { .ech-captcha-space { display: none !important; } }

/* New logo (with phone + tagline) needs a little more height on phones to stay readable.
   The logo box keeps its original width, so the bigger image is centred over it. */
@media (max-width: 767px) {
	#mobile-hamburger-header .imageWidget img,
	#mobile-hamburger-drawer .imageWidget img {
		height: 58px !important; width: auto !important; max-width: none !important;
		position: relative !important; left: 50% !important; transform: translateX(-50%) !important;
	}
}

/* ---------- Header v2 (client's mockup, desktop only; tablet/mobile keep the hamburger header) ---------- */
/* Duda ids start with a digit, so elements are matched by their .u_<id> classes; "#dm #hcontainer"
   gives these rules enough weight over the original theme's !important rules. */
@media (min-width: 1025px) {
	#dm #hcontainer .u_1526574882 { padding-top: 6px !important; padding-bottom: 6px !important; }
	#dm #hcontainer .u_1526574882 > .dmRespColsWrapper { max-width: 1640px !important; width: 100% !important; margin: 0 auto !important; padding: 0 24px !important; box-sizing: border-box !important; align-items: center !important; }
	#dm #hcontainer .u_1526574882 .dmRespCol { display: flex !important; flex-direction: column !important; justify-content: center !important; float: none !important; padding-left: 0 !important; padding-right: 0 !important; }
	#dm #hcontainer .u_1484489703 { width: 33% !important; max-width: 33% !important; flex: 0 0 33% !important; }
	#dm #hcontainer .u_1493950271 { width: 30% !important; max-width: 30% !important; flex: 0 0 30% !important; }
	#dm #hcontainer .u_1796867565 { width: 37% !important; max-width: 37% !important; flex: 0 0 37% !important; }

	/* left: the two intro lines side by side, two lines each */
	#dm #hcontainer .u_1421084330 { display: flex !important; align-items: center !important; justify-content: center !important; gap: 34px !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }
	#dm #hcontainer .u_1421084330 p { margin: 0 !important; flex: 0 0 auto !important; white-space: normal !important; }
	#dm #hcontainer .u_1421084330 p:first-child { width: 170px !important; }
	#dm #hcontainer .u_1421084330 p:last-child { width: 240px !important; }

	/* centre: the new logo, big */
	#dm #hcontainer .u_1047957258 { margin: 0 auto !important; width: auto !important; max-width: 100% !important; }
	#dm #hcontainer img[id="1308933526"] { height: 180px !important; width: auto !important; max-width: 100% !important; object-fit: contain !important; display: block !important; margin: 0 auto !important; }

	/* right: CALL (outlined) + GET A QUOTE side by side */
	#dm #hcontainer .u_1526574882 .u_1796867565 { flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 34px !important; }
	#dm #hcontainer .u_1796867565 .ech-call-wrap { order: 1 !important; flex: 0 0 auto !important; width: auto !important; }
	#dm #hcontainer .u_1796867565 a.u_1949844355 { order: 2 !important; margin: 0 !important; width: 200px !important; min-width: 0 !important; max-width: none !important; height: 54px !important; flex: 0 0 auto !important; }
	#dm .ech-call-btn {
		display: inline-flex !important; align-items: center; justify-content: center; height: 54px; padding: 0 26px;
		border: 3px solid #4fb0e8; border-radius: 30px; background: #fff; white-space: nowrap; box-sizing: border-box;
		font-family: 'Oswald', sans-serif !important; font-weight: 600; font-size: 26px; letter-spacing: .5px; line-height: 1;
		color: #1a8bd2 !important; text-decoration: none !important; box-shadow: 0 1px 3px rgba(0,0,0,.15);
	}
	#dm .ech-call-btn:hover { background: #f1f9fe; }

	/* menu: one slim line */
	#dm #hcontainer .u_1050906067 { padding-top: 0 !important; padding-bottom: 0 !important; min-height: 0 !important; }
	#dm #hcontainer .u_1050906067 .dmRespCol { padding-top: 0 !important; padding-bottom: 0 !important; min-height: 0 !important; }
	#dm #hcontainer .u_1050906067 nav { padding-top: 10px !important; padding-bottom: 10px !important; margin: 0 !important; }
	#dm #hcontainer .u_1050906067 nav > .unifiednav__container { flex-wrap: nowrap !important; justify-content: center !important; }
}
/* narrower desktops: scale the header down so everything stays on one line */
@media (min-width: 1025px) and (max-width: 1599px) {
	#dm #hcontainer img[id="1308933526"] { height: 150px !important; }
	#dm .ech-call-btn { font-size: 20px; padding: 0 14px; height: 46px; border-width: 2px; }
	#dm #hcontainer .u_1796867565 { gap: 14px !important; }
	#dm #hcontainer .u_1796867565 a.u_1949844355 { width: 150px !important; height: 46px !important; }
	#dm #hcontainer .u_1421084330 { gap: 16px !important; zoom: .85; }
}
@media (min-width: 1025px) and (max-width: 1279px) {
	#dm #hcontainer img[id="1308933526"] { height: 125px !important; }
	#dm .ech-call-btn { font-size: 16px; padding: 0 10px; height: 40px; }
	#dm #hcontainer .u_1796867565 { gap: 10px !important; }
	#dm #hcontainer .u_1796867565 a.u_1949844355 { width: 120px !important; height: 40px !important; }
	#dm #hcontainer .u_1421084330 { zoom: .72; }
}
/* menu scale steps (its natural width is ~1540px) */
@media (min-width: 1400px) and (max-width: 1599px) { #dm #hcontainer .u_1050906067 nav { zoom: .88; } }
@media (min-width: 1280px) and (max-width: 1399px) { #dm #hcontainer .u_1050906067 nav { zoom: .8; } }
@media (min-width: 1150px) and (max-width: 1279px) { #dm #hcontainer .u_1050906067 nav { zoom: .72; } }
@media (min-width: 1025px) and (max-width: 1149px) { #dm #hcontainer .u_1050906067 nav { zoom: .6; } }
@media (min-width: 1025px) and (max-width: 1599px) { #dm #hcontainer a.u_1949844355 .text { font-size: 16px !important; white-space: nowrap !important; } }
@media (min-width: 1025px) and (max-width: 1279px) { #dm #hcontainer a.u_1949844355 .text { font-size: 13px !important; } }

/* ---------- Mobile clean-up: CALL / GET A QUOTE as one tidy bar at the bottom of the screen ---------- */
@media (max-width: 767px) {
	#dm .sticky-widgets-container-global {
		position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 300; display: flex !important; gap: 8px;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.15);
	}
	#dm .site_content .sticky-widgets-container-global [data-element-type],
	#dm .sticky-widgets-container-global a.dmButtonLink {
		position: static !important; flex: 1 1 50% !important; width: auto !important; max-width: none !important;
		height: 46px !important; min-height: 0 !important; margin: 0 !important; display: flex !important;
		align-items: center !important; justify-content: center !important; border-radius: 30px !important;
		transform: none !important; inset: auto !important;
	}
	#dm .sticky-widgets-container-global a.dmButtonLink .text { font-size: 13px !important; white-space: nowrap !important; padding: 0 !important; }
	/* call button first (left), quote button second (right, filled) */
	#dm .sticky-widgets-container-global a[href^="tel:"] { order: 1; }
	#dm .sticky-widgets-container-global a:not([href^="tel:"]) { order: 2; background: #1b1e45 !important; border-color: #1b1e45 !important; }
	#dm .sticky-widgets-container-global a:not([href^="tel:"]) .text { color: #fff !important; }
	#dm #dmBackToTop { bottom: 74px !important; }
	body #dm { padding-bottom: 62px; }
}
