/* Mobile Navigation Fix */

/* Hamburger Menu Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  /* Show hamburger button on mobile */
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Hide desktop nav links by default */
  nav > div > div:last-child {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    gap: 20px !important;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
  }
  
  .light nav > div > div:last-child {
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  /* Show menu when active */
  nav > div > div:last-child.mobile-menu-open {
    right: 0;
  }
  
  /* Style mobile nav links */
  nav > div > div:last-child a {
    width: 100%;
    padding: 12px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    display: block;
  }
  
  .light nav > div > div:last-child a {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  
  /* Theme toggle button in mobile menu */
  nav > div > div:last-child button {
    width: 100%;
    justify-content: flex-start;
    margin-top: 20px;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
  }
  
  /* Overlay for mobile menu */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    pointer-events: auto;
  }
  
  .mobile-menu-overlay.active {
    display: block;
    pointer-events: auto;
  }
}

/* Improved Text Contrast */
nav a {
  color: var(--text-primary) !important;
  opacity: 0.9;
}

nav a:hover,
nav a.active {
  color: var(--accent-primary) !important;
  opacity: 1;
}

.light nav a {
  color: var(--text-primary) !important;
}

/* Chatbot Text Visibility Fix */
.chatbot-header {
  background: var(--gradient-accent);
  color: #000 !important;
  font-weight: 700;
  font-size: 16px;
}

.chatbot-header * {
  color: #000 !important;
}

.chatbot-close {
  color: #000 !important;
  opacity: 0.8;
}

.chatbot-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

.chatbot-message {
  color: var(--text-primary);
  line-height: 1.6;
}

.chatbot-message.bot {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.chatbot-message.user {
  background: var(--gradient-accent);
  color: #000;
}

.chatbot-option {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.chatbot-option:hover {
  color: #000;
  background: var(--accent-primary);
}

.light .chatbot-message.bot {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.light .chatbot-option {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

/* Ensure all text is readable */
body {
  color: var(--text-primary);
}

p, li, span {
  color: var(--text-secondary);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}
