/* Shared site navigation — Ridgeline Inspection and Testing */

.logo{
  font-weight:800;
  letter-spacing:.5px;
  display:flex;
  align-items:center;
  gap:12px;
  color:#fff;
  text-decoration:none;
}
.logo img{height:56px;width:auto;display:block;filter:drop-shadow(0 0 1px rgba(255,255,255,.9))}
.logo span{color:var(--accent)}
.logo>div{line-height:1.15}

header{background:var(--navy);color:#fff;position:sticky;top:0;z-index:40}
header .wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
  padding:10px 20px;
  max-width:1240px;
}

.dcall{
  display:none;
  flex-shrink:0;
  background:var(--accent);
  color:#fff!important;
  font-weight:700;
  text-decoration:none;
  padding:9px 16px;
  border-radius:6px;
  font-size:.95rem;
  white-space:nowrap;
  margin-left:0;
}
.dcall-short{display:none}

.nav-toggle,
.nav-close,
.nav-panel-head,
.nav-call-mobile{display:none}

nav.site-nav{
  display:flex;
  align-items:center;
  gap:4px 6px;
  flex:1 1 auto;
  justify-content:flex-end;
  min-width:0;
}
nav.site-nav a:not(.nav-req):not(.nav-call-mobile),
nav.site-nav .nav-drop-btn{
  color:#fff;
  text-decoration:none;
  margin-left:0;
  font-size:.95rem;
  font-weight:600;
  font-family:inherit;
  background:none;
  border:0;
  cursor:pointer;
  white-space:nowrap;
  line-height:1.2;
}
.nav-link,
.nav-drop-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-radius:6px;
  color:#fff;
}
.nav-link:hover,
.nav-link:focus-visible,
.nav-drop-btn:hover,
.nav-drop-btn:focus-visible,
.nav-drop.is-open>.nav-drop-btn,
.nav-drop.is-current>.nav-drop-btn{
  background:rgba(255,255,255,.1);
  outline:none;
}
.nav-link.is-current,
.nav-req[aria-current="page"]{
  box-shadow:inset 0 -2px 0 var(--accent);
}
.nav-drop-btn::after{
  content:"";
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid currentColor;
  margin-top:1px;
  opacity:.85;
}
.nav-drop{position:relative}
.nav-drop-list{
  display:none;
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  min-width:260px;
  margin:0;
  padding:8px 0;
  list-style:none;
  background:#fff;
  color:var(--navy);
  border-radius:8px;
  box-shadow:0 12px 30px rgba(10,20,35,.22);
  border:1px solid #dde3ea;
  z-index:45;
}
.nav-drop.is-open>.nav-drop-list{
  display:block;
}
.nav-drop-list a{
  display:block;
  color:var(--navy)!important;
  text-decoration:none;
  padding:10px 16px;
  font-size:.95rem;
  font-weight:600;
  white-space:nowrap;
}
.nav-drop-list a:hover,
.nav-drop-list a:focus-visible{
  background:var(--light,#f4f6f8);
  color:var(--navy)!important;
  outline:none;
}
.nav-drop-list a.is-current{
  background:var(--light,#f4f6f8);
  box-shadow:inset 3px 0 0 var(--accent);
}

.nav-links,.nav-cta{display:contents}
@media(max-width:960px){
  .nav-links{
    display:block;
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:0;
  }
  .nav-cta{
    display:flex;
    flex-direction:column;
    flex:0 0 auto;
    gap:8px;
    position:static;
    background:var(--navy);
    padding:8px 0 4px;
    border-top:1px solid rgba(255,255,255,.12);
  }
}
nav.site-nav a.nav-req{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:var(--navy)!important;
  font-weight:800;
  text-decoration:none;
  padding:9px 14px;
  border-radius:6px;
  font-size:.92rem;
  white-space:nowrap;
  margin-left:6px;
  border:0;
  cursor:pointer;
}
nav.site-nav a.nav-req:hover,
nav.site-nav a.nav-req:focus-visible{
  background:#f3f6f9;
  outline:2px solid var(--accent);
  outline-offset:2px;
}

@media(min-width:961px){
  .dcall{display:inline-block}
  .mcall{display:none!important}
  .nav-toggle,
  .nav-panel-head,
  .nav-call-mobile{display:none!important}
  nav.site-nav{display:flex!important}
  @media(min-width:961px) and (max-width:1180px){
    .logo{font-size:.85rem;gap:8px}
    .logo img{height:48px}
    nav.site-nav a,
    nav.site-nav .nav-drop-btn{font-size:.88rem}
    .nav-link,.nav-drop-btn{padding:8px 8px}
    .nav-req{padding:8px 12px;font-size:.85rem;margin-left:4px}
    .dcall{padding:8px 12px;font-size:.9rem}
  }
  @media(min-width:961px) and (max-width:1080px){
    .dcall-phone{display:none}
    .dcall-short{display:inline}
  }
}

@media(max-width:960px){
  .dcall{display:none!important}
  .mcall{display:none!important}
  .logo{font-size:.78rem;gap:8px}
  .logo img{height:40px}

  .nav-toggle{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-left:auto;
    background:#fff;
    color:var(--navy);
    font-weight:800;
    font-size:.95rem;
    font-family:inherit;
    border:0;
    border-radius:6px;
    padding:8px 12px;
    min-height:44px;
    cursor:pointer;
    letter-spacing:.02em;
  }
  .nav-toggle:hover,
  .nav-toggle:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:2px;
  }
  .nav-toggle[aria-expanded="true"]{
    background:var(--accent);
    color:#fff;
  }
  .nav-toggle-bars{
    display:block;
    width:18px;
    height:12px;
    background:
      linear-gradient(currentColor,currentColor) 0 0/100% 2px no-repeat,
      linear-gradient(currentColor,currentColor) 0 5px/100% 2px no-repeat,
      linear-gradient(currentColor,currentColor) 0 10px/100% 2px no-repeat;
  }

  nav.site-nav{
    display:none;
    position:fixed;
    top:var(--header-h,64px);
    left:0;
    right:0;
    bottom:calc(64px + env(safe-area-inset-bottom,0px));
    z-index:25;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:0;
    background:var(--navy);
    padding:8px 16px 6px;
    overflow:hidden;
  }
  body.nav-open nav.site-nav.is-open,
  nav.site-nav.is-open{display:flex!important}

  .nav-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 0 6px;
    border-bottom:1px solid rgba(255,255,255,.12);
    margin-bottom:6px;
  }
  .nav-panel-title{
    margin:0;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    font-size:.82rem;
    color:#cfd8e3;
  }
  .nav-close{
    display:inline-flex;
    align-items:center;
    gap:4px;
    min-height:44px;
    padding:8px 12px;
    border:0;
    border-radius:6px;
    background:rgba(255,255,255,.12);
    color:#fff;
    font-weight:700;
    font-size:.95rem;
    font-family:inherit;
    cursor:pointer;
  }
  .nav-close span{font-size:1.4rem;line-height:1;font-weight:400}
  .nav-close:hover,
  .nav-close:focus-visible{background:rgba(255,255,255,.22);outline:2px solid #fff;outline-offset:2px}

  .nav-drop{position:static}
  .nav-drop-btn,
  .nav-link{
    display:flex;
    width:100%;
    justify-content:space-between;
    text-align:left;
    padding:10px 12px;
    min-height:44px;
    font-size:1.05rem;
    border-radius:6px;
  }
  .nav-drop-btn::after{
    border-top-width:6px;
    border-left-width:5px;
    border-right-width:5px;
    transition:transform .15s ease;
  }
  .nav-drop.is-open>.nav-drop-btn::after{transform:rotate(180deg)}
  .nav-drop-list{
    position:static;
    display:none;
    min-width:0;
    margin:0;
    padding:0 0 2px;
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
  /* On mobile, only show the list when the section is opened — not on hover */
  .nav-drop:hover>.nav-drop-list{display:none}
  .nav-drop.is-open>.nav-drop-list{display:block}
  .nav-drop-list a{
    color:#fff!important;
    padding:8px 12px 8px 24px;
    min-height:44px;
    font-size:1rem;
    white-space:normal;
    border-radius:6px;
  }
  .nav-drop-list a:hover,
  .nav-drop-list a:focus-visible,
  .nav-drop-list a.is-current{
    background:rgba(255,255,255,.1);
    box-shadow:inset 3px 0 0 var(--accent);
  }

  nav.site-nav a.nav-call-mobile{display:none!important}
  nav.site-nav a.nav-req{
    display:flex;
    margin:0;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    padding:10px 16px;
    min-height:44px;
    font-size:1.05rem;
    justify-content:center;
    align-self:stretch;
  }

  /* Keep the red sticky call bar visible and tappable above the menu */
  .callbar{z-index:30}

  body.nav-open{
    overflow:hidden;
    touch-action:none;
  }
}

@media(prefers-reduced-motion:reduce){
  .nav-drop-btn::after{transition:none}
}

/* Skip link */
.skip-link{
  position:absolute;
  left:12px;
  top:-40px;
  z-index:60;
  background:#fff;
  color:var(--navy);
  padding:8px 12px;
  border-radius:0 0 6px 6px;
  font-weight:700;
  text-decoration:none;
}
.skip-link:focus{top:0}
