/* Custom CSS for Mobile Responsive Header */

/* Mobile Header Styles */
@media (max-width: 991.98px) {
  /* Hide desktop navigation */
  .header-links {
    display: none;
  }
  
  /* Show mobile menu button */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
  }
  
  .mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #212B36;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
  }
  
  /* Mobile menu toggle animation */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* Mobile navigation overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile navigation menu */
  .mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #ffffff;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-nav-menu.active {
    right: 0;
  }
  
  /* Mobile navigation header */
  .mobile-nav-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-nav-logo img {
    height: 32px;
  }
  
  .mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  
  .mobile-nav-close svg {
    width: 24px;
    height: 24px;
  }
  
  /* Mobile navigation links */
  .mobile-nav-links {
    padding: 20px 0;
  }
  
  .mobile-nav-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-nav-links li {
    border-bottom: 1px solid #f1f5f9;
  }
  
  .mobile-nav-links li:last-child {
    border-bottom: none;
  }
  
  .mobile-nav-links a {
    display: block;
    padding: 16px 20px;
    color: #212B36;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
  }
  
  .mobile-nav-links a:hover {
    background-color: #f8fafc;
    color: #0018FF;
  }
  
  /* Mobile dropdown */
  .mobile-dropdown {
    background-color: #f8fafc;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .mobile-dropdown.active {
    max-height: 500px;
  }
  
  .mobile-dropdown a {
    padding: 12px 40px;
    font-size: 14px;
    color: #64748b;
  }
  
  .mobile-dropdown a:hover {
    background-color: #e2e8f0;
    color: #0018FF;
  }
  
  /* Mobile dropdown toggle */
  .mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-dropdown-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
  }
  
  .mobile-dropdown-toggle.active svg {
    transform: rotate(180deg);
  }
  
  /* Mobile action buttons */
  .mobile-nav-actions {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
  }
  
  .mobile-nav-actions .btn {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 20px;
    font-weight: 500;
  }
  
  .mobile-nav-actions .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Header layout adjustments */
  .header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  
  .header-actions {
    display: none;
  }
  
  /* Topbar adjustments for mobile */
  .topbar-text p {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .topbar-text a {
    font-size: 14px;
  }
  .mob-nav .mobile-menu-toggle {
    display: none;
  }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991.98px) {
  .mobile-nav-menu {
    width: 60%;
    max-width: 400px;
  }
}

/* Small mobile styles */
@media (max-width: 575.98px) {
  .mobile-nav-menu {
    width: 90%;
    max-width: 280px;
  }
  
  .mobile-nav-header {
    padding: 16px;
  }
  
  .mobile-nav-links a {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .mobile-nav-actions {
    padding: 16px;
  }
  
  .mobile-nav-actions .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Desktop styles - ensure desktop navigation is visible */
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .mobile-nav-overlay {
    display: none;
  }
  
  .mobile-nav-menu {
    display: none;
  }
  
  .header-links {
    display: block;
  }
  
  .header-actions {
    display: block;
  }
}

/* Additional responsive adjustments */
@media (max-width: 1199.98px) {
  .header-links ul {
    gap: 20px;
  }
  
  .header-links a {
    font-size: 15px;
  }
}

/* Smooth transitions for all interactive elements */
.header-links a,
.mobile-nav-links a,
.btn {
  transition: all 0.2s ease;
}

/* Focus states for accessibility */
.mobile-menu-toggle:focus,
.mobile-nav-close:focus,
.mobile-nav-links a:focus {
  outline: 2px solid #0018FF;
  outline-offset: 2px;
}

/* Ensure proper z-index stacking */
#header_main {
  position: relative;
  z-index: 100;
}

.mobile-nav-overlay {
  z-index: 999;
}

.mobile-nav-menu {
  z-index: 1000;
}

.mobile-menu-toggle {
  z-index: 1001;
}
