/* ====== HAMBURGER ANIMATION FIX ====== */
/* This file fixes hamburger animation issues on mobile */

/* ====== MOBILE HAMBURGER ANIMATION ====== */
@media (max-width: 768px) {
  /* Ensure hamburger container allows animation */
  .mobile-nav .hamburger {
    display: flex !important;
    flex-direction: column !important;
    cursor: pointer !important;
    gap: 4px !important;
    padding: 8px !important;
    z-index: 1001 !important;
    position: relative !important;
    width: 40px !important;
    height: 40px !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  /* Base hamburger lines */
  .mobile-nav .hamburger div {
    width: 25px !important;
    height: 3px !important;
    background: #123458 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
    margin: 0 !important;
    transform-origin: center !important;
  }
  
  /* Animation states - Override all other CSS */
  .mobile-nav .hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-nav .hamburger.active div:nth-child(2) {
    opacity: 0 !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-nav .hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
    transition: all 0.3s ease !important;
  }
  
  /* Reset states when not active */
  .mobile-nav .hamburger:not(.active) div:nth-child(1) {
    transform: none !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-nav .hamburger:not(.active) div:nth-child(2) {
    opacity: 1 !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-nav .hamburger:not(.active) div:nth-child(3) {
    transform: none !important;
    transition: all 0.3s ease !important;
  }
}

/* ====== EXTRA SMALL SCREENS ====== */
@media (max-width: 480px) {
  .mobile-nav .hamburger {
    padding: 6px !important;
    width: 35px !important;
    height: 35px !important;
  }
  
  .mobile-nav .hamburger div {
    width: 22px !important;
    height: 2px !important;
  }
}

/* ====== FORCE ANIMATION OVERRIDE ====== */
/* Override any conflicting CSS */
.mobile-nav .hamburger div {
  transition: all 0.3s ease !important;
  transform-origin: center !important;
}

/* Ensure JavaScript animations work */
.mobile-nav .hamburger div[style*="transform"] {
  transition: all 0.3s ease !important;
}

.mobile-nav .hamburger div[style*="opacity"] {
  transition: all 0.3s ease !important;
}

/* ====== DEBUGGING HELPERS ====== */
/* Temporary styles to verify animation is working */
.mobile-nav .hamburger.active {
  background: rgba(255, 0, 0, 0.1) !important; /* Light red background when active */
}

.mobile-nav .hamburger:not(.active) {
  background: rgba(0, 255, 0, 0.1) !important; /* Light green background when inactive */
}
