/* ==========================================================================
   SudoGrep CSS Design System — Navigation (Header & Footer)
   ========================================================================== */

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  height: 70px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.logo-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
}

/* Mobile Toggle */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 120;
}

.mobile-menu-btn span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Header CTA Positioning */
.btn-cta-header {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* Header Dark Overrides (when scrolling over a dark section or specific pages) */
.header-dark {
  background-color: rgba(9, 9, 9, 0.8);
  border-bottom-color: var(--border-dark);
  color: var(--text-white);
}

.header-dark .logo {
  color: var(--text-white);
}

.header-dark .nav-link {
  color: var(--text-light);
}

.header-dark .nav-link:hover {
  color: var(--text-white);
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 5rem 0 2.5rem;
  border-top: 1px solid var(--border-dark);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .logo {
  color: var(--text-white);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 250px;
}

.footer-column h4 {
  color: var(--text-white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-column ul a {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: color 0.2s ease;
}

.footer-column ul a:hover {
  color: var(--text-white);
}

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: var(--text-light);
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: var(--text-white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  .nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    padding: 0;
    gap: 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .nav.active {
    height: calc(100vh - 70px);
    padding: 2rem 0;
    gap: 1.5rem;
  }
  
  .nav-link {
    font-size: 1.15rem;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }
  
  .nav-link.active::after {
    display: none;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
