/* Original theme owns typography, spacing, lists and side menus. */
.sptg-capability-page .right-col { min-width: 0; }
.sptg-capability-page h1 { overflow-wrap: break-word; }
/* Longer editorial labels wrap within the existing menu columns. */
.sptg-themed .left-menu-subpages a { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
.sptg-themed .footer-menu-group .nav.navbar-nav > div { padding-right: 22px; }
.sptg-themed .footer-menu-sub-items { width: auto; }
.sptg-themed .footer-menu-sub-items a { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
.sptg-themed .header-main .dropdown-menu > li > a { white-space: normal; overflow-wrap: break-word; }
/* Keep headings stationary; allocate more width to the longer Services and Expertise lists. */
.sptg-themed #responsive-menu .nav.navbar-nav { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1.05fr) minmax(105px, .85fr); column-gap: clamp(18px, 2.5vw, 36px); width: 100%; float: none; margin: 0; }
.sptg-themed #responsive-menu .nav.navbar-nav::before, .sptg-themed #responsive-menu .nav.navbar-nav::after { display: none; }
.sptg-themed #responsive-menu .nav.navbar-nav > li { min-width: 0; padding: 0; overflow: hidden; }
.sptg-themed #responsive-menu .nav.navbar-nav > li > a { display: inline-block; }
.sptg-themed #responsive-menu .nav.navbar-nav > li .dropdown-menu { width: 100%; min-width: 0; background: transparent; border-radius: 0; }
.sptg-themed #responsive-menu .dropdown-menu > li { width: 100%; }
/* Keep the original open/close behavior; wrapped labels can exceed its old -300px offset. */
@media (min-width: 768px) {
    .sptg-themed #responsive-menu { max-height: none; }
    .sptg-themed #responsive-menu .nav.navbar-nav > li:not(.open) .dropdown-menu { display: none; }
}
/* The original 9px line box is insufficient only where longer labels wrap. */
@media (min-width: 768px) and (max-width: 1199px) {
    .sptg-themed #responsive-menu .nav.navbar-nav > li .dropdown-menu a { line-height: 18px; }
}
.sptg-themed #top-menu-responsive .nav a { white-space: normal; overflow-wrap: break-word; }
/* Give wrapped phone-menu labels room between lines without stretching every row. */
@media (max-width: 767px) {
    .sptg-themed #top-menu-responsive .nav-sub-items > li > a { line-height: 1.5; padding-top: 6px; padding-bottom: 6px; }
}

/* Compact side navigation; give the dropdown and footer lists a more open rhythm. */
@media (min-width: 768px) {
    .sptg-themed .left-menu-subpages .list-group-item { padding-top: 10px; padding-bottom: 8px; margin-bottom: 1px; }
    .sptg-themed .left-menu-subpages .list-group-submenu { margin-top: 2px; margin-bottom: 5px; }
    .sptg-themed .left-menu-subpages .list-group-submenu .list-group-item { padding-top: 8px; padding-bottom: 8px; }
    .sptg-themed #responsive-menu .nav.navbar-nav > li .dropdown-menu a { line-height: 18px; padding-top: 8px; padding-bottom: 8px; }
    .sptg-themed #responsive-menu .nav.navbar-nav > li.open .dropdown-menu { padding-top: 8px; padding-bottom: 18px; }
    .sptg-themed .footer-menu-container { padding-top: 40px; padding-bottom: 12px; }
    .sptg-themed .footer-menu-sub-items { margin-top: 20px; }
    .sptg-themed .footer-menu-sub-items a { line-height: 20px; margin-top: 4px; margin-bottom: 8px; }
    .sptg-themed .footer-menu-sub-items .email { margin-top: 0; }
}

/* A separate Expertise band sits between the original illustrated tiles and Insights. */
.sptg-themed .home .sptg-home-expertise { padding: 64px 0; background: #e9eff3; color: #555; }
.sptg-themed .sptg-home-expertise header { max-width: 960px; margin-bottom: 32px; }
.sptg-themed .sptg-home-expertise h2 { margin: 0 0 18px; font-family: "Open Sans Light"; font-size: 36px; font-weight: 500; line-height: 1.2; color: #333; }
.sptg-themed .sptg-home-expertise header > p:last-child { margin: 0; font-size: 14px; line-height: 24px; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-card { display: block; min-width: 0; padding: 26px; color: #00384f; background: #f8fbfd; border: 1px solid #cbd8e0; text-decoration: none; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-card h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-family: "Open Sans Light"; font-size: 24px; font-weight: 500; line-height: 1.3; color: inherit; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-card h3 span { flex: none; margin-left: auto; color: #28a6d7; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-card p { margin: 0; color: #555; font-size: 14px; line-height: 24px; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-card:hover,
.sptg-themed .sptg-home-expertise .sptg-home-capability-card:focus-visible { border-color: #28a6d7; color: #28a6d7; }
.sptg-themed .sptg-home-expertise .sptg-home-capability-card:hover h3,
.sptg-themed .sptg-home-expertise .sptg-home-capability-card:focus-visible h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sptg-themed .expertise-section .sptg-capability-section-link:focus-visible,
.sptg-themed .sptg-home-expertise a:focus-visible { outline: 2px solid #28a6d7; outline-offset: 4px; }
.sptg-themed .home .sptg-capability-section-link { display: inline-block; margin-top: 28px; color: #1688b4; font-size: 14px; line-height: 24px; }
.sptg-themed .home .sptg-capability-section-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.sptg-dark .home .sptg-home-expertise { background: #0d1720; color: #bdcbd7; }
.sptg-dark .sptg-home-expertise h2 { color: #e5edf4; }
.sptg-dark .sptg-home-expertise .sptg-home-capability-card { color: #e5edf4; background: #14232f; border-color: #2b414f; }
.sptg-dark .sptg-home-expertise .sptg-home-capability-card p { color: #bdcbd7; }
.sptg-dark .sptg-home-expertise .sptg-home-capability-card h3 span,
.sptg-dark .home .sptg-capability-section-link { color: #79d5ef; }
.sptg-dark .sptg-home-expertise .sptg-home-capability-card:hover,
.sptg-dark .sptg-home-expertise .sptg-home-capability-card:focus-visible { color: #79d5ef; border-color: #79d5ef; }
.sptg-dark .expertise-section .sptg-capability-section-link:focus-visible,
.sptg-dark .sptg-home-expertise a:focus-visible { outline-color: #79d5ef; }
@media (min-width: 768px) and (max-width: 1199px) {
    .sptg-themed .sptg-home-expertise .sptg-home-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 767px) {
    .sptg-themed .home .sptg-home-expertise { padding: 40px 0; }
    .sptg-themed .sptg-home-expertise h2 { font-size: 32px; }
    .sptg-themed .sptg-home-expertise .sptg-home-capability-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .sptg-themed .sptg-home-expertise .sptg-home-capability-card { padding: 22px 20px; }
}

/* On phones, the existing Owl library shows one Expertise tile with usable paging dots. */
.sptg-themed .sptg-home-expertise .sptg-expertise-pagination { display: flex; justify-content: center; margin-top: 16px; }
.sptg-themed .sptg-home-expertise .sptg-expertise-pagination[hidden] { display: none; }
/* Match Owl's 8px dot + 7px side margins, retaining the taller button area. */
.sptg-themed .sptg-expertise-pagination button { display: grid; place-items: center; flex: none; width: 22px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sptg-themed .sptg-expertise-pagination button[aria-pressed="true"] { width: 24px; }
.sptg-themed .sptg-expertise-pagination button::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: #74838d; }
.sptg-themed .sptg-expertise-pagination button[aria-pressed="true"]::before { width: 10px; height: 10px; border: 1px solid #1688b4; background: transparent; }
.sptg-themed .sptg-expertise-pagination button:focus-visible { outline: 2px solid #1688b4; outline-offset: -4px; }
.sptg-dark .sptg-expertise-pagination button::before { background: #889caa; }
.sptg-dark .sptg-expertise-pagination button[aria-pressed="true"]::before { border-color: #79d5ef; background: transparent; }
.sptg-dark .sptg-expertise-pagination button:focus-visible { outline-color: #79d5ef; }
@media (max-width: 767px) {
    .sptg-themed .sptg-expertise-carousel .sptg-home-capability-grid.owl-carousel { display: block; }
    .sptg-themed .sptg-expertise-carousel .owl-wrapper { display: flex !important; }
    .sptg-themed .sptg-expertise-carousel .owl-item { display: flex; flex: none; }
    .sptg-themed .sptg-expertise-carousel .owl-item .sptg-home-capability-card { flex: 1; }
    .sptg-themed .sptg-expertise-carousel .sptg-home-capability-card:focus-visible { outline-offset: -4px; }
}


/* Reserve the phone carousel's first card and controls before enhancement. */
@media (max-width:767px) {
  .sptg-themed .sptg-home-expertise:not(.sptg-expertise-carousel) .sptg-home-capability-card { grid-area: 1 / 1; visibility: hidden; }
  .sptg-themed .sptg-home-expertise:not(.sptg-expertise-carousel) .sptg-home-capability-card:first-child { visibility: visible; }
  .sptg-themed .sptg-home-expertise:not(.sptg-expertise-carousel) .sptg-home-capability-grid::after { grid-area: 2 / 1; content: ""; display: block; height: 44px; }
}
