/* Navigation Component Styles */

#main-navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background-color: transparent;
  transition: all 0.3s ease;
  padding: 18px 0;
}

#main-navigation.scrolled {
  background-color: var(--darker);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Desktop Menu Styles */
.desktop-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 25px;
}

.nav-menu-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 25px;
}

.nav-menu-list li,
.nav-social-links .social-link {
  position: relative;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.nav-menu-list li:nth-child(1) { animation-delay: 1.5s; }
.nav-menu-list li:nth-child(2) { animation-delay: 1.6s; }
.nav-menu-list li:nth-child(3) { animation-delay: 1.7s; }
.nav-menu-list li:nth-child(4) { animation-delay: 1.8s; }
.nav-menu-list li:nth-child(5) { animation-delay: 1.9s; }
.nav-menu-list li:nth-child(6) { animation-delay: 2s; }
.nav-menu-list li:nth-child(7) { animation-delay: 2.1s; }
.nav-menu-list li:nth-child(8) { animation-delay: 2.2s; }

.nav-social-links .social-link:nth-child(1) { animation-delay: 2.4s; }
.nav-social-links .social-link:nth-child(2) { animation-delay: 2.5s; }
.nav-social-links .social-link:nth-child(3) { animation-delay: 2.6s; }
.nav-social-links .social-link:nth-child(4) { animation-delay: 2.7s; }
.nav-menu-list a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: white;
  transition: width 0.5s ease;
}

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

/* CTA Button Styles */
.nav-cta-button {
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  opacity: 0;
  min-width: 130px;
  text-align: center;

}
.desktop-menu .nav-cta-button {
  animation: fadeInUp 0.6s ease-out 2.3s forwards;
}

#main-navigation.scrolled .nav-cta-button[data-scrolled-bg="white"] {
  background-color: white !important;
  color: #1a1a1a !important;
}

#main-navigation.scrolled .nav-cta-button[data-scrolled-bg="white"]:hover {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

#main-navigation.scrolled .nav-cta-button[data-scrolled-bg="monteleva-red"] {
  background-color: var(--monteleva-red) !important;
}

#main-navigation.scrolled .nav-cta-button[data-scrolled-bg="monteleva-green"] {
  background-color: var(--monteleva-green) !important;
}

#main-navigation.scrolled .nav-cta-button[data-scrolled-bg="monteleva-blue"] {
  background-color: var(--monteleva-blue) !important;
}

#main-navigation.scrolled .nav-cta-button[data-scrolled-bg="darker"] {
  background-color: var(--darker) !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 50;
}

.menu-toggle .line {
  width: 100%;
  height: 2.5px;
  background-color: #fff;
  transition: all 0.3s ease-in-out;
  transform-origin: center;
}

/* Mobile Menu */
#mobile-menu {
  color: white;
  background: var(--darker);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
  opacity: 0;
  transition: all 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: scale(0);
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding-top: 20px;
}

.mobile-menu-list li {
  margin-bottom: 15px;
  opacity: 0;
}

#main-navigation.is-active .mobile-menu-list li:nth-child(odd) {
  animation: fadeInLeft 0.4s ease-out forwards;
}
#main-navigation.is-active .mobile-menu-list li:nth-child(even) {
  animation: fadeInRight 0.4s ease-out forwards;
}
#main-navigation.is-active #mobile-menu .nav-cta-button {
  animation: fadeInUp 0.4s ease-out 0.8s forwards;
}

/* Staggered animation delays only when menu is active */
#main-navigation.is-active .mobile-menu-list li:nth-child(1) { animation-delay: 0.4s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(2) { animation-delay: 0.5s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(3) { animation-delay: 0.6s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(4) { animation-delay: 0.7s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(5) { animation-delay: 0.8s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(6) { animation-delay: 0.9s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(7) { animation-delay: 1s; }
#main-navigation.is-active .mobile-menu-list li:nth-child(8) { animation-delay: 1.1s; }

.mobile-menu-list a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  display: block;
  padding: 10px 0;
  transition: color 0.3s ease;
}

/* Navigation Social Links */
.nav-social-links {
  display: flex;
  align-items: center;
}

.mobile-social-links {
  display: flex;
  justify-content: center;
  padding: 20px;
  opacity: 0;
}

/* Animate mobile social links only when menu is active */
#main-navigation.is-active .mobile-social-links {
  animation: fadeInUp 0.6s ease-out 0.9s forwards;
}

/* Active States */
#main-navigation.is-active #mobile-menu {
  opacity: 1;
  transform: scale(1);
}

#main-navigation.is-active .line:nth-child(1) {
  transform: translateY(13px) rotate(45deg);
}

#main-navigation.is-active .line:nth-child(2) {
  opacity: 0;
}

#main-navigation.is-active .line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .desktop-menu {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  #main-navigation {
    padding: 10px 0;
  }
  #main-navigation.scrolled {
    padding: 8px 0;
  }
}

/* CTA Button with slide background and text animation */
.nav-cta-slide-bg {
  position: relative;
  overflow: hidden;
}

.nav-cta-slide-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  z-index: 1;
}

.nav-cta-slide-bg span {
  position: relative;
  z-index: 2;
  display: inline-block;
  transition: color 0.2s ease;
}

.nav-cta-slide-bg:hover::before {
  transform: translateX(0);
}

.nav-cta-slide-bg:hover span {
  color: #1a1a1a;
  font-weight: bold;
  animation: slideTextLeftToRight 0.4s ease 0.3s both;
}

/* ============================================================
   Santa Lucía variant
   Dark sticky bar, light slate accents, two-line brand. Reuses the
   shared structure + navigation.js; every color/font comes from
   the enclosing .ml-scope palette (--ink / --gold / --gold-dk /
   --font-display / --font-serif).
   ============================================================ */
#main-navigation.nav-santa-lucia {
  position: fixed;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  padding: 0;
}

/* Transparent over the hero at rest; the ink bar + steel hairline fade in on
   scroll (matches the default santa-lucia nav). The hero reserves the bar's
   height via its own top padding, so no page-body offset is needed. */
#main-navigation.nav-santa-lucia.scrolled {
  background-color: var(--darker);
  border-bottom-color: rgba(148, 164, 173, 0.22); /* steel hairline */
  box-shadow: 0 6px 24px rgba(10, 22, 33, 0.45);
}

.nav-santa-lucia .nav-container-sl {
  /* 1280 content + 2×32 gutter, so the nav content edge lines up with the
     page sections (max-w-[1280px] inside a px-[32px] section). */
  max-width: 1344px;
  margin: 0 auto;
  height: 72px;
  padding: 0 32px;
  gap: 24px;
  transition: height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#main-navigation.nav-santa-lucia.scrolled .nav-container-sl {
  height: 60px;
}

/* Match the sections' mobile gutter (they drop to 22px at <=900px). */
@media (max-width: 900px) {
  .nav-santa-lucia .nav-container-sl {
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* Two-line brand */
.nav-santa-lucia .nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: #fff;
  text-decoration: none;
}

.nav-santa-lucia .nav-brand img {
  height: 44px;
  width: auto;
  display: block;
  transition: height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#main-navigation.nav-santa-lucia.scrolled .nav-brand img {
  height: 36px;
}

.nav-santa-lucia .nav-brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-santa-lucia .nav-brand-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  color: var(--gold);
  margin-top: 2px;
}

/* Spacing between the link group and the CTA */
.nav-santa-lucia .desktop-menu {
  gap: 28px;
}

/* Menu links stagger in once the three-panel intro clears (~1.5s). Inherits the
   shared fadeInUp entrance from the default nav: items 1.5s–1.8s, CTA 2.3s. */
.nav-santa-lucia .nav-menu-list {
  gap: 32px;
}

.nav-santa-lucia .nav-menu-list a {
  color: #e8e8e8;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-santa-lucia .nav-menu-list a:hover {
  color: #fff;
}

.nav-santa-lucia .nav-menu-list a::after {
  background-color: var(--gold);
}

/* Light CTA with slate sweep — same hallmark as the 01 hero button */
.nav-santa-lucia .nav-cta-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.55); /* light outline — mirrors the hero outline CTA */
  border-radius: 4px;
  padding: 10px 21px; /* -1px to absorb the added border */
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.35s ease, box-shadow 0.45s ease, color 0.3s ease, border-color 0.3s ease;
}

.nav-santa-lucia .nav-cta-button span {
  position: relative;
  z-index: 2;
}

.nav-santa-lucia .nav-cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #ffffff; /* white sweep keeps the button light on the dark bar */
  transform: translateX(-101%);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-santa-lucia .nav-cta-button:hover {
  color: var(--darker); /* text flips dark as the white curtain fills */
  border-color: #ffffff;
  box-shadow: 0 8px 22px rgba(10, 22, 33, 0.45);
}

.nav-santa-lucia .nav-cta-button:hover::before {
  transform: translateX(0);
}

/* Keep the CTA light when scrolled. The shared nav forces `--darker !important`
   on any [data-scrolled-bg] button, which would grey-out this one. */
#main-navigation.nav-santa-lucia.scrolled .nav-cta-button[data-scrolled-bg] {
  background-color: transparent !important;
  color: #ffffff !important;
}

#main-navigation.nav-santa-lucia.scrolled .nav-cta-button[data-scrolled-bg]:hover {
  color: var(--darker) !important; /* sweep panel is white; keep the text dark */
}

/* Mobile toggle */
.nav-santa-lucia .menu-toggle .line {
  background-color: var(--gold);
}

/* Mobile drawer — brand-styled links over ink */
.nav-santa-lucia #mobile-menu {
  background: var(--ink2);
}

.nav-santa-lucia #mobile-menu .mobile-menu-list a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8e8e8;
}

.nav-santa-lucia #mobile-menu .mobile-menu-list a:hover {
  color: var(--gold);
}

.nav-santa-lucia #mobile-menu .nav-cta-button {
  margin-top: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-santa-lucia .nav-container-sl,
  .nav-santa-lucia .nav-cta-button,
  .nav-santa-lucia .nav-cta-button::before,
  .nav-santa-lucia .nav-menu-list a::after {
    transition: none;
  }
}
