/* ============================================================
   Pro ASIC Miner Repair LLC — navbar.css
   ============================================================ */

/* ============================================================
   5. HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(11,31,58,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 200;
  transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
#site-header.scrolled {
  height: var(--nav-height);
  background: rgba(11,31,58,0.97);
  box-shadow: 0 2px 24px rgba(0,0,0,0.42);
  border-bottom-color: rgba(255,255,255,0.11);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}
.site-logo-img {
  display: block;
  width: auto;
  height: 50px;
  max-width: 330px;
  transition: none;
}
#site-header.scrolled .site-logo-img {
  height: 50px;
  max-width: 330px;
}
@media (max-width: 768px) {
  .site-logo-img { height: 42px; max-width: 270px; }
  #site-header.scrolled .site-logo-img { height: 42px; max-width: 270px; }
}
@media (max-width: 390px) {
  .site-logo-img { height: 38px; max-width: 235px; }
  #site-header.scrolled .site-logo-img { height: 38px; max-width: 235px; }
}
@media (max-width: 320px) {
  .site-logo-img { height: 34px; max-width: 200px; }
  #site-header.scrolled .site-logo-img { height: 34px; max-width: 200px; }
}

/* ---- Main Nav ---- */
#main-nav {
  display: flex;
  align-items: center;
}
#main-nav > ul {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

/* Base link + dropdown button shared style */
#main-nav > ul > li > a,
.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.46rem 0.68rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  white-space: nowrap;
  position: relative;
  transition: color 0.18s ease, background 0.18s ease;
}

/* Underline slide-in hover effect */
#main-nav > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 0.68rem; right: 0.68rem;
  height: 2px;
  background: var(--blue-bright);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
#main-nav > ul > li > a:hover::after { transform: scaleX(1); }
#main-nav > ul > li.nav-cta-item > a::after { display: none; }

#main-nav > ul > li > a:hover,
.nav-dropdown-btn:hover,
.nav-has-dropdown.open > .nav-dropdown-btn {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

/* ---- Dropdown trigger chevron ---- */
.nav-chevron {
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
  flex-shrink: 0;
  transition: transform 0.2s ease, margin-top 0.2s ease;
}
.nav-has-dropdown.open .nav-chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* ---- Dropdown menu ---- */
.nav-has-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 228px;
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 0.4rem 0;
  box-shadow: 0 14px 44px rgba(0,0,0,0.5);
  list-style: none;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.nav-has-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu li { list-style: none; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}
.nav-dropdown-menu a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
  padding-left: 1.4rem;
}

/* Divider after ASIC PSU Repair */
.nav-dropdown-menu li:nth-child(2) a {
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 0.75rem;
  margin-bottom: 0.1rem;
}

/* ---- Nav CTA button ---- */
.nav-cta-item { margin-left: 0.6rem; }
.nav-cta-btn {
  display: inline-flex !important;
  align-items: center;
  padding: 0.46rem 1rem !important;
  background: var(--blue) !important;
  color: var(--white) !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
}
.nav-cta-btn:hover {
  background: var(--blue-dk) !important;
  box-shadow: var(--shadow-blue) !important;
  transform: translateY(-1px) !important;
  color: var(--white) !important;
}

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile nav ---- */
@media (max-width: 1080px) {
  .hamburger { display: flex; }

  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(11,31,58,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.5rem var(--container-pad) 1.25rem;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
  #main-nav.open { display: block; }

  #main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  #main-nav > ul > li > a,
  .nav-dropdown-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    border-radius: 0;
    text-align: left;
  }
  #main-nav > ul > li > a::after { display: none; }

  /* Mobile dropdown accordion */
  .nav-has-dropdown { position: static; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    border-left: 2px solid rgba(33,150,243,0.35);
    border-radius: 0;
    background: rgba(255,255,255,0.04);
    padding: 0;
    display: none;
    transition: none;
    margin-left: 0.5rem;
  }
  .nav-has-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a {
    padding: 0.65rem 1.1rem;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .nav-dropdown-menu a:hover { padding-left: 1.4rem; }
  .nav-dropdown-menu li:nth-child(2) a {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.65rem;
  }

  /* Mobile CTA */
  .nav-cta-item { margin-left: 0; margin-top: 0.75rem; }
  .nav-cta-btn {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    border-radius: var(--radius-md) !important;
    border-bottom: none !important;
  }
  #main-nav > ul > li:last-child > a { border-bottom: none; }
}
