/* Toast Bouquets — shared site header
   Relies on brand CSS variables (--green, --gold, --cream-light) declared on each page. */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
  background: rgba(31, 58, 46, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.25s ease;
}

.navbar-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  transition: padding 0.25s ease;
}

/* Explicit column placement so the nav group stays visually centered in the
   full header/viewport (not merely centered in the space between logo and CTA),
   and the CTA stays pinned right even while the middle column is hidden on mobile. */
.nav-inner > .logo { grid-column: 1; justify-self: start; }
.nav-inner > .nav-links { grid-column: 2; justify-self: center; }
.nav-inner > .nav-cta { grid-column: 3; justify-self: end; }

.navbar-scrolled .nav-inner {
  padding: 20px 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: 1px;
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}

.navbar-scrolled .logo img {
  height: 52px;
}

.logo span {
  color: var(--gold);
}

/* Nav links/logo never get the browser/page default underline (kills the
   second line on pages that set a global a:hover underline). */
.navbar a,
.navbar a:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.nav-links a {
  color: var(--cream-light);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Shared hover animation for nav links: gold text, animated underline, subtle pop */
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--gold);
  transform: translateY(-2px);
}

.nav-links a:not(.btn):hover::after {
  transform: scaleX(1);
}

.nav-links a.btn {
  padding: 11px 22px;
}

.nav-quote-mobile {
  display: none;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream-light);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  padding: 9px 20px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-phone:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
}

.nav-phone svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream-light);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Button styles used by the nav CTA (also defined inline on the homepage). */
.btn {
  display: inline-block;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: var(--gold);
  color: var(--green-dark);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}
.btn-gold:hover { filter: brightness(1.12); }

/* Items that should appear ONLY inside the open mobile menu */
.menu-only { display: none; }

@media (max-width: 1240px) {
  .nav-inner { padding: 12px 20px; }
  .navbar-scrolled .nav-inner { padding: 16px 20px; }

  .navbar .nav-links, .navbar .nav-phone, .navbar .nav-quote-btn { display: none; }
  .nav-toggle { display: block; }

  .navbar.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;                /* nav content CENTERED */
    position: absolute;
    top: 100%;
    /* Full-bleed edge-to-edge panel. The grid cell is this absolute element's
       containing block, so we break out to the full viewport width. */
    left: 50%;
    right: auto;
    width: 100vw;
    transform: translateX(-50%);
    /* Match the header's dark-green glass treatment */
    background: rgba(31, 58, 46, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    padding: 22px 26px 26px;
    gap: 20px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  }

  /* Keep the gold text + underline sweep on tap/hover, same as desktop */
  .navbar.open .nav-links a { text-align: center; }
  .navbar.open .nav-links a:not(.btn):hover,
  .navbar.open .nav-links a:not(.btn):active { color: var(--gold); }

  /* Reveal the phone inside the open menu */
  .navbar.open .nav-links .menu-only { display: inline-flex; }

  /* Phone button: identical styling to the desktop .nav-phone */
  .navbar.open .menu-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--cream-light);
    white-space: nowrap;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    padding: 9px 20px;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  }
  .navbar.open .menu-phone svg { width: 16px; height: 16px; flex-shrink: 0; }
  .navbar.open .menu-phone:hover,
  .navbar.open .menu-phone:active {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
  }
  .navbar.open .nav-links .menu-phone::after { display: none; }

  /* Get Quote + Phone shown side by side inside the open mobile menu */
  .navbar.open .nav-links .menu-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin-top: 4px;
  }
  .navbar.open .menu-actions .menu-quote,
  .navbar.open .menu-actions .menu-phone {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    text-align: center;
    white-space: nowrap;
  }
  .navbar.open .menu-actions .menu-quote {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* At very narrow widths (~320px) stack to avoid cramped text/overflow.
     375 / 390 / 430 stay comfortably side by side. */
  @media (max-width: 359px) {
    .navbar.open .nav-links .menu-actions { flex-direction: column; }
  }
}

/* ---- Sticky mobile bottom CTA bar (injected by header.js) ---- */
.mobile-cta-bar { display: none; }

@media (max-width: 1240px) {
  .mobile-cta-bar {
    display: flex;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4000;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(31, 58, 46, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.3);
    transform: translateY(120%);
    transition: transform 0.3s ease;
  }
  .mobile-cta-bar.show { transform: translateY(0); }

  .mcta-quote {
    flex: 1;
    text-align: center;
    padding: 14px 18px;
    font-size: 0.95rem;
  }

  .mcta-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    color: var(--cream-light);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  }
  .mcta-call svg { width: 16px; height: 16px; flex-shrink: 0; }
  .mcta-call:hover, .mcta-call:active {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
  }
}
