/* === CLEAN HEADER FIX === */
/* This file fixes the header issues by providing clean, simple styles */

/* Reset and hide problematic elements */
.mobile-menu-btn:not(:first-of-type),
.hamburger:not(.mobile-menu-btn),
.menu-toggle:not(.mobile-menu-btn),
.nav-toggle:not(.mobile-menu-btn) {
  display: none !important;
}

/* Remove any top margin/padding from body and html */
html, body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Hide any elements that might be causing scroll beneath header */
#main_header_row + *:not(.mobile-menu),
.mobile-menu:not(.active) {
  display: none !important;
}

/* Main header container */
#main_header_row {
  background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 50%, #ab47bc 100%) !important;
  box-shadow: 0 2px 8px rgba(106,27,154,0.3) !important;
  border-bottom: 2px solid #4a148c !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 999999 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 50px !important;
  overflow: hidden !important;
}

/* Container for proper alignment */
#main_header_row .container {
  padding: 0 15px !important;
  margin: 0 auto !important;
  max-width: 1200px !important;
}

/* Desktop styles (901px and above) */
@media (min-width: 901px) {
  #main_header_row {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 50%, #ab47bc 100%) !important;
    padding: 0 !important;
    box-shadow: 0 2px 20px rgba(106, 27, 154, 0.2) !important;
    border-bottom: 3px solid #4a148c !important;
    height: 50px !important;
  }
  
  .main-header-flex {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 50px !important;
    padding: 0 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }
  
  .header-logo {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  
  .header-logo img, 
  .header-logo .custom-logo {
    max-height: 35px !important;
    width: auto !important;
    height: auto !important;
    filter: brightness(0) invert(1) !important;
  }
  
  .header-logo h1 a {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin: 0 !important;
  }
  
  .desktop-menu {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  
  .desktop-menu .main-nav {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    height: 100% !important;
  }
  
  .desktop-menu .main-nav > li {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    position: relative !important;
  }
  
  .desktop-menu .main-nav > li > a {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0 15px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    transition: all 0.3s ease !important;
  }
  
  .desktop-menu .main-nav > li > a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
  }
  
  .desktop-menu .main-nav > li:hover > a {
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  /* Hide mobile menu button on desktop */
  .mobile-menu-btn {
    display: none !important;
  }
  
  /* Hide mobile menu on desktop */
  .mobile-menu {
    display: none !important;
  }
  
  /* Departments dropdown */
  .departments-dropdown {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin-left: 20px !important;
  }
  
  .departments-dropdown select {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
  }
  
  .departments-dropdown select option {
    background: #6a1b9a !important;
    color: #ffffff !important;
  }
}

/* Mobile styles (900px and below) */
@media (max-width: 900px) {
  #main_header_row {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 50%, #ab47bc 100%) !important;
    padding: 0 !important;
    box-shadow: 0 2px 15px rgba(106, 27, 154, 0.3) !important;
    border-bottom: 2px solid #4a148c !important;
    height: 50px !important;
  }
  
  .main-header-flex {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 50px !important;
    padding: 0 15px !important;
    width: 100% !important;
  }
  
  .header-logo {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  
  .header-logo img, 
  .header-logo .custom-logo {
    max-height: 30px !important;
    width: auto !important;
    height: auto !important;
    filter: brightness(0) invert(1) !important;
  }
  
  .header-logo h1 a {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin: 0 !important;
  }
  
  /* Mobile menu button */
  .mobile-menu-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 30px !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .mobile-menu-btn span {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    background: #ffffff !important;
    margin: 2px 0 !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
  }
  
  /* Hide desktop menu on mobile */
  .desktop-menu {
    display: none !important;
  }
  
  /* Mobile menu */
  .mobile-menu {
    position: fixed !important;
    top: 50px !important;
    left: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%) !important;
    box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3) !important;
    z-index: 999998 !important;
    transform: translateY(-100%) !important;
    transition: transform 0.3s ease !important;
    max-height: calc(100vh - 50px) !important;
    overflow-y: auto !important;
  }
  
  .mobile-menu.active {
    transform: translateY(0) !important;
  }
  
  .mobile-menu .main-nav {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .mobile-menu .main-nav > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .mobile-menu .main-nav > li > a {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    display: block !important;
    transition: background 0.3s ease !important;
  }
  
  .mobile-menu .main-nav > li > a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  .mobile-menu .main-nav > li > a.submenu-open {
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  .mobile-menu .main-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(74, 20, 140, 0.8) !important;
    display: none !important;
  }
  
  .mobile-menu .main-nav ul.show {
    display: block !important;
  }
  
  .mobile-menu .main-nav ul li a {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 30px !important;
    font-size: 14px !important;
    display: block !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }
  
  .mobile-menu .main-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
  }
  
  /* Departments dropdown in mobile menu */
  .mobile-menu .departments-dropdown {
    padding: 15px 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .mobile-menu .departments-dropdown select {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 12px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
  }
  
  .mobile-menu .departments-dropdown select option {
    background: #6a1b9a !important;
    color: #ffffff !important;
  }
  
  /* Body padding for fixed header */
  body {
    padding-top: 50px !important;
  }
}

/* Animation for dropdown */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
