/* Hermes Mobile/Tablet Drawer */
.hms-md{display:none}
@media (max-width:1399px){
  .hms-md{display:block}
  html.hms-md-open{overflow:hidden}
  .hms-md__overlay{
    position:fixed; inset:0;
    background:rgba(16,24,40,.55);
    z-index:9998;
    opacity:0; pointer-events:none;
    transition:opacity .18s ease;
  }
  .hms-md__panel{
    position:fixed;
    top:0; bottom:0;
    right:0;
    width:min(86vw, 420px);
    background:#fff;
    z-index:10031; 
    transform:translateX(100%);
    transition:transform .22s ease;
    padding:18px 18px 24px;
    overflow:auto;
  }
  html.hms-theme-night .hms-md__panel{background:#0b1220;color:#fff}
  .hms-md.is-open .hms-md__overlay{opacity:1; pointer-events:auto}
  .hms-md.is-open .hms-md__panel{transform:translateX(0)}
  .hms-md__close{
    position:absolute; top:12px; left:12px;
    width:44px;height:44px;
    border-radius:14px;
    border:0;
    background:transparent;
    font-size:34px;
    line-height:44px;
    cursor:pointer;
    color:#1f2a44;
  }
  html.hms-theme-night .hms-md__close{color:#fff}
  .hms-md__top{padding-top:18px}
  .hms-md__logo{display:flex; justify-content:center; margin:30px 0 16px}
  .hms-md__logo img{max-height:38px; width:auto}
  .hms-md__site-name{font-size:22px;font-weight:800}
  .hms-md__search{
    position:relative;
    display:flex;
    align-items:center;
    background:#f3f5f7;
    border-radius:18px;
    padding:12px 14px;
    gap:10px;
    margin:0 0 18px;
  }
  html.hms-theme-night .hms-md__search{background:#121a2b}
  .hms-md__search input{
    border:0; outline:none; background:transparent;
    width:100%;
    font-size:13px;
    color:#1f2a44;
  }
  html.hms-theme-night .hms-md__search input{color:#fff}
  .hms-md__search-ico{opacity:.7}
  .hms-md__theme{
  width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 14px 1px;
        background: transparent;
        border: 0;
        cursor: pointer;
        gap: 10px;
        font-size: 16px;
        font-weight: 700;
        color: #1f2a44;
        flex-direction: row-reverse;
  }
  html.hms-theme-night .hms-md__theme{color:#fff}
  
  .hms-md__theme-ico{
    width:44px;height:44px;border-radius:999px;
    display:flex;align-items:center;justify-content:center;
    background:#f0f2f4;
    color:#1f2a44;
  }
  /* === Mobile drawer: place desktop-style badges on top of the icon bubble === */
.hms-md__top-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.hms-md__theme--link{
  text-decoration:none;
  width:100%;
}

/* enable absolute positioning for badges inside icon bubble */
.hms-md__theme-ico{
  position:relative;
}

/* reuse desktop notif badge styles, but correct its position for mobile icon bubble */
.hms-md .hms-md__theme-ico .hermes-notif-badge--corner{
  inset-inline-end:-6px;
  inset-block-start:-6px;
}

/* cart badge: reuse bootstrap colors (same as desktop) but place it on icon bubble */
.hms-md__cart-badge{
  position:absolute;
  inset-inline-end:-6px;
  inset-block-start:-6px;
  border-radius:999px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  line-height:1;
}

  html.hms-theme-night .hms-md__theme-ico{background:#121a2b;color:#fff}
  .hms-md__divider{height:1px;background:rgba(31,42,68,.12); margin:14px 0 18px}
  html.hms-theme-night .hms-md__divider{background:rgba(255,255,255,.12)}
  .hms-md__list{list-style:none;margin:0;padding:0}
  .hms-md__item{margin:0;padding:0}
  .hms-md__link{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 6px;
    text-decoration:none;
    color:#1f2a44;
    font-size:1rem;
    font-weight:500;
  }
  html.hms-theme-night .hms-md__link{color:#fff}
  .hms-md__text{flex:1}
  .hms-md__caret{opacity:.7;font-size:18px}
  .hms-md__ico{
    width:44px;height:44px;border-radius:999px;
    display:flex;align-items:center;justify-content:center;
    background:#eef2ff;
    flex:0 0 44px;
  }
  html.hms-theme-night .hms-md__ico{background:#121a2b}
  .hms-md__ico--dot{background:#e9eefb}
  html.hms-theme-night .hms-md__ico--dot{background:#121a2b}
  .hms-md__ico--img img{width:22px;height:22px;object-fit:contain}
  .hms-md__ico--svg svg{width:22px;height:22px}
  .hms-md__sub{
    list-style:none;
    margin:0;
    padding:0 0 0 0;
    display:none;
    border-top:1px solid rgba(31,42,68,.08);
  }
  html.hms-theme-night .hms-md__sub{border-top-color:rgba(255,255,255,.10)}
  li.is-open > .hms-md__sub{display:block}
  .hms-md__sub .hms-md__link{
    font-size:18px;
    font-weight:700;
    padding:14px 6px 14px 44px;
    color:#fff;

  }
  .hms-md__sub .hms-md__ico{display:none}
  /* Ensure Courses main icon is visible on top-level in drawer */
.hm-mega-menu--mobile > a.hms-md__link .hms-md__ico{display:flex}

    /* Mega menu rows inside mobile drawer (Courses) */
  .hms-md__sub a.hms-md__link--mega{
    padding:12px 6px;           /* بدون indent اضافی */
    font-size:18px;
    font-weight:700;
    color:#fff;

  }
  
  .hms-md__sub a.hms-md__link--mega .hms-md__ico{
    display:flex;               /* آیکن‌ها دوباره نمایش داده شوند */
  }
 /* Courses rows (mega) text colors must follow drawer theme */
.hms-md__sub a.hms-md__link--mega .hms-md__title{
  font-weight:800;
  font-size:18px;
  line-height:1.2;
  color: rgba(15,23,42,.92); /* day: dark text */
}

.hms-md__sub a.hms-md__link--mega .hms-md__desc{
font-size: 13px;
        font-weight: 500;
        opacity: .72;
        display: flex;
        line-height: 1.5;             /* avoid double-dimming */
        color: #363cc1;
}

/* night mode overrides */
html.hms-theme-night .hms-md__sub a.hms-md__link--mega .hms-md__title{
  color: rgba(255,255,255,.92);
}

html.hms-theme-night .hms-md__sub a.hms-md__link--mega .hms-md__desc{
  color: rgba(255,255,255,.68);
}

  .hms-md__sub a.hms-md__link--mega .hms-md__desc{
    font-size:13px;
    font-weight:500;
    opacity:.72;
    line-height:1.5;
  }

}
/* Ensure mega menu overlays page content */
.hm-mega-menu{
  position: relative; /* anchor for absolute panel */
}

.hm-mega-panel{
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  z-index: 20000; /* higher than content */
}
/* Mobile drawer menu skeleton (shown before AJAX menu HTML is loaded) */
.hms-md__skeleton{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:10px 4px 4px;
}

.hms-md__sk-row{
  height:46px;
  border-radius:14px;
  background: rgba(15,23,42,.08);
  overflow:hidden;
  position:relative;
}

html.hms-theme-night .hms-md__sk-row{
  background: rgba(255,255,255,.10);
}

.hms-md__sk-row:before{
  content:"";
  position:absolute;
  inset:0;
  transform: translateX(-60%);
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.35) 50%,
    rgba(255,255,255,0) 100%);
  animation: hmsSk 1.2s infinite;
}

html.hms-theme-night .hms-md__sk-row:before{
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.20) 50%,
    rgba(255,255,255,0) 100%);
}

@keyframes hmsSk{
  0%{ transform: translateX(-60%); }
  100%{ transform: translateX(120%); }
}

