/* Navigation Styles */
#site-header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  padding: 12px 0 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: var(--foreground);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.16), rgba(255, 159, 64, 0.1));
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

@media (max-width: 480px) {
  .brand-title {
    max-width: 140px;
  }
}

@media (max-width: 370px) {
  .brand-title {
    max-width: 110px;
  }
}

.brand-sub {
  font-size: 11px;
  color: var(--muted-foreground);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

@media (min-width: 375px) {
  .brand-sub {
    max-width: none;
  }
}

/* Desktop Navigation Links */
.nav-links {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--primary);
}

/* Mobile Toggle Button */
.nav-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--border);
  color: var(--foreground);
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

/* Ensure touches always hit the button, not the icon inside */
.nav-menu-btn * {
  pointer-events: none;
}

/* Mobile Overlay Menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding-top: calc(80px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden !important;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.nav-menu-item-text {
  flex: 1;
  word-break: break-word;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 20px;
  text-decoration: none;
  color: #0d1117;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.nav-menu-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.02);
  color: var(--primary);
}

.nav-menu-item-text {
  font-size: 18px;
  font-weight: 600;
  color: inherit;
}

.nav-menu-icon {
  color: var(--primary);
}

.nav-menu-item-primary {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  margin-top: 16px;
}

.nav-menu-item-primary .nav-menu-icon {
  color: #fff;
}

.nav-bottom-info {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.nav-socials {
  display: flex;
  gap: 12px;
}

.nav-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-social-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nav-contact-text {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* Responsive Logic */
@media (min-width: 992px) {
  #site-header {
      top: 0;
      padding: 15px 0;
  }
  
  .nav-wrap {
      padding: 12px 24px;
  }

  .nav-links {
    display: flex;
  }
  
  .nav-menu-btn {
    display: none;
  }

  .nav-overlay {
    display: none;
  }
}
