

@media (min-width: 721px) {
    .sidebar {
        display: none; /* Hide sidebar on screens wider than 720px */
    }

    .sidebar-navbar {
      display: none; /* Hide sidebar on screens wider than 720px */
  }
}

@media (max-width: 720px) {

  .sidebar-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f4f4f4;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  /* Logo Styles */
  .sidebar-navbar .sidebar-logo img {
    height: 40px;
    width: auto;
  }
  

  .sidebar-navbar .sidebar-logo img {
    height: 35px;
  }
    
  .sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }
    
    
    .navbar-links{
       display: none; /* Hide the navbar when the screen width is 720px or less */
      }
    
    .toggle-btn {
      position: fixed;
      top: 25px;
      right: 20px;
      cursor: pointer;
      z-index: 9999;
    }
    
    
    
/* Default Hamburger Icon Style */
/* Default Hamburger Icon Style */
.toggle-btn span {
    display: block;
    width: 30px;
    height: 5px;
    background-color: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease; /* Smooth transition for opening/closing */
}

/* Close Icon Transformation */
.toggle-btn.close span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px); /* First bar becomes part of X */
}

.toggle-btn.close span:nth-child(2) {
    opacity: 0; /* Hide the middle bar */
}

.toggle-btn.close span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px); /* Third bar becomes part of X */
}

    
    .sidebar {
      /* background-color: #f4f4f4; */
      background-color: white;
      width: 350px;
      position: fixed;
      top: 0;
      right: -550px;
      height: 100%;
      overflow-y: auto;
      transition: all 0.3s ease;
      z-index: 999;
      padding-top: 30px;
      margin-top: 20px;
    }
    
    .sidebar.show {
      right: 0;
    }
    
    .sidebar-nav {
      padding: 20px;
      list-style: none;
    
    }
    
    .sidebar-nav li {
      margin-bottom: 10px;
    }
    
    .sidebar-nav a {
      text-decoration: none;
      color: #333;
      font-size: 16px;
      display: block;
      padding: 10px;
      transition: background-color 0.3s ease;
      border-radius: 20px;
      width: 250px;
    }
    
    .sidebar-nav a:hover {
      /* background-color: #ddd; */
      background-color: #bd0202;
      color: white; 
      font-weight: 700;
      border-radius: 20px;
    
    
    }
    
    .sidebar-dropdown-menu{
      display: none;
      padding-left: 20px;
      list-style: none;
    }
    
    .sidebar-sub-menu {
      padding-left: 20px;
      display: none;
      list-style: none;
    }
    
    .has-submenu:hover .sidebarsub-menu {
      display: block;
    }
    
    .show {
      display: block;
    }
    
    .arrow {
      display: inline-block;
      width: 0;
      height: 0;
      border: 4px solid transparent;
      border-top-color: #555; /* Change color as needed */
      margin-left: 5px; /* Adjust spacing as needed */
      transition: transform 0.3s ease; /* Added for animation */
    }
    
    .up {
      transform: rotate(180deg); /* Rotate arrow for "up" position */
    }
    
    
      }











/* iOS-Specific Media Query */
@media screen and (max-device-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
  .sidebar {
      width: 100%; /* Adjust the sidebar width for small iOS devices */
  }
  .toggle-btn {
      right: 10px; /* Adjust toggle button position */
  }
  .sidebar-nav a {
      font-size: 18px; /* Increase font size for better touch interaction */
      padding: 15px; /* Add more padding for easier taps */
  }
}

/* Further Touch Optimizations */
.sidebar-nav a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* Remove highlight on touch */
  touch-action: manipulation; /* Prevent default touch actions like double-tap zoom */
}