/* v1.2: photo hero, trust bar, media splits, size images, gallery, finder, skeletons, reviews,
   multi-step quote form, safe-area call bar. Loads after blocks.css. */

/* Hero with photograph */
.ewdt-hero--photo { background: var(--ink); min-height: clamp(520px, 78vh, 760px); display: flex; align-items: center; }
.ewdt-hero--photo::before, .ewdt-hero--photo::after { display: none; }
.ewdt-hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.ewdt-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23, 25, 27, .9) 0%, rgba(23, 25, 27, .72) 42%, rgba(23, 25, 27, .25) 100%); }
.ewdt-hero__photo { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; display: block; transform-origin: 60% 50%; animation: ewdt-drift-bg 26s ease-in-out infinite alternate; will-change: transform; }
.ewdt-hero--photo .ewdt-hero__in { padding: 96px 0 88px; width: min(100% - 40px, var(--wrap)); }
.ewdt-hero--photo .ewdt-hero__copy { max-width: 700px; }
.ewdt-hero--photo .ewdt-hero__title { font-size: clamp(2.7rem, 6.2vw, 5rem); clip-path: inset(0 0 100% 0); transform: translateY(18px); animation: ewdt-mask-in .9s .1s var(--ease) forwards; }
.ewdt-hero--photo .ewdt-eyebrow { opacity: 0; animation: ewdt-fade-up .7s 0s var(--ease) forwards; }
.ewdt-hero--photo .ewdt-hero__lead { opacity: 0; animation: ewdt-fade-up .8s .55s var(--ease) forwards; }
.ewdt-hero--photo .ewdt-btns { opacity: 0; animation: ewdt-fade-up .8s .75s var(--ease) forwards; margin-top: 8px; }
@keyframes ewdt-mask-in { from { clip-path: inset(0 0 100% 0); transform: translateY(18px); } to { clip-path: inset(0 0 -12% 0); transform: none; } }
@keyframes ewdt-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ewdt-drift-bg { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1.2%, -1%, 0); } }

/* Trust bar */
.ewdt-trust { background: var(--navy); color: #fff; border-bottom: 3px solid var(--orange); }
.ewdt-trust__in { display: grid; grid-template-columns: repeat(4, 1fr); }
.ewdt-trust__item { display: flex; align-items: center; gap: 14px; padding: 22px 20px; border-right: 1px solid rgba(255, 255, 255, .1); }
.ewdt-trust__item:last-child { border-right: 0; }
.ewdt-trust__item .ewdt-card__ico { width: 44px; height: 44px; margin: 0; background: var(--orange); color: var(--ink); border-radius: 6px; flex: none; }
.ewdt-trust__item p { margin: 0; line-height: 1.3; }
.ewdt-trust__item strong { display: block; font-size: 1rem; }
.ewdt-trust__item span { color: #b9c0c6; font-size: .86rem; }

/* Media splits */
.ewdt-split--media { align-items: center; }
.ewdt-split--flip.ewdt-split { grid-template-columns: 1.05fr 1fr; }
.ewdt-photo { margin: 0; overflow: hidden; border-radius: var(--radius); }
.ewdt-photo .wp-block-image, .ewdt-photo figure { margin: 0; }
.ewdt-photo img { width: 100%; height: auto; display: block; transition: transform .9s var(--ease); aspect-ratio: 980 / 527; object-fit: cover; }
.ewdt-photo:hover img { transform: scale(1.03); }
.js .ewdt-photo.ewdt-reveal { opacity: 1; transform: none; clip-path: inset(0 0 0 100%); transition: clip-path .9s var(--ease); }
.js .ewdt-photo.ewdt-reveal.is-in { clip-path: inset(0); }

/* Size cards with image */
.ewdt-size { border-width: 1px; border-radius: 10px; padding: 0 0 26px; overflow: visible; background: #fff; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.ewdt-size > *:not(.ewdt-size__img):not(.ewdt-size__flag) { margin-left: 26px; margin-right: 26px; }
.ewdt-size > figure.ewdt-size__img { margin: 0; background: var(--sand); border-radius: 10px 10px 0 0; overflow: hidden; }
.ewdt-size__img img { display: block; width: 100%; height: 190px; object-fit: contain; padding: 14px; transition: transform .6s var(--ease); }
.ewdt-size:hover .ewdt-size__img img { transform: scale(1.05) translateY(-2px); }
.ewdt-size:hover, .ewdt-size:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--orange); }
.ewdt-size--pop { border-color: var(--orange); border-width: 2px; }
.ewdt-size > p.ewdt-size__flag { left: 0; top: 0; border-radius: 8px 0 8px 0; z-index: 2; }
.ewdt-size h3 { margin-top: 20px; }

/* Applications list */
.ewdt-apps { display: grid; gap: 0; margin-top: 20px; }
.ewdt-app { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ewdt-app:last-child { border-bottom: 0; }
.ewdt-app .ewdt-card__ico { width: 44px; height: 44px; margin: 0; border-radius: 6px; }
.ewdt-app h3 { font-size: 1.25rem; margin: 0 0 2px; }
.ewdt-app p { margin: 0; color: var(--steel); font-size: .96rem; }

/* Why choose: numbered rows */
.ewdt-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; border-top: 1px solid #cfd2d1; }
.ewdt-why > .ewdt-why__item { background: transparent; border-radius: 0; padding: 28px 0; border-bottom: 1px solid #cfd2d1; }
.ewdt-why__n { font: 800 2.6rem/1 var(--head); color: var(--orange); margin: 0 0 8px !important; }
.ewdt-why__item h3 { margin-bottom: .3em; }

/* Gallery */
.ewdt-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.ewdt-gallery .wp-block-image { margin: 0; overflow: hidden; border-radius: var(--radius); }
.ewdt-gallery .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.ewdt-gallery .wp-block-image:hover img { transform: scale(1.06); }
.ewdt-gallery .wp-block-image:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.ewdt-gallery .wp-block-image:nth-child(4) { grid-column: span 2; }

/* Areas: map and finder */
.ewdt-map { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: var(--radius); display: block; background: var(--line); }
.ewdt-areas > :last-child { min-height: 320px; }
.ewdt-chipsrow { margin-top: 36px; }
.ewdt-finder { margin: 22px 0 18px; }
.ewdt-finder__label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.ewdt-finder__input { width: 100%; font: inherit; padding: 14px 16px; border: 1.5px solid #c9cdcc; border-radius: 6px; background: #fff; }
.ewdt-finder__input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 119, 33, .2); }
.ewdt-finder__out { margin-top: 10px; }
.ewdt-finder__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ewdt-finder__item { margin: 0; }
.ewdt-finder__item a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s var(--ease); }
.ewdt-finder__item a:hover { border-color: var(--orange); transform: translateX(3px); }
.ewdt-finder__item span { color: var(--steel); font-size: .88rem; }
.ewdt-finder__empty { margin: 0; padding: 12px 16px; background: #fff; border: 1px dashed #c9cdcc; border-radius: 6px; }
.ewdt-link { background: none; border: 0; padding: 0; color: var(--orange-d); text-decoration: underline; cursor: pointer; font: inherit; }

/* Skeletons: same box size as the real content */
.ewdt-skel { position: relative; overflow: hidden; background: #fff; }
.ewdt-skel__l { display: block; height: 12px; margin: 0 0 12px; border-radius: 4px; background: #e6e8e7; }
.ewdt-skel__l--s { width: 38%; }
.ewdt-skel__l--m { width: 66%; }
.ewdt-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: ewdt-shimmer 1.3s infinite; }
.ewdt-finder__item.ewdt-skel { padding: 16px; border: 1px solid var(--line); border-radius: 6px; height: 50px; }
.ewdt-finder__item.ewdt-skel .ewdt-skel__l { margin-bottom: 8px; }
@keyframes ewdt-shimmer { to { transform: translateX(100%); } }

/* Reviews */
.ewdt-reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ewdt-review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 0; min-height: 210px; }
.ewdt-review blockquote { margin: 0 0 14px; padding: 0; border: 0; background: none; font-size: 1.02rem; }
.ewdt-review__stars { color: var(--orange); letter-spacing: 3px; margin: 0 0 10px; font-size: 1.1rem; }
.ewdt-review figcaption strong { display: block; }
.ewdt-review figcaption span { color: var(--steel); font-size: .9rem; }

/* Multi-step quote form */
.ewdt-quote { padding: clamp(20px, 3vw, 34px); }
.ewdt-qprog { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ewdt-qprog[hidden], .ewdt-qback[hidden], .ewdt-qnext[hidden], .ewdt-qsubmit[hidden], .ewdt-qerrors[hidden], .ewdt-qdone[hidden], .ewdt-qstep[hidden], .ewdt-qform[hidden] { display: none !important; }
.ewdt-qprog li { display: grid; justify-items: center; gap: 6px; font-size: .78rem; color: var(--steel); position: relative; }
.ewdt-qprog li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.ewdt-qprog li:first-child::before { display: none; }
.ewdt-qprog span { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 700; transition: background .3s, color .3s; }
.ewdt-qprog li.is-current span { background: var(--orange); color: var(--ink); }
.ewdt-qprog li.is-done span { background: var(--ink); color: #fff; }
.ewdt-qprog li.is-done::before, .ewdt-qprog li.is-current::before { background: var(--ink); }
.ewdt-qprog em { font-style: normal; font-weight: 600; }
.ewdt-qstep { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.ewdt-qstep legend { font: 800 1.5rem/1.1 var(--head); text-transform: uppercase; color: var(--ink); padding: 0; margin-bottom: 16px; }
.ewdt-quote.is-steps .ewdt-qstep:not([hidden]) { animation: ewdt-fade-up .45s var(--ease); }
.ewdt-quote:not(.is-steps) .ewdt-qstep { margin-bottom: 26px; }
.ewdt-qsizes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ewdt-qsize { display: block; cursor: pointer; position: relative; }
.ewdt-qsize input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ewdt-qsize__body { display: grid; gap: 2px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .2s, background .2s, box-shadow .2s; }
.ewdt-qsize__body strong { font: 800 1.35rem/1 var(--head); text-transform: uppercase; }
.ewdt-qsize__body small { color: var(--steel); }
.ewdt-qsize__body em { font-style: normal; font-weight: 700; color: var(--orange-d); }
.ewdt-qsize input:checked + .ewdt-qsize__body { border-color: var(--orange); background: #fff7f0; box-shadow: 0 0 0 3px rgba(244, 119, 33, .18); }
.ewdt-qsize input:focus-visible + .ewdt-qsize__body { outline: 3px solid var(--ink); outline-offset: 2px; }
.ewdt-qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ewdt-qgrid p { margin: 0 0 16px; }
.ewdt-qgrid .ewdt-span { grid-column: 1 / -1; }
.ewdt-qradios { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; align-content: end; }
.ewdt-qlabel { flex-basis: 100%; font-weight: 600; font-size: .92rem; color: var(--ink); }
.ewdt-qradios label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
.ewdt-qradios input { width: auto; accent-color: var(--orange); }
.ewdt-quote [aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .15); }
.ewdt-qsummary { margin: 0 0 14px; display: grid; border: 1px solid var(--line); border-radius: 8px; }
.ewdt-qsummary > div { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: baseline; }
.ewdt-qsummary > div:last-child { border-bottom: 0; }
.ewdt-qsummary dt { color: var(--steel); font-size: .88rem; }
.ewdt-qsummary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ewdt-qedit { background: none; border: 0; color: var(--orange-d); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; }
.ewdt-qerrors { margin: 0 0 14px; padding: 12px 16px; background: #fbeceb; color: #7f1d1d; border-radius: 6px; font-weight: 600; }
.ewdt-qnav { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.ewdt-qnav .ewdt-btn { min-width: 140px; }
.ewdt-qnext, .ewdt-qsubmit { margin-left: auto; }
.ewdt-qsubmit.is-loading { opacity: .7; pointer-events: none; }
.ewdt-qsubmit.is-loading span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ewdt-spin .7s linear infinite; vertical-align: -2px; }
@keyframes ewdt-spin { to { transform: rotate(360deg); } }
.ewdt-qdone { text-align: center; padding: 20px 0; }
.ewdt-qdone:focus { outline: none; }
.ewdt-form__note a { color: var(--orange-d); }

/* Mobile call bar: safe area, spacing, hides while a form is used */
.ewdt-callbar { padding-bottom: env(safe-area-inset-bottom, 0); background: var(--ink); transition: transform .25s var(--ease); }
body.ewdt-form-active .ewdt-callbar { transform: translateY(110%); }

.ewdt-btn, .ewdt-b .wp-block-button__link { border-radius: 6px; }

@media (max-width: 1100px) {
	.ewdt-why { grid-template-columns: repeat(2, 1fr); }
	.ewdt-trust__in { grid-template-columns: repeat(2, 1fr); }
	.ewdt-trust__item:nth-child(2) { border-right: 0; }
	.ewdt-trust__item { border-bottom: 1px solid rgba(255, 255, 255, .1); }
}
@media (max-width: 960px) {
	.ewdt-split--flip.ewdt-split { grid-template-columns: 1fr; }
	.ewdt-split--flip > :first-child { order: 2; }
	.ewdt-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
	.ewdt-gallery .wp-block-image:nth-child(1) { grid-column: span 2; grid-row: span 1; }
	.ewdt-gallery .wp-block-image:nth-child(4) { grid-column: span 2; }
	.ewdt-reviews { grid-template-columns: 1fr 1fr; }
	.ewdt-hero--photo .ewdt-hero__in { padding: 72px 0 64px; }
	.ewdt-hero__media::after { background: linear-gradient(180deg, rgba(23, 25, 27, .82), rgba(23, 25, 27, .7)); }
}
@media (max-width: 640px) {
	body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }
	.ewdt-callbar a { min-height: 58px; }
	.ewdt-hero--photo { min-height: 0; }
	.ewdt-hero--photo .ewdt-hero__in { padding: 56px 0 52px; }
	.ewdt-trust__in { grid-template-columns: 1fr; }
	.ewdt-trust__item { padding: 14px 4px; border-right: 0; }
	.ewdt-why { grid-template-columns: 1fr; }
	.ewdt-reviews { grid-template-columns: 1fr; }
	.ewdt-gallery { grid-auto-rows: 130px; gap: 8px; }
	.ewdt-qsizes, .ewdt-qgrid { grid-template-columns: 1fr; }
	.ewdt-qprog em { display: none; }
	.ewdt-qsummary > div { grid-template-columns: 1fr auto; }
	.ewdt-qsummary dt { grid-column: 1 / -1; }
	.ewdt-qnav .ewdt-btn { flex: 1; min-width: 0; }
	.ewdt-size__img img { height: 170px; }
	.ewdt-map { min-height: 260px; }
	.ewdt-areas > :last-child { min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
	.ewdt-hero__photo { animation: none; }
	.ewdt-hero--photo .ewdt-hero__title, .ewdt-hero--photo .ewdt-eyebrow, .ewdt-hero--photo .ewdt-hero__lead, .ewdt-hero--photo .ewdt-btns { opacity: 1; clip-path: none; transform: none; animation: none; }
	.js .ewdt-photo.ewdt-reveal { clip-path: none; }
	.ewdt-skel::after { animation: none; }
}

/* Header and footer fit (found by the 1024 and 1366 width tests) */
.ewdt-footer__col, .ewdt-footer__brand { min-width: 0; }
.ewdt-footer a, .ewdt-flist li { overflow-wrap: anywhere; }
/* Burger navigation up to 1180px: six menu items plus phone and button do not fit a 1024px laptop on one row */
@media (max-width: 1180px) {
	.ewdt-topbar__mid { display: none; }
	.ewdt-burger { display: block; }
	.ewdt-header__actions > .ewdt-btn, .ewdt-header__phone span { display: none; }
	.ewdt-header__actions { margin-left: auto; }
	.ewdt-header__phone .ewdt-ico { width: 44px; height: 44px; padding: 11px; }
	.ewdt-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); flex-direction: column; align-items: stretch; margin: 0; padding: 12px 20px 24px; max-height: 0; overflow: hidden; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: max-height .4s var(--ease), opacity .25s, transform .3s var(--ease), visibility 0s .4s; box-shadow: 0 24px 40px rgba(0, 0, 0, .4); }
	.ewdt-menu-open .ewdt-nav { max-height: 90vh; overflow-y: auto; visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
	.ewdt-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.ewdt-menu a { padding: 16px 8px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1.1rem; }
	.ewdt-nav__extra { display: grid; gap: 12px; margin-top: 20px; }
}
