/* Independent desktop dropdowns; the phone's existing side navigation is separate. */
@media (min-width: 768px) {
    .sptg-themed #responsive-menu { overflow: visible; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li { position: relative; display: flex; align-items: center; align-self: start; overflow: visible; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > a { flex: none; }
    .sptg-themed #responsive-menu .sptg-desktop-nav > li { transition: opacity 140ms ease; }
    .sptg-themed #responsive-menu .sptg-desktop-nav.has-open-menu > li:not(.open) { opacity: .42; }
    .sptg-themed #responsive-menu .sptg-desktop-nav > li.open > a { color: #28a6d7 !important; }
    .sptg-dark #responsive-menu .sptg-desktop-nav > li.open > a { color: #79d5ef !important; }
    /* Match the primary links' content center, including their top border and padding. */
    .sptg-themed .sptg-nav-toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 34px; box-sizing: border-box; padding: 10px 0 8px; border: 0; border-top: 3px solid transparent; background: transparent; color: #00384f; cursor: pointer; }
    .sptg-themed .sptg-nav-toggle .caret { position: static; top: auto; right: auto; width: 7px; height: 4px; margin: 0; border: 0; background: url('../images/menu/arrow_menu.png') 0 0 no-repeat; }
    .sptg-themed .sptg-nav-toggle:focus-visible { outline: 2px solid #28a6d7; outline-offset: -3px; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > .dropdown-menu { position: absolute; z-index: 101; top: calc(100% + 6px); left: -20px; width: max-content; min-width: 280px; max-width: calc(100vw - 40px); margin: 0; padding: 12px 20px 18px; border: 1px solid #dedede; border-radius: 0; background: #fff; box-shadow: 0 10px 22px rgba(0,0,0,.12); }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > .dropdown-menu[hidden],
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li:not(.open) > .dropdown-menu { display: none !important; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li.open > .dropdown-menu { display: block; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > .dropdown-menu > li { min-width: 0; width: auto; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > .dropdown-menu a { max-width: 100%; line-height: 20px; padding-top: 8px; padding-bottom: 8px; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li:last-child > .dropdown-menu { right: 0; left: auto; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li.open > .sptg-nav-industries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(7, auto) auto; grid-auto-flow: column; column-gap: 28px; width: 620px; }
    .sptg-themed #responsive-menu .sptg-nav-industries .sptg-nav-view-all { grid-column: 1 / -1; grid-row: 8; margin-top: 10px; padding-top: 8px; border-top: 1px solid #dedede; }
    .sptg-dark #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > .dropdown-menu { background: #151f2a; border-color: #344351; }
    .sptg-dark #responsive-menu .sptg-nav-industries .sptg-nav-view-all { border-color: #344351; }
    .sptg-dark .sptg-nav-toggle .caret { filter: brightness(0) invert(1); opacity: .9; }
    .sptg-dark .sptg-nav-toggle:focus-visible { outline-color: #79d5ef; }
}

/* Navigation above a separate contact row at every screen size. */
.sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; width: 100%; float: none; margin: 0; }
.sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav::before,
.sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav::after { display: none; }
.sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > .sptg-footer-section,
.sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav .sptg-footer-mobile-column > .sptg-footer-section { min-width: 0; width: auto; float: none; clear: none; padding: 0; margin: 0; }
.sptg-themed .sptg-footer-nav > [data-footer-section="industries"] { grid-column: 1 / 4; padding-top: 28px !important; border-top: 1px solid #52616b44; }
.sptg-themed .sptg-footer-nav > [data-footer-section="industries"] > ul { column-count: 3; column-gap: 32px; }
.sptg-themed .sptg-footer-nav [data-footer-section="industries"] li { break-inside: avoid; }
.sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > .sptg-footer-section[data-footer-section="contact"] { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: center; padding-top: 28px; border-top: 1px solid #52616b44; }
.sptg-themed .sptg-footer-contact-details { min-width: 0; }
.sptg-themed .sptg-footer-contact-details > .footer-menu-sub-items { margin-top: 16px; margin-bottom: 0; }
.sptg-themed .sptg-footer-ai-button { display: none; box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid #28a6d7; border-radius: 0; background: #28a6d7; color: #fff; font: inherit; font-size: 15px; line-height: 22px; white-space: nowrap; cursor: pointer; }
.sptg-themed .sptg-footer-ai-button:hover { background: #2395c1; }
.sptg-themed .sptg-footer-ai-button:focus-visible { outline: 2px solid #28a6d7; outline-offset: 4px; }
.sptg-dark .sptg-footer-ai-button:focus-visible { outline-color: #79d5ef; }
/* One launcher floats until its permanent footer slot reaches the same height. */
.sptg-themed .sptg-footer-chat-dock { position: relative; display: flex; justify-content: flex-end; min-width: 0; min-height: 48px; }
.sptg-themed .sptg-chat .sptg-chat-launch { background: #28a6d7; border-color: #28a6d7; }
.sptg-themed .sptg-chat .sptg-chat-launch:hover { background: #2395c1; }
.sptg-themed .sptg-footer-chat-dock.is-docked .sptg-chat-launch { position: absolute; top: 0; right: 0; bottom: auto; box-shadow: none; }
@media (min-width: 768px) {
    .sptg-themed .sptg-footer-contact-details > .footer-menu-sub-items { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 28px; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > [data-footer-section="workflow"] { grid-column: 1; grid-row: 2; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > [data-footer-section="industries"] { grid-column: 2 / 4; grid-row: 2; padding-top: 0 !important; border-top: 0; }
    .sptg-themed .sptg-footer-nav > [data-footer-section="industries"] > ul { column-count: 2; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > .sptg-footer-section[data-footer-section="contact"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sptg-themed .sptg-footer-contact-details { grid-column: 1 / 3; }
    .sptg-themed .sptg-footer-chat-dock { grid-column: 3; }
}
@media (max-width: 767px) {
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 32px; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > .sptg-footer-mobile-column { display: flex; flex-direction: column; gap: 32px; min-width: 0; padding: 0; }
    .sptg-themed .sptg-footer-nav .sptg-footer-section > ul { margin-bottom: 0; }
    .sptg-themed .sptg-footer-nav > [data-footer-section="industries"] { grid-column: 1 / -1; padding-top: 28px !important; border-top: 1px solid #52616b44; }
    .sptg-themed .sptg-footer-nav [data-footer-section="industries"] > ul { column-count: 2; column-gap: 28px; }
}
/* Phone landscape: Workflow and Clients share a row, followed by Industries. */
@media (max-width: 991px) and (orientation: landscape) and (max-height: 600px) {
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > [data-footer-section="workflow"] { grid-column: 1; grid-row: 2; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > [data-footer-section="clients"] { grid-column: 2; grid-row: 2; padding-top: 0 !important; border-top: 0; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > [data-footer-section="industries"] { grid-column: 1 / -1; grid-row: 3; padding-top: 28px !important; border-top: 1px solid #52616b44; }
    .sptg-themed .sptg-footer-nav > [data-footer-section="industries"] > ul { column-count: 3; column-gap: 28px; }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > .sptg-footer-section[data-footer-section="contact"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sptg-themed .sptg-footer-contact-details { grid-column: 1 / 3; }
    .sptg-themed .sptg-footer-chat-dock { grid-column: 3; }
}
/* Short landscape viewports cover phones rotated into the three-column layout.
   Taller tablets keep the existing floating launcher. */
@media (max-width: 767px), (min-width: 768px) and (max-width: 991px) and (orientation: landscape) and (max-height: 600px) {
    .sptg-themed .sptg-footer-chat-dock { min-height: 44px; }
    .sptg-themed.sptg-footer-chat-ready .sptg-footer-ai-button:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
    .sptg-themed.sptg-footer-chat-ready .sptg-chat .sptg-chat-launch { display: none !important; }
}
@media (max-width: 319px) {
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav { grid-template-columns: minmax(0, 1fr); }
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav > .sptg-footer-section[data-footer-section="contact"] { grid-template-columns: minmax(0, 1fr); }
}

/* Shared project action: native button, with the existing compact phone icon. */
.sptg-themed .ask-a-question-main { padding: 0; border: 0; border-radius: 0; background: transparent; font: inherit; text-align: left; }
.sptg-themed .header-main .ask-a-question-main .text { width: 100px; line-height: 18px; }
.sptg-themed .ask-a-question-main:focus-visible { outline: 2px solid #28a6d7; outline-offset: 4px; }
.sptg-dark .ask-a-question-main:focus-visible { outline-color: #79d5ef; }
@media (prefers-reduced-motion: reduce) {
    .sptg-themed #responsive-menu .sptg-desktop-nav > li { transition: none; }
}
.sptg-themed .header-main .sptg-header-chat { display: none; align-items: center; justify-content: center; float: left; box-sizing: border-box; width: 44px; height: 40px; margin: 0 8px 0 0; padding: 10px; border: 0; border-radius: 0; background: transparent; color: #28a6d7; cursor: pointer; touch-action: manipulation; }
.sptg-themed .header-main .sptg-header-chat[hidden] { display: none; }
.sptg-themed .header-main .sptg-header-chat svg { display: block; width: 24px; height: 24px; flex: none; pointer-events: none; }
.sptg-themed .header-main .sptg-header-chat:hover { color: #2395c1; }
.sptg-themed .header-main .sptg-header-chat:focus-visible { outline: 2px solid #28a6d7; outline-offset: -3px; }
.sptg-dark .header-main .sptg-header-chat:hover { color: #79d5ef; }
.sptg-dark .header-main .sptg-header-chat:focus-visible { outline-color: #79d5ef; }
@media (max-width: 767px) {
    .sptg-themed .header-main .navbar-toggle { width: 52px; padding-left: 13px; padding-right: 13px; }
    .sptg-themed .header-main .navbar-right-side:not(.expanded) { display: flex; align-items: center; justify-content: flex-end; right: 52px; width: 88px; height: 66px; }
    .sptg-themed .header-main .navbar-right-side:not(.expanded) .sptg-header-chat:not([hidden]) { display: inline-flex; float: none; flex: 0 0 44px; height: 44px; margin: 0; }
    .sptg-themed .header-main .navbar-right-side:not(.expanded) .search-form-container { flex: 0 0 44px; width: 44px; height: 44px; margin: 0; float: none; }
    .sptg-themed .header-main .navbar-right-side:not(.expanded) .navbar-form { position: relative; width: 44px; height: 44px; border: 0; box-shadow: none; }
    .sptg-themed .header-main .header-inner-1level .navbar-right-side:not(.expanded) .btn-success { top: 0; left: 0; right: auto; margin: 0; }
    .sptg-themed .header-main .navbar-right-side.expanded .sptg-header-chat { display: none; }
}
@media (max-width: 374px) {
    .sptg-themed .header-main .header-logo { width: 36px; height: 36px; }
    .sptg-themed .header-main .header-logo-text { padding-left: 7px; }
    .sptg-themed .header-main .header-logo-text .text-top { font-size: 21px; }
    .sptg-themed .header-main .header-logo-text .text-bottom { font-size: 13px; }
}
@media (max-width: 349px) {
    .sptg-themed .header-main .header-logo { width: 32px; height: 32px; }
    .sptg-themed .header-main .header-logo-text .text-top { font-size: 17px; }
    .sptg-themed .header-main .header-logo-text .text-bottom { font-size: 10.5px; }
}

/* Replace the envelope wherever the existing question label is shown. */
.sptg-themed .header-main .ask-a-question-main .icon,
.sptg-themed #top-menu-responsive .ask-a-question-main .icon { width: 24px; height: 24px; background: currentColor !important; color: #28a6d7; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20.5%2011.5a8.5%208.5%200%200%201-8.5%208.5%209.5%209.5%200%200%201-3.8-.8L3.5%2021l1.4-4.7a8.5%208.5%200%201%201%2015.6-4.8Z%22%2F%3E%3Cpath%20d%3D%22M8%2011.5h.01M12%2011.5h.01M16%2011.5h.01%22%20stroke-width%3D%222.8%22%2F%3E%3C%2Fsvg%3E") center / 24px 24px no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20.5%2011.5a8.5%208.5%200%200%201-8.5%208.5%209.5%209.5%200%200%201-3.8-.8L3.5%2021l1.4-4.7a8.5%208.5%200%201%201%2015.6-4.8Z%22%2F%3E%3Cpath%20d%3D%22M8%2011.5h.01M12%2011.5h.01M16%2011.5h.01%22%20stroke-width%3D%222.8%22%2F%3E%3C%2Fsvg%3E") center / 24px 24px no-repeat; }
.sptg-themed .header-main .ask-a-question-main .icon { margin-top: 5px; }
.sptg-themed #top-menu-responsive .ask-a-question-main .icon { vertical-align: middle; margin-top: 0; }
.sptg-themed .ask-a-question-main:hover .icon { color: #2395c1; }
.sptg-dark .ask-a-question-main:hover .icon { color: #79d5ef; }

/* Six balanced primary links and a Clients column beside the industry links. */
@media (min-width: 768px) {
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav { display: flex; justify-content: space-between; width: 100%; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav::before,
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav::after { display: none; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li { padding-right: 0 !important; }
    .sptg-themed #responsive-menu .nav.navbar-nav.sptg-desktop-nav > li > .sptg-nav-industries { left: auto; right: 0; }
}
@media (min-width: 992px) {
    .sptg-themed .sptg-footer-nav > [data-footer-section="clients"] { grid-column: 4; grid-row: 2; padding-top: 28px !important; border-top: 1px solid #52616b44; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .sptg-themed .sptg-footer-nav > [data-footer-section="clients"] { grid-column: 1 / -1; }
}

/* Wide desktops: five primary groups above the full-width industry directory. */
@media (min-width: 1600px) {
    .sptg-themed .footer-menu-group .nav.navbar-nav.sptg-footer-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .sptg-themed .sptg-footer-nav > [data-footer-section="clients"] { grid-column: 5; grid-row: 1; padding-top: 0 !important; border-top: 0; }
    .sptg-themed .sptg-footer-nav > [data-footer-section="industries"] { grid-column: 1 / -1; grid-row: 2; }
    .sptg-themed .sptg-footer-nav > [data-footer-section="industries"] > ul { column-count: 5; }
}
