/* ============================================
   SHARED STYLES
   Navbar and Footer styles for all pages
   ============================================ */

/* Enhanced Navigation - Shared (dark) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 17, 21, 0.6);
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem 0;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  border-bottom-color: var(--border-subtle);
  padding: 0.5rem 0;
}

/* Light mode navbar */
[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.75);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

/* Light mode navbar for pages other than home - ensure light background */
[data-theme="light"] body:not(.page-home) .navbar {
  background: rgba(248, 250, 252, 0.75);
}

[data-theme="light"] body:not(.page-home) .navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-link {
  color: var(--text-secondary);
}

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

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo-img {
  height: 45px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.nav-link.active {
  color: white;
}

/* For pages without hero (navbar should be dark from start) */
body:not(.page-home) .navbar:not(.scrolled) .nav-link {
  color: white;
}

body:not(.page-home) .navbar:not(.scrolled) .nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

body:not(.page-home) .navbar:not(.scrolled) .nav-link.active {
  color: white;
}

/* Light mode for pages without hero */
[data-theme="light"] body:not(.page-home) .navbar:not(.scrolled):not(.on-hero) {
  background: rgba(248, 250, 252, 0.95);
}

[data-theme="light"] body:not(.page-home) .navbar:not(.scrolled) .nav-link {
  color: rgba(0, 0, 0, 0.9);
}

[data-theme="light"] body:not(.page-home) .navbar:not(.scrolled) .nav-link:hover {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] body:not(.page-home) .navbar:not(.scrolled) .nav-link.active {
  color: var(--text-primary);
}

/* Navbar on-hero for pages with page-hero (about, products, blog) */
body:not(.page-home) .navbar.on-hero {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body:not(.page-home) .navbar.on-hero .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

body:not(.page-home) .navbar.on-hero .nav-link:hover {
  color: white;
}

body:not(.page-home) .navbar.on-hero .nav-link.active {
  color: white;
}

body:not(.page-home) .navbar.on-hero .theme-toggle {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

body:not(.page-home) .navbar.on-hero .nav-toggle span {
  background: rgba(255, 255, 255, 0.9);
}

/* Light mode - navbar on-hero for pages with page-hero */
[data-theme="light"] body:not(.page-home) .navbar.on-hero {
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero .nav-link {
  color: rgba(0, 0, 0, 0.9);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero .nav-link:hover {
  color: var(--text-primary);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero .nav-link.active {
  color: var(--text-primary);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero .theme-toggle {
  color: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero .nav-toggle span {
  background: rgba(0, 0, 0, 0.9);
}

/* Navbar on-hero scrolled for pages with page-hero */
body:not(.page-home) .navbar.on-hero.scrolled {
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  border-bottom-color: var(--border-subtle);
}

body:not(.page-home) .navbar.on-hero.scrolled .nav-link {
  color: var(--text-secondary);
}

body:not(.page-home) .navbar.on-hero.scrolled .nav-link:hover,
body:not(.page-home) .navbar.on-hero.scrolled .nav-link.active {
  color: var(--accent-blue);
}

/* Light mode - navbar on-hero scrolled for pages with page-hero */
[data-theme="light"] body:not(.page-home) .navbar.on-hero.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero.scrolled .nav-link {
  color: var(--text-secondary);
}

[data-theme="light"] body:not(.page-home) .navbar.on-hero.scrolled .nav-link:hover,
[data-theme="light"] body:not(.page-home) .navbar.on-hero.scrolled .nav-link.active {
  color: var(--accent-blue);
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
  font-size: 1.1rem;
}

/* Hide mobile toggle on desktop */
.theme-toggle-mobile-wrapper {
  display: none;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-blue);
  transform: scale(1.1);
}

.theme-toggle i {
  transition: transform 0.3s ease;
}

.theme-toggle:hover i {
  transform: rotate(15deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Footer Enhanced - Shared (dark) */
.footer-enhanced {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-dark) 100%);
  color: var(--text-primary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

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

.footer-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  max-width: 200px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  transition: color 0.3s ease;
}

[data-theme="light"] .footer-tagline {
  color: rgba(0, 0, 0, 0.7);
}

.footer-section-title {
  font-size: 0.875rem;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.contact-item i {
  color: var(--accent-blue);
  margin-top: 0.25rem;
  min-width: 20px;
}

.contact-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
  font-family: var(--font-mono);
}

.contact-item a:hover {
  color: white;
}

.contact-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono);
}

[data-theme="light"] .contact-item a {
  color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .contact-item a:hover {
  color: var(--text-primary);
}

[data-theme="light"] .contact-item p {
  color: rgba(0, 0, 0, 0.8);
}

.map-container {
  width: 100%;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-version {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
}

[data-theme="light"] .footer-bottom {
  border-top-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .footer-version {
  color: rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .theme-toggle {
    display: none; /* Hide theme toggle from navbar on mobile */
  }
  
  /* Show mobile toggle in mobile menu */
  .theme-toggle-mobile-wrapper {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: left 0.3s ease;
    z-index: 999;
    gap: 1rem;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li {
    width: 100%;
  }
  
  .nav-links .nav-link {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
  }
  
  .nav-links .theme-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin: 0 auto;
  }
  
  .nav-links .theme-toggle-mobile:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
  }
  
  .nav-links .theme-toggle-mobile i {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
  }
  
  .nav-links .theme-toggle-mobile:hover i {
    transform: rotate(15deg);
  }
  
  [data-theme="light"] .nav-links .theme-toggle-mobile {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-primary);
  }
  
  [data-theme="light"] .nav-links .theme-toggle-mobile:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .footer-content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
