/* =====================================================================
   Header + mega menu — tcs.com structure (dark bar, full-width dark panel,
   intro | level-1 list | level-2 links). Colours adapted to the SolidPro brand.
   Loaded after theme-refresh.css; desktop only (mobile uses MobileMenu).
===================================================================== */
@media (min-width: 992px) {
  :root {
    --tm-head: #081a3d;
    --tm-panel: #0d2656;
    --tm-line: rgba(255, 255, 255, 0.28);
    --tm-txt: rgba(255, 255, 255, 0.72);
    --tm-accent: #e11b22;
  }

  /* ---------- header bar ---------- */
  html body #header, html body header#header { background: var(--tm-head) !important; border-bottom: 0 !important; box-shadow: none !important; }
  /* inner pages keep the transparent-over-banner behaviour, but go solid while a menu is open */
  html body.pg-inner #header:has(.has-megamenu:hover),
  html body.pg-inner #header:has(.megamenu-container.active) { background: var(--tm-head) !important; }

  #header .logo img { filter: brightness(0) invert(1) !important; }

  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link {
    position: relative;
    color: #fff !important;
    background: transparent !important;
    font-weight: 400;
    font-size: 1.02rem;
    letter-spacing: 0;
    padding: 0 16px;
    /* underline sits under the label, like tcs.com */
    background-image: linear-gradient(var(--tm-accent), var(--tm-accent)) !important;
    background-repeat: no-repeat !important;
    background-position: 16px calc(100% - 24px) !important;
    background-size: 0 2px !important;
    transition: background-size 0.25s ease, color 0.2s ease;
  }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current,
  html body #header .nav-links > li > .nav-link.is-current:hover {
    color: #fff !important;
    background-color: transparent !important;
    box-shadow: none !important;
    background-size: calc(100% - 32px) 2px !important;
  }
  #header .nav-links > li > .nav-link .dropdown-icon { color: #fff !important; font-size: 0.6rem; margin-left: 6px; transition: transform 0.2s; }
  #header .nav-links > li.has-megamenu:hover > .nav-link .dropdown-icon { transform: rotate(180deg); }

  /* ---------- panel ---------- */
  /* anchor the panel to the header itself so it spans the full viewport width */
  #header .container,
  #header .navbar,
  #header .nav-links > li.has-megamenu,
  #header .megamenu-container { position: static !important; }
  #header .mega-menu.tm-menu { border-radius: 0 !important; }

  #header .mega-menu.tm-menu {
    background: var(--tm-panel) !important;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35) !important;
    padding: 0 !important;
    left: 0 !important; right: 0 !important; width: 100% !important; max-width: none !important; margin: 0 !important; transform: none !important;
  }
  #header .mega-menu.tm-menu a { color: inherit !important; text-decoration: none; }

  .tm-panel {
    display: grid;
    grid-template-columns: 340px 320px 1fr;
    column-gap: 56px;
    align-items: start;
    max-width: 1210px;
    margin: 0 auto;
    padding: 46px 20px 56px;
    min-height: 330px;
    color: var(--tm-txt);
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
  }
  .tm-panel--single { grid-template-columns: 340px 1fr; }

  /* intro */
  .tm-intro h3 {
    margin: 0 0 22px; padding: 0; border: 0;
    color: #fff; font-family: 'Hanken Grotesk', system-ui, sans-serif;
    font-size: 1.85rem; font-weight: 400; line-height: 1.25; letter-spacing: 0;
  }
  .tm-intro p { margin: 0 0 34px; color: var(--tm-txt); font-size: 1.02rem; line-height: 1.8; }
  #header .mega-menu.tm-menu .tm-intro-link {
    display: inline-flex; align-items: center; gap: 12px;
    color: #fff !important; font-size: 1.05rem; font-weight: 500;
    background: none; padding: 0; border: 0;
  }
  .tm-intro-link i { transition: transform 0.2s; }
  .tm-intro-link:hover i { transform: translateX(5px); }

  /* level 1 */
  .tm-l1 { list-style: none; margin: 0; padding: 0; }
  .tm-l1 li { margin: 0; padding: 0; }
  #header .mega-menu.tm-menu .tm-l1-link {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 6px 14px 0;
    color: var(--tm-txt) !important;
    font-size: 1.02rem; line-height: 1.35;
    border-bottom: 1px solid var(--tm-line);
    transition: color 0.2s, background 0.2s, padding 0.2s;
  }
  #header .mega-menu.tm-menu .tm-l1-link i { color: #fff; font-size: 0.78rem; }
  #header .mega-menu.tm-menu .tm-l1-link:hover,
  #header .mega-menu.tm-menu .tm-l1-link.is-active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.09);
    padding-left: 12px; padding-right: 12px;
  }
  /* single list (About / Insights / Careers): two tidy columns */
  .tm-l1--wide { columns: 2; column-gap: 56px; max-width: 760px; }
  .tm-l1--wide li { break-inside: avoid; }

  /* level 2 */
  .tm-l2 { animation: tmIn 0.25s ease both; }
  .tm-l2-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 56px; }
  .tm-l2-links li { break-inside: avoid; margin: 0; }
  #header .mega-menu.tm-menu .tm-l2-links a {
    display: block; padding: 9px 0;
    color: var(--tm-txt) !important; font-size: 1.02rem; line-height: 1.5;
    transition: color 0.2s, transform 0.2s;
  }
  #header .mega-menu.tm-menu .tm-l2-links a:hover { color: #fff !important; transform: translateX(4px); }

  .tm-l2-card h4 { margin: 0 0 14px; color: #fff; font-size: 1.5rem; font-weight: 400; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .tm-l2-card p { margin: 0 0 26px; color: var(--tm-txt); font-size: 1.02rem; line-height: 1.8; max-width: 520px; }
  .tm-badge { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; background: var(--tm-accent); color: #fff; }
  .tm-also { margin-top: 34px !important; font-size: 0.92rem !important; }
  .tm-also strong { color: #fff; font-weight: 500; }
  #header .mega-menu.tm-menu .tm-also a { color: var(--tm-txt) !important; text-decoration: underline; text-underline-offset: 3px; }
  #header .mega-menu.tm-menu .tm-also a:hover { color: #fff !important; }

  @keyframes tmIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .tm-l2 { animation: none; } }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .tm-panel { grid-template-columns: 260px 260px 1fr; column-gap: 36px; }
  .tm-l2-links { columns: 1; }
}

/* ---------- attractive background pattern (desktop) ---------- */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu {
    position: absolute;
    overflow: hidden;
    background:
      radial-gradient(620px 320px at 8% 0%, rgba(60, 120, 255, 0.28), transparent 70%),
      radial-gradient(560px 300px at 96% 100%, rgba(225, 27, 34, 0.20), transparent 70%),
      linear-gradient(135deg, #0a1f4a 0%, #0d2656 55%, #0b1d45 100%) !important;
  }
  /* dot grid fading toward the right */
  #header .mega-menu.tm-menu::before {
    content: ''; position: absolute; inset: 0; width: auto; height: auto; transform: none; border: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.26) 1.3px, transparent 1.6px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
    animation: tmDrift 18s linear infinite;
  }
  /* circuit / flow lines echoing the page banner */
  #header .mega-menu.tm-menu::after {
    content: '' !important; display: block !important; position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; transform: none; border: 0; pointer-events: none; opacity: 0.8; -webkit-mask-image: linear-gradient(90deg, transparent 52%, #000 82%); mask-image: linear-gradient(90deg, transparent 52%, #000 82%);
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 420' preserveAspectRatio='xMaxYMid slice'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.30' stroke-width='1.4'%3E%3Cpath d='M520 40H760L800 80H1000L1040 40H1200'/%3E%3Cpath d='M600 150H720L760 110H980L1020 150H1200'/%3E%3Cpath d='M480 260H800L840 300H1060L1100 260H1200'/%3E%3Cpath d='M660 370H900L940 330H1200'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.6'%3E%3Ccircle cx='760' cy='40' r='3'/%3E%3Ccircle cx='800' cy='80' r='3'/%3E%3Ccircle cx='1040' cy='40' r='3'/%3E%3Ccircle cx='760' cy='110' r='3'/%3E%3Ccircle cx='1020' cy='150' r='3'/%3E%3Ccircle cx='840' cy='300' r='3'/%3E%3Ccircle cx='1100' cy='260' r='3'/%3E%3Ccircle cx='940' cy='330' r='3'/%3E%3C/g%3E%3C/svg%3E") right center / cover no-repeat;
  }
  .tm-panel { position: relative; z-index: 1; }
  /* red accent bar along the top edge of the open panel */
  #header .mega-menu.tm-menu .tm-panel::before {
    content: ''; position: absolute; top: 0; left: 20px; width: 84px; height: 3px;
    background: var(--tm-accent);
  }
  @keyframes tmDrift { from { background-position: 0 0; } to { background-position: 28px 28px; } }
  @media (prefers-reduced-motion: reduce) { #header .mega-menu.tm-menu::before { animation: none; } }
}

/* =====================================================================
   LIGHT PANEL variant — white panel, soft engineering-grid pattern, navy text
   (replaces the dark dot-grid / circuit-line pattern above)
===================================================================== */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu {
    background:
      radial-gradient(640px 300px at 4% 0%, rgba(23, 71, 158, 0.10), transparent 70%),
      radial-gradient(560px 300px at 98% 100%, rgba(225, 27, 34, 0.08), transparent 70%),
      #ffffff !important;
    border-top: 3px solid #17479e;
    box-shadow: 0 26px 44px rgba(13, 38, 86, 0.18) !important;
  }
  /* grid of fine lines with brighter cross marks, fading to the right */
  #header .mega-menu.tm-menu::before {
    background-image:
      linear-gradient(rgba(23, 71, 158, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(23, 71, 158, 0.07) 1px, transparent 1px),
      radial-gradient(circle, rgba(225, 27, 34, 0.35) 1.6px, transparent 2px);
    background-size: 44px 44px, 44px 44px, 176px 176px;
    background-position: 0 0, 0 0, 0 0;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.15) 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.15) 100%);
    animation: none;
  }
  /* big soft rings on the right edge */
  #header .mega-menu.tm-menu::after {
    background:
      radial-gradient(circle at 100% 50%, transparent 0 150px, rgba(23, 71, 158, 0.07) 151px 153px, transparent 154px 230px, rgba(23, 71, 158, 0.06) 231px 233px, transparent 234px 320px, rgba(225, 27, 34, 0.07) 321px 323px, transparent 324px) !important;
    -webkit-mask-image: none; mask-image: none; opacity: 1;
  }

  .tm-panel { color: #4a5875; }
  .tm-intro h3 { color: #0b2a6b; font-weight: 500; }
  .tm-intro p { color: #4a5875; }
  #header .mega-menu.tm-menu .tm-intro-link { color: #17479e !important; font-weight: 600; }
  #header .mega-menu.tm-menu .tm-intro-link:hover { color: #e11b22 !important; }

  #header .mega-menu.tm-menu .tm-l1-link {
    color: #2b3a5c !important;
    border-bottom-color: rgba(23, 71, 158, 0.18);
  }
  #header .mega-menu.tm-menu .tm-l1-link i { color: #17479e; }
  #header .mega-menu.tm-menu .tm-l1-link:hover,
  #header .mega-menu.tm-menu .tm-l1-link.is-active {
    color: #17479e !important;
    background: rgba(23, 71, 158, 0.08);
    box-shadow: inset 3px 0 0 #e11b22;
  }
  #header .mega-menu.tm-menu .tm-l2-links a { color: #3a4866 !important; }
  #header .mega-menu.tm-menu .tm-l2-links a:hover { color: #e11b22 !important; }
  .tm-l2-card h4 { color: #0b2a6b; font-weight: 500; }
  .tm-l2-card p { color: #4a5875; }
  .tm-also strong { color: #0b2a6b; }
  #header .mega-menu.tm-menu .tm-also a { color: #17479e !important; }
  #header .mega-menu.tm-menu .tm-also a:hover { color: #e11b22 !important; }
}

/* =====================================================================
   LEFT INNER BOX — the intro column becomes a navy card that slides in
   when the menu opens (Services, Industries, Solutions, Insights, About, Careers)
===================================================================== */
@media (min-width: 992px) {
  .tm-panel { align-items: stretch; }
  .tm-intro {
    position: relative;
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 34px 30px 32px;
    border-radius: 8px;
    color: #fff;
    background:
      radial-gradient(260px 200px at 100% 0%, rgba(225, 27, 34, 0.30), transparent 70%),
      radial-gradient(240px 200px at 0% 100%, rgba(80, 140, 255, 0.28), transparent 70%),
      linear-gradient(160deg, #17479e 0%, #0d2a68 100%);
    box-shadow: 0 18px 34px rgba(13, 38, 86, 0.30);
    overflow: hidden;
    /* slide-in */
    opacity: 0;
    transform: translateX(-34px);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s, opacity 0.4s ease 0.05s;
  }
  .has-megamenu:hover .tm-intro,
  .megamenu-container.active .tm-intro { opacity: 1; transform: translateX(0); }
  /* corner ornament */
  .tm-intro::before {
    content: ''; position: absolute; right: -46px; bottom: -46px; width: 150px; height: 150px;
    border-radius: 50%; border: 18px solid rgba(255, 255, 255, 0.07);
  }
  .tm-intro::after {
    content: ''; position: absolute; left: 30px; top: 0; width: 56px; height: 4px; background: #e11b22;
  }
  .tm-intro h3 { color: #fff !important; font-weight: 500; margin: 14px 0 16px; }
  .tm-intro p { color: rgba(255, 255, 255, 0.82) !important; margin-bottom: 28px; }
  #header .mega-menu.tm-menu .tm-intro .tm-intro-link {
    color: #fff !important; margin-top: auto; align-self: flex-start;
    padding: 11px 18px; border-radius: 4px; background: #e11b22; font-weight: 600; font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
  }
  #header .mega-menu.tm-menu .tm-intro .tm-intro-link:hover { background: #fff; color: #17479e !important; }
}
@media (prefers-reduced-motion: reduce) { .tm-intro { transition: none; opacity: 1; transform: none; } }

/* =====================================================================
   MODERATE LIGHT BACKGROUND — calmer than the first light version:
   soft off-white tint, very faint grid, no rings or red marks
===================================================================== */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu {
    background:
      radial-gradient(700px 260px at 0% 0%, rgba(23, 71, 158, 0.05), transparent 70%),
      linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%) !important;
    border-top: 3px solid #17479e;
    box-shadow: 0 22px 38px rgba(13, 38, 86, 0.12) !important;
  }
  #header .mega-menu.tm-menu::before {
    background-image:
      linear-gradient(rgba(23, 71, 158, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(23, 71, 158, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(0,0,0,0.25));
    mask-image: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(0,0,0,0.25));
  }
  #header .mega-menu.tm-menu::after { display: none !important; }
}

/* =====================================================================
   FULL-WIDTH CONTENT — no centred container; the three columns span the
   whole panel with a comfortable side gutter
===================================================================== */
@media (min-width: 992px) {
  .tm-panel {
    max-width: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 44px clamp(32px, 5vw, 96px) 54px !important;
    grid-template-columns: minmax(300px, 22%) minmax(300px, 26%) 1fr;
    column-gap: clamp(40px, 4.5vw, 88px);
  }
  .tm-panel--single { grid-template-columns: minmax(300px, 22%) 1fr; }
  .tm-panel::before { left: clamp(32px, 5vw, 96px) !important; }
  .tm-l2-links { columns: 3; column-gap: clamp(32px, 3.5vw, 64px); }
  .tm-l1--wide { columns: 3; max-width: none; column-gap: clamp(32px, 3.5vw, 64px); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .tm-l2-links { columns: 2; }
  .tm-l1--wide { columns: 2; }
}

/* =====================================================================
   FULL-WIDTH HEADER — logo at the left gutter, menu + CTA at the right,
   same side gutter as the mega panel below
===================================================================== */
@media (min-width: 992px) {
  html body #header .container {
    max-width: none !important;
    width: 100% !important;
    padding-left: clamp(32px, 5vw, 96px) !important;
    padding-right: clamp(32px, 5vw, 96px) !important;
  }
  html body #header .navbar { max-width: none !important; width: 100%; justify-content: space-between; }
  html body #header .nav-links { margin-left: auto; }
}

/* =====================================================================
   THIRD LEVEL — links listed one after another in a single column
===================================================================== */
@media (min-width: 992px) {
  .tm-l2-links,
  .tm-l2-links { columns: 1 !important; max-width: 460px; }
  .tm-l2-links li { border-bottom: 1px solid rgba(23, 71, 158, 0.12); }
  #header .mega-menu.tm-menu .tm-l2-links a {
    display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  }
  #header .mega-menu.tm-menu .tm-l2-links a::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: #e11b22; flex: none;
    transition: transform 0.2s;
  }
  #header .mega-menu.tm-menu .tm-l2-links a:hover::before { transform: scale(1.5); }
}

/* =====================================================================
   OUTLINE LEFT BOX (no filled background) + plain third-level links (no dots)
===================================================================== */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu .tm-l2-links a::before { content: none !important; display: none !important; }

  .tm-intro {
    background: transparent !important;
    border: 1.5px solid rgba(23, 71, 158, 0.55);
    box-shadow: none !important;
    color: #0b2a6b;
  }
  .tm-intro::before { display: none; }                         /* corner ring */
  .tm-intro::after { background: #e11b22; }                    /* keep the small red tab on the border */
  .tm-intro h3 { color: #0b2a6b !important; }
  .tm-intro p { color: #4a5875 !important; }
  #header .mega-menu.tm-menu .tm-intro .tm-intro-link {
    background: transparent; color: #17479e !important;
    border: 1.5px solid #17479e; box-shadow: none;
  }
  #header .mega-menu.tm-menu .tm-intro .tm-intro-link:hover {
    background: #17479e; color: #fff !important;
  }
}

/* =====================================================================
   NEW PANEL LOOK — split background: tinted left rail (intro + categories)
   and a clean white area for the links; left intro = accent bar only
===================================================================== */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu {
    --tm-split: calc(5vw + 0.48 * (100% - 10vw) + 6.75vw);
    background:
      linear-gradient(90deg, #edf2fa 0, #edf2fa var(--tm-split), #ffffff var(--tm-split)) !important;
    border-top: 3px solid #17479e;
    box-shadow: 0 22px 38px rgba(13, 38, 86, 0.14) !important;
  }
  /* hairline between rail and link area + fine diagonal texture on the white side */
  #header .mega-menu.tm-menu::before {
    background-image:
      linear-gradient(90deg, transparent calc(var(--tm-split) - 1px), rgba(23, 71, 158, 0.18) calc(var(--tm-split) - 1px), rgba(23, 71, 158, 0.18) var(--tm-split), transparent var(--tm-split)),
      repeating-linear-gradient(135deg, rgba(23, 71, 158, 0.045) 0 1px, transparent 1px 16px);
    background-size: 100% 100%, 100% 100%;
    -webkit-mask-image: none; mask-image: none;
  }

  /* left intro: accent bar only (no box, no border, no fill) */
  .tm-intro {
    background: transparent !important;
    border: 0 !important;
    border-left: 4px solid #e11b22 !important;
    border-radius: 0;
    box-shadow: none !important;
    padding: 2px 8px 2px 26px;
  }
  .tm-intro::before, .tm-intro::after { display: none !important; }
  .tm-intro h3 { margin-top: 0; font-size: 2rem; }
  #header .mega-menu.tm-menu .tm-intro .tm-intro-link {
    border: 0 !important; background: transparent !important; padding: 0;
    color: #e11b22 !important; font-weight: 600;
  }
  #header .mega-menu.tm-menu .tm-intro .tm-intro-link:hover { color: #17479e !important; background: transparent !important; }

  /* categories: solid navy pill on the active row */
  #header .mega-menu.tm-menu .tm-l1-link { border-bottom-color: rgba(23, 71, 158, 0.15); }
  #header .mega-menu.tm-menu .tm-l1-link:hover,
  #header .mega-menu.tm-menu .tm-l1-link.is-active {
    background: #17479e; color: #fff !important; box-shadow: none;
    border-radius: 4px; border-bottom-color: transparent;
  }
  #header .mega-menu.tm-menu .tm-l1-link:hover i,
  #header .mega-menu.tm-menu .tm-l1-link.is-active i { color: #fff; }

  /* link area: lines with a sliding arrow instead of dots */
  .tm-l2-links li { border-bottom: 1px solid rgba(23, 71, 158, 0.12); }
  #header .mega-menu.tm-menu .tm-l2-links a { justify-content: space-between; color: #1d2c4d !important; }
  #header .mega-menu.tm-menu .tm-l2-links a::after {
    content: '\2192'; color: #e11b22; opacity: 0; transform: translateX(-8px);
    transition: opacity 0.2s, transform 0.2s;
  }
  #header .mega-menu.tm-menu .tm-l2-links a:hover { color: #17479e !important; transform: none; }
  #header .mega-menu.tm-menu .tm-l2-links a:hover::after { opacity: 1; transform: none; }
  .tm-l2-links { max-width: 520px; }
}

/* =====================================================================
   MEGA CARDS — third-level links as small white cards (icon, title,
   one-line description) on a calm light-grey panel
===================================================================== */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu {
    background: #f3f5f9 !important;
    border-top: 3px solid #17479e;
    box-shadow: 0 22px 38px rgba(13, 38, 86, 0.14) !important;
  }
  #header .mega-menu.tm-menu::before,
  #header .mega-menu.tm-menu::after { display: none !important; }

  .tm-l2-links.tm-cards {
    columns: auto !important; max-width: none !important;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  }
  .tm-l2-links.tm-cards li { border: 0; break-inside: auto; }
  #header .mega-menu.tm-menu .tm-l2-links a.tm-card {
    display: flex; align-items: flex-start; justify-content: flex-start; gap: 14px;
    height: 100%; padding: 16px 18px;
    background: #fff; border: 1px solid #e2e8f2; border-radius: 8px;
    box-shadow: 0 2px 6px rgba(13, 38, 86, 0.05);
    color: #1d2c4d !important;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  }
  #header .mega-menu.tm-menu .tm-l2-links a.tm-card::after { display: none; }
  #header .mega-menu.tm-menu .tm-l2-links a.tm-card:hover {
    transform: translateY(-3px); border-color: #17479e;
    box-shadow: 0 12px 24px rgba(13, 38, 86, 0.14);
  }
  .tm-card-ico {
    flex: none; width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: 10px; background: #e9effa; color: #17479e; font-size: 1rem;
    transition: background 0.2s, color 0.2s;
  }
  .tm-card:hover .tm-card-ico { background: #17479e; color: #fff; }
  .tm-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .tm-card-title { font-weight: 600; font-size: 0.98rem; line-height: 1.3; color: #0b2a6b; }
  .tm-card-desc { font-size: 0.84rem; line-height: 1.45; color: #5a6783; }

  /* left rail: accent bar stays; categories as plain list, active = navy pill */
  .tm-l2 { max-width: 760px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .tm-l2-links.tm-cards { grid-template-columns: 1fr; }
}

/* =====================================================================
   FINAL — tcs.com exact look (measured on tcs.com at 1536px width)
   header + panel #1e2222 · title 26.96px/500 · text & links 17.97px, lh 32.3px,
   letter-spacing .56px, grey #9e9fa3 · CTA 20.2px/500 white · panel top 81px, ~467px tall
   Only the accent colour (red underline) is SolidPro's.
===================================================================== */
@media (min-width: 992px) {
  :root { --tx-bg: #17479e; --tx-grey: rgba(255, 255, 255, 0.78); --tx-line: rgba(255, 255, 255, 0.35); }

  /* header bar */
  html body #header, html body header#header, html body.pg-inner #header { background: var(--tx-bg) !important; }
  html body #header .navbar { min-height: 81px; }
  html body #header .container { padding-left: 4.75vw !important; padding-right: 4.75vw !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link {
    font-size: 17.97px; font-weight: 400; letter-spacing: 0.56px; text-transform: none !important;
  }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link .nav-label { text-transform: none !important; }

  /* panel */
  html body #header .mega-menu.tm-menu {
    background: var(--tx-bg) !important;
    border: 0 !important; border-top: 0 !important;
    box-shadow: none !important;
  }
  html body #header .mega-menu.tm-menu::before,
  html body #header .mega-menu.tm-menu::after { display: none !important; }

  html body .tm-panel {
    grid-template-columns: 298px 297px 1fr !important;
    column-gap: 49px !important;
    padding: 36px 4.75vw 48px !important;
    min-height: 467px; align-items: start !important;
    color: var(--tx-grey);
  }
  html body .tm-panel--single { grid-template-columns: 298px 1fr !important; }
  html body .tm-panel::before { display: none !important; }

  /* intro — plain text, no bar / box */
  html body .tm-intro {
    background: transparent !important; border: 0 !important; box-shadow: none !important;
    padding: 0 !important; border-radius: 0; display: block;
    opacity: 1 !important; transform: none !important; transition: none;
  }
  html body .tm-intro h3 { font-size: 26.96px; font-weight: 500; line-height: 32.3px; letter-spacing: normal; color: #fff !important; margin: 0 0 17px; }
  html body .tm-intro p { font-size: 17.97px; font-weight: 400; line-height: 32.3px; letter-spacing: 0.56px; color: var(--tx-grey) !important; margin: 0 0 42px; }
  html body #header .mega-menu.tm-menu .tm-intro .tm-intro-link {
    font-size: 20.2px; font-weight: 500; line-height: 32.3px; letter-spacing: 0.56px;
    color: #fff !important; background: transparent !important; border: 0 !important; padding: 0; margin: 0; gap: 12px;
  }
  html body #header .mega-menu.tm-menu .tm-intro .tm-intro-link:hover { color: #fff !important; }

  /* level 1 — grey rows, hairline under each, chevron right, hovered row greyed block */
  html body #header .mega-menu.tm-menu .tm-l1-link {
    font-size: 17.97px; font-weight: 400; line-height: 32.3px; letter-spacing: 0.56px;
    padding: 9px 6px 9px 0; color: var(--tx-grey) !important;
    background: transparent; border: 0; border-bottom: 1px solid var(--tx-line); border-radius: 0; box-shadow: none;
  }
  html body #header .mega-menu.tm-menu .tm-l1-link i { color: #fff; font-size: 0.8rem; }
  html body #header .mega-menu.tm-menu .tm-l1-link:hover,
  html body #header .mega-menu.tm-menu .tm-l1-link.is-active {
    background: rgba(255, 255, 255, 0.14); color: #fff !important; padding-left: 0; padding-right: 6px; box-shadow: none; border-radius: 0;
  }
  html body .tm-l1--wide { columns: 2; column-gap: 49px; max-width: 700px; }

  /* level 2 — plain grey links, two columns (cards flattened) */
  html body .tm-l2 { margin-left: 28px; max-width: none; }
  html body .tm-l2-links, html body .tm-l2-links.tm-cards {
    display: block !important; columns: 2 !important; column-gap: 50px; max-width: 660px !important; gap: 0;
  }
  html body .tm-l2-links li { border: 0 !important; break-inside: avoid; }
  html body #header .mega-menu.tm-menu .tm-l2-links a,
  html body #header .mega-menu.tm-menu .tm-l2-links a.tm-card {
    display: block; padding: 0 0 16px; height: auto;
    background: transparent; border: 0; border-radius: 0; box-shadow: none; transform: none;
    font-size: 17.97px; font-weight: 400; line-height: 32.3px; letter-spacing: 0.56px;
    color: var(--tx-grey) !important;
  }
  html body #header .mega-menu.tm-menu .tm-l2-links a::after,
  html body #header .mega-menu.tm-menu .tm-l2-links a::before { display: none !important; }
  html body .tm-card-ico, html body .tm-card-desc { display: none !important; }
  html body .tm-card-body { display: inline; }
  html body .tm-card-title { font-size: inherit; font-weight: inherit; color: inherit; line-height: inherit; }
  html body #header .mega-menu.tm-menu .tm-l2-links a:hover { color: #fff !important; transform: none; background: transparent; box-shadow: none; }

  html body .tm-l2-card h4 { font-size: 26.96px; font-weight: 500; color: #fff; }
  html body .tm-l2-card p { font-size: 17.97px; line-height: 32.3px; letter-spacing: 0.56px; color: var(--tx-grey); }
  html body .tm-also strong { color: #fff; }
  html body #header .mega-menu.tm-menu .tm-also a { color: var(--tx-grey) !important; }
}

/* =====================================================================
   PER-MENU COLOURS on the TCS-style panel — Services = SolidPro blue, Industries = black
   (header bar and other menus use the SolidPro blue set in --tx-bg)
===================================================================== */
@media (min-width: 992px) {
  html body #header #servicesMegaMenu.tm-menu { background: #17479e !important; }
  html body #header #industriesMegaMenu.tm-menu { background: #111418 !important; }
}

/* Solutions = red panel · Insights = white panel */
@media (min-width: 992px) {
  html body #header #solutionsMegaMenu.tm-menu { background: #d4181f !important; --tx-grey: rgba(255, 255, 255, 0.86); --tx-line: rgba(255, 255, 255, 0.4); }
  html body #header #solutionsMegaMenu.tm-menu .tm-l1-link:hover,
  html body #header #solutionsMegaMenu.tm-menu .tm-l1-link.is-active { background: rgba(0, 0, 0, 0.18); }

  html body #header #insightsMegaMenu.tm-menu {
    background: #ffffff !important;
    --tx-grey: #4a5875; --tx-line: #d5dcea;
    border-top: 1px solid #e3e8f2 !important;
    box-shadow: 0 22px 38px rgba(13, 38, 86, 0.14) !important;
  }
  html body #insightsMegaMenu .tm-intro h3 { color: #0b2a6b !important; }
  html body #header #insightsMegaMenu.tm-menu .tm-intro .tm-intro-link,
  html body #header #insightsMegaMenu.tm-menu .tm-intro .tm-intro-link:hover { color: #17479e !important; }
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link { color: #2b3a5c !important; }
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link i { color: #17479e; }
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link:hover,
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link.is-active { background: #eef3fb; color: #17479e !important; }
}

/* =====================================================================
   IMAGE CARD (Industries hover) — image with title, green outline, Read More
===================================================================== */
@media (min-width: 992px) {
  .tm-l2-card--img { display: block; }
  #header .mega-menu.tm-menu .tm-imgcard {
    position: relative; display: block; width: 100%; max-width: 300px; height: 360px;
    border-radius: 14px; overflow: hidden; color: #fff !important;
    background-size: cover; background-position: center; background-color: #0d2656;
    box-shadow: 0 14px 30px rgba(13, 38, 86, 0.28);
    transition: transform 0.25s, box-shadow 0.25s;
  }
  #header .mega-menu.tm-menu .tm-imgcard:hover { transform: translateY(-3px); box-shadow: 0 20px 38px rgba(13, 38, 86, 0.36); }
  .tm-imgcard-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 26, 61, 0.55) 0%, rgba(8, 26, 61, 0) 45%); }
  .tm-imgcard-title { position: absolute; top: 22px; left: 24px; right: 20px; font-size: 1.55rem; font-weight: 600; line-height: 1.2; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.35); }
  .tm-imgcard-desc { position: absolute; top: 96px; left: 24px; right: 24px; font-size: 0.9rem; line-height: 1.5; color: rgba(255,255,255,0.92); text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
  .tm-imgcard-shape { position: absolute; left: 0; bottom: 0; width: 100%; height: 62%; pointer-events: none; overflow: visible; }
  .tm-imgcard-shape polygon { stroke: #7cc242; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
  .tm-imgcard-btn {
    position: absolute; right: 16px; bottom: 16px;
    background: #22d3dc; color: #0b2a6b; font-weight: 600; font-size: 1rem;
    padding: 12px 22px; border-radius: 8px; transition: background 0.2s, transform 0.2s;
  }
  .tm-imgcard:hover .tm-imgcard-btn { background: #17479e; color: #fff; transform: translateX(-2px); }
}

/* SolidPro "O" mark — animated on every Industries image card */
@media (min-width: 992px) {
  .tm-imgcard-o { position: absolute; right: 18px; top: 150px; width: 84px; height: 84px; overflow: visible; filter: drop-shadow(0 0 6px rgba(255,255,255,0.65)); pointer-events: none; }
  .tm-o-ring { stroke: #16469D; stroke-dasharray: 214; stroke-dashoffset: 0; transform-origin: 50% 50%; animation: tmORing 4.5s ease-in-out infinite; }
  .tm-o-wedge { fill: #E01A22; transform-origin: 50% 90%; animation: tmOWedge 2.2s ease-in-out infinite; }
  .tm-imgcard:hover .tm-o-ring { animation-duration: 1.8s; }
  @keyframes tmORing { 0% { stroke-dashoffset: 214; transform: rotate(-90deg); } 55%,100% { stroke-dashoffset: 0; transform: rotate(270deg); } }
  @keyframes tmOWedge { 0%,100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(-5px) scale(1.15); opacity: .85; } }
  @media (prefers-reduced-motion: reduce) { .tm-o-ring, .tm-o-wedge { animation: none; } }
}

/* Image card polish: no inner lines, richer overlay, glass description, shine sweep */
@media (min-width: 992px) {
  .tm-imgcard-shape { display: none; }
  .tm-imgcard-shade { background: linear-gradient(180deg, rgba(8,26,61,.75) 0%, rgba(8,26,61,.15) 42%, rgba(8,26,61,.0) 55%, rgba(8,26,61,.78) 100%); }
  #header .mega-menu.tm-menu .tm-imgcard { background-size: 108%; transition: transform .3s, box-shadow .3s, background-size .6s; border: 1px solid rgba(255,255,255,.35); }
  #header .mega-menu.tm-menu .tm-imgcard:hover { background-size: 118%; }
  .tm-imgcard-title { border-left: 4px solid #E01A22; padding-left: 12px; }
  .tm-imgcard-desc { top: 100px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); }
  .tm-imgcard-btn { background: linear-gradient(135deg, #22d3dc, #17a9d6); box-shadow: 0 8px 18px rgba(34,211,220,.4); }
  .tm-imgcard-shine { position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-18deg); pointer-events: none; }
  .tm-imgcard:hover .tm-imgcard-shine { animation: tmShine 1s ease; }
  @keyframes tmShine { to { left: 130%; } }
  .tm-imgcard-o { top: 175px; }
}

/* Image card fills the whole right column */
@media (min-width: 992px) {
  #header .mega-menu.tm-menu .tm-imgcard { max-width: none; width: 100%; height: 360px; background-size: cover; }
  #header .mega-menu.tm-menu .tm-imgcard:hover { background-size: cover; }
  .tm-imgcard-desc { max-width: 520px; }
  .tm-imgcard-o { right: 28px; width: 110px; height: 110px; }
}

/* Final: green outline back, O animation removed, richer look */
@media (min-width: 992px) {
  .tm-imgcard-o { display: none; }
  .tm-imgcard-shape { display: block; height: 66%; }
  .tm-imgcard-shape polygon { stroke: #8dd23f; stroke-width: 3; filter: drop-shadow(0 0 5px rgba(141,210,63,.8)); stroke-dasharray: 600; stroke-dashoffset: 0; }
  .tm-imgcard:hover .tm-imgcard-shape polygon { animation: tmDraw 1.2s ease; }
  @keyframes tmDraw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
  #header .mega-menu.tm-menu .tm-imgcard { border: 0; border-radius: 16px; box-shadow: 0 18px 38px rgba(13,38,86,.35), inset 0 0 0 1px rgba(255,255,255,.18); }
  .tm-imgcard-title { font-size: 1.7rem; letter-spacing: .2px; }
  .tm-imgcard-btn { border-radius: 10px; padding: 13px 26px; font-size: 1.05rem; }
}

/* Header menu: slightly larger, moderate weight */
@media (min-width: 992px) {
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link {
    font-size: 19px; font-weight: 500; letter-spacing: 0.3px; padding: 0 18px;
    background-position: 18px calc(100% - 24px) !important;
  }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current { background-size: calc(100% - 36px) 2px !important; }
  #header .nav-links > li > .nav-link .dropdown-icon { font-size: 0.65rem; }
}

/* Black panel for every mega menu (Industries, Services, Solutions, About, Insights, Careers) */
@media (min-width: 992px) {
  :root { --tx-panel-black: #0a0a0a; }
  html body #header .mega-menu.tm-menu {
    background: var(--tx-panel-black) !important;
    border-top: 3px solid #e11b22 !important;
    box-shadow: 0 26px 44px rgba(0, 0, 0, 0.5) !important;
  }
  html body #header .mega-menu.tm-menu::before,
  html body #header .mega-menu.tm-menu::after { display: none !important; }
  .tm-panel { color: rgba(255,255,255,.78); }
  .tm-intro h3 { color: #fff; }
  .tm-intro p { color: rgba(255,255,255,.75); }
  #header .mega-menu.tm-menu .tm-intro-link { color: #fff !important; }
  #header .mega-menu.tm-menu .tm-intro-link:hover { color: #e11b22 !important; }
  #header .mega-menu.tm-menu .tm-l1-link { color: rgba(255,255,255,.82) !important; border-bottom-color: rgba(255,255,255,.18); }
  #header .mega-menu.tm-menu .tm-l1-link i { color: #fff; }
  #header .mega-menu.tm-menu .tm-l1-link:hover,
  #header .mega-menu.tm-menu .tm-l1-link.is-active { color: #fff !important; background: rgba(255,255,255,.1); }
  #header .mega-menu.tm-menu .tm-l2-links a,
  .tm-l2-card p { color: rgba(255,255,255,.78) !important; }
  .tm-l2-card h4 { color: #fff; }
}

/* Force black on Services / Solutions / Insights (beats the per-menu colour rules above) */
@media (min-width: 992px) {
  html body #header #servicesMegaMenu.tm-menu,
  html body #header #solutionsMegaMenu.tm-menu,
  html body #header #insightsMegaMenu.tm-menu,
  html body #header #industriesMegaMenu.tm-menu {
    background: #0a0a0a !important;
    --tx-grey: rgba(255, 255, 255, 0.82); --tx-line: rgba(255, 255, 255, 0.22);
    border-top: 3px solid #e11b22 !important;
    box-shadow: 0 26px 44px rgba(0, 0, 0, 0.5) !important;
  }
  html body #insightsMegaMenu .tm-intro h3 { color: #fff !important; }
  html body #header #insightsMegaMenu.tm-menu .tm-intro .tm-intro-link,
  html body #header #insightsMegaMenu.tm-menu .tm-intro .tm-intro-link:hover { color: #fff !important; }
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link { color: rgba(255,255,255,.82) !important; }
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link i { color: #fff; }
  html body #header #solutionsMegaMenu.tm-menu .tm-l1-link:hover,
  html body #header #solutionsMegaMenu.tm-menu .tm-l1-link.is-active,
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link:hover,
  html body #header #insightsMegaMenu.tm-menu .tm-l1-link.is-active,
  html body #header #servicesMegaMenu.tm-menu .tm-l1-link:hover,
  html body #header #servicesMegaMenu.tm-menu .tm-l1-link.is-active { background: rgba(255,255,255,.12); color: #fff !important; }
}

/* Red hover/border accents -> white */
@media (min-width: 992px) {
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link {
    background-image: linear-gradient(#fff, #fff) !important;
  }
  html body #header #servicesMegaMenu.tm-menu,
  html body #header #solutionsMegaMenu.tm-menu,
  html body #header #insightsMegaMenu.tm-menu,
  html body #header #industriesMegaMenu.tm-menu,
  html body #header .mega-menu.tm-menu { border-top: 3px solid #fff !important; }
  #header .mega-menu.tm-menu .tm-panel::before { background: #fff; }
  #header .mega-menu.tm-menu .tm-intro-link:hover { color: #fff !important; }
  .tm-imgcard-title { border-left-color: #fff; }
}

/* Remove the white borders (panel top border, panel accent bar, card title bar) */
@media (min-width: 992px) {
  html body #header #servicesMegaMenu.tm-menu,
  html body #header #solutionsMegaMenu.tm-menu,
  html body #header #insightsMegaMenu.tm-menu,
  html body #header #industriesMegaMenu.tm-menu,
  html body #header .mega-menu.tm-menu { border-top: 0 !important; }
  #header .mega-menu.tm-menu .tm-panel::before { display: none !important; }
  .tm-imgcard-title { border-left: 0; padding-left: 0; }
}

/* Spacing + uniform widths: no overflowing text between left list and right panel */
@media (min-width: 992px) {
  html body .tm-panel { grid-template-columns: 290px 350px minmax(0, 1fr) !important; column-gap: 40px !important; }
  html body .tm-panel--single { grid-template-columns: 290px minmax(0, 1fr) !important; }

  /* left list: every row the same width and height, text wraps inside */
  html body .tm-l1 { width: 100%; min-width: 0; }
  html body #header .mega-menu.tm-menu .tm-l1-link {
    box-sizing: border-box; width: 100%; min-height: 58px;
    padding: 10px 14px 10px 12px !important; gap: 14px;
    font-size: 17px; line-height: 1.35; letter-spacing: .2px;
  }
  html body #header .mega-menu.tm-menu .tm-l1-link span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  html body #header .mega-menu.tm-menu .tm-l1-link i { flex: none; }
  html body #header .mega-menu.tm-menu .tm-l1-link:hover,
  html body #header .mega-menu.tm-menu .tm-l1-link.is-active { padding-left: 12px !important; padding-right: 14px !important; }
  html body .tm-l1--wide { columns: 2; column-gap: 40px; max-width: none; }

  /* right side: breathing room from the left list, divider, links wrap cleanly */
  html body .tm-l2 { margin-left: 0; padding-left: 44px; min-width: 0; border-left: 1px solid rgba(255,255,255,.18); max-width: none; }
  html body .tm-l2-links, html body .tm-l2-links.tm-cards { columns: 2 !important; column-gap: 48px; max-width: none !important; }
  html body #header .mega-menu.tm-menu .tm-l2-links a,
  html body #header .mega-menu.tm-menu .tm-l2-links a.tm-card {
    box-sizing: border-box; width: 100%; padding: 0 8px 14px 0;
    font-size: 17px; line-height: 1.4; letter-spacing: .2px; overflow-wrap: anywhere;
  }
  html body .tm-l2-card--img { padding-left: 0; }
}

/* Main header menu text in CAPS (like the CONTACT button) */
@media (min-width: 992px) {
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link .nav-label {
    text-transform: uppercase !important; letter-spacing: 0.6px; font-size: 16px; font-weight: 600;
  }
}

/* Main menu text = exact CONTACT button type (0.82rem / 700 / 0.08em / caps) */
@media (min-width: 992px) {
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link .nav-label {
    font-size: 0.82rem !important; font-weight: 700 !important; letter-spacing: 0.08em !important; text-transform: uppercase !important;
  }
}

/* Main menu one step larger than the CONTACT button */
@media (min-width: 992px) {
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link .nav-label {
    font-size: 0.9rem !important;
  }
}

/* Right-side links flow row-wise (left→right, then next row) instead of column-wise */
@media (min-width: 992px) {
  html body .tm-l2-links, html body .tm-l2-links.tm-cards {
    display: grid !important; columns: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 0; grid-auto-flow: row;
  }
  html body .tm-l2-links li { break-inside: auto; }
}

/* Right-side links: single list, one after another */
@media (min-width: 992px) {
  html body .tm-l2-links, html body .tm-l2-links.tm-cards {
    grid-template-columns: minmax(0, 1fr) !important; row-gap: 4px;
  }
  html body #header .mega-menu.tm-menu .tm-l2-links a,
  html body #header .mega-menu.tm-menu .tm-l2-links a.tm-card { padding: 8px 8px 8px 0; }
}

/* Right area: link list + related image filling the rest of the panel */
@media (min-width: 992px) {
  html body .tm-l2 { padding-left: 44px; }
  .tm-l2-split { display: flex; align-items: stretch; gap: 36px; min-height: 380px; }
  .tm-l2-split .tm-l2-links { flex: 0 0 300px; align-self: flex-start; }
  .tm-l2-visual {
    position: relative; flex: 1 1 auto; min-width: 0; min-height: 380px; display: block; overflow: hidden;
    border-radius: 16px; background-size: cover; background-position: center; background-color: #101010;
    color: #fff !important; box-shadow: 0 18px 38px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.15);
    animation: tmVisualIn .45s ease both;
  }
  .tm-l2-visual .tm-imgcard-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.05) 45%, rgba(0,0,0,.75) 100%); }
  .tm-visual-text { position: absolute; top: 26px; left: 28px; right: 28px; display: flex; flex-direction: column; gap: 10px; }
  .tm-visual-title { font-size: 1.7rem; font-weight: 600; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
  .tm-visual-desc { max-width: 460px; font-size: .95rem; line-height: 1.5; color: rgba(255,255,255,.92); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
  .tm-l2-visual .tm-imgcard-btn { position: absolute; right: 20px; bottom: 20px; }
  .tm-l2-visual:hover .tm-imgcard-btn { background: #17479e; color: #fff; }
  @keyframes tmVisualIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
  html body #header .mega-menu.tm-menu .tm-l2-links a.tm-card.is-hover,
  html body #header .mega-menu.tm-menu .tm-l2-links a.tm-card:hover { color: #fff !important; }
  @media (prefers-reduced-motion: reduce) { .tm-l2-visual { animation: none; } }
}

/* Nested menus (Services etc.): give the right area enough room so text never clips */
@media (min-width: 992px) {
  html body .tm-panel:has(.tm-l2-split) { grid-template-columns: 230px 270px minmax(0, 1fr) !important; column-gap: 32px !important; }
  html body .tm-panel:has(.tm-l2-split) .tm-intro p { font-size: 16px; line-height: 1.6; }
  html body .tm-panel:has(.tm-l2-split) .tm-l2 { padding-left: 32px; }
  .tm-l2-split { gap: 28px; }
  .tm-l2-split .tm-l2-links { flex: 0 0 250px; }
  html body #header .mega-menu.tm-menu .tm-l2-split .tm-l2-links a.tm-card { font-size: 16px; line-height: 1.35; white-space: normal; }
  .tm-l2-visual { min-width: 300px; }
  .tm-visual-title { font-size: 1.5rem; overflow-wrap: anywhere; }
  .tm-visual-text { right: 24px; left: 24px; }
}

/* image text must wrap inside the card (links default to nowrap) */
@media (min-width: 992px) {
  .tm-l2-visual, .tm-l2-visual * { white-space: normal !important; }
  .tm-visual-desc { max-width: 100%; overflow-wrap: break-word; }
  .tm-imgcard, .tm-imgcard * { white-space: normal !important; }
}

/* Light header bar (white) with navy text; hero slider stays dark */
@media (min-width: 992px) {
  html body #header, html body header#header, html body.pg-inner #header, html body #header:has(.megamenu-container.active), html body.pg-inner #header:has(.megamenu-container.active) {
    background: #ffffff !important; box-shadow: 0 2px 14px rgba(13, 38, 86, 0.10) !important; border-bottom: 1px solid #e3e8f2 !important;
  }
  #header .logo img { filter: none !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current { color: #0b2a6b !important; }
  #header .nav-links > li > .nav-link .dropdown-icon { color: #0b2a6b !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link { background-image: linear-gradient(#e11b22, #e11b22) !important; }
  html body #header .nav-cta a { background: #17479e !important; color: #fff !important; }
}

/* Welcome to SolidPro — keep the ring, tidy spacing and balance */
@media (min-width: 992px) {
  html body .wc { padding-top: 72px !important; padding-bottom: 96px !important; }
  html body .wc .wc-intro { margin-bottom: 56px !important; }
  html body .wc .wc-grid { grid-template-columns: minmax(0, 1fr) 400px minmax(0, 1fr) !important; gap: 56px !important; align-items: center; max-width: 1240px; margin: 0 auto; }
  html body .wc .wc-ring { width: 400px !important; margin: 0 auto; }
  html body .wc .wc-col { gap: 28px !important; }
  html body .wc .wc-benefit {
    align-items: center; gap: 20px; padding: 22px 24px; min-height: 128px;
    background: #fff; border: 1px solid #e3e8f2; border-radius: 14px;
    box-shadow: 0 8px 22px rgba(13, 38, 86, 0.07);
    transition: transform .25s, box-shadow .25s, border-color .25s;
  }
  html body .wc .wc-benefit:hover { transform: translateY(-3px); border-color: #17479e; box-shadow: 0 16px 30px rgba(13, 38, 86, 0.14); }
  html body .wc .wc-benefit--left { flex-direction: row-reverse; text-align: right; }
  html body .wc .wc-benefit h3 { font-size: 1.1rem; margin: 0 0 6px; }
  html body .wc .wc-benefit p { font-size: .95rem; line-height: 1.55; margin: 0; }
  html body .wc .wc-icon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px; }
}
@media (min-width: 992px) and (max-width: 1250px) {
  html body .wc .wc-grid { grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr) !important; gap: 32px !important; }
  html body .wc .wc-ring { width: 340px !important; }
}
@media (min-width: 992px) { html body .wc .wc-col { display: grid !important; grid-auto-rows: 1fr; } html body .wc .wc-benefit { min-height: 150px; } }

/* Welcome to SolidPro — split layout: ring left, heading + 2x2 benefits right */
@media (min-width: 992px) {
  html body .wc--split { padding: 90px 0 !important; }
  html body .wc-split { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 72px; align-items: center; max-width: 1240px; margin: 0 auto; }
  html body .wc-split .wc-ring { width: 430px !important; margin: 0; }
  html body .wc-split .wc-intro { text-align: left !important; margin: 0 0 36px !important; max-width: none; }
  html body .wc-split .wc-intro h2 { text-align: left !important; font-size: clamp(2rem, 3vw, 2.8rem); }
  html body .wc-split .wc-eyebrow { justify-content: flex-start; margin-bottom: 14px; }
  html body .wc-split .wc-eyebrow::before { display: none !important; }
  html body .wc-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  html body .wc-benefits .wc-benefit {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; text-align: left;
    min-height: 0; padding: 26px 24px 24px; background: #fff; border: 1px solid #e3e8f2; border-top: 3px solid #17479e;
    border-radius: 12px; box-shadow: 0 8px 22px rgba(13, 38, 86, 0.07); transition: transform .25s, box-shadow .25s, border-color .25s;
  }
  html body .wc-benefits .wc-benefit:hover { transform: translateY(-4px); border-top-color: #e11b22; box-shadow: 0 16px 30px rgba(13, 38, 86, 0.14); }
  html body .wc-benefits .wc-benefit--right { flex-direction: column; }
  .wc-num { position: absolute; top: 16px; right: 20px; font-size: 1.6rem; font-weight: 800; color: #e3e8f2; letter-spacing: .04em; }
}
@media (max-width: 991px) {
  .wc-split { display: grid; gap: 32px; }
  .wc-benefits { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .wc-num { display: none; }
}

/* Welcome to SolidPro — heading + list left, large O-ring photo right */
@media (min-width: 992px) {
  html body .wc-split--rev { grid-template-columns: minmax(0, 1fr) 520px !important; gap: 80px !important; }
  html body .wc-split--rev .wc-ring { width: 520px !important; margin-left: auto; }
  .wc-lead { margin: 18px 0 0; font-size: 1.12rem; line-height: 1.7; color: #4a5875; max-width: 560px; }
  .wc-list { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-direction: column; }
  .wc-row { position: relative; display: flex; align-items: center; gap: 22px; padding: 20px 4px; border-top: 1px solid #dfe5f1; transition: padding .25s, background .25s; }
  .wc-row:last-child { border-bottom: 1px solid #dfe5f1; }
  .wc-row:hover { padding-left: 16px; background: #fff; }
  .wc-row .wc-icon { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px; background: #17479e; color: #fff; font-size: 1.15rem; transition: background .25s; }
  .wc-row:hover .wc-icon { background: #e11b22; }
  .wc-row h3 { margin: 0 0 4px; font-size: 1.12rem; font-weight: 700; color: #0b2a6b; }
  .wc-row p { margin: 0; font-size: .96rem; line-height: 1.55; color: #4a5875; }
  .wc-row .wc-num { margin-left: auto; font-size: 1.5rem; font-weight: 800; color: #dfe5f1; letter-spacing: .04em; position: static; }
}
@media (max-width: 991px) {
  .wc-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
  .wc-row { display: flex; gap: 16px; align-items: flex-start; }
  .wc-row .wc-icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: #17479e; color: #fff; }
  .wc-row .wc-num { display: none; }
  .wc-split--rev .wc-center { order: -1; }
}

/* Key Metrics — compact: all 8 in one tidy block */
@media (min-width: 992px) {
  html body .kh.kh4 { padding: 64px 0 68px; }
  html body .kh4-head { margin-bottom: 28px; }
  html body .kh4 .kh4-head h2 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1.15; margin: 8px 0 0; }
  html body .kh4-rule { margin-top: 22px; }
  html body .kh4-cell { padding: 20px 22px 18px !important; min-height: 0 !important; display: grid; grid-template-columns: 40px 1fr; grid-template-areas: "icon num" "icon label"; column-gap: 16px; align-items: center; }
  html body .kh4-cell .kh4-icon { grid-area: icon; width: 40px; height: 40px; margin: 0; font-size: .95rem; align-self: start; }
  html body .kh4-cell .kh4-num { grid-area: num; font-size: clamp(2.2rem, 3.2vw, 3rem); }
  html body .kh4-cell h3 { grid-area: label; margin: 6px 0 0; font-size: .74rem; line-height: 1.35; letter-spacing: .08em; }
}

/* Keep the chat robot visible above the cookie-consent banner */
html body:has(#gdpr_banner:not([style*="display: none"])) .ai-launch.ai-launch--robot { bottom: 108px !important; }
html body:has(#gdpr_banner:not([style*="display: none"])) .ai-launch--robot ~ *[class*="ai-bubble"],
html body:has(#gdpr_banner:not([style*="display: none"])) [class*="ai-nudge"] { bottom: 230px !important; }
.ai-launch.ai-launch--robot { transition: bottom .3s ease; }

/* Key Metrics — one-line stat strip (4 headline numbers) */
@media (min-width: 992px) {
  html body .kh4--strip { padding: 56px 0 60px; }
  html body .kh4--strip .kh4-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
  html body .kh4--strip .kh4-rule { display: none; }
  html body .kh4--strip .kh4-grid { border: 0; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.25); border-bottom: 1px solid rgba(255,255,255,.25); }
  html body .kh4--strip .kh4-cell {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
    padding: 30px 28px !important; border: 0; border-right: 1px solid rgba(255,255,255,.22); background: transparent !important; min-height: 0 !important;
  }
  html body .kh4--strip .kh4-cell:last-child { border-right: 0; }
  html body .kh4--strip .kh4-line, html body .kh4--strip .kh4-icon { display: none; }
  html body .kh4--strip .kh4-cell .kh4-num { font-size: clamp(3rem, 4.8vw, 4.4rem); }
  html body .kh4--strip .kh4-cell h3 { margin: 0; font-size: .8rem; letter-spacing: .1em; color: rgba(255,255,255,.85); }
}
@media (max-width: 991px) {
  html body .kh4--strip .kh4-grid { grid-template-columns: repeat(2, 1fr); }
  html body .kh4--strip .kh4-icon, html body .kh4--strip .kh4-line { display: none; }
}
@media (min-width: 992px) { html body .kh4--strip .kh4-cell { justify-content: flex-start; min-height: 150px !important; } }


/* Hide the left-side chat robot and its speech bubble */
html body .ai-launch.ai-launch--robot, html body .ai-launch--robot, html body .ai-bubble, html body .ai-think, html body .ai-hello { display: none !important; }

/* Tighter space between "Welcome to SolidPro" and "Why SolidPro" */
@media (min-width: 992px) {
  html body .wc--split { padding-bottom: 24px !important; }
  html body .wz { padding-top: 24px !important; }
}
@media (max-width: 991px) {
  html body .wc--split { padding-bottom: 12px !important; }
  html body .wz { padding-top: 12px !important; }
}

/* Tighter space above "What we do" (Our Services) */
@media (min-width: 992px) {
  html body .ind5 { padding-bottom: 24px !important; }
  html body .sg { padding-top: 24px !important; }
}
@media (max-width: 991px) {
  html body .ind5 { padding-bottom: 12px !important; }
  html body .sg { padding-top: 12px !important; }
}

/* +30px more space above "What we do" */
@media (min-width: 992px) { html body .sg { padding-top: 54px !important; } }
@media (max-width: 991px) { html body .sg { padding-top: 42px !important; } }

/* Industries We Serve: top padding 70px */
html body .ind5 { padding-top: 70px !important; }

/* UNIFORM section spacing: same top and bottom padding on every home section */
html body .wc, html body .wc--split, html body .wz, html body .ind5, html body .sg,
html body .kh4, html body .kh.kh4, html body .kh4--strip, html body .ins, html body .work, html body .sp-contact-section {
  padding-top: 40px !important; padding-bottom: 40px !important;
}
@media (max-width: 991px) {
  html body .wc, html body .wc--split, html body .wz, html body .ind5, html body .sg,
  html body .kh4, html body .kh.kh4, html body .kh4--strip, html body .ins, html body .work, html body .sp-contact-section {
    padding-top: 28px !important; padding-bottom: 28px !important;
  }
}

/* Contact: compact spacing (from the screen height) so the whole section shows on one screen */
@media (min-width: 992px) {
  html body .sp-contact-section .cx-info { padding-top: clamp(20px, 4vh, 56px) !important; padding-bottom: clamp(20px, 4vh, 56px) !important; }
  html body .sp-contact-section [class*="sp-contact-fo"]:not(form) { padding-top: clamp(16px, 2.6vh, 48px) !important; padding-bottom: clamp(14px, 2.2vh, 40px) !important; }
  html body .sp-contact-section .sp-field { margin-bottom: clamp(4px, 1vh, 14px) !important; }
  html body .sp-contact-section .sp-form-row { margin-bottom: clamp(4px, 1vh, 15px) !important; }
  html body .sp-contact-section .sp-field label { margin-bottom: clamp(3px, .6vh, 8px) !important; }
  html body .sp-contact-section .sp-field input, html body .sp-contact-section .sp-field select, html body .sp-contact-section .sp-field textarea { padding-top: clamp(6px, 1.1vh, 12px) !important; padding-bottom: clamp(6px, 1.1vh, 12px) !important; }
  html body .sp-contact-section .sp-field textarea { height: clamp(56px, 9vh, 121px) !important; min-height: 0 !important; }
  html body .sp-contact-section .char-count { display: none; }
  html body .sp-contact-section .sp-contact-btn { padding-top: clamp(10px, 1.4vh, 14px) !important; padding-bottom: clamp(10px, 1.4vh, 14px) !important; }
  html body .sp-contact-section .cx-info h2 { font-size: clamp(1.8rem, 4.4vh, 2.6rem) !important; }
}
@media (min-width: 992px) and (max-height: 800px) { html body .sp-contact-section { zoom: .92; } }
@media (min-width: 992px) and (max-height: 700px) { html body .sp-contact-section { zoom: .82; } }

/* Header = SolidPro dark blue (same as footer), white text */
@media (min-width: 992px) {
  html body #header, html body header#header, html body.pg-inner #header, html body #header:has(.megamenu-container.active), html body.pg-inner #header:has(.megamenu-container.active) {
    background: linear-gradient(135deg, #17479e 0%, #06204f 100%) !important; box-shadow: 0 2px 14px rgba(6, 32, 79, 0.35) !important; border-bottom: 0 !important;
  }
  #header .logo img { filter: brightness(0) invert(1) !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current { color: #fff !important; }
  #header .nav-links > li > .nav-link .dropdown-icon { color: #fff !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link { background-image: linear-gradient(#fff, #fff) !important; }
  html body #header .nav-cta a { background: #e11b22 !important; color: #fff !important; }
}

/* Dropdown (hover) panels: SolidPro blue instead of black — header bar unchanged */
@media (min-width: 992px) {
  html body #header #servicesMegaMenu.tm-menu,
  html body #header #solutionsMegaMenu.tm-menu,
  html body #header #insightsMegaMenu.tm-menu,
  html body #header #industriesMegaMenu.tm-menu,
  html body #header #aboutMegaMenu.tm-menu,
  html body #header #careersMegaMenu.tm-menu,
  html body #header .mega-menu.tm-menu {
    background: linear-gradient(135deg, #17479e 0%, #0b2a6b 100%) !important;
    box-shadow: 0 26px 44px rgba(6, 32, 79, 0.45) !important;
  }
}

/* Logo: the SVG has ~6% empty space on its left — pull it back so the "S" sits exactly on the left edge */
html body #header .logo img { transform: translateX(-6.125%); }

/* Header bar = white with navy text (dropdown panels stay SolidPro blue) */
@media (min-width: 992px) {
  html body #header, html body header#header, html body.pg-inner #header, html body #header:has(.megamenu-container.active), html body.pg-inner #header:has(.megamenu-container.active) {
    background: #ffffff !important; box-shadow: 0 2px 14px rgba(13, 38, 86, 0.10) !important; border-bottom: 1px solid #e3e8f2 !important;
  }
  #header .logo img { filter: none !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link,
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link:hover,
  html body #header .nav-links > li.has-megamenu:hover > .nav-link,
  html body #header .nav-links > li > .nav-link.is-current { color: #0b2a6b !important; }
  #header .nav-links > li > .nav-link .dropdown-icon { color: #0b2a6b !important; }
  html body #header .nav-links > li:not(.nav-cta):not(.nav-utilities) > .nav-link { background-image: linear-gradient(#e11b22, #e11b22) !important; }
  html body #header .nav-cta a { background: #17479e !important; color: #fff !important; }
}

/* Contact Us — light layout: details on the left, white form card with blue accent strip on the right */
@media (min-width: 992px) {
  html body .sp-contact-section { background: #f4f6fb !important; }
  html body .sp-contact-section .cx-layout { display: grid !important; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr) !important; gap: 56px !important; align-items: center; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; }
  html body .sp-contact-section .cx-info { background: transparent !important; color: #0b2a6b !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  html body .sp-contact-section .cx-info .cx-eyebrow { color: #e11b22 !important; }
  html body .sp-contact-section .cx-info h2 { color: #0b2a6b !important; }
  html body .sp-contact-section .cx-info h2 em, html body .sp-contact-section .cx-info h2 span { color: #17479e !important; }
  html body .sp-contact-section .cx-info p { color: #4a5875 !important; }
  html body .sp-contact-section .cx-points { margin-top: 26px !important; padding: 0 !important; border: 0 !important; display: grid; gap: 14px; }
  html body .sp-contact-section .cx-points li { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; border: 1px solid #e3e8f2; border-left: 4px solid #17479e; border-radius: 12px; box-shadow: 0 6px 18px rgba(13, 38, 86, 0.06); transition: transform .25s, box-shadow .25s, border-left-color .25s; }
  html body .sp-contact-section .cx-points li:hover { transform: translateX(4px); border-left-color: #e11b22; box-shadow: 0 12px 26px rgba(13, 38, 86, 0.12); }
  html body .sp-contact-section .cx-points__icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #17479e !important; color: #fff !important; }
  html body .sp-contact-section .cx-points b { display: block; color: #0b2a6b !important; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
  html body .sp-contact-section .cx-points li span:not(.cx-points__icon), html body .sp-contact-section .cx-points a { color: #1d2c4d !important; font-weight: 600; text-decoration: none; }

  html body .sp-contact-section .cx-form {
    position: relative; background: #fff !important; border-radius: 18px !important; border: 1px solid #e3e8f2;
    box-shadow: 0 22px 50px rgba(13, 38, 86, 0.14) !important; overflow: hidden; padding: clamp(20px, 3vh, 34px) clamp(24px, 3vw, 40px) !important;
  }
  html body .sp-contact-section .cx-form::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: linear-gradient(90deg, #17479e 0%, #17479e 78%, #e11b22 78%, #e11b22 100%); }
}
@media (min-width: 992px) { html body .sp-contact-section .cx-form::before { display: block !important; z-index: 2; } }
