/* Lovart-style Navigation - Modern & Clean Design */
/* Compatible with ARTeefy Maker Pop Theme */

:root {
  --nav-height: 60px;
  --nav-bg: rgba(255, 255, 255, 0.98);
  --nav-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --nav-text: #2d3436;
  --nav-text-hover: #667eea;
  --nav-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Navigation Container */
.lovart-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 100;
}

/* Navigation Menu - Desktop */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.2px;
  padding: 8px 0;
  position: relative;
  transition: var(--nav-transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Hover Effect */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 3px;
  background: var(--nav-accent);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

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

.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Active State */
.nav-item.active .nav-link {
  color: var(--nav-text-hover);
}

.nav-item.active .nav-link::after {
  transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

/* Show toggle on mobile when user is not authenticated */
body:not(.authenticated) .nav-toggle {
  display: none; /* Default hidden, JS will control */
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 4px;
}

.nav-toggle-line {
  width: 24px;
  height: 3px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: var(--nav-transition);
}

/* Hamburger Animation */
.nav-toggle.active .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Integration with existing header */
.header-inner {
  position: relative;
}

.header-inner .header-left {
  display:flex;
  align-items:center;
}

/* Insert navigation after brand section */
.lovart-nav {
  flex: 1;
  margin: 0 40px;
  max-width: 600px;
}

/* Mobile Overlay Menu */
.nav-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.nav-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}


.nav-mobile-menu {
  position: absolute;
  top: 76px;
  left: 16px;
  transform: none;
  text-align: left;
  width: 240px;
  max-width: 280px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 16px 0;
}

.nav-mobile-menu .nav-menu {
  flex-direction: column;
  gap: 8px;
  height: auto;
  padding: 0 10px;
}

.nav-mobile-menu .nav-item {
  height: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.4s ease forwards;
}

.nav-mobile-menu .nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-mobile-menu .nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-mobile-menu .nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-mobile-menu .nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-mobile-menu .nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-mobile-menu .nav-item:nth-child(6) { animation-delay: 0.35s; }

.nav-mobile-menu .nav-link {
  font-size: 18px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--nav-text);
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.nav-mobile-menu .nav-link:hover {
  background: rgba(102, 126, 234, 0.12);
  color: var(--nav-text-hover);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .lovart-nav {
    padding: 0 24px;
    margin: 0 20px;
  }

  .nav-menu {
    gap: 30px;
  }

  .nav-link {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  /* Hide desktop nav */
  .lovart-nav {
    display: none;
  }

  /* Show mobile toggle */
  .nav-toggle {
    display: block;
    position: static;
    transform: none;
    margin-right: 8px;
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .header-left {
    flex: 1;
  }

  .header-actions {
    margin-left: auto;
  }

  /* Adjust header actions for mobile */
  .header-actions {
    padding-right: 60px; /* Make room for hamburger */
  }
}

@media (max-width: 480px) {
  .nav-mobile-menu .nav-link {
    font-size: 17px;
    font-weight: 600;
    padding: 11px 14px;
  }

  .nav-mobile-menu .nav-menu {
    gap: 6px;
  }

  .nav-mobile-menu {
    width: 200px;
    padding: 14px 0;
  }
}

/* Special Styles for Sign Up / Login buttons in nav */
.nav-auth-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.nav-btn {
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: var(--nav-transition);
  border: 2px solid transparent;
}

.nav-btn-outline {
  color: var(--nav-text);
  border-color: var(--nav-text);
}

.nav-btn-outline:hover {
  color: var(--nav-text-hover);
  border-color: var(--nav-text-hover);
  transform: translateY(-2px);
}

.nav-btn-primary {
  background: var(--nav-accent);
  color: white;
  border: none;
}

.nav-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Language Selector Style */
.nav-language {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: var(--nav-transition);
}

.nav-language:hover {
  background: rgba(0, 0, 0, 0.06);
}

.nav-language span {
  font-size: 14px;
  font-weight: 600;
}

/* Integration with Maker Pop theme */
.header-inner .lovart-nav {
  border: none;
  background: transparent;
  padding: 0;
  height: auto;
}

.header-inner .nav-menu {
  height: auto;
}

.header-inner .nav-link {
  color: var(--hdr-ink);
}

.header-inner .nav-link:hover {
  color: #667eea;
}

/* Dropdown Menu (if needed) */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  margin-top: 12px;
  opacity: 0;
  visibility: hidden;
  transition: var(--nav-transition);
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  margin-top: 8px;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 20px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--nav-transition);
}

.nav-dropdown-item:hover {
  background: rgba(102, 126, 234, 0.08);
  color: var(--nav-text-hover);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Sticky navigation (optional) */
.lovart-nav.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: var(--nav-shadow);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}
