/*
 * Mobile navigation fixes (LACTO)
 * Hamburger button styling + mobile overlay via JS.
 */

/* ---------- Hamburger / close button ---------- */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 65px;
  width: 65px;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1002;
  cursor: pointer;
  text-decoration: none;
}
.menu-toggle .inner { display: none; }
.menu-toggle .icon-bars,
.menu-toggle .icon-close {
  font-size: 28px;
  color: #333;
  line-height: 1;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle.active .icon-bars { display: none; }
.menu-toggle.active .icon-close { display: block; }

/* ---------- Mobile: overlay menu with slide animation ---------- */
@media (max-width: 1023.98px) {
  .site-nav {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1001 !important;
    background: rgba(0,0,0,.5) !important;
    float: none !important;
    overflow: hidden !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s;
  }
  .site-nav > ul {
    display: flex !important;
    flex-direction: column !important;
    width: 75% !important;
    max-width: 300px !important;
    height: 100% !important;
    padding: 65px 0 0 !important;
    margin: 0 0 0 auto !important;
    float: right !important;
    background: #fff !important;
    border: none !important;
    box-shadow: -2px 0 8px rgba(0,0,0,.15) !important;
    align-items: stretch !important;
    list-style: none !important;
    overflow-y: auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
    position: relative !important;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }
  .site-header.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .site-header.nav-open .site-nav > ul {
    transform: translateX(0);
  }
  .site-nav li {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }
  .site-nav li a {
    display: block !important;
    padding: 14px 20px !important;
    color: #333 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    height: auto !important;
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .site-nav li a:hover {
    background: #f0f0f0 !important;
  }
  /* Hide header hamburger when menu open - use inner close button instead */
  .site-header.nav-open .menu-toggle {
    display: none !important;
  }
  /* Inner close button - fixed at top-right of drawer, looks like header X */
  li.nav-close {
    display: none !important;
  }
  .site-header.nav-open li.nav-close {
    display: flex !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 65px !important;
    height: 65px !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2 !important;
  }
  .site-header.nav-open li.nav-close a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 28px !important;
    color: #333 !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1 !important;
  }
  /* Hide PC language dropdown on mobile - use li.mobile-lang instead */
  .lang-switcher {
    display: none !important;
  }
}

/* ---------- Desktop: hide hamburger and nav close ---------- */
@media (min-width: 1024px) {
  .menu-toggle { display: none !important; }
  li.nav-close { display: none !important; }
}
