/* ---------------------------------------------------------------------------
   Shared site header.

   Copied from the homepage stylesheet so the inner pages get the SAME header
   the homepage has — big logo, phone and email alongside, teal underline.

   home.css calls the teal "--gold"; styles.css calls it "--teal". Both names
   are defined here so this file works on either page.
   --------------------------------------------------------------------------- */
:root { --gold: #14B8A6; --gold2: #0F9488; }

nav {
      background: var(--white);
      border-bottom: 3px solid var(--gold);
      padding: 0 5%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 120px;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
.nav-left {
      display: flex;
      align-items: center;
      gap: 18px;
      min-width: 0;
    }
.nav-contact {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-family: 'Montserrat', sans-serif;
      font-size: 0.85rem;
      font-weight: 600;
    }
.nav-contact a {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--navy);
      transition: color 0.2s;
    }
.nav-contact a:hover { color: var(--gold); }
.nav-contact svg { width: 15px; height: 15px; fill: var(--gold); flex-shrink: 0; }
.nav-logo {
      display: flex;
      align-items: center;
      height: 100%;
      flex-shrink: 0;
    }
.nav-logo img {
      display: block;
      height: 88px;
      width: auto;
      max-width: 380px;
      object-fit: contain;
    }
.nav-logo-mark {
      width: 48px;
      height: 48px;
      background: var(--navy);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
.nav-logo-mark svg { width: 28px; height: 28px; fill: var(--white); }
.nav-logo-name {
      font-family: 'Montserrat', sans-serif;
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--navy);
      line-height: 1.15;
      text-transform: uppercase;
      letter-spacing: 0.01em;
    }
.nav-logo-name span {
      display: block;
      font-size: 0.62rem;
      font-weight: 500;
      color: var(--muted);
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }
.nav-menu {
      display: flex;
      align-items: center;
      gap: 0;
      list-style: none;
    }
.nav-menu li a {
      display: block;
      padding: 0 18px;
      height: 120px;
      line-height: 120px;
      font-family: 'Montserrat', sans-serif;
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--navy);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      border-bottom: 3px solid transparent;
      margin-bottom: -3px;
      transition: color 0.2s, border-color 0.2s;
    }
.nav-menu li a:hover {
      color: var(--gold);
      border-color: var(--gold);
    }
.nav-menu li.nav-cta a {
      background: var(--gold);
      color: var(--white);
      border-radius: 4px;
      margin-left: 14px;
      padding: 0 22px;
      border-bottom: none;
      height: auto;
      line-height: normal;
      padding-top: 11px;
      padding-bottom: 11px;
      transition: background 0.2s;
    }
.nav-menu li.nav-cta a:hover {
      background: var(--gold2);
      color: var(--white);
      border-color: transparent;
    }
.nav-menu li.nav-login a {
      color: var(--gold);
      border: 1.5px solid rgba(20,184,166,0.55);
      border-radius: 4px;
      height: auto;
      line-height: normal;
      padding: 10px 16px;
      margin-left: 8px;
      margin-right: 2px;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
    }
.nav-menu li.nav-login a:hover {
      background: rgba(20,184,166,0.10);
      color: var(--gold2);
      border-color: var(--gold);
    }
.nav-portal-mobile {
      display: none;
      font-family: 'Montserrat', sans-serif;
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--white);
      background: var(--gold);
      padding: 10px 12px;
      border-radius: 4px;
      white-space: nowrap;
      margin-left: auto;
    }
.nav-portal-mobile:hover {
      background: var(--gold2);
      color: var(--white);
    }
.nav-menu li.nav-login a {
      background: var(--gold) !important;
      color: var(--white) !important;
      border: none !important;
      box-shadow: 0 10px 24px rgba(20,184,166,0.22) !important;
    }
.nav-menu li.nav-login a:hover {
      background: var(--gold2) !important;
      color: var(--white) !important;
      border: none !important;
    }
.nav-menu li.nav-cta a {
      background: var(--white) !important;
      color: var(--navy) !important;
      border: 1.5px solid rgba(28,53,87,0.22) !important;
      box-shadow: none !important;
    }
.nav-menu li.nav-cta a:hover {
      background: var(--offwhite) !important;
      color: var(--gold2) !important;
      border-color: rgba(20,184,166,0.45) !important;
    }
.nav-burger {
      display: none;
      margin-left: auto;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 48px;
      height: 42px;
      padding: 9px 10px;
      background: transparent;
      border: 1.5px solid rgba(20,184,166,0.55);
      border-radius: 4px;
      cursor: pointer;
      flex-shrink: 0;
    }
.nav-burger span {
      display: block;
      width: 100%;
      height: 2px;
      background: var(--gold);
      border-radius: 2px;
    }
@media (max-width: 680px) {
  nav { padding: 0 4%; }
  .nav-menu { display: none; }
}
@media (max-width: 768px) {
  nav {
        height: auto;
        min-height: 0;
        padding-top: 18px;
        padding-bottom: 18px;
        align-items: flex-start;
      }
  .nav-left {
        width: 100%;
        gap: 14px;
        align-items: center;
      }
  .nav-logo img {
        height: 64px !important;
        width: auto;
        max-width: min(78vw, 300px);
      }
  .nav-contact {
        gap: 8px;
        font-size: 0.76rem;
      }
  .nav-contact a {
        gap: 6px;
        line-height: 1.3;
        word-break: break-word;
      }
}
@media (max-width: 768px) {
  .nav-portal-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }
  .nav-left {
        width: 100%;
      }
  .nav-contact {
        flex: 1;
      }
}
@media (max-width: 430px) {
  .nav-portal-mobile {
        font-size: 0.68rem;
        padding: 9px 10px;
      }
}
@media (max-width: 768px) {
  .nav-portal-mobile {
        background: var(--gold) !important;
        color: var(--white) !important;
      }
  .nav-portal-mobile:hover {
        background: var(--gold2) !important;
        color: var(--white) !important;
      }
}
@media (max-width: 768px) {
  .nav-menu { display: none; }
}
@media (max-width: 1280px) {
  .nav-menu li a { padding: 0 12px; font-size: 0.74rem; }
}
@media (max-width: 1080px) {
  .nav-menu li a { padding: 0 9px; font-size: 0.70rem; }
}
@media (max-width: 768px) {
  nav { flex-wrap: wrap; }
  .nav-burger { display: flex; }
   .nav-menu.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 14px;
        border-top: 1px solid rgba(28,53,87,0.12);
      }
  .nav-menu.open li a {
        height: auto;
        line-height: 1.3;
        padding: 16px 2px;
        border-bottom: 1px solid rgba(28,53,87,0.10);
      }
  
  .nav-menu.open li.nav-cta a {
        margin: 14px 0 4px;
        text-align: center;
        padding: 15px;
        border-bottom: none;
      }
}

    /* Current page marker — the homepage has no equivalent because it has
       no page to be "on", so this is the one addition. */
    .nav-menu li a.on { color: var(--gold); }

    /* ------------------------------------------------------------------
       Wordmark as real text next to the transparent NY mark.
       The supplied logo artwork has a cream paper background baked in,
       which showed as a box on the white nav. This has no background at
       all, stays sharp on any screen, and makes the company name real
       text rather than pixels.
       ------------------------------------------------------------------ */
    .nav-logo { display: flex; align-items: center; gap: 13px; text-decoration: none; }
    .nav-logo img.mark {
      height: 58px !important;
      width: auto !important;
      max-width: none !important;
      flex-shrink: 0;
    }
    .wordmark { display: flex; flex-direction: column; line-height: 1; }
    .wordmark strong {
      font-family: "Montserrat", sans-serif;
      font-weight: 600;
      font-size: 1.42rem;
      letter-spacing: 0.32em;
      color: var(--navy);
      text-indent: 0.32em;
    }
    .wordmark em {
      font-style: normal;
      font-family: "Montserrat", sans-serif;
      font-weight: 500;
      font-size: 0.66rem;
      letter-spacing: 0.2em;
      color: var(--navy);
      margin-top: 7px;
      text-indent: 0.2em;
      white-space: nowrap;
    }
    .wordmark em::before { content: "— "; }
    .wordmark em::after  { content: " —"; }

    @media (max-width: 900px) {
      .nav-logo { gap: 10px; }
      .nav-logo img.mark { height: 46px !important; }
      .wordmark strong { font-size: 1.12rem; letter-spacing: 0.26em; }
      .wordmark em { font-size: 0.56rem; letter-spacing: 0.16em; margin-top: 5px; }
    }
    @media (max-width: 460px) {
      .nav-logo img.mark { height: 38px !important; }
      .wordmark strong { font-size: 0.92rem; letter-spacing: 0.2em; }
      .wordmark em { font-size: 0.48rem; letter-spacing: 0.12em; }
    }

    /* Current page: teal text plus an underline along the bottom of the tab,
       so it is obvious which page you are on. */
    .nav-menu li a.on {
      color: var(--gold);
      box-shadow: inset 0 -3px 0 0 var(--gold);
    }

    /* Mobile header: the logo, contact block, Facility Login button and
       hamburger cannot all fit across a phone. The contact block was being
       squeezed to almost no width, so the phone number and email wrapped one
       character per line. Hidden below 768px — the number is right there in
       the banner call box, and again in the footer. */
    @media (max-width: 768px) {
      .nav-contact { display: none !important; }
      .nav-left { justify-content: space-between; gap: 10px; }
      .nav-logo { flex: 0 1 auto; min-width: 0; }
      .nav-logo img.mark { flex-shrink: 0; }
      .wordmark { min-width: 0; }
    }

    /* ------------------------------------------------------------------
       Header fitting across screen sizes.

       The bar holds a lot: logo + wordmark, phone, email, six menu items
       and two buttons. On a laptop that overflowed and wrapped mid-word
       ("X-" / "RAY"), and since the items are 120px tall with a matching
       line-height, the wrapped text spilled over the banner below.
       ------------------------------------------------------------------ */
    .nav-menu li a { white-space: nowrap; }

    @media (min-width: 769px) {
      nav { flex-wrap: nowrap; }
      .nav-menu { flex-shrink: 0; }
    }

    /* phone + email are the first thing to go — both are in the banner
       call box and again in the footer */
    @media (max-width: 1440px) {
      .nav-contact { display: none; }
    }
    @media (max-width: 1180px) {
      .nav-menu li a { padding: 0 8px; font-size: 0.67rem; }
      .nav-logo img.mark { height: 46px !important; }
      .wordmark strong { font-size: 1.05rem; letter-spacing: 0.22em; }
      .wordmark em { font-size: 0.5rem; letter-spacing: 0.13em; }
    }
    @media (max-width: 980px) {
      .nav-menu li a { padding: 0 6px; font-size: 0.62rem; }
      .nav-menu li.nav-cta a, .nav-menu li.nav-login a { padding: 0 10px; }
    }

    /* Measured: the header needs about 1576px of room with the phone and
       email column, and about 1243px without it. Hiding it below 1600px
       leaves a safe margin instead of letting it collide with the menu.
       The min-width/overflow rules make an overlap impossible even if a
       future change makes something wider. */
    @media (max-width: 1600px) {
      .nav-contact { display: none; }
    }
    .nav-left { min-width: 0; }
    .nav-contact { min-width: 0; overflow: hidden; }
    .nav-contact a { word-break: normal; white-space: nowrap; }

    /* "— MOBILE IMAGING —" sits under "UPSTATE", so hiding it saved no
       horizontal room — it just cost the company name on a phone.
       Kept at every size, scaled to sit neatly under the word above. */
    .wordmark em { display: block !important; }
    @media (max-width: 980px) {
      .wordmark strong { font-size: 0.98rem; letter-spacing: 0.2em; }
      .wordmark em { font-size: 0.47rem; letter-spacing: 0.1em; margin-top: 4px; }
    }
    @media (max-width: 420px) {
      .wordmark strong { font-size: 0.86rem; letter-spacing: 0.16em; }
      .wordmark em { font-size: 0.42rem; letter-spacing: 0.07em; }
    }

    /* Mobile header button is now Call Now, so Facility Login lives in the
       dropdown instead — last item before Request Service. */
    .nav-menu.open li.nav-login { display: block; }
    .nav-portal-mobile svg { width: 13px; height: 13px; fill: currentColor; margin-right: 6px; vertical-align: -2px; }

    /* In the open mobile menu, Facility Login is just another row — same
       colour, size and divider as Home, X-Ray, Contact and the rest. The
       gold button styling only applies to the desktop bar. */
    @media (max-width: 768px) {
      .nav-menu.open li.nav-login a,
      .nav-menu.open li.nav-login a:hover {
        background: none !important;
        color: var(--navy) !important;
        border: none !important;
        border-bottom: 1px solid rgba(28,53,87,0.10) !important;
        border-radius: 0 !important;
        height: auto !important;
        line-height: 1.3 !important;
        padding: 16px 2px !important;
        margin: 0 !important;
        text-align: left !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        letter-spacing: inherit !important;
      }
    }

    /* the gold button also carries a teal drop shadow — kill that too,
       otherwise the row still reads as a raised card in the dropdown */
    @media (max-width: 768px) {
      .nav-menu.open li.nav-login a,
      .nav-menu.open li.nav-login a:hover,
      .nav-menu.open li.nav-login a:focus {
        box-shadow: none !important;
        text-shadow: none !important;
        transform: none !important;
      }
    }
