/* Hianma commercial page — header + anchor spacing refinement only.
   No text, translation, asset, color, typography family, route or product logic changes. */

/* Desktop header: give the five visible navigation items enough breathing room. */
@media (min-width: 1121px) {
  body .hm-marketing .hm-header {
    grid-template-columns: minmax(205px, auto) minmax(610px, 1fr) auto;
    column-gap: clamp(24px, 2.4vw, 38px);
    padding-inline: clamp(28px, 3.2vw, 52px);
  }

  body .hm-marketing .hm-nav {
    width: 100%;
    min-width: 610px;
    justify-content: center;
    gap: clamp(24px, 2vw, 34px) !important;
    overflow: visible;
  }

  body .hm-marketing .hm-nav > a,
  body .hm-marketing .hm-nav > a:nth-child(1),
  body .hm-marketing .hm-nav > a:nth-child(3),
  body .hm-marketing .hm-nav > a:nth-child(8),
  body .hm-marketing .hm-nav > a:nth-child(10),
  body .hm-marketing .hm-nav > a:nth-child(13) {
    flex: 0 0 auto;
    min-width: max-content;
    margin: 0 !important;
    white-space: nowrap;
  }

  body .hm-marketing .hm-header-actions {
    justify-self: end;
    flex: 0 0 auto;
  }
}

/* Compact desktop: preserve spacing until the existing mobile/tablet menu takes over. */
@media (min-width: 1121px) and (max-width: 1365px) {
  body .hm-marketing .hm-header {
    grid-template-columns: minmax(185px, auto) minmax(560px, 1fr) auto;
    column-gap: 20px;
    padding-inline: 24px;
  }

  body .hm-marketing .hm-nav {
    min-width: 560px;
    gap: 22px !important;
  }
}

/* Anchor destinations: account for the sticky header without creating a large empty band. */
body .hm-marketing #solution,
body .hm-marketing #roles,
body .hm-marketing #all-in-one,
body .hm-marketing #website,
body .hm-marketing #institutions,
body .hm-marketing #languages-security,
body .hm-marketing #features,
body .hm-marketing #why-hianma,
body .hm-marketing #how-it-works,
body .hm-marketing #faq,
body .hm-marketing #commercial-cta,
body .hm-marketing #contact {
  scroll-margin-top: 88px;
}

/* Reduce only the excessive top whitespace in anchored commercial sections. */
body .hm-marketing #solution,
body .hm-marketing #institutions,
body .hm-marketing #features,
body .hm-marketing #why-hianma,
body .hm-marketing #how-it-works,
body .hm-marketing #faq,
body .hm-marketing #contact {
  padding-top: clamp(72px, 5.8vw, 92px);
}

/* Roles: compact enough to fit common desktop viewports without sacrificing readability. */
body .hm-marketing #roles {
  padding-top: clamp(14px, 1.5vw, 20px);
  padding-bottom: clamp(14px, 1.5vw, 20px);
}

body .hm-marketing #roles .hm-section-heading {
  margin-bottom: clamp(14px, 1.5vw, 20px);
}

body .hm-marketing #roles .hm-section-heading::after {
  width: min(100%, 410px) !important;
  margin-top: 10px !important;
}

body .hm-marketing #roles .hm-role-card {
  min-height: 218px;
  padding: 20px 19px 18px;
}

body .hm-marketing #roles .hm-role-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
}

body .hm-marketing #roles .hm-role-card h3 {
  margin-bottom: 9px;
}

body .hm-marketing #roles .hm-role-card p {
  line-height: 1.58;
}

/* Short laptop/desktop screens need a second, height-aware compaction pass.
   This is what keeps all four cards visible on 720–800px-tall browser viewports. */
@media (min-width: 1121px) and (max-height: 850px) {
  body .hm-marketing #roles {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body .hm-marketing #roles .hm-section-heading {
    margin-bottom: 10px;
  }

  body .hm-marketing #roles .hm-section-heading::after {
    width: min(100%, 350px) !important;
    margin-top: 6px !important;
  }

  body .hm-marketing #roles .hm-role-card {
    min-height: 198px;
    padding: 17px 18px 16px;
  }

  body .hm-marketing #roles .hm-role-icon {
    width: 39px;
    height: 39px;
    margin-bottom: 14px;
  }

  body .hm-marketing #roles .hm-role-card h3 {
    margin-bottom: 7px;
  }

  body .hm-marketing #roles .hm-role-card p {
    font-size: .84rem;
    line-height: 1.48;
  }
}

@media (max-width: 1120px) {
  body .hm-marketing #solution,
  body .hm-marketing #roles,
  body .hm-marketing #all-in-one,
  body .hm-marketing #website,
  body .hm-marketing #institutions,
  body .hm-marketing #languages-security,
  body .hm-marketing #features,
  body .hm-marketing #why-hianma,
  body .hm-marketing #how-it-works,
  body .hm-marketing #faq,
  body .hm-marketing #commercial-cta,
  body .hm-marketing #contact {
    scroll-margin-top: 76px;
  }

  body .hm-marketing #solution,
  body .hm-marketing #institutions,
  body .hm-marketing #features,
  body .hm-marketing #why-hianma,
  body .hm-marketing #how-it-works,
  body .hm-marketing #faq,
  body .hm-marketing #contact {
    padding-top: clamp(64px, 8vw, 80px);
  }

  body .hm-marketing #roles {
    padding-top: clamp(18px, 3vw, 24px);
    padding-bottom: clamp(28px, 4vw, 38px);
  }

  body .hm-marketing #roles .hm-section-heading::after {
    width: min(100%, 400px) !important;
  }

  body .hm-marketing #roles .hm-role-card {
    min-height: 220px;
  }
}

@media (max-width: 980px) {
  body .hm-marketing #roles {
    padding-top: 18px;
  }

  body .hm-marketing #roles .hm-section-heading {
    margin-bottom: 22px;
  }

  body .hm-marketing #roles .hm-section-heading::after {
    width: min(100%, 420px) !important;
    margin-top: 8px !important;
  }
}

@media (max-width: 760px) {
  body .hm-marketing #solution,
  body .hm-marketing #roles,
  body .hm-marketing #all-in-one,
  body .hm-marketing #website,
  body .hm-marketing #institutions,
  body .hm-marketing #languages-security,
  body .hm-marketing #features,
  body .hm-marketing #why-hianma,
  body .hm-marketing #how-it-works,
  body .hm-marketing #faq,
  body .hm-marketing #commercial-cta,
  body .hm-marketing #contact {
    scroll-margin-top: 70px;
  }

  body .hm-marketing #solution,
  body .hm-marketing #institutions,
  body .hm-marketing #features,
  body .hm-marketing #why-hianma,
  body .hm-marketing #how-it-works,
  body .hm-marketing #faq,
  body .hm-marketing #contact {
    padding-top: clamp(56px, 13vw, 68px);
  }

  body .hm-marketing #roles {
    padding-top: 16px;
    padding-bottom: 34px;
  }

  body .hm-marketing #roles .hm-section-heading {
    margin-bottom: 20px;
  }

  body .hm-marketing #roles .hm-section-heading::after {
    width: min(100%, 340px) !important;
  }

  body .hm-marketing #roles .hm-role-card {
    min-height: 0;
    padding: 20px 18px 22px;
  }

  body .hm-marketing #roles .hm-role-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
  }

  body .hm-marketing #roles .hm-role-card p {
    font-size: .88rem;
    line-height: 1.58;
  }
}
