/* ══════════════════════════════════════════════
   JHW Navigation & Header Polish  v2
   ══════════════════════════════════════════════ */

/* ── Desktop header: 2-row grid layout ── */
@media (min-width: 1024px) {
  .header__wrapper {
    padding: 12px 48px 0;
  }

  .header__container {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 24px;
    row-gap: 0;
  }

  /* Flatten wrapper so children participate in grid */
  .site-header__navigations {
    display: contents;
  }

  .site-header__mobile-navigation-toggle {
    display: none !important;
  }

  /* Row 1 – logo */
  .site-header__logo {
    grid-column: 1;
    grid-row: 1;
    max-width: 200px;
    margin: 0;
    padding: 4px 0 10px;
    align-self: center;
  }

  .site-header__logo img,
  .site-header__logo svg {
    display: block;
    max-width: 200px;
    max-height: 42px;
    width: auto;
    height: auto;
  }

  .site-header__logo h1 {
    margin: 0;
    line-height: 0;
  }

  /* Row 1 – utilities (phone, projects, search) */
  .site-header__eyebrow-and-search {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0 18px;
    padding: 4px 0 10px;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible;
    min-width: 0;
  }

  .site-header__icon-navigation {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    flex: 0 0 auto;
    gap: 12px;
    width: auto;
  }

  .site-header__eyebrow-navigation {
    flex: 0 0 auto;
    gap: 0 14px;
    width: auto;
  }

  .site-header__eyebrow-navigation a {
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 4px 0;
    white-space: nowrap;
    color: #8fa3c4;
  }

  .site-header__eyebrow-navigation a:hover {
    color: #5a6c91;
  }

  .site-header__search {
    flex: 0 0 auto;
    width: auto;
  }

  .site-header__search input {
    width: 130px;
    height: 28px;
    font-size: 12px;
    border-radius: 3px;
  }

  /* Row 2 – main navigation bar */
  .site-header__navigation {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    opacity: 1 !important;
    height: auto !important;
    visibility: visible !important;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0 8px;
    padding: 14px 0 16px;
    margin: 0;
    max-width: none;
    width: 100%;
    border-top: 1px solid #e4e9f0;
    overflow: visible;
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
  }

  .site-header__navigation > .menu-item {
    height: auto;
    min-height: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 12px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .site-header__navigation > .menu-item > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 18px;
    line-height: 1;
    color: #4a5872;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid #d8e0eb;
    border-radius: 100px;
    box-shadow: 0 1px 2px rgba(74, 88, 114, 0.06);
    transition: color 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  }

  .site-header__navigation > .menu-item > a:hover,
  .site-header__navigation > .menu-item:hover > a {
    color: #fff;
    background: linear-gradient(135deg, #5a6c91 0%, #4a5872 100%);
    border-color: #4a5872;
    box-shadow: 0 4px 14px rgba(74, 88, 114, 0.28);
    transform: translateY(-1px);
  }

  /* Quick Ship – accent pill */
  .site-header__navigation > .menu-item:nth-child(5) > a {
    border-color: #c5d4e8;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  }

  .site-header__navigation > .menu-item:nth-child(5) > a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7491bf;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(116, 145, 191, 0.25);
  }

  /* Hide old theme chevrons completely */
  .site-header__navigation .menu-item.menu-item-has-children:not(.menu-item--child)::after,
  .site-header__navigation .menu-item.has-sub-categories::after,
  .resources__navigation .menu-item.menu-item-has-children:not(.menu-item--child)::after,
  .resources__navigation .menu-item.has-sub-categories::after {
    display: none !important;
    content: none !important;
  }

  /* Elegant circular "+" indicator instead of chevron */
  .site-header__navigation .menu-item.menu-item-has-children:not(.menu-item--child) > a::after,
  .site-header__navigation .menu-item.has-sub-categories > a::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    opacity: 0.45;
    flex-shrink: 0;
    transform: none;
    transition: opacity 0.25s, transform 0.3s, background 0.25s, border-color 0.25s;
    /* reset theme border trick */
    border-right: 1.5px solid currentColor !important;
    border-bottom: 1.5px solid currentColor !important;
    border-top: 1.5px solid currentColor !important;
    border-left: 1.5px solid currentColor !important;
    background: transparent;
  }

  .site-header__navigation > .menu-item:hover > a::after {
    opacity: 1;
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7) !important;
  }

  /* Open dropdown state */
  .site-header__navigation > .menu-item:hover > a {
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
  }

  /* Dropdown panels */
  .site-header__navigation .menu-item {
    position: relative;
  }

  .site-header__navigation .sub-navigation {
    z-index: 300;
    min-width: 200px;
    border-radius: 10px;
    border: 1px solid #dce4ef;
    box-shadow: 0 12px 40px rgba(74, 88, 114, 0.16) !important;
    overflow: hidden;
    padding: 0 !important;
  }

  .site-header__navigation .sub-navigation::before {
    display: none !important;
  }

  .site-header__navigation .sub-navigation .sub-navigation__wrapper {
    padding: 10px 6px;
  }

  .site-header__navigation .menu-item.has-sub-categories > .sub-navigation {
    left: 50%;
    transform: translateX(-50%);
    min-width: 560px;
    max-width: min(90vw, 720px);
  }

  .site-header__navigation .sub-navigation .sub-navigation__columns {
    column-count: 4;
    column-gap: 20px;
    padding: 6px 10px;
  }

  .site-header__navigation .sub-navigation .sub-navigation__columns .menu-item {
    display: block;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.4;
    break-inside: avoid;
    white-space: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 2px;
  }

  .site-header__navigation .sub-navigation .sub-navigation__columns .menu-item:hover {
    color: #5a6c91;
    background: #f5f7fa;
  }

  .site-header__navigation .sub-navigation .sub-navigation__flex {
    padding: 6px 0;
  }

  .site-header__navigation .sub-navigation .sub-navigation__flex .menu-item--child {
    padding: 5px 14px;
    font-size: 13px;
  }

  .site-header__navigation .sub-navigation .menu-item--third-level {
    display: block;
    padding: 3px 14px 3px 22px;
    font-size: 12px;
    opacity: 0.85;
  }

  .site-header__navigation .sub-navigation .menu-item--third-level::before {
    content: "› ";
    color: #a5b9da;
  }

  .site-header__navigation .menu-item.menu-item-has-children:not(.menu-item--child) > a,
  .site-header__navigation .menu-item.has-sub-categories > a {
    padding-bottom: 6px !important;
  }

/* Medium desktop */
@media (min-width: 1024px) and (max-width: 1280px) {
  .header__wrapper {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-header__navigation > .menu-item {
    font-size: 11px;
  }

  .site-header__navigation > .menu-item > a {
    padding: 8px 12px 8px 14px;
    font-size: 10.5px;
    gap: 7px;
  }

  .site-header__navigation .menu-item.menu-item-has-children:not(.menu-item--child) > a::after,
  .site-header__navigation .menu-item.has-sub-categories > a::after {
    width: 15px;
    height: 15px;
    font-size: 11px;
  }

  .site-header__eyebrow-navigation a {
    font-size: 10px;
  }

  .site-header__eyebrow-and-search {
    gap: 0 12px;
  }
}

/* ── Tablet & Mobile ── */
@media (max-width: 1023px) {
  .header__wrapper {
    padding: 10px 16px;
  }

  .header__container {
    gap: 0;
  }

  .site-header__navigations {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
  }

  .site-header__mobile-navigation-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    z-index: 10;
  }

  .site-header__logo {
    max-width: 130px;
    flex: 0 1 auto;
  }

  .site-header__navigations.open {
    max-height: none;
    overflow: visible;
    padding-bottom: 4px;
  }

  :root .open .site-header__navigation,
  .site-header__navigations.open .site-header__navigation {
    opacity: 1 !important;
    height: auto !important;
    visibility: visible !important;
    padding: 10px 0 14px;
    flex-basis: 100%;
    width: 100%;
    border-top: 1px solid #e8ecf2;
    margin-top: 8px;
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 0;
  }

  :root .open + .site-header__eyebrow-and-search,
  .site-header__navigations.open + .site-header__eyebrow-and-search {
    opacity: 1 !important;
    height: auto !important;
    visibility: visible !important;
    padding: 12px 0 14px;
    flex-basis: 100%;
    width: 100%;
    border-top: 1px solid #e8ecf2;
    background: #fafbfc;
    max-height: none;
  }

  .site-header__navigation > .menu-item {
    flex-basis: 100% !important;
    width: 100%;
    height: auto;
    text-align: left;
    padding: 0;
    border-bottom: 1px solid #f0f2f5;
  }

  .site-header__navigation > .menu-item:last-child {
    border-bottom: none;
  }

  .site-header__navigation > .menu-item > a {
    font-weight: 600;
    font-size: 15px;
    display: block;
    padding: 11px 6px;
    text-transform: lowercase;
    color: #5a6c91;
  }

  .site-header__navigation .menu-item.menu-item-has-children > a,
  .site-header__navigation .menu-item.has-sub-categories > a {
    position: relative;
    padding-right: 36px;
  }

  .site-header__navigation .menu-item.menu-item-has-children > a::after,
  .site-header__navigation .menu-item.has-sub-categories > a::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #737272;
    border-bottom: 2px solid #737272;
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  .site-header__navigation .menu-item.sub-open > a::after {
    transform: rotate(-135deg);
    margin-top: -2px;
  }

  .site-header__navigation .sub-navigation {
    position: static !important;
    opacity: 1 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 0 8px 8px !important;
    pointer-events: all !important;
    display: none;
    height: auto !important;
    background: transparent;
    transform: none !important;
    left: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .site-header__navigation .menu-item.sub-open > .sub-navigation {
    display: block;
  }

  .site-header__navigation .sub-navigation::before {
    display: none !important;
  }

  .site-header__navigation .sub-navigation .sub-navigation__flex {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .site-header__navigation .sub-navigation .sub-navigation__flex .menu-item--child,
  .site-header__navigation .sub-navigation .sub-navigation__columns .menu-item {
    display: block;
    padding: 6px 10px;
    font-size: 14px;
    text-align: left;
    white-space: normal;
  }

  .site-header__navigation .sub-navigation .menu-item--third-level {
    display: block !important;
    padding-left: 24px;
    font-size: 13px;
    opacity: 0.85;
  }

  .site-header__icon-navigation {
    position: relative !important;
    right: 0 !important;
    flex: none;
    justify-content: flex-start;
    gap: 16px;
    padding: 4px 0 8px;
    width: 100%;
  }

  .site-header__eyebrow-navigation {
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: flex-start;
    width: 100%;
    padding: 2px 0;
  }

  .site-header__eyebrow-navigation a {
    font-size: 13px;
    padding: 4px 0;
  }

  .site-header__search {
    margin-top: 6px;
    width: 100%;
  }

  .site-header__search input {
    width: 100%;
    max-width: none;
    height: 36px;
  }

  .phone-number-trigger .phone-number {
    position: static;
    opacity: 1;
    transform: none;
    margin-left: 6px;
    color: #5a6c91;
    font-size: 13px;
  }
}

@media (max-width: 670px) {
  .site__header {
    box-shadow: 0 2px 10px rgba(90, 108, 145, 0.25);
  }

  .main__container {
    padding-top: 68px;
  }
}

/* ── General nav polish ── */
.site-header__navigation > .menu-item > a {
  transition: color 0.2s ease, background 0.2s ease;
}

.site-header__eyebrow-navigation a {
  transition: color 0.2s ease;
}

body.nav-menu-open {
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   Home page – floating section navigation
   (replaces intrusive side panel + arrows)
   ══════════════════════════════════════════════ */
.component__page-navigation {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 32px !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 5px 6px;
  margin: 0;
  max-width: calc(100vw - 40px);
  width: auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(216, 224, 235, 0.9);
  border-radius: 100px;
  box-shadow: 0 6px 28px rgba(26, 35, 50, 0.12), 0 1px 4px rgba(26, 35, 50, 0.06);
  z-index: 90;
  pointer-events: none;
}

.page-navigation__item {
  cursor: pointer;
  pointer-events: all;
  padding: 9px 20px !important;
  padding-right: 20px !important;
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a8da8 !important;
  text-shadow: none !important;
  text-align: center;
  border-radius: 100px;
  line-height: 1.2 !important;
  white-space: nowrap;
  background: transparent;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

/* Remove old arrow icons entirely */
.page-navigation__item::after,
.page-navigation__item--current::after {
  display: none !important;
  content: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}

.page-navigation__item:hover {
  color: #4a5872 !important;
  background: rgba(90, 108, 145, 0.07);
}

.page-navigation__item--current {
  color: #fff !important;
  background: linear-gradient(135deg, #5a6c91 0%, #4a5872 100%) !important;
  box-shadow: 0 3px 14px rgba(74, 88, 114, 0.32);
  font-weight: 600 !important;
}

/* Tablet */
@media (max-width: 1023px) {
  .component__page-navigation {
    bottom: 24px;
    gap: 4px;
    padding: 4px 5px;
  }

  .page-navigation__item {
    padding: 8px 14px !important;
    font-size: 10px !important;
    letter-spacing: 0.08em;
  }
}

/* Mobile – keep compact bottom pill (override theme hide) */
@media (max-width: 670px) {
  .component__page-navigation {
    display: flex !important;
    bottom: 16px;
    max-width: calc(100vw - 24px);
    gap: 3px;
    padding: 4px;
  }

  .page-navigation__item {
    padding: 7px 11px !important;
    font-size: 9px !important;
    letter-spacing: 0.06em;
  }
}

/* ══════════════════════════════════════════════
   Resources pages – secondary nav bar
   ══════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .navigation__wrapper--resources {
    background: #eef1f5;
    border-bottom: 1px solid #dde3ec;
  }

  .navigation__wrapper--resources .navigation__wrapper {
    padding: 0 48px;
    max-width: 1374px;
  }

  .resources__navigations {
    width: 100%;
    align-items: center;
  }

  .resources__navigation {
    display: flex !important;
    opacity: 1 !important;
    height: auto !important;
    visibility: visible !important;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0 8px;
    padding: 12px 0 !important;
    max-width: none;
    width: 100%;
    background: transparent;
    overflow: visible;
  }

  .resources__navigation > .menu-item {
    height: auto;
    flex: 0 0 auto;
    font-size: 13px;
    text-align: center;
  }

  .resources__navigation > .menu-item > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    color: #4a5872;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid #d8e0eb;
    border-radius: 100px;
    box-shadow: 0 1px 2px rgba(74, 88, 114, 0.06);
    transition: color 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s;
  }

  .resources__navigation > .menu-item > a:hover {
    color: #fff;
    background: linear-gradient(135deg, #5a6c91 0%, #4a5872 100%);
    border-color: #4a5872;
    box-shadow: 0 3px 10px rgba(74, 88, 114, 0.22);
  }

  .resources__mobile-navigation-toggle {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .navigation__wrapper--resources {
    background: #eef1f5;
    padding: 0 16px;
  }

  .resources__navigations {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
  }

  .resources__mobile-navigation-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  :root .open .resources__navigation,
  .resources__navigations.open .resources__navigation {
    opacity: 1 !important;
    height: auto !important;
    padding: 10px 0 !important;
    flex-basis: 100%;
    width: 100%;
    border-top: 1px solid #dde3ec;
    margin-top: 8px;
    justify-content: flex-start;
  }

  .resources__navigation > .menu-item {
    flex-basis: 100% !important;
    text-align: left;
    border-bottom: 1px solid #e4e9f0;
  }

  .resources__navigation > .menu-item > a {
    display: block;
    padding: 11px 6px;
    font-size: 15px;
    font-weight: 600;
    color: #5a6c91;
  }
}

/* ══════════════════════════════════════════════
   Home page content polish
   ══════════════════════════════════════════════ */
body.home .section__slider .full-image__content-wrapper h2 {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

body.home .section__copy .intro-text {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-size: 1.05rem;
}

body.home .section__boxes .boxes__row {
  gap: 0;
}

body.home .section__boxes .box__content {
  padding: 1.5em 1.75em;
}

body.home .section__boxes .box__content h3 {
  margin-bottom: 0.6em;
  line-height: 1.35;
  font-size: 1.1rem;
}

body.home .section__boxes .box__content .sub-title {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.3em;
  opacity: 0.75;
}

body.home .section__boxes .button.read-more {
  margin-top: 0.85em;
}

body.home .slider__wrapper {
  overflow: hidden;
}

body.home .section__divider {
  margin: 0;
}
