/* ═══════════════════════════════════════════════════════════════
   HVM REALTORS — HEADER / NAVBAR STYLES
   assets/css/header.css
   Link in <head>: <link rel="stylesheet" href="assets/css/header.css">
   ═══════════════════════════════════════════════════════════════ */

/* ─── NAVBAR BASE ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scrolled state */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(27, 45, 91, 0.12);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  padding: 0.6rem clamp(1rem, 4vw, 3rem);
}

/* ─── LOGO ───────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.nav-logo-img {
  height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.85;
}

/* ─── DESKTOP NAV LINKS ──────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-links a {
  font-family: var(--ff-body, 'DM Sans', sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-body, #1a1a1a);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.35s ease;
}

/* Underline hover effect */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--clr-red, #C22032);
  transition: width 0.35s ease;
}

.nav-links a:hover {
  color: var(--clr-navy, #1B2D5B);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Active page link */
.nav-links a.active-link {
  color: var(--clr-navy, #1B2D5B);
  font-weight: 500;
}

.nav-links a.active-link::after {
  width: 100%;
}

/* CTA Button */
.nav-cta {
  font-family: var(--ff-body, 'DM Sans', sans-serif) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: var(--clr-red, #C22032) !important;
  padding: 0.6rem 1.4rem !important;
  border-radius: 4px !important;
  transition: background 0.35s ease, transform 0.35s ease !important;
}

.nav-cta:hover {
  background: var(--clr-red-dk, #9a1926) !important;
  transform: translateY(-1px) !important;
}

/* Remove underline from CTA */
.nav-cta::after {
  display: none !important;
}

/* ─── HAMBURGER ──────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  outline: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-navy, #1B2D5B);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── MOBILE MENU (nav-links.active) ────────────────────────── */
@media (max-width: 768px) {

  /* Hide desktop links */
  .nav-links {
    display: none !important;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Mobile dropdown menu */
  .nav-links.active {
    display: flex !important;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    z-index: 999;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--clr-red, #C22032);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    animation: menuSlideDown 0.25s ease;
  }

  @keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Each link in mobile menu */
  .nav-links.active a {
    padding: 0.9rem clamp(1rem, 4vw, 2rem);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(27, 45, 91, 0.08);
    color: var(--clr-body, #1a1a1a);
  }

  .nav-links.active a:last-child {
    border-bottom: none;
  }

  .nav-links.active a:hover {
    background: rgba(27, 45, 91, 0.04);
    color: var(--clr-navy, #1B2D5B);
  }

  /* CTA in mobile menu */
  .nav-links.active .nav-cta {
    margin: 0.75rem clamp(1rem, 4vw, 2rem) !important;
    text-align: center !important;
    border-radius: 4px !important;
    padding: 0.75rem 1rem !important;
  }

  /* Remove underline animation in mobile */
  .nav-links.active a::after {
    display: none !important;
  }
}

/* ─── TABLET ─────────────────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.72rem;
  }
}
