/* New bits for the static site (things the WordPress plugins' JavaScript used to do). */

/* Sliders (was Owl Carousel). Fade sliders stack their slides; the others slide sideways. */
.ev-owl.owl-carousel { display: block; visibility: visible; }
.ev-owl .owl-stage-outer { position: relative; overflow: hidden; }
.ev-owl.ev-fade .owl-stage { display: grid; transform: none !important; width: 100%; }
.ev-owl.ev-fade .owl-item { grid-area: 1 / 1; float: none; width: 100%; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; }
.ev-owl.ev-fade .owl-item.active { opacity: 1; visibility: visible; transition: opacity .7s ease; z-index: 1; }
.ev-owl.ev-slide .owl-stage { display: flex; transition: transform .7s ease; width: 100%; }
.ev-owl.ev-slide .owl-item { float: none; flex: 0 0 100%; max-width: 100%; }
.ev-owl:not(.ev-fade):not(.ev-slide) .owl-item:not(:first-child) { display: none; }
.ev-owl .owl-nav button, .ev-owl .owl-dots button { cursor: pointer; }

/* Appointment pop-up (was Popup Maker). */
#pum-276.ev-pum-open { display: block !important; opacity: 1 !important; z-index: 1999999999; overflow-y: auto; }
#pum-276.ev-pum-open .pum-container { display: block !important; opacity: 1 !important; position: absolute; left: 0; right: 0; margin-left: auto; margin-right: auto; top: 100px; }
html.pum-open.pum-open-overlay { overflow: hidden; }
html.pum-open.pum-open-overlay body { overflow: hidden; }

/* Multi-step forms: only the current step shows. */
.frm-fluent-form .fluentform-step { display: none; }
.frm-fluent-form .fluentform-step.active { display: block; }
.frm-fluent-form .has-conditions { display: none; }
.frm-fluent-form input[type="date"].ff-el-form-control { min-height: 42px; }

/* Turnstile spam check */
.ev-turnstile { margin: 10px 0 15px; min-height: 0; }

/* Before/after photos */
.twentytwenty-container img { max-width: 100%; height: auto; }
.twentytwenty-container { cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.frm-fluent-form .ff-step-body { width: auto !important; left: 0 !important; margin-left: 0 !important; }
.frm-fluent-form .fluentform-step { float: none; width: 100% !important; height: auto; overflow: visible; }
/* Fluent hid the submit button until its script reached the last step; the step script shows one step at a time instead */
.frm-fluent-form .fluentform-step.active .ff-btn-submit { visibility: visible; }

/* Photo lightbox (was Simple Lightbox) */
.ev-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 2147483000; }
.ev-lightbox.open { display: flex; }
.ev-lightbox img { max-width: 92vw; max-height: 88vh; box-shadow: 0 6px 30px rgba(0,0,0,.5); }
.ev-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; padding: 10px 16px; }
.ev-lb-close { top: 10px; right: 14px; }
.ev-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.ev-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Our Reviews page: Write a Review button above the MoreGoodReviews wall */
.mgr-write-review { text-align: center; margin-bottom: 30px; }
.mgr-reviews { min-height: 400px; }

/* Blog posts: center images narrower than the text column (the old site left them on the left with empty space beside) */
.single-post .entry-content .wp-block-image { text-align: center; }
.single-post .entry-content .wp-block-image img { margin-left: auto; margin-right: auto; }

/* Desktop menu dropdowns. On WordPress the Superfish script opened them; the theme CSS alone keeps them hidden
   (".genesis-responsive-menu ... :hover > .sub-menu {display:none}"). Open on hover and on keyboard focus. */
@media only screen and (min-width: 960px) {
  .genesis-responsive-menu .genesis-nav-menu .menu-item:hover > .sub-menu,
  .genesis-responsive-menu .genesis-nav-menu .menu-item:focus-within > .sub-menu {
    display: block; opacity: 1; left: auto;
  }
}

/* Blog image whose file is too small to fill the column without blurring (512 px): show it at its real size
   on the right with the text wrapping around it. Full width on phones. */
@media (min-width: 700px) {
  .single-post .entry-content .wp-block-image.ev-wrap-right { float: right; width: 50%; max-width: 512px; margin: 0 0 20px 30px; }
  .single-post .entry-content .wp-block-image.ev-wrap-right img { width: 100%; }
}

/* Phones: the homepage quote panel is solid black and covers the whole hero video, at a fixed 840px that fit the
   old form (with its photo-upload field). Let it fit the form, don't load the hidden video, and trim the gap
   below (the old panel overlapped the next section's 100px top padding). */
@media (max-width: 767px) {
  .video-container-proseal { height: auto !important; }
  .video-container-proseal video { display: none !important; }
  .transbg { position: relative !important; height: auto !important; padding: 40px 15px 50px !important; }
  .hservice { padding-top: 15px !important; }
}

/* Process step cards. Several pages carry two style blocks for .step-grid; the second (meant for a 2-card row)
   also forced the first row into 2 columns, leaving card 3 alone on its row (same on the old site).
   One layout everywhere: 3 per row with the last row centered, 2 on tablets, 1 on phones. */
.step-grid { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 25px; }
.step-grid > .step-box { flex: 0 0 calc((100% - 50px) / 3); max-width: 350px; height: auto !important; box-sizing: border-box; }
@media (max-width: 1024px) { .step-grid > .step-box { flex-basis: calc((100% - 25px) / 2); } }
@media (max-width: 600px) { .step-grid > .step-box { flex-basis: 100%; max-width: none; } }
/* Exactly 4 cards: 2 by 2 instead of 3 + 1 */
@media (min-width: 601px) { .step-grid:has(> .step-box:nth-child(4):last-child) > .step-box { flex-basis: calc((100% - 25px) / 2); } }

/* GetTerms legal documents start with their own H1 that repeats the page title (two titles, two H1s). */
.getterms-document-embed > div > h1:first-child { display: none; }

/* About Us: team photo beside longer text left an empty gap under it. Center it against the text (no crop). */
@media (min-width: 782px) { .page-id-40 .wp-block-columns > .wp-block-column:has(.wp-image-348) { align-self: center; } }
