/* ==========================================================================
 * STSC shared navigation
 *
 * The utility classes below are the compiled Tailwind utilities used by
 * inc/navbar.php. They are scoped to .stsc-nav so they cannot collide with
 * the Bootstrap classes still used by the legacy pages.
 *
 * Visual target: the white fixed-top bar used on the homepage —
 *   background #fff, 1px #dedede bottom border, subtle shadow,
 *   uppercase #444 links, #02bdd5 hover, white dropdown panels.
 * ========================================================================== */

.stsc-nav,
.stsc-nav *,
.stsc-nav *::before,
.stsc-nav *::after { box-sizing: border-box; }

.stsc-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid #dedede;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, .1);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* .container / .flex / .items-center / .justify-between */
.stsc-nav .stsc-container {
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.stsc-nav .stsc-logo { display: block; flex-shrink: 0; padding: 6px 8px; }
.stsc-nav .stsc-logo img { display: block; height: 48px; width: auto; }

/* .hidden / .lg:flex */
.stsc-nav .stsc-menu-wrap { display: none; }
.stsc-nav .stsc-menu { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }

/* Top-level link — matches the homepage: 14px, 500, uppercase,
   2px transparent bottom border, cyan on hover. */
.stsc-nav .stsc-link {
  display: block;
  padding: 28px 9px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-transform: uppercase;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.stsc-nav .stsc-link:hover,
.stsc-nav .stsc-link:focus {
  color: #02bdd5;
  border-bottom-color: #02bdd5;
  outline: none;
}

.stsc-nav .stsc-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-top: 4px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

/* .relative */
.stsc-nav .stsc-group { position: relative; }

/* Dropdown panel — hover + keyboard focus-within, no JS required. */
.stsc-nav .stsc-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  min-width: 275px;
  margin: 0;
  padding: 5px 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
  display: none;
}
.stsc-nav .stsc-group:hover > .stsc-dropdown,
.stsc-nav .stsc-group:focus-within > .stsc-dropdown { display: block; }

/* Right-align dropdowns that would overflow the viewport. */
.stsc-nav .stsc-group-right .stsc-dropdown { left: auto; right: 0; }

.stsc-nav .stsc-dropdown a {
  display: block;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  white-space: normal;
}
.stsc-nav .stsc-dropdown li:last-child a { border-bottom: 0; }
.stsc-nav .stsc-dropdown a:hover,
.stsc-nav .stsc-dropdown a:focus {
  color: #02bdd5;
  background: #f7f7f7;
  outline: none;
}

.stsc-nav .stsc-phone { color: #02bdd5; }

/* Mobile toggle — checkbox hack, no JS. */
.stsc-nav .stsc-toggle { position: absolute; opacity: 0; pointer-events: none; }
.stsc-nav .stsc-hamburger {
  display: block;
  cursor: pointer;
  padding: 10px;
  margin-right: 4px;
}
.stsc-nav .stsc-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: #444;
  border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 1023px) {
  .stsc-nav .stsc-toggle:checked ~ .stsc-menu-wrap {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #dedede;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .15);
  }
  .stsc-nav .stsc-toggle:checked ~ .stsc-menu-wrap .stsc-menu {
    display: block;
    padding: 8px 15px 16px;
  }
  .stsc-nav .stsc-toggle:checked ~ .stsc-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .stsc-nav .stsc-toggle:checked ~ .stsc-hamburger span:nth-child(2) { opacity: 0; }
  .stsc-nav .stsc-toggle:checked ~ .stsc-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .stsc-nav .stsc-link { padding: 12px 6px; border-bottom: 1px solid #eee; }
  .stsc-nav .stsc-dropdown {
    position: static;
    display: none;
    min-width: 0;
    box-shadow: none;
    border: 0;
    border-left: 2px solid #02bdd5;
    border-radius: 0;
    margin-left: 10px;
  }
  .stsc-nav .stsc-group:hover > .stsc-dropdown,
  .stsc-nav .stsc-group:focus-within > .stsc-dropdown { display: block; }
}

@media (min-width: 1024px) {
  .stsc-nav .stsc-menu-wrap { display: block; }
  .stsc-nav .stsc-hamburger { display: none; }
}

/* Modern pages need to push their first section below the fixed bar. */
.stsc-nav-spacer { height: 78px; }
@media (min-width: 1024px) { .stsc-nav-spacer { height: 78px; } }
