/* ====== HAMBURGER X FIX ====== */
/* This file ensures the X animation works correctly */

/* ====== MOBILE HAMBURGER X ANIMATION ====== */
@media (max-width: 768px) {
  /* Force hamburger container to allow 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 - ensure they're visible */
  .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;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* X ANIMATION - When hamburger is active */
  .mobile-nav .hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
    transition: all 0.3s ease !important;
    background: #123458 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .mobile-nav .hamburger.active div:nth-child(2) {
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    visibility: hidden !important;
  }
  
  .mobile-nav .hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
    transition: all 0.3s ease !important;
    background: #123458 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* HAMBURGER STATE - When not active */
  .mobile-nav .hamburger:not(.active) div:nth-child(1) {
    transform: none !important;
    transition: all 0.3s ease !important;
    background: #123458 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .mobile-nav .hamburger:not(.active) div:nth-child(2) {
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    background: #123458 !important;
    visibility: visible !important;
  }
  
  .mobile-nav .hamburger:not(.active) div:nth-child(3) {
    transform: none !important;
    transition: all 0.3s ease !important;
    background: #123458 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Force override any conflicting styles */
  .mobile-nav .hamburger div[style*="transform"] {
    transition: all 0.3s ease !important;
    transform-origin: center !important;
  }
  
  .mobile-nav .hamburger div[style*="opacity"] {
    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;
  }
}

/* ====== DEBUGGING HELPERS ====== */
/* Visual indicators to verify animation is working */
.mobile-nav .hamburger.active {
  background: rgba(255, 0, 0, 0.2) !important; /* Red background when X */
  border: 2px solid #FF0000 !important; /* Red border when X */
}

.mobile-nav .hamburger:not(.active) {
  background: rgba(0, 255, 0, 0.2) !important; /* Green background when hamburger */
  border: 2px solid #00FF00 !important; /* Green border when hamburger */
}

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

/* Ensure the X is visible when active */
.mobile-nav .hamburger.active div:nth-child(1),
.mobile-nav .hamburger.active div:nth-child(3) {
  background: #123458 !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}
