/* Header Styles */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
  max-width: 100%;
}

.logo-img {
  width: 40px;
  height: 40px;
  color: var(--primary);
  transition: color 0.3s ease;
}

.logo:hover .logo-img {
  color: var(--primary-blue);
}

.mobile-brand {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
  -webkit-tap-highlight-color: transparent;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

/* Footer Styles */
.footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 3rem 6vw 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1600px;
  margin: 0 auto 2rem;
}

.footer-section h4 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-section p {
  hyphens: none;
  word-break: keep-all;
}

.footer-copy {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  color: #64748b;
  font-size: 0.9rem;
}

/* Mobile Header/Footer */
@media (max-width: 968px) {
  body {
    padding-top: 70px;
  }
  
  .topbar {
    padding: 0.75rem 1rem;
    min-height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  .mobile-brand {
    display: block;
  }
  
  .logo-img {
    width: 32px;
    height: 32px;
  }
  
  .mobile-menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }
  
  .nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    gap: 0;
    align-items: stretch;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav a {
    padding: 1.25rem 1rem;
    width: 100%;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: rgba(255, 122, 24, 0.1);
  }
  
  .nav a:last-child {
    border-bottom: none;
  }
  
  .nav a:active {
    background: rgba(255, 122, 24, 0.05);
  }
  
  .nav a::after {
    display: none;
  }
  
  .footer {
    padding: 2rem 1rem 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-copy {
    font-size: 0.85rem;
    padding-top: 1.5rem;
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 60px;
  }
  
  .topbar {
    padding: 0.5rem 0.75rem;
    min-height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  .logo-img {
    width: 28px;
    height: 28px;
  }
  
  .mobile-brand {
    font-size: 0.8rem;
  }
  
  .mobile-menu-toggle {
    padding: 8px;
  }
  
  .mobile-menu-toggle span {
    width: 22px;
    height: 2.5px;
  }
  
  .nav {
    top: 60px;
    padding: 1.5rem 1rem;
  }
  
  .nav a {
    padding: 1rem 0.75rem;
    font-size: 1rem;
  }
  
  .footer {
    padding: 1.5rem 0.75rem 1rem;
  }
  
  .footer-content {
    gap: 1.5rem;
  }
  
  .footer-section h4 {
    font-size: 1rem;
  }
  
  .footer-section li {
    font-size: 0.9rem;
  }
  
  .footer-copy {
    font-size: 0.8rem;
    padding-top: 1rem;
  }
}