﻿/* Desktop Menu Styles */
#menublock-normal {
  background-color: #333; /* Example background, adjust as needed */
  padding: 0 10px;
 width: 100%;
  box-sizing: border-box;
}

#menu-bar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* Arrange items horizontally */
  justify-content: center; /* Center menu items, adjust as needed */
  flex-wrap: wrap; /* Allow items to wrap on smaller desktop screens if necessary */
}

#menu-bar > li {
  position: relative; /* For sub-menu positioning */
  margin-left: 1px; /* Spacing between top-level items */
}

#menu-bar > li > a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #fff; /* Default color, will be overridden by inline styles */
  white-space: nowrap; /* Prevent text wrapping for main menu items */
}

#menu-bar > li:hover > a {
  background-color: #555; /* Hover effect for top-level items */
}

/* Sub-menu Styles (Desktop) */
#menu-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%; /* Position below the parent item */
  right: 0; /* Align to the right of the parent for RTL */
  background-color: #444;
  min-width: 200px; /* Minimum width for dropdown */
  display: none; /* Hidden by default */
  z-index: 1000;
  border-top: 1px solid #555;
}

#menu-bar li:hover > ul {
  display: block; /* Show sub-menu on hover */
}

#menu-bar ul li {
  position: relative; /* For potential nested sub-menus, though not in current HTML */
}

#menu-bar ul li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #eee;
  white-space: nowrap;
}

#menu-bar ul li a:hover {
  background-color: #666;
}

/* Hamburger Menu Icon (Hidden on Desktop) */
.menu-toggle {
  display: none; /* Hidden by default */
  background-color: #333;
  color: #fff;
  padding: 10px 15px;
  cursor: pointer;
  text-align: left; /* Align hamburger to the left for RTL, or right if you prefer */
  font-size: 24px; /* Size of hamburger icon */
  border: none;
  outline: none;
}
.menu-toggle:focus {
  outline: 1px dashed #fff; /* Accessibility */
}


/* Mobile Responsive Styles */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
  .menu-toggle {
    display: block; /* Show hamburger icon */
    position: fixed; /* Keep it visible on scroll */
    top: 10px;
    left: 10px; /* Position to the left for RTL */
    z-index: 1001; /* Above the menu */
    background-color: #c5242b; /* Match gallery button or choose another */
    border-radius: 5px;
  }

  #menublock-normal {
    padding-top: 0; /* Remove padding if hamburger is outside */
  }

  #menu-bar {
    display: none; /* Hide horizontal menu */
    flex-direction: column; /* Stack items vertically */
    position: fixed; /* Take up full screen or part of it */
    top: 0;
    right: -280px; /* Start off-screen (for RTL slide-in from right) */
    width: 280px; /* Width of the mobile menu */
    height: 100vh; /* Full height */
    background-color: #2c2c2c;
    overflow-y: auto; /* Allow scrolling if menu is long */
    padding-top: 60px; /* Space for close button or header */
    transition: right 0.3s ease-in-out; /* Smooth slide-in animation */
    z-index: 1000;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5); /* Shadow for RTL */
  }

  #menu-bar.menu-open {
    display: flex; /* Show the menu */
    right: 0; /* Slide in to view */
  }

  #menu-bar > li {
    margin-left: 0;
    width: 100%;
  }

  #menu-bar > li > a {
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    text-align: right; /* Ensure text is right-aligned */
  }

  /* Sub-menu Styles (Mobile) */
  #menu-bar ul {
    position: static; /* No absolute positioning */
    display: block; /* Always visible or toggleable with JS */
    background-color: #3a3a3a; /* Slightly different bg for sub-menu */
    min-width: 100%;
    border-top: none;
  }

  #menu-bar ul li a {
    padding: 10px 20px 10px 30px; /* Indent sub-menu items */
    color: #ccc;
    border-bottom: 1px dotted #555;
  }
  #menu-bar ul li:last-child a {
    border-bottom: none;
  }

  /* Hide sub-menus by default on mobile, toggle with click/JS if needed */
  /* For this version, they are shown expanded.
     To make them toggleable, you'd add more JS and classes */
  /*
  #menu-bar ul {
      display: none;
  }
  #menu-bar li.submenu-open > ul {
      display: block;
  }
  */
}
@media (max-width: 480px) {
  .menu-toggle {
    top: 5px;
    left: 5px;
    font-size: 20px;
    padding: 8px 12px;
  }
  #menu-bar {
    width: 100%; /* Full width on very small screens */
    right: -100%;
  }
  #menu-bar.menu-open {
    right: 0;
  }
}
