/* Header Services/Resources menus, compact footer Resources column and the /resources hub.
   Loaded only in WF_RESOURCES=1 builds (nav_menus.py). css/whisk-freight.css is not changed. */

/* ---------- Group labels: same type as the other nav links ---------- */
.nav-links .nm-top { font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--navy); background: none; border: 0; margin: 0; padding: 4px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px; text-decoration: none; position: relative; line-height: inherit; }
.nav-links .nm-top::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--rust-text); transition: width 0.3s; }
.nav-links .nm-top:hover, .nav-links .nm-top.active, .nm-item.is-open > .nm-top { color: var(--rust-text); }
.nav-links .nm-top.active::after, .nm-item.is-open > .nm-top::after { width: calc(100% - 16px); }
.nm-chev { flex: none; transition: transform 0.2s; }
.nm-item.is-open > .nm-top .nm-chev { transform: rotate(180deg); }
@media (max-width: 1487px) { .nav-links .nm-top { font-size: 14.5px; letter-spacing: 0.02em; } }
@media (max-width: 1400px) { .nav-links .nm-top { font-size: 14px; } }
@media (max-width: 1280px) { .nav-links .nm-top { font-size: 13px; letter-spacing: 0.01em; } }
@media (max-width: 1180px) { .nav-links .nm-top { font-size: 12.5px; } }
/* Seven top-level items instead of nine: a little more room between them */
.nm-links { gap: 34px; }
@media (max-width: 1400px) { .nm-links { gap: 26px; } }
@media (max-width: 1180px) { .nm-links { gap: 20px; } }
@media (max-width: 960px) and (min-width: 641px) { .nm-links { gap: 6px 18px; } }

/* ---------- Panels (desktop and tablet) ---------- */
.nm-item { position: relative; }
.nm-item.nm-has-mega { position: static; }
.nm-panel { display: none; position: absolute; z-index: 950; background: #fff; text-align: left;
  border-top: 3px solid var(--orange); box-shadow: 0 18px 40px rgba(0, 30, 80, 0.18); }
.nm-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -19px; height: 16px; } /* hover bridge over the nav padding */
.nm-item.is-open > .nm-panel { display: block; }
html:not(.nm-js) .nm-item:hover > .nm-panel, html:not(.nm-js) .nm-item:focus-within > .nm-panel { display: block; }
.nm-drop { top: calc(100% + 16px); left: -20px; width: 380px; padding: 10px 0; }
.nm-mega { top: 100%; left: 0; right: 0; margin-top: 0; }
.nm-mega-in { max-width: 1400px; margin: 0 auto; padding: 28px 44px 22px; }
.nm-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 36px; }
.nm-h { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy);
  margin: 0 0 8px; padding-bottom: 10px; border-bottom: 2px solid var(--orange); }
.nm-panel ul { list-style: none; margin: 0; padding: 0; }
.nm-panel li { border: 0; }
.nav-links .nm-panel a { display: block; text-transform: none; letter-spacing: 0; font-family: 'IBM Plex Sans', sans-serif; text-decoration: none;
  color: var(--navy-ink); padding: 10px 10px; margin: 0 -10px; border-radius: 3px; min-height: 0; transition: background 0.15s; }
.nav-links .nm-drop a { margin: 0; padding: 11px 22px; border-radius: 0; }
.nav-links .nm-panel a::after { display: none; }
.nav-links .nm-panel a:hover, .nav-links .nm-panel a:focus-visible { background: var(--concrete); color: var(--navy-ink); }
.nav-links .nm-panel a[aria-current="page"] { background: var(--concrete); box-shadow: inset 3px 0 0 var(--orange); }
.nm-t { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--brand-blue); }
.nm-d { display: block; font-weight: 400; font-size: 13.5px; line-height: 1.4; color: #3D4B60; margin-top: 3px; }
.nm-all { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--concrete-dark); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  font-size: 13.5px; color: #3D4B60; }
.nav-links .nm-all a { display: inline-block; margin: 0; padding: 4px 0; font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-blue); background: none; }
.nav-links .nm-all a:hover { background: none; color: var(--orange); }
@media (max-width: 1180px) { .nm-mega-in { padding: 24px 32px 18px; } .nm-cols { gap: 0 24px; } }
@media (max-width: 1024px) { .nm-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; } .nm-mega-in { padding: 22px 28px 18px; } }

/* ---------- Phone menu: accordions ---------- */
@media (max-width: 640px), (max-height: 500px) and (max-width: 1024px) {
  .nm-links { gap: 0; }
  .nm-item, .nm-item.nm-has-mega { position: static; }
  .nav-links .nm-top { width: 100%; justify-content: space-between; color: #fff; font-size: 15px; letter-spacing: 0.02em; padding: 15px 2px; }
  .nav-links .nm-top::after { display: none; }
  .nav-links .nm-top:hover { color: #fff; }
  .nm-item.is-open > .nm-top, .nav-links .nm-top.active { color: var(--orange-bright); }
  .nm-chev { width: 14px; height: 14px; }
  .nm-panel, .nm-drop, .nm-mega { position: static; width: auto; box-shadow: none; border-top: 0; background: transparent; padding: 0 0 10px; }
  .nm-panel::before { display: none; }
  html:not(.nm-js) .nm-item:hover > .nm-panel { display: none; }
  .nm-mega-in { padding: 0; }
  .nm-cols { grid-template-columns: 1fr; gap: 6px; }
  .nm-h { color: var(--orange-bright); font-size: 12.5px; border-bottom: 0; padding: 8px 0 2px; margin: 0; }
  .nav-links .nm-panel a, .nav-links .nm-drop a { margin: 0; padding: 9px 12px; border-left: 2px solid rgba(255,255,255,0.18); border-radius: 0; color: #fff; }
  .nav-links .nm-panel a:hover, .nav-links .nm-panel a:focus-visible, .nav-links .nm-panel a[aria-current="page"] { background: rgba(255,255,255,0.08); box-shadow: none; border-left-color: var(--orange); }
  .nm-t { color: #fff; font-size: 15px; }
  .nm-d { color: #C3CCD9; font-size: 13px; }
  .nm-all { border-top: 0; margin: 8px 0 0; padding: 0; color: #C3CCD9; }
  .nm-all span { display: none; }
  .nav-links .nm-all a { color: var(--orange-bright); padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .nm-chev, .nav-links .nm-top::after { transition: none; } }

/* ---------- Footer: five columns with Resources ---------- */
.footer-container.ft-has-resources { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 48px; }
.footer-col .ft-all a { color: #fff; font-weight: 600; }
@media (max-width: 1024px) { .footer-container.ft-has-resources { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 640px) { .footer-container.ft-has-resources { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- /resources hub ---------- */
.rs-jump ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; }
.rs-jump a { display: inline-block; padding: 9px 14px; border: 1px solid rgba(255,255,255,0.45); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600; min-height: 24px; }
.rs-jump a:hover, .rs-jump a:focus-visible { border-color: var(--orange-bright); color: var(--orange-bright); }
.rs-group { padding-top: 72px; padding-bottom: 72px; scroll-margin-top: 140px; }
.rs-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 30px; max-width: 880px; }
.rs-n { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.1em; color: #0C1E3C; background: var(--orange);
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.rs-head h2 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; color: var(--navy); margin: 0 0 8px; }
.rs-head p { margin: 0; font-size: 17px; line-height: 1.55; color: #3D4B60; }
.rs-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rs-grid li { margin: 0; }
.rs-card { display: flex; flex-direction: column; height: 100%; padding: 24px 24px 20px; background: #fff; border: 1px solid var(--concrete-dark);
  border-top: 4px solid var(--brand-blue); text-decoration: none; color: var(--navy-ink); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.rs-group:not(.white) .rs-card { border-color: #fff; border-top-color: var(--brand-blue); }
.rs-card h3 { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--brand-blue); margin: 0 0 8px; }
.rs-card p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.55; color: #3D4B60; flex: 1; }
.rs-more { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-blue);
  display: inline-flex; gap: 8px; }
.rs-card:hover, .rs-card:focus-visible { border-top-color: var(--orange); box-shadow: 0 12px 28px rgba(0, 30, 80, 0.12); transform: translateY(-3px); }
.rs-card:hover .rs-more { color: var(--orange); }
@media (max-width: 1024px) { .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .rs-grid { grid-template-columns: 1fr; gap: 14px; }
  .rs-group { padding-top: 52px; padding-bottom: 52px; }
  .rs-head { gap: 14px; }
  .rs-n { min-width: 36px; height: 36px; font-size: 13px; }
  .rs-card { padding: 20px 18px 18px; }
  .rs-card h3 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .rs-card { transition: none; } .rs-card:hover { transform: none; } }
