/* ============================================
   MOBILE MENU & SIDEBAR STYLES
   ============================================ */

/* Mobile Sidebar */
.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.mobile-sidebar-overlay.active {
  opacity: 0.5;
  pointer-events: all;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 10000;
  padding: 20px 40px;
  overflow-y: auto;
}

.mobile-sidebar.active {
  left: 0;
}

/* Close button (Font Awesome X), same visual size as sandwich */
.mobile-sidebar-close {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  /* the font awesome icon is a bit too long compared to 
   * its width, so let's compress it a bit vertically: */
  transform: scaleY(0.85);
}

.mobile-sidebar-close i {
  font-size: 20px;
  color: #333;
}

/* Menu list */
.mobile-menu {
  list-style: none;
  padding: 0;
  margin: 40px 0 0 0; /* leave room for close button */
}

.mobile-menu > li {
  margin-bottom: 15px;
}

.mobile-menu > li > a {
  text-decoration: none;
  color: #333;
  font-family: Manrope, sans-serif;
  font-size: var(--site-header-menu-font-size-mobile, 18px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--site-header-menu-item-padding-vertical-mobile, 12px) var(--site-header-menu-item-padding-horizontal-mobile, 0);
}

/* Chevron (Font Awesome), right next to the menu item text */
.mobile-menu .menu-item-has-children > a .menu-chevron-icon {
  font-size: var(--site-header-dropdown-chevron-size-mobile, 16px);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.mobile-menu
  .menu-item-has-children
  > a[aria-expanded="true"]
  .menu-chevron-icon {
  transform: rotate(180deg);
}

/* Sub-menu: 20px margin-left per level, animated with max-height */
.mobile-menu .sub-menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0 0 15px 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.mobile-menu .sub-menu .sub-menu {
  margin-left: 20px;
}

.mobile-menu .menu-item-has-children[aria-expanded="true"] > .sub-menu {
  margin-top: 15px;
}

/* Sub-menu links: same appearance as top-level */
.mobile-menu .sub-menu a {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: var(--site-header-menu-font-size-mobile, 18px);
  font-weight: 700;
  padding: var(--site-header-menu-item-padding-vertical-mobile, 12px) var(--site-header-menu-item-padding-horizontal-mobile, 0);
  color: #333;
  text-decoration: none;
}

/* Mobile responsive header: breakpoint is controlled by Customizer > Site Header > Mobile breakpoint (px).
   The actual @media rule is output in header.php so the breakpoint value can be dynamic. */
