/**
 * Mobile Header Fix CSS
 * Ensures mobile header only shows logo and pancake menu
 */

/* Hide desktop navigation items on mobile screens */
@media (max-width: 1199px) {
  /* Hide the more-option section on mobile */
  .header-area .more-option.mobile-item {
    display: none !important;
  }
  
  /* Ensure mobile responsive nav is visible */
  .header-area .main-responsive-nav {
    display: block !important;
  }
  
  /* Hide main navbar on mobile */
  .header-area .main-navbar {
    display: none !important;
  }
  
  /* Ensure mobile menu wrapper has proper styling */
  .mobile-menu-wrapper {
    padding: 20px 0;
  }
  
  /* Style mobile menu items */
  .mobile-menu .nav-link {
    padding: 12px 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    display: block;
    text-decoration: none;
  }
  
  .mobile-menu .nav-link:hover {
    background-color: #f8f9fa;
    color:#0c1800;
  }
  
  /* Style mobile dropdown menus */
  .mobile-menu .dropdown-menu {
    position: static;
    float: none;
    width: auto;
    margin-top: 0;
    background-color: #f8f9fa;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding-left: 20px;
  }
  
  .mobile-menu .dropdown-item {
    padding: 8px 20px;
    color: #666;
  }
  
  .mobile-menu .dropdown-item:hover {
    background-color: #e9ecef;
    color:#0c1800;
  }
  
  /* Ensure mobile logo has proper sizing - Natural size with reasonable constraints */
  .main-responsive-nav .logo img {
    width: auto !important;
    height: auto !important;
    max-width: 150px !important;
    max-height: 60px !important;
    object-fit: contain !important;
  }
  
  /* Style the menu toggler button */
  .menu-toggler {
    border: none;
    background:#0c1800;
    padding: 8px;
    border-radius: 4px;
  }
  
  .menu-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.25);
  }
  
  /* Ensure proper spacing in mobile header */
  .main-responsive-nav > div {
    padding: 10px 0;
  }
}

/* Additional mobile-specific styles */
@media (max-width: 767px) {
  /* Natural logo size on very small screens with constraints */
  .main-responsive-nav .logo img {
    width: auto !important;
    height: auto !important;
    max-width: 120px !important;
    max-height: 50px !important;
    object-fit: contain !important;
  }
  
  /* Adjust menu toggler for smaller screens */
  .menu-toggler {
    padding: 6px;
  }
  
  .menu-toggler span {
    width: 18px;
    height: 2px;
  }
}

/* Ensure mobile menu items are properly styled when cloned */
.mobile-menu .mobile-only-items .nav-link {
  color: #333;
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
}

.mobile-menu .mobile-only-items .nav-link:hover {
  background-color: #f8f9fa;
  color:#0c1800;
}

/* Style language selector in mobile menu */
.mobile-menu .mobile-only-items .dropdown-toggle::after {
  margin-left: 8px;
}

/* Ensure mobile menu has proper z-index */
.mobile-menu {
  z-index: 9999;
}

/* Style mobile menu backdrop */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

/* Ensure mobile menu slides in properly */
.mobile-menu-active .mobile-menu {
  left: 0;
  visibility: visible;
}

/* Hide mobile-only items on desktop (they will be cloned into mobile menu) */
.mobile-only-items {
  display: none !important;
}

/* Show mobile-only items when they are cloned into the mobile menu */
.mobile-menu .mobile-only-items {
  display: block !important;
}

/* Hamburger menu icon styles */
.menu-toggler {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10000;
}

.menu-toggler span {
  width: 25px;
  height: 3px;
  background: #ffffff;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.menu-toggler.active span:first-child {
  transform: rotate(45deg);
}

.menu-toggler.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.menu-toggler.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Simplified mobile menu positioning */
@media (max-width: 1199px) {
  /* Basic mobile menu positioning */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    transition: left 0.3s ease;
    visibility: hidden;
  }

  /* Mobile menu active state */
  .mobile-menu-active .mobile-menu {
    left: 0;
    visibility: visible;
  }

  /* Mobile menu wrapper styling */
  .mobile-menu .mobile-menu-wrapper {
    padding: 80px 20px 20px 20px;
  }

  /* Style the mobile menu items properly */
  .mobile-menu .nav-link {
    color: #333;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    display: block;
    text-decoration: none;
  }

  .mobile-menu .nav-link:hover {
    background-color: #f8f9fa;
    color:#0c1800;
  }

  /* Style mobile menu dropdowns */
  .mobile-menu .menu-dropdown {
    background-color: #f8f9fa;
    padding-left: 20px;
  }

  .mobile-menu .menu-dropdown .nav-link {
    padding: 8px 20px;
    color: #666;
  }

  .mobile-menu .menu-dropdown .nav-link:hover {
    background-color: #e9ecef;
    color:#0c1800;
  }
}
