/* =========================================================
   Scrap Car Stoke — nav.css (FULL VERSION)
========================================================= */

:root {
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(11, 99, 255, 0.1);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  
  /* Bright White Glass Drawer Variables */
  --drawer-bg: rgba(255, 255, 255, 0.95);
  --drawer-border: rgba(11, 99, 255, 0.15);
  --drawer-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  
  --radius-nav: 16px;
  
  /* Mobile-first: Tighter outer gap on phones */
  --nav-inset: 8px; 
}

/* Expand outer gap for Desktop */
@media (min-width: 992px) {
  :root {
    --nav-inset: 16px;
  }
}

.site-nav-root {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: var(--nav-inset);
  pointer-events: none;
}

.site-nav-root .glass-header,
.site-nav-root .glass-header * { pointer-events: auto; }

.glass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* Mobile-first: Slimmer padding inside the pill */
  padding: 8px 16px; 
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow);
}

/* =========================================================
   Logo Sizing & Split Text Colors
========================================================= */
.brand { 
  display: flex; 
  align-items: center; 
  gap: 8px;
  text-decoration: none; 
}

.brand-logo { 
  /* Mobile-first: Shrunk logo */
  height: 28px;
  width: auto; 
  display: block; 
}

.brand-text {
  /* Mobile-first: Slightly smaller text to match logo */
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
}

.text-black { color: #0f172a; }
.text-blue { color: #0b63ff; }

/* =========================================================
   Header Actions & Toggles
========================================================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle, .nav-close {
  /* Mobile-first: Smaller menu button */
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(11, 99, 255, 0.1);
  color: #0b63ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.nav-toggle:hover, .nav-close:hover { background: rgba(11, 99, 255, 0.2); }

/* =========================================================
   Mobile Drawer
========================================================= */
.nav-backdrop {
  position: fixed; inset: 0;
  z-index: 11000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-drawer {
  position: fixed;
  z-index: 12000;
  top: 16px; right: 16px; left: 16px;
  max-width: 500px;
  margin-left: auto;
  border-radius: var(--radius-nav);
  background: var(--drawer-bg);
  border: 1px solid var(--drawer-border);
  box-shadow: var(--drawer-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateY(-10px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  
  /* MOBLE SCROLLING FIXES ADDED HERE */
  max-height: calc(100vh - 32px); /* Accounts for the 16px top and bottom margin */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.nav-drawer.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: #0f172a;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-title { font-weight: 900; font-size: 1.15rem; }

.nav-grid {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
}

.nav-group {
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
}

.nav-group__title {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover { 
  background: rgba(11, 99, 255, 0.08); 
  color: #0b63ff; 
}

.nav-link--active { background: #0b63ff; color: #fff; }
.nav-link--active:hover { color: #fff; }

.desktop-nav { display: none; }
.call-desktop { display: none; }

.nav-toplink {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
}

.nav-toplink:hover { background: rgba(15, 23, 42, 0.05); }

/* =========================================================
   Desktop Navigation Media Query (Scales everything up)
========================================================= */
@media (min-width: 992px) {
  .nav-toggle { display: none !important; }
  
  /* Restore Desktop Nav Sizing */
  .glass-header { padding: 12px 20px; gap: 16px; }
  .brand { gap: 10px; }
  .brand-logo { height: 44px; }
  .brand-text { font-size: 1.3rem; }
  
  .header-actions { flex: 1; justify-content: flex-end; gap: 16px; }

  .call-desktop {
    display: inline-flex !important;
    align-items: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    color: #fff;
    background: #0b63ff;
    box-shadow: 0 10px 20px rgba(11,99,255,0.2);
    white-space: nowrap;
    transition: all 0.3s ease;
  }
  .call-desktop:hover { background: #004ee6; transform: translateY(-2px); }

  .desktop-nav { display: flex; align-items: center; gap: 8px; }
  .desktop-nav__toplinks { display: flex; align-items: center; gap: 8px; margin-left: 8px; }

  .desktop-nav__group { position: relative; }
  .desktop-nav__group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; }

  .desktop-nav__trigger {
    color: #0f172a;
    font-weight: 800;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    padding: 12px 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .desktop-nav__trigger:hover { background: rgba(15, 23, 42, 0.05); }

  .desktop-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 240px;
    padding: 12px;
    z-index: 20000;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  }

  .desktop-nav__group:hover .desktop-nav__menu,
  .desktop-nav__group:focus-within .desktop-nav__menu { display: block; }

  .desktop-nav__menu .nav-link { color: #0f172a; padding: 12px 16px; }
  .desktop-nav__menu .nav-link:hover { background: rgba(11,99,255,0.05); color: #0b63ff; }
  
  .nav-drawer, .nav-backdrop { display: none !important; }
}

/* =========================================================
   Accordions Mobile
========================================================= */
.nav-acc { 
  border: 1px solid rgba(0, 0, 0, 0.08); 
  border-radius: 12px; 
  overflow: hidden; 
  margin-bottom: 8px; 
}
.nav-acc__summary { 
  list-style: none; 
  cursor: pointer; 
  padding: 16px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  font-weight: 800; 
  background: rgba(0, 0, 0, 0.02); 
  color: #0f172a;
}
.nav-acc__summary::-webkit-details-marker { display: none; }
.nav-acc__panel { padding: 0 12px 12px; display: grid; gap: 4px; }
.nav-acc__chev { transition: transform 0.2s ease; color: #64748b; }
.nav-acc[open] .nav-acc__chev { transform: rotate(180deg); }

/* =========================================================
   Floating Actions
========================================================= */
.floating-actions { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 12px; z-index: 9999; }
.floating-btn { width: 60px !important; height: 60px !important; border-radius: 999px; display: grid; place-items: center; text-decoration: none; box-shadow: 0 10px 20px rgba(0,0,0,0.15); transition: transform 0.3s ease; }
.floating-btn:hover { transform: translateY(-4px); }
.floating-btn svg.floating-icon { width: 28px !important; height: 28px !important; display: block !important; }
.floating-btn--call svg.floating-icon path { fill: #fff; }
.floating-btn--wa { background: #25D366; border: 4px solid #fff; }
.floating-btn--wa .fab-icon { color: #fff; font-size: 30px !important; line-height: 1; }
.floating-btn--call { background: #0b63ff; border: 4px solid #fff; }

@media (min-width: 992px) { .floating-btn--call { display: none !important; } }