/* ============================================
   Navigation
   ============================================ */

/* 3-column grid so the center links align to the true page center —
   with flex space-between they centered in the leftover space, which
   sits right of page center because the logo is wider than the CTA. */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  transition: all 0.4s ease;
}

nav .logo {
  justify-self: start;
}

nav .nav-links {
  justify-self: center;
}

nav .nav-cta {
  justify-self: end;
}

nav.scrolled {
  background: rgba(10, 22, 40, 0.97);
  padding: 1rem 3rem;
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
}

.logo-icon svg {
  width: 62%;
  height: 62%;
  display: block;
}

.logo-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-cta {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 0.65rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--navy);
}

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

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(10px);
  min-width: 220px;
  padding: 0.75rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.nav-dropdown-menu a:hover {
  color: var(--gold);
  background: rgba(201, 169, 98, 0.1);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy);
  z-index: 999;
  padding: 6rem 2rem 2rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.mobile-menu li {
  list-style: none;
  width: 100%;
}

.mobile-menu a {
  display: block;
  width: 100%;
  padding: 1.25rem 0;
  text-align: center;
  color: var(--white);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a:active {
  color: var(--gold);
  background: rgba(201, 169, 98, 0.05);
}

/* Gold CTA = only the final DIRECT-child link (.mobile-menu-cta on the
   home page, or the last flat <a> on product pages). Scoped with > so
   links wrapped in <ul><li> don't each become a :last-child. */
.mobile-menu > a:last-child {
  border-bottom: none;
  margin-top: 1rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: 1rem;
}

.mobile-menu > a:last-child:hover {
  background: var(--gold-light);
}

/* Drop the separator under the final nav link so it sits cleanly above the CTA */
.mobile-menu ul li:last-child a {
  border-bottom: none;
}

.mobile-toggle {
  position: relative;
  z-index: 1001;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Sticky CTA Bar */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--navy);
  padding: 0.75rem 1rem;
  border-top: 2px solid var(--gold);
  gap: 0.5rem;
}

.mobile-cta-bar a {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-cta-bar .call-btn {
  background: var(--gold);
  color: var(--navy);
}

.mobile-cta-bar .quote-btn {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}

/* Responsive */
@media (max-width: 1160px) {
  nav {
    padding: 1.25rem 1.5rem;
  }

  nav.scrolled {
    padding: 1rem 1.5rem;
  }

  .logo-text {
    font-size: 1.15rem;
    white-space: nowrap;
  }

  .nav-links {
    gap: 1.25rem;
  }

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

  .nav-cta {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* Between phone and full desktop the links don't fit on one line —
   hand over to the hamburger early (mobile menu is a full-screen
   overlay, so it works at any width). */
@media (max-width: 960px) {
  /* Back to flex: only the logo and hamburger remain */
  nav {
    display: flex;
    justify-content: space-between;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .logo {
    gap: 0.5rem;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-cta-bar {
    display: flex;
  }
}
