/* ABC Home targeted fixes: accessibility, mobile UX and lazy video poster state. */

.abc-home-fixes-h1.elementor-headline,
.elementor-widget-animated-headline .abc-home-fixes-h1.elementor-headline {
  display: block;
  margin: 0;
  padding: 0;
  font: inherit;
  line-height: inherit;
  color: inherit;
}

.abc-lazy-video-section {
  position: relative;
  background-image: var(--abc-video-poster);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.abc-lazy-video-section.abc-video-pending .elementor-background-video-container {
  opacity: 0;
}

.abc-lazy-video-section.abc-video-loaded .elementor-background-video-container,
.abc-lazy-video-section.abc-video-loading .elementor-background-video-container {
  opacity: 1;
  transition: opacity .35s ease;
}

.abc-lazy-video-section .elementor-background-video-hosted {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Contrast fixes flagged by Lighthouse. */
.elementor-widget-form input,
.elementor-widget-form textarea,
.elementor-widget-form select {
  color: #333333 !important;
}

.elementor-widget-form input::placeholder,
.elementor-widget-form textarea::placeholder {
  color: #555555 !important;
  opacity: 1 !important;
}

.elementor-element-729409b2 .elementor-heading-title,
.elementor-element-729409b2,
.elementor-element-15fe2d8a .elementor-field-label,
.elementor-element-ee4af29 .elementor-heading-title,
.elementor-element-a69643c .elementor-heading-title,
.elementor-element-10291b59 .elementor-heading-title,
.elementor-element-6502d8c2 .elementor-heading-title,
.elementor-element-2094c5f5 .elementor-heading-title,
.elementor-element-3318ec6 .elementor-heading-title,
.elementor-element-3221ac2e p,
.elementor-element-511c3bcb .elementor-icon-box-description,
.elementor-element-54383df2 .elementor-icon-box-description,
.elementor-element-716e42d7 .elementor-icon-box-description {
  color: #4b5563 !important;
}

.elementor-element-158cf82e .elementor-heading-title {
  color: #10203f !important;
}

.elementor-element-a858cd5,
.elementor-element-a858cd5 > .elementor-widget-wrap {
  background-color: rgba(255, 255, 255, .96) !important;
}

/* Make hero copy a touch more readable over imagery/video without removing the visual treatment. */
.elementor-background-overlay {
  pointer-events: none;
}

/* Desktop above-the-fold polish: keep the heavy service nav from taking three rows and make the quote form fit better. */
@media (min-width: 1025px) {
  .elementor-element-6353ba4c img,
  .elementor-location-header img,
  header img[src*="abc-home-logo"] {
    max-width: 156px !important;
    height: auto !important;
  }

  .elementor-element-d89a788 nav.elementor-nav-menu--main,
  .elementor-location-header .elementor-nav-menu--main .elementor-nav-menu,
  header .elementor-nav-menu--main .elementor-nav-menu {
    flex-wrap: nowrap !important;
    gap: 0 !important;
    height: auto !important;
    align-items: center !important;
  }

  .elementor-element-d89a788 .elementor-nav-menu,
  .elementor-element-d89a788 .elementor-nav-menu > li,
  .elementor-element-d89a788 .elementor-nav-menu--main,
  .elementor-element-d89a788 .elementor-nav-menu--main > ul {
    height: auto !important;
  }

  .elementor-element-d89a788 .elementor-nav-menu--main .elementor-item,
  .elementor-location-header .elementor-nav-menu--main .elementor-item,
  header .elementor-nav-menu--main .elementor-item {
    font-size: 14px !important;
    line-height: 1.15 !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }

  .elementor-element-d89a788 .abc-services-menu {
    position: relative !important;
  }

  .elementor-element-d89a788 .abc-services-submenu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 9999 !important;
    min-width: 220px !important;
    padding: 8px 0 !important;
    background: #0b2346 !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: 0 18px 35px rgba(0,0,0,.18) !important;
  }

  .elementor-element-d89a788 .abc-services-menu:hover > .abc-services-submenu,
  .elementor-element-d89a788 .abc-services-menu:focus-within > .abc-services-submenu {
    display: block !important;
  }

  .elementor-element-d89a788 .abc-services-submenu .elementor-item {
    display: block !important;
    padding: 10px 16px !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .elementor-element-d89a788 .abc-services-submenu .elementor-item:hover,
  .elementor-element-d89a788 .abc-services-submenu .elementor-item:focus {
    color: #ffb347 !important;
    background: rgba(255,255,255,.08) !important;
  }

  .elementor-element-a858cd5,
  .elementor-element-a858cd5 > .elementor-widget-wrap {
    border-radius: 28px !important;
  }

  .elementor-element-a858cd5 > .elementor-widget-wrap.elementor-element-populated {
    padding: 28px 36px 30px !important;
    margin-bottom: 0 !important;
  }

  .elementor-element-a858cd5 .elementor-widget-container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .elementor-element-a858cd5 .elementor-heading-title {
    line-height: 1.18 !important;
  }

  .elementor-element-a858cd5 .elementor-element-5d4be793 .elementor-heading-title {
    font-size: 28px !important;
    line-height: 1.12 !important;
  }

  .elementor-element-a858cd5 .elementor-element-5d4be793,
  .elementor-element-a858cd5 .elementor-element-729409b2 {
    margin-bottom: 12px !important;
  }

  .elementor-element-a858cd5 .elementor-element-729409b2 .elementor-heading-title {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .elementor-element-a858cd5 .elementor-field-group {
    margin-bottom: 8px !important;
  }

  .elementor-element-a858cd5 .elementor-field-label {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  .elementor-element-a858cd5 input.elementor-field,
  .elementor-element-a858cd5 textarea.elementor-field {
    min-height: 38px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .elementor-element-a858cd5 textarea.elementor-field {
    min-height: 72px !important;
  }

  .elementor-element-a858cd5 .elementor-button {
    min-height: 42px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
  }
}

/* Mobile header/menu polish without restructuring Elementor templates. */
@media (max-width: 767px) {
  header img,
  .elementor-location-header img,
  .elementor-widget-theme-site-logo img,
  .custom-logo-link img {
    max-width: 150px !important;
    max-height: 52px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .elementor-location-header,
  .elementor-location-header .elementor-section,
  .elementor-location-header .elementor-container,
  .elementor-location-header .elementor-widget-container {
    overflow: visible !important;
  }

  .elementor-element-6353ba4c,
  .elementor-element-6353ba4c .elementor-widget-container,
  .elementor-element-6353ba4c a,
  .elementor-element-6353ba4c picture,
  .elementor-element-6353ba4c img {
    width: 248px !important;
    max-width: 248px !important;
  }

  .elementor-element-6353ba4c img {
    height: auto !important;
  }

  .elementor-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    border-radius: 10px;
  }

  .elementor-nav-menu--dropdown,
  .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    z-index: 9999;
  }

  .abc-mobile-menu-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 18px 20px;
    background: #111827;
  }

  .abc-mobile-menu-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none !important;
  }

  .abc-mobile-menu-actions .abc-menu-quote {
    background: #f5b400;
    color: #111827 !important;
  }

  .abc-mobile-menu-actions .abc-menu-call {
    background: #ffffff;
    color: #111827 !important;
  }

  .elementor-button[href="#services"] .elementor-button-text {
    font-size: 0;
  }

  .elementor-button[href="#services"] .elementor-button-text::after {
    content: "Get a Free Quote";
    font-size: 15px;
  }
}
