/*
 * HADI mobile conversion refinement (integration candidate)
 *
 * Scope: the four service landing pages that use .hadi-pd. The existing
 * page copy, consent controls and form markup stay unchanged. This file only
 * improves the reading viewport and keeps the page's existing contact CTA
 * reachable while a visitor reads the long service sections.
 */

#hadi-product-development-contact {
  scroll-margin-top: 88px;
}

.hadi-mobile-conversion-cta {
  display: none;
}

@media (max-width: 767px) {
  /* The hero graphic is useful context, but its desktop minimum height makes
   * the first actionable content arrive too late on a phone. */
  .hadi-pd .hadi-pd__hero,
  .hadi-pd .hadi-mech-hero {
    min-height: 0;
    padding-block: 32px;
  }

  .hadi-pd .hadi-pd__hero-layout {
    gap: 30px;
  }

  .hadi-pd .hadi-pd__hero-visual {
    /* Decorative diagram repeats the visible capability list. Let the real
     * project photos follow the hero sooner on phones. */
    display: none;
  }

  .hadi-pd .hadi-pd__hero-copy p,
  .hadi-pd .hadi-pd__lead {
    max-width: 42rem;
    line-height: 1.7;
  }

  .hadi-mobile-conversion-cta {
    position: fixed;
    z-index: 10020;
    left: 76px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    display: none;
    width: auto;
  }

  .hadi-mobile-conversion-cta.is-visible {
    display: block;
  }

  .hadi-mobile-conversion-cta a {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 18px;
    border: 1px solid #06508f;
    border-radius: 10px;
    background: #06508f;
    box-shadow: 0 8px 24px rgba(5, 55, 93, .2);
    color: #fff;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
  }

  .hadi-mobile-conversion-cta a:focus-visible {
    outline: 3px solid #44a7e5;
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    .hadi-mobile-conversion-cta {
      transition: none;
    }
  }
}

/* A short landscape viewport is already height-constrained; keep the header
 * and consent choices readable and let the page use the full width. */
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 499px) {
  .hadi-has-service-landing header.elementor-location-header .hadi-mobile-nav__top {
    min-height: 52px;
    padding-block: 8px;
  }

  .hadi-has-service-landing header.elementor-location-header .hadi-mobile-nav__viewport {
    max-height: calc(100svh - 52px);
  }

  .hadi-has-service-landing .mv-privacy-consent-banner {
    padding: 8px 12px;
  }

  .hadi-has-service-landing .hadi-mobile-conversion-cta {
    display: none !important;
  }
}
