/* =====================================
   DESKTOP DEFAULT (DISABLED)
===================================== */
/* Desktop default */
.mobile-menu,
.mobile-menu-overlay {
  display: none !important;
}

/* Keep mobile header rendered (for animation) */
.mobile-header {
  opacity: 0;
  pointer-events: none;
}

/* =====================================
   MOBILE ONLY
===================================== */
@media (max-width: 768px) {

  /* SHOW MOBILE ELEMENTS */
  .mobile-menu,
  .mobile-menu-overlay {
    display: block !important;
  }

  .mobile-header {
    display: flex;
    /* OK – already rendered */
    opacity: 1;
    pointer-events: auto;
  }

  .site-header {
    display: none !important;
  }

  /****************************************
      MOBILE TOP BAR
  *****************************************/
  .mobile-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 18px;

    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;

    z-index: 100;
  }

  /* White → Black icon switch */
  .mobile-header .mh-icon svg {
    stroke: #ffffff;
    transition: stroke 0.25s ease;
  }

  .mobile-header .mh-logo img {
    height: 50px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.686));
    transition: filter 0.25s ease;
  }

  /* Solid header on scroll */
  .mobile-header.scrolled {
    background: #000000;
    backdrop-filter: none;
  }

  .mobile-header.scrolled .mh-icon svg {
    stroke: #ffffff !important;
  }

  .mobile-header.scrolled .mh-logo img {
    filter: drop-shadow(0 0 6px rgb(255, 255, 255)) !important;
  }

  /* When menu is opened → icons must also be black */
  .mobile-menu.open~.mobile-header .mh-icon svg {
    stroke: #222 !important;
  }

  .mobile-menu.open~.mobile-header .mh-logo img {
    filter: none !important;
  }

  /****************************************
      ICONS
  *****************************************/
  .mh-icons {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .mh-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
  }

  .mh-icon svg {
    width: 30px;
    height: 30px;
  }

  /* ===============================
     OVERLAY
  ================================ */
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9998;
  }

  .mobile-menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  /* ===============================
     MENU CONTAINER
  ================================ */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 86%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .mobile-menu.open {
    transform: translateX(0);
  }

  /* ===============================
     CLOSE
  ================================ */
  .mh-close-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 18px;
  }

  .mh-close {
    background: none;
    border: 0;
    cursor: pointer;
  }

  .mh-close svg {
    width: 22px;
    height: 22px;
  }

  /* ===============================
     TRANSITION WRAPPER
  ================================ */
  .menu-transition-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    /* 🔥 CRITICAL for flex scroll */
    overflow: hidden;
  }

  /* ===============================
     MENU VIEWS
  ================================ */
  .menu-view {
    position: absolute;
    inset: 0;
    padding: 10px 22px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }

  .menu-view.active {
    transform: translateX(0);
  }

  .menu-view.slide-left {
    transform: translateX(-100%);
  }

  /* ===============================
     MAIN LIST
  ================================ */
  .mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 30px;
  }

  .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    cursor: pointer;
  }

  .item-text {
    font-size: 16px;
    font-weight: 500;
    color: #555;
  }

  .arrow-icon {
    width: 18px;
    height: 18px;
  }

  /* ===============================
     BOTTOM LINKS
  ================================ */
  .menu-bottom {
    margin-top: auto;
    padding: 20px 0 10px;
  }

  .bottom-item {
    display: block;
    font-size: 14px;
    color: #555;
    padding: 8px 0;
    text-decoration: none;
  }

  /* ===============================
     SUB VIEW
  ================================ */
  .sub-view {
    transform: translateX(100%);
  }

  .sub-view.show {
    transform: translateX(0);
  }

  /* ===============================
     SUB HEADER
  ================================ */
  .sub-header {
    padding: 11px 0 5px;
  }

  .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
  }

  .back-btn svg {
    width: 18px;
    height: 18px;
  }

  /* ===============================
     SUB TITLE
  ================================ */
  .sub-title {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0 20px;
  }

  /* ===============================
     SUB MENU LIST
  ================================ */
  .sub-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .sub-menu-item {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    cursor: pointer;
  }

  .menu-transition-wrapper {
    -webkit-box-flex: 1;
    flex-grow: 1;
    display: flex;
    position: relative;
    overflow-x: hidden;
    overscroll-behavior: contain;
    position: relative;
    flex: 1 1 auto;
    height: 100%;
    overflow: hidden;
  }
}