/* =========================================================
   Street Smart — Mobile burger menu
   ========================================================= */

/* Street Smart brand overrides — only applied on Street Smart site */
/* :root.streetsmart-site {
  --njtpa-dark-blue: var(--njtpa-gray-lighter); 
  --njtpa-dark-blue: var(--bs-green-darker); 
  --njtpa-dark-blue-light: var(--bs-green-darker);
  --njtpa-gray-medium: var(--njtpa-gray-light); 
  --njtpa-white: var(--njtpa-white);
} */

.landing-hero {
  background: var(--bs-green-darker);
  color: var(--njtpa-white);
}

a {
  color: var(--bs-green-darker);
}

a:hover {
  color: var(--bs-green-darker);
}


.streetsmart-header-main {
  background: var(--njtpa-white);
  border-bottom: 1px solid var(--njtpa-gray-light);
  padding: 8px 0;
}

.streetsmart-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.streetsmart-logo img {
  height: 32px;
  width: auto;
}

.njtpa-attribution {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attribution-text {
  font-size: 0.875rem;
  color: var(--njtpa-gray-medium);
  font-style: italic;
  margin: 0;
}

.njtpa-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.njtpa-link:hover {
  background: var(--njtpa-gray-lighter);
}

.njtpa-logo {
  height: 20px;
  width: auto;
}

/* Hidden by default (desktop) */
.streetsmart-mobilebar {
  display: none;
}

/* Show burger on mobile, hide desktop navbar */
@media (max-width: 1024px) {
  .streetsmart-header-main {
    padding: 6px 0 !important;
  }
  
  .streetsmart-logo img {
    height: 28px;
  }
  
  .attribution-text {
    font-size: 0.75rem;
  }
  
  .njtpa-logo {
    height: 18px;
  }
  .streetsmart-navbar {
    display: none;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .streetsmart-logo img {
    height: 24px;
  }
  
  .attribution-text {
    font-size: 0.7rem;
  }
  
  .njtpa-logo {
    height: 16px;
  }
  
  .njtpa-attribution {
    gap: 6px;
  }
  .streetsmart-mobilebar {
    display: block;
  }
}

/* Burger bar layout */
.streetsmart-mobilebar .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px 0;
}

.streetsmart-header,
.streetsmart-mobilebar {
  /* background-color: #4B8235;  */
}

.streetsmart-footer-info,
.site-footer {
  background-color: var(--njtpa-gray-lighter);
  color: var(--njtpa-black); /* if needed */
}

/* Burger button */
.ss-menu-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background: var(--bs-green-darker); /* Street Smart bar color */
  color: var(--njtpa-white);
  border: 0;
  padding: 14px 0;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  cursor: pointer;
}
.ss-menu-toggle:focus {
  outline: none;
}
.ss-menu-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Burger icon */
.ss-burger {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  display: inline-block;
}
.ss-burger::before,
.ss-burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.ss-burger::before {
  transform: translateY(-7px);
}
.ss-burger::after {
  transform: translateY(7px);
}

/* X state */
.ss-menu-toggle[aria-expanded="true"] .ss-burger {
  background: transparent;
}
.ss-menu-toggle[aria-expanded="true"] .ss-burger::before {
  transform: rotate(45deg);
}
.ss-menu-toggle[aria-expanded="true"] .ss-burger::after {
  transform: rotate(-45deg);
}

/* Mobile menu panel */
.ss-mobile-menu {
  position: relative;
  z-index: 9999;
  width: 100%;
  background: var(--bs-green-darker);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
#ss-mobile-menu[hidden] {
  display: none !important;
}

/* Mobile UL */
.ss-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0px;
  display: grid;
  gap: 0;
  text-align: left;
}
.ss-mobile-list > li {
  width: 100%;
}
.ss-mobile-list > li {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.ss-mobile-list > li > a {
  display: inline-block;
  color: var(--njtpa-white);
  text-decoration: none;
  padding: 12px 16px;
  font-weight: 600;
}
.ss-mobile-list > li > a:hover,
.ss-mobile-list > li > a:focus {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.menu-item a {
  width: 100%;
}

/* Small phones */
@media (max-width: 480px) {
  .ss-menu-toggle {
    padding: 12px 0;
  }
  .ss-mobile-list > li > a {
    padding: 10px 14px;
  }
}

/* =========================================================
   Street Smart — Desktop nav (NJTPA behavior, SS look)
   ========================================================= */

.streetsmart-navigation .menu.menu--primary {
  display: flex;
  /* gap: 24px;               */
  list-style: none;
  margin: 0;
  white-space: nowrap;
}
.streetsmart-navigation .menu.menu--primary > li {
  position: relative;
}

.streetsmart-navigation .menu.menu--primary > li > a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  color: var(--njtpa-white);
  font-weight: 500;
  text-decoration: none;
  outline: none;
  border: none;
  box-shadow: none;
}

.streetsmart-navigation .menu.menu--primary > li > a:hover,
.streetsmart-navigation .menu.menu--primary > li > a:focus {
  color: var(--njtpa-gray-lighter);
  /* text-decoration: underline; */
}

/* Chevron — force white fill, rotate on .open */
.streetsmart-navigation .menu.menu--primary > li.menu-item-has-children > a::after {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-left: 4px;
  /* TODO: replace with svg icon */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='3.6 8.6 16.8 9.6'><path fill='%23ffffff' d='M5.99998 7.2L12 13.2L18 7.2L20.4 8.4L12 16.8L3.59998 8.4L5.99998 7.2Z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  vertical-align: middle;
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.streetsmart-navigation .menu.menu--primary > li.menu-item-has-children.open > a::after {
  transform: rotate(180deg);
}

/* Optional: keep it white on hover/focus too */
.streetsmart-navigation .menu.menu--primary > li.menu-item-has-children > a:hover::after,
.streetsmart-navigation .menu.menu--primary > li.menu-item-has-children > a:focus::after {
  filter: none;
}

/* Submenus: hidden by default; visible when parent <li> has .open */
.streetsmart-navigation .menu.menu--primary .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  border: none;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.12));
  padding: 0px;
  display: none;
  z-index: 1000;
  white-space: normal;
}

/* Submenu dividers (inset like NJTPA) */
.streetsmart-navigation .menu.menu--primary .sub-menu li {
  position: relative;
  /* padding: 0px 20px; */
}

.streetsmart-navigation .menu.menu--primary .sub-menu li:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.streetsmart-navigation .menu.menu--primary .sub-menu > li > a {
  border-bottom: none !important;
}

.streetsmart-navigation .menu.menu--primary li.open > .sub-menu {
  display: block;
}

.streetsmart-navigation .menu.menu--primary .sub-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--njtpa-white);
  font-weight: 500;
  text-decoration: none;
}
.streetsmart-navigation .menu.menu--primary .sub-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive: stack on mobile like NJTPA */
@media (max-width: 900px) {
  .streetsmart-navigation .menu.menu--primary {
    flex-direction: column;
    gap: 12px;
    white-space: normal;
  }
  .streetsmart-navigation .menu.menu--primary .sub-menu {
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

/* ===== Mobile dropdown behavior (inside #ss-mobile-menu) ===== */

/* Submenus stack on mobile; use SS green background */
.ss-mobile-menu .menu.menu--primary .sub-menu {
  position: static;
  display: none;
  padding: 0px;
  border: 0;
  box-shadow: none;
  background: var(--bs-green-darker); /* ensure not white */
  list-style: none;
}

/* Show when parent <li> has .open (set by JS) */
.ss-mobile-menu .menu.menu--primary li.open > .sub-menu {
  display: block;
}

/* Mobile chevron: white + rotates on open */
.ss-mobile-menu .menu.menu--primary > li.menu-item-has-children > a::after {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-left: 6px;
  /* TODO: replace with svg icon */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='3.6 8.6 16.8 9.6'><path fill='%23ffffff' d='M5.99998 7.2L12 13.2L18 7.2L20.4 8.4L12 16.8L3.59998 8.4L5.99998 7.2Z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  vertical-align: middle;
  transform-origin: center center;
  transition: transform 0.2s ease;
}
.ss-mobile-menu .menu.menu--primary > li.menu-item-has-children.open > a::after {
  transform: rotate(180deg);
}

/* Submenu items: keep white text; add inset dividers */
.ss-mobile-menu .menu.menu--primary .sub-menu > li {
  position: relative;
}
.ss-mobile-menu .menu.menu--primary .sub-menu > li:not(:last-child)::after {
  /* content: "";
  display: block;
  height: 1px;
  background: rgba(255,255,255,.35);
  margin: 0 10px; */
}

/* Submenu links: white text on green; subtle hover */
.ss-mobile-menu .menu.menu--primary .sub-menu a {
  display: block;
  color: var(--njtpa-white);
  padding: 5px 22px;
  text-decoration: none;
  background: transparent;
  font-size: 14px;
}
.ss-mobile-menu .menu.menu--primary a:hover,
.ss-mobile-menu .menu.menu--primary a:focus,
.ss-mobile-menu .menu.menu--primary a:active {
  text-decoration: none !important; /* override global NJTPA rule */
  background-color: rgba(255, 255, 255, 0.1);
  width: 100%;
}

/* One-row mobile header: Back | Logo | Burger */
@media (max-width: 1024px) {
  .streetsmart-mobilebar {
    display: block;
  }

  /* row layout */
  .streetsmart-mobilebar .container.mobilebar-row {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background-color: var(--bs-green-darker);
  }

  /* keep originals hidden on mobile;  */
  .streetsmart-mobilebar .mobile-only {
    display: block;
  }

  /* back link (left) */
  .streetsmart-mobilebar .back-to-njtpa {
    justify-self: start;
    font-weight: 600;
    color: var(--njtpa-white);
    text-decoration: none;
  }
  .streetsmart-mobilebar .back-to-njtpa:hover,
  .streetsmart-mobilebar .back-to-njtpa:focus {
    text-decoration: underline;
  }

  /* logo (center) */
  .streetsmart-mobilebar .streetsmart-logo {
    justify-self: center;
  }
  .streetsmart-mobilebar .streetsmart-logo img {
    max-height: 34px;
    width: auto;
    display: block;
  }

  /* search + burger (right) */
  .streetsmart-mobilebar .header-search-btn {
    justify-self: end;
    color: var(--njtpa-white);
    margin-right: -8px;
  }
}

.header-search-btn {
  color: var(--njtpa-white) !important;
}

@media (max-width: 1024px) {

  .streetsmart-mobilebar .ss-menu-toggle {
    justify-self: end;
    width: auto;
    padding: 8px 10px;
    background: var(--bs-green-darker);
    color: var(--njtpa-white);
    border: 0;
    border-radius: 6px;
  }

  /* keep your icon lines */
  .streetsmart-mobilebar .ss-burger {
    width: 22px;
  }

  /* Position search and burger together on the right */
  .streetsmart-mobilebar .container.mobilebar-row {
    grid-template-columns: 1fr auto auto;
  }
}

/* Desktop keeps original header rowe */
@media (min-width: 1025px) {
  .streetsmart-mobilebar .mobile-only {
    display: none !important;
  }
}

/* Hide desktop header items on mobile */
@media (max-width: 1024px) {
  .streetsmart-header-main .back-to-njtpa,
  .streetsmart-header-main .streetsmart-logo {
    /* display: none !important; */
  }
}

/* ===== Street Smart mobile overlay ===== */
@media (max-width: 1024px) {
  /* lock page scroll when menu is open */
  body.streetsmart-menu-open {
    overflow: hidden;
  }

  /* dim background under the menu (click to close) */
  .streetsmart-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    background-color: rgba(0, 0, 0, 0.3);
    top: 169px;
  }

  /* make the panel fixed under the header row */
  .ss-mobile-menu {
    position: fixed;
    left: 0;
    right: 0;
    overflow-y: auto;
    z-index: 999;
  }
}

.streetsmart-footer-info,
.site-footer {
  /* padding: 40px 20px; */
}
.footer-col-title {
  color: var(--bs-green-darker);
}

/* Main two-column frame: logo | nav */
.site-footer--streetsmart .footer-main {
  /* padding: 40px 28px; */
  display: grid;
  grid-template-columns: 320px 1fr; /* left logo/contact | right nav */
  gap: 40px;
}

/* Four nav columns on the right */
.footer-links-flex {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px 35px;
}

/* Responsive steps */
@media (max-width: 1280px) {
  .site-footer--streetsmart .footer-main {
    grid-template-columns: 1fr;
  }
  .footer-links-flex {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .footer-links-flex {
    grid-template-columns: 1fr;
  }
}


.page-header {
  background: var(--bs-green-darker) !important;
}
