.navbar { display: flex; height: 100%; padding: 0; } .menu-list { display: flex; align-items: center; } .menu-list a { display: block; padding: 10px; text-decoration: none; color: #000; } .navbar-list { display: flex; align-items: center; flex-direction: row; /* Ensure items are aligned in a row */ flex-wrap: nowrap; height: 100%; justify-content: flex-start; overflow-x: auto; /* Horizontal scrolling */ scroll-behavior: smooth; transition: 0.3s; } /* Hide scrollbar for Chrome, Safari and Opera */ .navbar-list::-webkit-scrollbar { display: none; } /* Hide scrollbar for IE, Edge and Firefox */ .navbar-list { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ } .navbar-list ul { display: flex; flex-direction: row; /* Ensure items are aligned in a row */ flex-wrap: nowrap; padding: 0; margin: 0; } .navbar-list li { display: flex; /* Ensure each item is a flexbox */ align-items: center; list-style: none; margin: 0; padding: 0; position: relative; /* Required for positioning submenus */ } .navbar-list li a { display: flex; align-items: center; padding: 8px 12px; text-decoration: none; color: #000; white-space: nowrap; transition: color 0.3s, background-color 0.3s; line-height: 1.3; font-size: 17px; vertical-align: middle; /* transform: translateY(4%); */ } .menu-list a, .navbar-list li a { padding-top: 12px !important; } .navbar-list li a:after { content: ''; position: absolute; right: 0; top: 50%; height: 10px; width: 2px; background-color: #d71921; transform: translateY(-50%); } .navbar-list li:last-child a:after { content: none; } .navbar-list li a:hover { color: #fff; background-color: #21497b; /* Change this color as needed */ } .navbar-list li.current-menu-item > a, .navbar-list li.current-post-ancestor > a, .navbar-list li.current-menu-parent > a, .navbar-list li.current-page-ancestor > a, .navbar-list li.current_page_item > a { color: #d71921 !important; font-weight: 600; } /* Submenu styles */ .navbar-list li ul { display: none; /* Hide submenus by default */ position: absolute; top: 100%; /* Position submenu below the parent item */ left: 0; background-color: #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.2); z-index: 1; } .navbar-list li:hover > ul, .navbar-list li:focus-within > ul { display: block; /* Show submenu on hover and focus */ } .navbar-list li ul li { display: block; /* Ensure submenu items are displayed in a column */ } .navbar-list li ul li a { padding: 10px 15px; color: #000; background-color: #fff; white-space: nowrap; } .navbar-list li ul li a:hover { color: #fff; background-color: #0077b5; /* Change this color as needed */ } /* Floating Drawer Menu */ .drawer-menu { height: 100%; width: 0; position: fixed; z-index: 1000; top: 0; left: 0; background-color: #fff; overflow-x: hidden; transition: 0.5s; box-shadow: 2px 0 5px rgba(0,0,0,0.5); } .drawer-menu-content { position: relative; width: 250px; /* Adjust the width as needed */ padding: 30px 15px; } .close-btn { position: absolute; top: 15px; right: 25px; font-size: 36px; cursor: pointer; } /* Drawer menu styles */ .drawer-menu ul { list-style: none; padding: 0; margin: 0; } .drawer-menu li { padding: 6px 0; } .drawer-menu li a { text-decoration: none; color: #000; display: block; padding: 5px 10px; transition: color 0.3s, background-color 0.3s; } .drawer-menu li a { padding-top: 10px !important; } .drawer-menu li a:hover { color: #fff; background-color: #21497b; /* Change this color as needed */ } /* Submenu styles for drawer menu */ .drawer-menu li ul { display: none; /* Hide submenus by default */ position: relative; background-color: #f9f9f9; box-shadow: none; padding-left: 20px; } .drawer-menu li:hover > ul, .drawer-menu li:focus-within > ul { display: block; /* Show submenu on hover and focus */ } .drawer-menu li ul li { display: block; /* Ensure submenu items are displayed in a column */ } .drawer-menu li ul li a { padding: 5px 10px; color: #000; background-color: #f9f9f9; white-space: nowrap; } .drawer-menu li ul li a:hover { color: #fff; background-color: #0077b5; } .drawer-menu li.menu-item-has-children > a { position: relative; padding-right: 25px; } .drawer-menu li.menu-item-has-children > a::after { content: '▼'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 0.8em; cursor: pointer; }