/* ===== Hamburger category menu — kokodezh.ir brand site =====
   Replaces the sticky category toolbar (nav.css, retired 2026-10-25):
   a small fixed ☰ button in the page corner opens a slide-in drawer
   with the site categories. Loaded after style.css / content.css.
   (Kept in its own file: style.css is served with immutable cache.) */

/* --- the floating hamburger button --- */
.kmenu-btn {
  position: fixed;
  top: 76px; /* header is sticky and ~64px tall: sit just under it */
  inset-inline-start: 12px;
  z-index: 60;
  width: 46px;
  height: 46px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(3, 8, 24, .45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kmenu-line {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--yellow);
  transition: background .18s ease;
}
.kmenu-btn:hover .kmenu-line,
.kmenu-btn:focus-visible .kmenu-line,
.kmenu-btn:active .kmenu-line { background: var(--orange); }
.kmenu-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* --- backdrop --- */
.kmenu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(3, 8, 24, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.kmenu-backdrop.open { opacity: 1; pointer-events: auto; }

/* --- slide-in drawer (from the inline-start side: right in RTL) --- */
.kmenu-drawer {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 100;
  width: 280px;
  max-width: 84vw;
  height: 100%;
  height: 100dvh;
  background: var(--card);
  box-shadow: -14px 0 34px rgba(3, 8, 24, .5);
  transform: translateX(110%);
  visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.kmenu-drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .3s ease;
}

.kmenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px 12px 20px;
  border-bottom: 1px solid var(--line);
}
.kmenu-title {
  font-family: "FarMorvarid", "Vazirmatn", sans-serif;
  font-size: 1.35rem;
  line-height: 1.8;
  color: var(--yellow);
  padding-inline-start: 10px;
}
.kmenu-close {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kmenu-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: background .18s ease;
}
.kmenu-close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.kmenu-close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.kmenu-close:hover span,
.kmenu-close:focus-visible span { background: var(--orange); }
.kmenu-close:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.kmenu-list { display: flex; flex-direction: column; padding: 8px 0 18px; }
.kmenu-list a {
  display: flex;
  align-items: center;
  min-height: 54px; /* generous tap targets */
  padding: 10px 22px;
  font-family: "FarMorvarid", "Vazirmatn", sans-serif;
  font-size: 1.18rem;
  line-height: 1.8;
  color: var(--ink);
  border-bottom: 1px solid rgba(244, 247, 255, .07);
  transition: background .15s ease, color .15s ease;
}
.kmenu-list a:last-child { border-bottom: 0; }
.kmenu-list a:hover,
.kmenu-list a:focus-visible,
.kmenu-list a:active {
  background: rgba(255, 115, 0, .14);
  color: var(--yellow);
}

/* body scroll lock while the drawer is open */
body.kmenu-lock { overflow: hidden; }

/* Anchored sections must clear the sticky header (~64px) */
section[id] { scroll-margin-top: 84px; }

/* «ارتباط با ما» category label above the info-section heading
   (carried over from nav.css so the approved heading keeps its style) */
.cat-label {
  font-family: "FarMorvarid", "Vazirmatn", sans-serif;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--purple-dark);
  text-align: center;
  margin-bottom: 2px;
}
