/* Mobile Navigation - Bottom Sheet Style */

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 24px;
  line-height: 1;
  color: var(--color-dark, #333);
  z-index: 1001;
  position: relative;
  transition: transform 0.2s ease;
}

.mobile-nav-toggle:hover {
  transform: scale(1.1);
}

.mobile-nav-toggle:active {
  transform: scale(0.95);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-nav-overlay.active {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Navigation Bottom Sheet */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav-wrapper {
    position: fixed !important;
    bottom: -100% !important;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    padding: 0;
    display: none !important;
    flex-direction: column;
    visibility: hidden;
  }

  .nav-wrapper.active {
    display: flex !important;
    bottom: 0 !important;
    visibility: visible;
  }


  /* Bottom Sheet Header */
  .nav-wrapper::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto 8px;
  }

  /* Navigation Links */
  .primary-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 0 20px 20px;
  }

  .primary-nav a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    color: var(--color-dark, #333);
    text-decoration: none;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-left-width: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }

  .primary-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #4a90e2, #357abd);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
  }

  .primary-nav a:hover,
  .primary-nav a:focus {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    transform: translateX(8px) translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    border-color: #357abd;
  }

  .primary-nav a:hover::before,
  .primary-nav a:focus::before {
    height: 60%;
    background: rgba(255, 255, 255, 0.3);
  }

  .primary-nav a:active {
    transform: translateX(6px) translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
  }

  /* Different styles for different links - More recognizable colors */
  .primary-nav a:nth-child(1) {
    background: linear-gradient(135deg, #fee2e2 0%, #ffffff 100%);
    border-color: #f87171;
    border-left: 4px solid #ef4444;
  }

  .primary-nav a:nth-child(1):hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left-color: #ffffff;
  }

  .primary-nav a:nth-child(2) {
    background: linear-gradient(135deg, #dcfce7 0%, #ffffff 100%);
    border-color: #4ade80;
    border-left: 4px solid #22c55e;
  }

  .primary-nav a:nth-child(2):hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-left-color: #ffffff;
  }

  .primary-nav a:nth-child(3) {
    background: linear-gradient(135deg, #fef9c3 0%, #ffffff 100%);
    border-color: #facc15;
    border-left: 4px solid #eab308;
  }

  .primary-nav a:nth-child(3):hover {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border-left-color: #ffffff;
  }

  .primary-nav a:nth-child(4) {
    background: linear-gradient(135deg, #ddd6fe 0%, #ffffff 100%);
    border-color: #a78bfa;
    border-left: 4px solid #8b5cf6;
  }

  .primary-nav a:nth-child(4):hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-left-color: #ffffff;
  }

  .primary-nav a:nth-child(5) {
    background: linear-gradient(135deg, #fce7f3 0%, #ffffff 100%);
    border-color: #f472b6;
    border-left: 4px solid #ec4899;
  }

  .primary-nav a:nth-child(5):hover {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    border-left-color: #ffffff;
  }

  .primary-nav a:nth-child(6) {
    background: linear-gradient(135deg, #e0e7ff 0%, #ffffff 100%);
    border-color: #818cf8;
    border-left: 4px solid #6366f1;
  }

  .primary-nav a:nth-child(6):hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-left-color: #ffffff;
  }

  .primary-nav a:nth-child(7) {
    background: linear-gradient(135deg, #ccfbf1 0%, #ffffff 100%);
    border-color: #5eead4;
    border-left: 4px solid #14b8a6;
  }

  .primary-nav a:nth-child(7):hover {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border-left-color: #ffffff;
  }

  /* Nav Actions */
  .nav-actions {
    margin-top: 8px;
    padding: 20px;
    border-top: 1px solid #eee;
  }

  .nav-actions .btn {
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
  }
}

/* Desktop: Keep normal navigation */
@media (min-width: 769px) {
  .mobile-nav-toggle {
    display: none !important;
  }

  .mobile-nav-overlay {
    display: none !important;
    visibility: hidden !important;
  }

  .nav-wrapper {
    position: static !important;
    bottom: auto !important;
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    max-height: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    overflow: visible !important;
  }
}
