/**
 * Centurysoft V24.22: loaded LAST after site.css and the Home reference styles.
 * Only layout corrections live here; configurable typography is injected through
 * the Appearance > Global Typography & CSS settings page.
 */

/* Keep the existing shared footer component visually identical on every route.
   V24.21 already uses template-parts/home-footer.php everywhere, but Home had
   extra CSS and other page templates inherited different earlier selectors. */
body .cs-reference-footer {
  padding:26px 0 20px !important;
  background:#fff !important;
  border-top:1px solid #dbe7ef !important;
}
body .cs-reference-footer .cs-footer-row {
  display:grid !important;
  grid-template-columns:230px minmax(0,1fr) 250px !important;
  align-items:center !important;
  gap:25px !important;
}
body .cs-reference-footer .cs-footer-brand,
body .cs-reference-footer .cs-footer-brand > a,
body .cs-reference-footer .cs-footer-brand .custom-logo-link {
  display:flex; align-items:center;
}
body .cs-reference-footer .cs-footer-brand img,
body .cs-reference-footer .cs-footer-brand .custom-logo {
  display:block !important;
  width:190px !important;
  max-width:100% !important;
  height:auto !important;
  object-fit:contain !important;
}
body .cs-reference-footer .cs-footer-legal {
  text-align:right !important;
  color:#66809a !important;
}
body .cs-reference-footer .cs-footer-legal p {
  margin:5px 0 !important;
  color:#66809a !important;
  font-size:11px !important;
  font-weight:400 !important;
  line-height:1.45 !important;
  letter-spacing:normal !important;
}
body .cs-reference-footer .cs-footer-legal a {
  color:#003760 !important;
  font-size:11px !important;
  line-height:1.45 !important;
}
@media (max-width:980px) {
  body .cs-reference-footer .cs-footer-row {
    grid-template-columns:200px minmax(0,1fr) !important;
  }
  body .cs-reference-footer .cs-footer-legal {
    grid-column:1 / -1 !important;
    text-align:center !important;
  }
}
@media (max-width:600px) {
  body .cs-reference-footer {padding:24px 0 18px !important;}
  body .cs-reference-footer .cs-footer-row {
    grid-template-columns:minmax(0,1fr) !important;
    justify-items:center !important;
    text-align:center !important;
    gap:14px !important;
  }
  body .cs-reference-footer .cs-footer-brand,
  body .cs-reference-footer .cs-footer-brand > a,
  body .cs-reference-footer .cs-footer-brand .custom-logo-link {justify-content:center;}
  body .cs-reference-footer .cs-footer-legal {
    grid-column:auto !important;
    text-align:center !important;
  }
}

/* Give the featured-image half of ALL Service heroes breathing room on top and
   bottom. Keep the existing 50/50 desktop structure and image-side label. */
@media (min-width:981px) {
  body.cs-service-reference .dm-ref-media {
    box-sizing:border-box !important;
    height:332px !important;
    min-height:332px !important;
    padding:20px 0 !important;
  }
  body.cs-service-reference .dm-ref-media img {
    display:block !important;
    height:292px !important;
    min-height:0 !important;
    width:100% !important;
    border-radius:9px 0 0 9px !important;
    object-fit:cover !important;
  }
  body.cs-service-reference .dm-ref-media::before {inset:20px 0 !important; border-radius:9px 0 0 9px;}
  body.cs-service-reference .dm-ref-media::after {top:20px !important;bottom:20px !important;}
}
@media (min-width:601px) and (max-width:980px) {
  body.cs-service-reference .dm-ref-media {
    box-sizing:border-box !important;
    height:274px !important;
    min-height:274px !important;
    padding:15px 4vw !important;
  }
  body.cs-service-reference .dm-ref-media img {
    width:100% !important;
    height:244px !important;
    min-height:0 !important;
    border-radius:9px !important;
    object-fit:cover !important;
  }
  body.cs-service-reference .dm-ref-media::before {inset:15px 4vw !important;border-radius:9px;}
  body.cs-service-reference .dm-ref-media::after {top:15px !important;bottom:15px !important;}
}
@media (max-width:600px) {
  body.cs-service-reference .dm-ref-media {
    box-sizing:border-box !important;
    height:244px !important;
    min-height:244px !important;
    padding:12px 4vw !important;
  }
  body.cs-service-reference .dm-ref-media img {
    width:100% !important;
    height:220px !important;
    min-height:0 !important;
    border-radius:9px !important;
    object-fit:cover !important;
  }
  body.cs-service-reference .dm-ref-media::before {inset:12px 4vw !important;border-radius:9px;}
  body.cs-service-reference .dm-ref-media::after {top:12px !important;bottom:12px !important;}
}

/* Industries mega-menu CARD titles (not the primary header label).
   Keep this separate from the adjustable global H1–H4 typography. */
@media (min-width:981px) {
  body .mega-nav > li:nth-child(2) > ul.sub-menu > li > a .menu-title {
    font-size:14px !important;
    font-weight:700 !important;
    letter-spacing:normal !important;
    line-height:1.35 !important;
  }
}
@media (max-width:980px) {
  body .mega-nav > li:nth-child(2) > ul.sub-menu > li > a .menu-title {
    font-size:14px !important;
    font-weight:700 !important;
    line-height:1.4 !important;
  }
}
