/*
 * nav.css — Utility bar, secondary bar, main nav, dropdowns
 * Shared by ALL pages
 * Dr Samir Contractor Website
 */

/* ─── UTILITY BAR (top bar 1) ─── */
.utility-bar {
  background: var(--brand-blue); color: rgba(255,255,255,.92);
  font-size: .84rem; padding: .5rem 1rem;
}
.utility-bar .container-fluid { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.util-left { display: flex; align-items: center; gap: .5rem; }
.util-left a { display: inline-flex; align-items: center; gap: .45rem; color: #fff; font-weight: 600; font-size: .84rem; transition: opacity .18s; }
.util-left a:hover { opacity: .85; }
.util-right { display: flex; align-items: center; gap: .75rem; }
.util-right a, .util-search-icon { color: rgba(255,255,255,.85); display: inline-flex; align-items: center; transition: color .18s; cursor: pointer; }
.util-right a:hover, .util-search-icon:hover { color: #fff; }

/* ─── SECONDARY BAR (top bar 2) ─── */
.secondary-bar {
  background: #f7f9fb;
  border-bottom: 1px solid var(--rule);
  font-size: .82rem;
}
.secondary-bar .container { display: flex; justify-content: flex-end; }
.secondary-links { list-style: none; display: flex; align-items: center; }
.secondary-links li a {
  display: block; padding: .5rem .9rem;
  color: var(--ink-2); font-weight: 500;
  transition: color .18s;
  white-space: nowrap;
}
.secondary-links li a:hover, .secondary-links li a.active { color: var(--brand-blue); }

/* ─── MAIN NAV ─── */
.nav-wrap {
  position: sticky; top: 0; z-index: 100;
  padding: 0 1rem;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 2px 8px rgba(15,44,63,.06);
}
nav.main-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.brand img { height: 52px; width: auto; display: block; }
.nav-links { display: flex; gap: .2rem; align-items: center; }
.nav-links > a {
  font-size: .88rem; font-weight: 500; color: var(--ink-2);
  padding: .5rem .7rem; border-radius: 4px;
  transition: color .18s, background .18s;
  white-space: nowrap;
}
.nav-links > a:hover, .nav-links > a.active { color: var(--brand-blue); background: var(--brand-blue-soft); }

/* ─── DROPDOWN ─── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex; align-items: center; gap: .28rem;
  font-size: .88rem; font-weight: 500; color: var(--ink-2);
  padding: .5rem .7rem; border-radius: 4px; cursor: pointer;
  transition: color .18s, background .18s;
  white-space: nowrap;
}
.nav-dropdown-toggle svg { transition: transform .2s ease; flex-shrink: 0; }
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle { color: var(--brand-blue); background: var(--brand-blue-soft); }
.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown:focus-within .nav-dropdown-toggle svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 12px 36px -6px rgba(15,44,63,.14);
  list-style: none;
  min-width: 250px;
  padding: .4rem 0;
  z-index: 200;
}
/* Bridge the 8px gap between the nav item and dropdown —
   invisible pseudo-element fills the space so hover isn't lost
   as the cursor moves from the trigger down into the menu */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;      /* slightly more than the 8px gap to be safe */
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; animation: dropIn .18s ease; }
@keyframes dropIn { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.nav-dropdown-menu li a {
  display: block; padding: .55rem 1.1rem;
  font-size: .875rem; font-weight: 500; color: var(--ink-2);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-dropdown-menu li a:hover { background: var(--bg-soft); color: var(--brand-blue); }
.nav-dropdown-menu li + li { border-top: 1px solid var(--rule); }

.btn-nav-cta {
  background: var(--brand-blue); color: #fff !important;
  padding: .62rem 1.2rem; border-radius: 4px;
  font-size: .88rem; font-weight: 600; margin-left: .5rem;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: background .2s; white-space: nowrap;
  text-decoration: none;
}
.btn-nav-cta:hover { background: var(--brand-blue-deep); }
.mobile-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: .5rem; }
.mobile-toggle svg { width: 26px; height: 26px; stroke: var(--ink); }
