/* Warrenwood Unified Navigation Styles */

/* Reset for nav injection */
.ww-nav-wrapper * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.ww-nav-wrapper {
  font-family: 'Nunito Sans', 'Avenir', 'Helvetica Neue', sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(180deg, rgba(14, 31, 88, 1) 0%, rgba(14, 31, 88, 0.98) 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.ww-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
}

.ww-nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.ww-nav-brand:hover {
  opacity: 0.9;
}

.ww-nav-logo {
  width: 54px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ww-nav-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ww-nav-menu {
  display: flex;
  align-items: center;
}

.ww-nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.ww-nav-links a {
  font-family: 'Nunito Sans', 'Avenir', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
}

.ww-nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.ww-nav-links a:active {
  transform: translateY(0);
}

.ww-nav-links a.active {
  color: #ffffff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
}

.ww-nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 1px;
}

/* Mobile menu button */
.ww-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: #ffffff;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.ww-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ww-menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

.ww-nav-close {
  display: none;
}

/* Mobile overlay */
.ww-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99998;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.ww-nav-overlay.open {
  display: block;
}

/* Spacer to push content below fixed nav */
.ww-nav-spacer {
  height: 68px;
}

/* Focus states */
.ww-nav-wrapper a:focus-visible,
.ww-nav-wrapper button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

/* Mobile styles */
@media (max-width: 868px) {
  .ww-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  
  .ww-menu-toggle:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
  }
  
  .ww-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #0e1f58 0%, #0a1640 100%);
    flex-direction: column;
    justify-content: flex-start;
    padding: 90px 20px 40px;
    transition: right 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 100000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .ww-nav-menu.open {
    right: 0;
  }
  
  .ww-nav-links {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }
  
  .ww-nav-links li {
    width: 100%;
  }
  
  .ww-nav-links a {
    display: block;
    padding: 18px 20px;
    font-size: 17px;
    font-weight: 400;
    border-radius: 12px;
    text-transform: none;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.85);
    -webkit-tap-highlight-color: transparent;
  }
  
  .ww-nav-links a:hover,
  .ww-nav-links a:active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: none;
  }
  
  .ww-nav-links a.active::after {
    display: none;
  }
  
  .ww-nav-links a.active {
    background: rgba(52, 103, 254, 0.25);
    color: #ffffff;
    font-weight: 600;
    border-left: 3px solid rgba(255, 255, 255, 0.6);
  }
  
  .ww-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 24px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  
  .ww-nav-close:hover,
  .ww-nav-close:active {
    background: rgba(255, 255, 255, 0.15);
  }
  
  .ww-nav-close:active {
    transform: scale(0.92);
  }
  
  .ww-nav-close svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
  }
  
  /* Mobile overlay animation */
  .ww-nav-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .ww-nav-overlay.open {
    display: block;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .ww-nav-inner {
    padding: 10px 16px;
  }
  
  .ww-nav-title {
    font-size: 17px;
  }
  
  .ww-nav-logo {
    width: 42px;
    height: 32px;
  }
  
  .ww-nav-brand {
    gap: 10px;
  }
  
  .ww-nav-spacer {
    height: 56px;
  }
  
  .ww-menu-toggle {
    width: 44px;
    height: 44px;
  }
  
  .ww-menu-toggle svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .ww-nav-inner {
    padding: 8px 12px;
  }
  
  .ww-nav-brand {
    gap: 8px;
  }
  
  .ww-nav-title {
    font-size: 14px;
    letter-spacing: 0;
    max-width: 160px;
    line-height: 1.2;
  }
  
  .ww-nav-logo {
    width: 36px;
    height: 27px;
  }
  
  .ww-nav-spacer {
    height: 52px;
  }
  
  .ww-menu-toggle {
    width: 40px;
    height: 40px;
  }
  
  .ww-nav-menu {
    width: 100vw;
    padding: 80px 16px 32px;
  }
  
  .ww-nav-links a {
    padding: 16px 16px;
    font-size: 16px;
  }
  
  .ww-nav-close {
    top: 18px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  
  .ww-nav-close svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 360px) {
  .ww-nav-title {
    font-size: 13px;
    max-width: 130px;
  }
  
  .ww-nav-logo {
    width: 32px;
    height: 24px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ww-nav-wrapper *,
  .ww-nav-wrapper *::before,
  .ww-nav-wrapper *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
