/**
 * AUTOMOTO.AI - Navigation & Footer Styles
 * Shared styles for navigation and footer across all pages
 * 
 * Usage:
 * <link rel="stylesheet" href="/shared/css/nav-footer.css">
 */

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-lg);
  background: rgba(17, 19, 24, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

[data-theme="light"] .nav,
.light-theme .nav {
  background: rgba(249, 249, 255, 0.85);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-width: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo .material-symbols-rounded {
  font-size: 28px;
  font-variation-settings: 'FILL' 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link .material-symbols-rounded {
  font-size: 20px;
}

.nav-link:hover {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

/* Light theme: nav links visibility */
[data-theme="light"] .nav-link,
.light-theme .nav-link {
  color: var(--md-sys-color-on-surface-variant);
}

[data-theme="light"] .nav-link:hover,
.light-theme .nav-link:hover {
  color: var(--md-sys-color-primary);
}

/* ============================================
   Language Switcher
   ============================================ */
.lang-switcher {
  display: flex;
  gap: var(--space-xs);
  background: var(--md-sys-color-surface-container-high);
  padding: 4px;
  border-radius: var(--radius-full);
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}

.lang-btn:hover {
  color: var(--md-sys-color-on-surface);
}

.lang-btn.active {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--md-sys-color-surface-container-highest);
}

.theme-toggle .material-symbols-rounded {
  font-size: 20px;
}

/* ============================================
   Burger Menu (Mobile)
   ============================================ */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--md-sys-color-on-surface);
  border-radius: 2px;
  transition: all 0.3s;
}

.burger-btn span:nth-child(1) { margin-bottom: 6px; }
.burger-btn span:nth-child(3) { margin-top: 6px; }

.burger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.burger-btn.active span:nth-child(2) { 
  opacity: 0; 
}

.burger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--md-sys-color-surface);
  z-index: 999;
  padding: var(--space-xl);
  flex-direction: column;
  gap: var(--space-md);
  overflow-y: auto;
}

.mobile-menu.active { 
  display: flex; 
}

.mobile-menu a {
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.mobile-menu a:hover { 
  background: var(--md-sys-color-surface-container); 
}

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-3xl);
  background: var(--md-sys-color-surface);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.footer-copy a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--md-sys-color-primary);
}

/* ============================================
   Responsive Navigation
   ============================================ */
@media (max-width: 768px) {
  .burger-btn { 
    display: flex; 
  }
  
  .nav-actions .nav-link {
    display: none;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .nav {
    padding: var(--space-sm) var(--space-md);
  }
  
  .nav-logo {
    font-size: 1rem;
  }
  
  .nav-logo .material-symbols-rounded {
    font-size: 24px;
  }
  
  .lang-btn {
    padding: 4px 8px;
    font-size: 0.6875rem;
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 380px) {
  /* Hide logo text on very small screens to prevent overflow */
  .nav-logo .logo-text {
    display: none;
  }
  
  .nav-content {
    gap: var(--space-sm);
  }
}

/* ============================================
   Main Content Offset (for fixed nav)
   ============================================ */
.main-content {
  padding-top: 80px;
  position: relative;
  z-index: 1;
}

/* Active nav link */
.nav-link.active {
  color: var(--md-sys-color-primary);
}
