/* ./assets/css/main.css */
/* ─── NAVBAR ─── */
.site-nav {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(26,58,143,0.08);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.navbar-brand-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  letter-spacing: 4px;
  color: var(--blue-dark);
  line-height: 1;
}
.navbar-brand-text span { color: var(--red); }
.navbar-brand-text small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.48rem;
  letter-spacing: 3px;
  color: var(--text-mid);
  font-weight: 500;
  margin-top: -4px;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 2px solid var(--blue);
  border-radius: 4px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop nav */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  height: 100%;
  margin: 0;
  padding: 0;
}
/* Every top-level item fills the full navbar height for contiguous hover zone */
.nav-links > .nav-item {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}
.nav-links .nav-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.2s;
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
}
.nav-links .nav-link:hover { color: var(--blue); background: rgba(26,58,143,0.06); }

/* Desktop dropdown — sits flush below the navbar; pseudo-element bridges the gap */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* flush — no gap */
  left: 0;
  background: var(--blue-dark);
  border: none;
  border-radius: 0 0 8px 8px;
  border-top: 3px solid var(--red);
  padding: 8px 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  min-width: 220px;
  list-style: none;
  z-index: 100;
}
/* Invisible bridge so mouse can travel from link → menu without dropout */
.nav-links > .nav-item > .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0; right: 0;
  height: 12px;
}
.nav-item:hover > .dropdown-menu { display: block; }
.dropdown-menu .dropdown-item {
  color: rgba(255,255,255,0.85);
  font-size: 0.83rem;
  padding: 9px 20px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  display: block;
  white-space: nowrap;
}
.dropdown-menu .dropdown-item:hover { background: var(--red); color: white; }

/* Desktop submenu */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  border-radius: 0 8px 8px 8px;
}
.dropdown-submenu:hover > .dropdown-menu { display: block; }
.dropdown-toggle-arrow::after { content: ' ›'; opacity: 0.6; }

.btn-quote {
  background: var(--red) !important;
  color: white !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border-radius: 4px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 8px;
  transition: background 0.2s;
}
.btn-quote:hover { background: var(--red-dark) !important; }

/* Hide mobile-only elements on desktop */
.mobile-dropdown-trigger { display: none; }

/* ─── MOBILE NAV ─── */
@media (max-width: 991px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    background: white;
    border-top: 1px solid #eee;
    border-bottom: 3px solid var(--red);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > .nav-item {
    width: 100%;
    display: block;
    position: static;
  }

  .nav-links .nav-link,
  .mobile-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 14px 24px;
    border-radius: 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
  }

  .nav-links .nav-link {
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .nav-links .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  .desktop-only {
    display: none;
  }

  .mobile-dropdown-trigger {
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    user-select: none;
    background: white;
  }

  .mobile-dropdown-trigger:hover {
    background: rgba(26,58,143,0.04);
    color: var(--blue);
  }

  .mobile-chevron {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
    color: var(--text-light);
  }

  .mobile-dropdown-trigger.open .mobile-chevron {
    transform: rotate(180deg);
  }

  .dropdown-menu {
    display: none;
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #f8f9fb;
    box-shadow: none;
  }

  .dropdown-menu.mobile-open {
    display: block;
  }

  .dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    color: var(--text-dark);
    font-size: 0.85rem;
    padding: 12px 24px 12px 42px;
    border-bottom: 1px solid #eee;
    white-space: normal;
  }

  .dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
  }

  .dropdown-menu .dropdown-item:hover {
    background: rgba(26,58,143,0.06);
    color: var(--blue);
  }

  .dropdown-submenu > .dropdown-menu {
    margin: 0;
    background: #f0f2f8;
  }

  .mobile-sub-trigger {
    justify-content: space-between;
    padding-left: 24px;
    padding-right: 24px;
  }

  .btn-quote {
    margin: 0;
    display: flex;
    justify-content: center;
    text-align: center;
    border-radius: 0 !important;
    padding: 14px 24px !important;
    border-bottom: none !important;
  }
}