/* V52 corrections based on the user's annotated review document.
   Keeps the V51 visual design while fixing card alignment and mobile brand lockups. */

/* Services cards: same-height cards and a shared baseline for every View service link. */
.service-grid {
  display: grid !important;
  align-items: stretch !important;
}
.service-grid > .service-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-width: 0 !important;
}
.service-grid > .service-card .service-image {
  flex: 0 0 auto !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
}
.service-grid > .service-card .service-body {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
  min-height: 252px !important;
}
.service-grid > .service-card .service-body h3 {
  min-height: 2.45em !important;
}
.service-grid > .service-card .service-body p {
  flex: 1 1 auto !important;
  width: 100% !important;
}
.service-grid > .service-card .service-more {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: stretch !important;
  width: 100% !important;
  margin-top: auto !important;
  padding-top: 18px !important;
  min-height: 26px !important;
}
.service-grid > .service-card .service-more > span,
.service-grid > .service-card .service-more::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .service-grid > .service-card .service-body { min-height: 238px !important; }
}
@media (max-width: 480px) {
  .service-grid { grid-template-columns: 1fr !important; }
  .service-grid > .service-card .service-body { min-height: 0 !important; }
  .service-grid > .service-card .service-body h3 { min-height: 0 !important; }
}

/* MSP360 uses lining numerals so the 3 sits on the same baseline as 6 and 0. */
.msp360-name {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  vertical-align: baseline !important;
  font-variant-numeric: lining-nums !important;
  font-feature-settings: "lnum" 1, "kern" 1 !important;
}

/* Footer brand must remain a single horizontal lockup, not stack the mark over the text. */
.site-footer .footer-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: fit-content !important;
  max-width: 100% !important;
  text-decoration: none !important;
}
.site-footer .footer-mark {
  display: grid !important;
  place-items: center !important;
  flex: 0 0 52px !important;
  width: 52px !important;
  height: 48px !important;
  min-width: 0 !important;
}
.site-footer .footer-mark img {
  display: block !important;
  width: 52px !important;
  height: 46px !important;
  max-width: 52px !important;
  object-fit: contain !important;
  object-position: center !important;
}
.site-footer .footer-text {
  display: flex !important;
  flex: 0 1 auto !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  min-width: 0 !important;
  line-height: 1 !important;
}
.site-footer .footer-title {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}
.site-footer .footer-subtitle {
  display: block !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

/* Mobile header brand: constrain the icon box so it cannot overlap the wordmark. */
@media (max-width: 600px) {
  .site-header .nav-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    height: 72px !important;
    min-height: 72px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
  }
  .site-header .brand {
    display: inline-flex !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 52px) !important;
    gap: 8px !important;
    align-items: center !important;
    overflow: visible !important;
  }
  .site-header .brand-mark {
    display: grid !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    overflow: visible !important;
  }
  .site-header .brand-mark img.brand-mark-image {
    display: block !important;
    width: 42px !important;
    height: 40px !important;
    max-width: 42px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  .site-header .brand-text {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    gap: 4px !important;
  }
  .site-header .brand-text .brand-title {
    font-size: clamp(14px, 4.2vw, 17px) !important;
    line-height: 1.05 !important;
    letter-spacing: .01em !important;
    white-space: nowrap !important;
  }
  .site-header .brand-text .brand-subtitle {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 7px !important;
    line-height: 1 !important;
    letter-spacing: .24em !important;
  }
  .site-header .menu-toggle {
    display: flex !important;
    flex: 0 0 44px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    margin-left: auto !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }

  /* Footer logo and wording stay beside each other on narrow screens. */
  .site-footer .footer-grid > div:first-child { min-width: 0 !important; }
  .site-footer .footer-brand { gap: 8px !important; }
  .site-footer .footer-mark {
    flex-basis: 42px !important;
    width: 42px !important;
    height: 42px !important;
  }
  .site-footer .footer-mark img {
    width: 42px !important;
    height: 40px !important;
    max-width: 42px !important;
  }
  .site-footer .footer-title { font-size: 17px !important; letter-spacing: .015em !important; }
  .site-footer .footer-subtitle { font-size: 8px !important; letter-spacing: .22em !important; }
}
