/* ==============================================
   LAYOUT  containers, header, footer, sections
   ============================================== */

/* Containers */
.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
  box-sizing: border-box;
}
.container--content {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Sections */
.section        { padding: var(--space-6) 0; }
.section--alt   { background: var(--color-light-gray); }

/*  Page-level wrappers  */
.site-main         { display: block; }
.solutions-section { background: var(--color-white); }
.news-section      { background: var(--color-light-gray); }
.news-header__left { display: flex; flex-direction: column; }

/*  Site Header  */
.site-header {
  background: var(--color-blue-dark);
  padding: var(--space-2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  /* 1px same-color border prevents a subpixel white sliver from appearing
     between the site-header and the same-colored page-header below on
     devices with fractional device pixel ratios. */
  border-bottom: 1px solid var(--color-blue-dark);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.site-header__logo img { height: 64px; width: auto; }

/*  Primary Navigation  */
.site-nav__menu {
  display: flex;
  list-style: none;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav__menu li { position: relative; }

.site-nav__menu a {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.site-nav__menu a:hover { color: var(--color-white); text-decoration: none; } /* was green; 3.51:1 on dark nav bg, now 7.04:1 */

.site-nav__menu .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.8em;
  vertical-align: middle;
}

/* Contact Us  top-level last nav item only */
.site-nav__menu > li:last-child > a {
  background: var(--color-green);
  color: #000;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.site-nav__menu > li:last-child > a:hover {
  background: var(--color-green-dark);
  text-decoration: none;
  color: #000;
}

/*  Dropdown sub-menu (desktop)  */
.site-nav__menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border-top: 3px solid var(--color-blue);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Gap bridge  invisible hover area prevents dropdown from closing */
.site-nav__menu .sub-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.site-nav__menu li:hover > .sub-menu,
.site-nav__menu li:focus-within > .sub-menu { display: block; }

.site-nav__menu .sub-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--color-blue-darker);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-transform: none;
}
.site-nav__menu .sub-menu a:hover {
  color: var(--color-blue);
  background: var(--color-light-gray);
  text-decoration: none;
}

/*  Hamburger toggle  */
.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
.site-nav__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
}
.site-nav__toggle.is-open .site-nav__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav__toggle.is-open .site-nav__bar:nth-child(2) { opacity: 0; }
.site-nav__toggle.is-open .site-nav__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/*  Site Footer  */
.site-footer {
  background: var(--color-blue-darker);
  color: var(--color-white);
  padding: var(--space-6) 0 var(--space-3);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--white-10);
}
.site-footer__logo img { height: 56px; width: auto; margin-bottom: var(--space-2); }
.site-footer__tagline {
  font-size: var(--text-sm);
  color: var(--white-60);
  line-height: var(--lh-base);
  max-width: 260px;
}
.site-footer__col-title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-2);
}
.site-footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer__menu a { font-size: 14px; color: var(--white-70); }
.site-footer__menu a:hover { color: var(--color-green); text-decoration: none; }
.site-footer__menu .sub-menu {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer__menu .sub-menu a { color: var(--white-60); font-size: 13px; }
.site-footer__menu .sub-menu a:hover { color: var(--color-green); }

.site-footer__contact p { font-size: 14px; color: var(--white-70); margin-bottom: 8px; line-height: 1.5; }
.site-footer__contact a { color: var(--white-70); }
.site-footer__contact a:hover { color: var(--color-green); }

.site-footer__social {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
  /* Now a <ul> rather than a <div role="list"> — see footer.php. */
  list-style: none;
  padding: 0;
}
.site-footer__social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--white-15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}
.site-footer__social a:hover { background: var(--color-green); color: #000; text-decoration: none; }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
/* Alpha raised from 0.50 to 0.78. Composited over --color-blue-darker
   (#004357) the old value rendered rgb(128,161,171) = 3.92:1 at 12px,
   below the 4.5:1 required for small text. 0.78 gives roughly 6.1:1.
   The address links are the route to the accessibility statement, so
   they are lifted further and underlined. (Audit KARNA-A11Y-005,
   WCAG 1.4.3 AA.) */
.site-footer__legal,
.site-footer__address { font-size: var(--text-xs); color: rgba(255,255,255,0.78); }
.site-footer__address a { color: rgba(255,255,255,0.92); text-decoration: underline; text-underline-offset: 2px; }
.site-footer__address a:hover,
.site-footer__legal a:hover { color: var(--color-green); text-decoration: none; }

/* 
   MOBILE NAV
    */
@media (max-width: 1024px) {
  .site-header      { position: relative; }

  /* The collapsed mobile menu is a JavaScript enhancement: main.js is the only
     thing that adds .is-open. Without JS the menu stays in normal flow and
     visible, and the toggle that could not have opened it is not shown. */
  .site-nav__toggle     { display: none; }
  .js .site-nav__toggle { display: flex; }

  .site-nav__menu {
    background: var(--color-blue-dark);
    flex-direction: column;
    padding: var(--space-3);
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
  }

  .js .site-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }
  .js .site-nav__menu.is-open { display: flex; }

  /* Top-level items */
  .site-nav__menu > li {
    border-bottom: 1px solid var(--white-10);
  }
  .site-nav__menu > li:last-child { border-bottom: none; }

  .site-nav__menu > li > a {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-base);
  }

  /* Reset Contact Us green button on mobile */
  .site-nav__menu > li:last-child > a {
    background: none;
    color: var(--color-green);
    padding: var(--space-2) 0;
    border-radius: 0;
    font-weight: 700;
  }
  .site-nav__menu > li:last-child > a:hover {
    background: none;
    color: var(--color-white);
  }

  /* Sub-menu  inline indented, no dropdown */
  .site-nav__menu .sub-menu {
    display: flex !important;
    position: static;
    background: none;
    border-top: none;
    border-left: 2px solid var(--white-15);
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0 8px var(--space-3);
    margin: 0;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }
  .site-nav__menu .sub-menu::before { display: none; }

  .site-nav__menu .sub-menu a {
    padding: 8px 0;
    color: var(--white-70);
    font-size: 14px;
    background: none;
    white-space: normal;
  }
  .site-nav__menu .sub-menu a:hover {
    color: var(--color-white);
    background: none;
  }
}
/* ============================================================
   MOBILE FIRST - additional breakpoints
   ============================================================ */

/* Hero section mobile */
@media (max-width: 640px) {
  .hero { min-height: 85vh; }
  .hero__inner { padding: var(--space-5) 0 var(--space-6); }
  .hero__title { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .hero__tagline { font-size: 0.875rem; line-height: 1.65; }
  .hero__buttons { flex-direction: column; gap: var(--space-2); }
  .hero__buttons .btn { width: 100%; text-align: center; justify-content: center; }
}

/* Section padding mobile */
@media (max-width: 640px) {
  .section { padding: var(--space-5) 0; }
  .solutions-header { margin-bottom: var(--space-4); }
  .solutions-title { font-size: 1.6rem; }
}

/* Page header mobile */
@media (max-width: 640px) {
  .page-header { padding: var(--space-4) 0; }
  .page-title { font-size: 1.8rem; }
}

/* CTA section mobile */
@media (max-width: 640px) {
  .cta-section { padding: var(--space-4) 0; }
}

/* News section mobile */
@media (max-width: 640px) {
  .news-title { font-size: 1.6rem; }
}

/* Footer mobile */
@media (max-width: 540px) {
  .site-footer { padding: var(--space-4) 0; }
  .site-footer__inner { grid-template-columns: 1fr; gap: var(--space-4); }
  .site-footer__bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}