/* ============================================
   NAVIGATION STYLES
   Works with existing nav.html structure
   ============================================ */

/* Base navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: white;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

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

/* Logo */
.brand-link {
  display: flex;
  align-items: center;
  z-index: 10000;
  position: relative;
}

.brand-logo {
  width: 64px;
  height: 64px;
}

/* Desktop menu container */
.nav-menu-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Desktop navigation menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link-holder {
  position: relative;
}

.nav-link {
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: inline-block;
  color: inherit;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.7;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font: inherit;
  color: inherit;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-toggle:hover {
  opacity: 0.7;
}

.dropdown-toggle::after {
  content: '▾';
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Desktop dropdown menu */
@media screen and (min-width: 992px) {
  .dropdown-menu {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    width: auto !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    min-width: 200px !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    z-index: 1002 !important;
    max-height: none !important;
    overflow: visible !important;
    color: #333 !important;
  }

  .dropdown-menu.show {
    display: block !important;
  }
}

/* Desktop dropdown links */
@media screen and (min-width: 992px) {
  .dropdown-menu .nav-link {
    display: block !important;
    padding: 0.75rem 1.5rem !important;
    white-space: nowrap !important;
    background: transparent !important;
  }

  .dropdown-menu .nav-link:hover {
    background: #f5f5f5 !important;
    opacity: 1 !important;
  }
}

/* Hamburger button - hidden on desktop */
.menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
  width: 44px;
  height: 44px;
}

.w-icon-nav-menu {
  width: 24px;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w-icon-nav-menu::before {
  content: '☰';
  font-size: 24px;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.menu-button.w--open .w-icon-nav-menu::before {
  content: '✕';
  font-size: 28px;
}

/* ============================================
   MOBILE & TABLET STYLES
   ============================================ */

@media screen and (max-width: 991px) {
  /* Show hamburger */
  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Mobile menu slide-out */
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 300px !important;
    height: 100vh !important;
    background: white !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 5rem 0 2rem !important;
    box-shadow: -4px 0 12px rgba(0,0,0,0.2) !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1000 !important;
  }
  
  /* Open state */
  .nav-menu.w--open {
    transform: translateX(0) !important;
  }
  
  /* Overlay when menu is open */
  .nav-menu.w--open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 300px;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: -1;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  /* Nav items in mobile */
  .nav-menu .nav-link-holder {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .nav-menu .nav-link-holder.dropdown {
    border-bottom: none;
    overflow: visible !important;
  }

  .nav-menu .nav-link {
    display: block;
    padding: 1rem 1.5rem;
    width: 100%;
  }
  
  /* Dropdowns in mobile menu */
  .nav-menu .dropdown-toggle {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #eee !important;
    background: white !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    color: inherit !important;
    font-size: inherit !important;
    cursor: pointer !important;
  }

  /* Override conflicting webflow styles with !important */
  .nav-menu .dropdown-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-top: 1px solid #eee !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    background: #f9f9f9 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
  }

  .nav-menu .dropdown-menu.show {
    display: block !important;
    max-height: 500px !important;
  }
  
  .nav-menu .dropdown-menu .nav-link {
    display: block !important;
    padding: 0.75rem 2rem !important;
    border-bottom: 1px solid #eee !important;
    width: 100% !important;
    text-align: left !important;
    background: transparent !important;
    color: inherit !important;
  }

  .nav-menu .dropdown-menu .nav-link:last-child {
    border-bottom: none !important;
  }

  .nav-menu .dropdown-menu .nav-link:hover {
    background: #e9e9e9 !important;
  }
  
  /* Prevent body scroll when menu is open */
  body.mobile-nav-open {
    overflow: hidden;
  }
}

@media screen and (max-width: 767px) {
  /* Slightly narrower on phones */
  .nav-menu {
    width: 280px !important;
  }

  .nav-menu.w--open::before {
    right: 280px !important;
  }
}

/* ============================================
   SOCIAL BAR
   ============================================ */

.social-bar {
  border-top: 1px solid #eee;
  padding: 1rem 0;
  background: #f9f9f9;
}

.social-groups {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.social-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.social-links a:hover {
  opacity: 0.7;
}

.social-icon {
  width: 1.5rem;
  height: 1.5rem;
}

@media screen and (max-width: 767px) {
  .social-groups {
    flex-direction: column;
    gap: 1rem;
  }
  
  .social-group {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}