/* ==========================================================
   HEADER: sticky navbar + dropdown + mobile menu
   ========================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease);
}
/* blur alag layer par, taaki mobile menu (position: fixed) na toote */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 11, 7, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.site-header.scrolled,
.site-header.nav-open { border-bottom-color: var(--line); }
.site-header.scrolled::before,
.site-header.nav-open::before { opacity: 1; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { height: 46px; width: auto; }

/* ---------- Nav ---------- */
.nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-cta { display: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--silver-300);
  transition: color 0.25s, background 0.25s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-link.active,
.nav-item.open > .nav-link { color: #fff; }

.chev { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.nav-item.open > .nav-link .chev { transform: rotate(180deg); }

/* ---------- Dropdown ---------- */
.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  min-width: 330px;
  padding: 10px;
  background: rgba(9, 21, 15, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0.25s;
}
/* hover ke time mouse ka gap na bane */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }

.has-drop.open > .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (min-width: 992px) and (hover: hover) {
  .has-drop:hover > .dropdown,
  .has-drop:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .has-drop:hover > .nav-link .chev { transform: rotate(180deg); }
}

.dd-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  transition: background 0.2s;
}
.dd-link strong { color: var(--silver-100); font-weight: 500; font-size: 0.98rem; }
.dd-link span { color: var(--silver-500); font-size: 0.85rem; line-height: 1.4; }
.dd-link:hover { background: rgba(255, 255, 255, 0.06); }

/* ---------- Right side ---------- */
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { color: var(--silver-300); font-size: 0.92rem; font-weight: 500; transition: color 0.25s; }
.header-phone:hover { color: #fff; }
.menu-btn { display: none; }

@media (max-width: 1180px) { .header-phone { display: none; } }

/* ---------- Mobile ---------- */
@media (max-width: 991px) {
  .menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
  }
  .menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s;
  }
  .menu-btn span + span { margin-top: 5px; }
  .nav-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .menu-btn span:nth-child(2) { opacity: 0; }
  .nav-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: block;
    padding: 12px 20px 48px;
    background: var(--bg-900);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 18px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
  }
  .nav-link:hover { background: none; }

  .dropdown {
    position: static;
    display: none;
    min-width: 0;
    padding: 4px 0 10px;
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .dropdown::before { display: none; }
  .has-drop.open > .dropdown { display: block; transform: none; }

  .nav-cta { display: block; margin-top: 28px; }
  .nav-cta .btn { width: 100%; }
  .header-cta { display: none; }
}

/* ---------- Bigger logo on desktop (mobile stays as it is) ---------- */
@media (min-width: 992px) {
  :root { --header-h: 88px; }
  .logo img { height: 68px; transition: height 0.35s var(--ease); }
  .site-header.scrolled .logo img { height: 58px; }
}