/* Fast Mega Menu - lightweight, responsive, no external libs */
.fmm-wrap{
  --fmm-blue:#1f6fff;
  --fmm-orange:#ff7a18;
  --fmm-text:#0b1220;
  --fmm-muted:rgba(11,18,32,.70);
  --fmm-card:rgba(255,255,255,.92);
  --fmm-stroke:rgba(11,18,32,.10);
  --fmm-shadow:0 12px 34px rgba(11,18,32,.14);
  --fmm-shadow2:0 6px 18px rgba(11,18,32,.10);

  font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  direction: rtl;
}

/* ===== Dropdown trigger ===== */
.fmm-dropdown{
  position: relative;
  display: inline-block;
}

/* Hover bridge: prevents accidental close while moving cursor from trigger to panel */
.fmm-dropdown::after{
  content:"";
  position:absolute;
  left:0; right:0;
  top:100%;
  height:14px;
}

.fmm-trigger{
  appearance:none;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 10px 14px;
  display:inline-flex;
  align-items:center;
  gap: 10px;
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  color: rgba(11,18,32,.85);
  box-shadow: var(--fmm-shadow2);
}
.fmm-trigger:active{ transform: translateY(1px); }
.fmm-trigger__chev{
  color: rgba(11,18,32,.55);
  transition: transform .15s ease;
}

.fmm-dropdown.is-open .fmm-trigger__chev{ transform: rotate(180deg); }

/* dropdown panel positioning */
.fmm-drop{
  position: absolute;
  top: calc(100% + 2px);
  width: var(--fmm-drop-width, 920px);
  max-width: min(92vw, var(--fmm-drop-width, 920px));
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 1005;
}

.fmm-dropdown[data-fmm-align="right"] .fmm-drop{ right: 0; }
.fmm-dropdown[data-fmm-align="left"] .fmm-drop{ left: 0; }
.fmm-dropdown[data-fmm-align="center"] .fmm-drop{ left: 50%; transform: translate(-50%, 8px); }

.fmm-dropdown.is-open .fmm-drop{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fmm-backdrop{
  display:none;
}

/* Mobile: drawer style */
@media (max-width: 768px){
  .fmm-drop{
    position: fixed;
    inset: auto 10px 10px 10px;
    top: 70px;
    width: auto;
    max-width: none;
    transform: translateY(10px);
  }
  .fmm-dropdown[data-fmm-align="center"] .fmm-drop{ left: 10px; transform: translateY(10px); }
  .fmm-dropdown.is-open .fmm-drop{ transform: translateY(0); }

  .fmm-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 1004;
  }
  .fmm-dropdown.is-open .fmm-backdrop{ display:block; }
}

/* ===== Shell (same as inline) ===== */
.fmm-shell{
  border-radius: 18px;
  border: 1px solid rgba(11,18,32,.06);
  background:
    radial-gradient(560px 260px at 18% 15%, rgba(31,111,255,.14), transparent 68%),
    radial-gradient(560px 260px at 85% 18%, rgba(255,122,24,.12), transparent 68%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  box-shadow: var(--fmm-shadow);
  overflow: hidden;
}

.fmm-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.fmm-title{
  font-weight: 900;
  font-size: 16px;
  color: rgba(11,18,32,.92);
}

.fmm-tabs{
  display:inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(11,18,32,.10);
  box-shadow: var(--fmm-shadow2);
}

.fmm-tab{
  appearance:none;
  border:0;
  cursor:pointer;
  border-radius: 999px;
  padding: 8px 12px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  font-size: 13px;
  color: rgba(11,18,32,.80);
  background: transparent;
  transition: transform .08s ease, background .15s ease;
}
.fmm-tab:active{ transform: translateY(1px); }
.fmm-tab[aria-selected="true"]{ color:#0b1020; }
.fmm-tab[aria-selected="true"][data-fmm-tab="telegram"]{
  background: linear-gradient(135deg, rgba(31,111,255,.98), rgba(90,167,255,.92));
}
.fmm-tab[aria-selected="true"][data-fmm-tab="instagram"]{
  background: linear-gradient(135deg, rgba(255,122,24,.98), rgba(255,66,125,.92));
}
.fmm-ico{ display:inline-grid; place-items:center; }

.fmm-panels{ padding: 0 14px 14px; }
.fmm-panel{ display:none; }
.fmm-panel.is-active{ display:block; }

.fmm-grid{
  display:grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 980px){
  .fmm-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .fmm-grid{ grid-template-columns: 1fr; }
  .fmm-top{ flex-direction: column; align-items: stretch; }
  .fmm-tabs{ width: 100%; justify-content: space-between; }
  .fmm-tab{ flex: 1 1 auto; justify-content:center; }
}

.fmm-col{
  background: rgba(255,255,255,.98);
  border: 1px solid var(--fmm-stroke);
  border-radius: 16px;
  box-shadow: var(--fmm-shadow2);
  overflow: hidden;
}

.fmm-col__head{
  width:100%;
  text-align: right;
  border:0;
  background: transparent;
  cursor: pointer;
  padding: 12px 12px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.fmm-col__title{
  font-weight: 1000;
  font-size: 15px;
  color: rgba(11,18,32,.92);
}
.fmm-col__chev{
  font-size: 16px;
  color: rgba(11,18,32,.55);
  transition: transform .15s ease;
}

.fmm-col__body{
  padding: 0 12px 12px;
}

.fmm-links{
  list-style:none;
  margin: 0;
  padding: 0;
  display:grid;
  gap: 6px;
}
.fmm-link{
  display:flex;
  align-items:center;
  gap: 8px;
  text-decoration:none;
  color: rgba(11,18,32,.82);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(11,18,32,.07);
  background: rgba(255,255,255,.98);
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.fmm-link:hover{
  background: rgba(31,111,255,.08);
  border-color: rgba(31,111,255,.18);
}
.fmm-link:active{ transform: translateY(1px); }

.fmm-link__dot{
  width: 10px;
  color: var(--fmm-orange);
  font-size: 16px;
  line-height: 1;
}
.fmm-link--single{ margin-top: 6px; }

.fmm-empty{
  color: rgba(11,18,32,.65);
  font-size: 13px;
  padding: 10px 0;
}


/* Mobile accordion behavior */
.fmm-col.is-collapsed .fmm-col__body{ display:none; }
.fmm-col.is-collapsed .fmm-col__chev{ transform: rotate(-90deg); }
@media (min-width: 561px){
  .fmm-col__head{ cursor: default; }
  .fmm-col__chev{ display:none; }
}


@media (max-width: 560px){
  /* Prevent layout jump before JS: start collapsed on mobile */
  .fmm-col__body{ display:none; }
  .fmm-col__head[aria-expanded="true"] + .fmm-col__body{ display:block; }
}

