/* ==========================================================================
   header.css — J&J Contractors (iOS-safe mobile nav)
   Header + navigation only
   ========================================================================== */

.site-header{
  position: sticky;
  top: 0;
  z-index: 80;
}

.glass-nav{
  background: rgba(10, 15, 23, .62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

/* Logo */
.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}

.logo-text{
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Admin badge */
.admin-badge{
  margin-left: 6px;
  font-weight: 900;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243,180,0,.35);
  background: rgba(243,180,0,.12);
  color: var(--text);
}

/* Toggle button */
.nav-toggle{
  display: none; /* desktop default */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.nav-ico{ font-size: 18px; line-height: 1; }

/* SR only */
.sr-only{
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Desktop nav is hidden because we’re using the drawer.
   If you want desktop inline nav later, we can re-add it.
*/
.site-nav{
  position: fixed;
  top: 0;
  right: 0;
  width: min(92vw, 360px);
  height: 100vh;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;

  background: rgba(15, 22, 36, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--line);

  z-index: 10001;

  /* iOS-safe show/hide (NO transform) */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), visibility .22s var(--ease);
}

.site-nav.is-open{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.nav-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.nav-title{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.nav-close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor: pointer;
}

.site-nav a{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 800;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.site-nav a:hover{
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.site-nav a.active,
.site-nav a[aria-current="page"]{
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}

/* CTA */
.site-nav .nav-cta{
  margin-top: 6px;
  justify-content: center;
  background: linear-gradient(180deg, rgba(243,180,0,1), rgba(243,180,0,.88));
  color: #10131a;
  border: 1px solid rgba(243,180,0,.55);
  box-shadow: 0 12px 26px rgba(243,180,0,.18);
}

/* Theme toggle in nav */
.theme-toggle{
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor: pointer;
}

/* Overlay */
.nav-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), visibility .22s var(--ease);
}

.nav-overlay.is-open{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Mobile-only: show toggle, use drawer */
@media (max-width: 920px){
  .nav-toggle{ display: inline-flex; }
}

/* Desktop: hide drawer completely */
@media (min-width: 921px){
  /* if you want desktop inline nav later, we can build it */
}
