/* هدر موبایل حرفه‌ای */
.mobile-header {
    display: flex;
    justify-content: space-between; /* متن سمت چپ، دکمه سمت راست */
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    z-index: 1002;
}

/* متن برند حرفه‌ای */
.brand-text {
    font-family: 'Tahoma', sans-serif;
    font-weight: 700;
    font-size: 1.6rem; /* کمی بزرگتر */
    color: #4f46e5;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* همبرگر حرفه‌ای */
.hamburger {
    width: 36px;
    height: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center; /* وسط‌چین کردن خطوط */
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1003;
}

.hamburger span {
    display: block;
    height: 4px;
    width: 100%;
    background: linear-gradient(45deg, #ff6ec4, #7873f5, #42e695);
    border-radius: 50px; /* گرد شدن کامل */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.magic-menu {
    position: relative;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #ff6ec4, #7873f5);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.magic-menu .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.magic-menu .spark {
    position: absolute;
    width: 6px;
    height: 6px;
    background: yellow;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

/* وقتی فعال شد */
.magic-menu.active {
    transform: rotate(360deg);
}

.magic-menu.active .circle {
    transform: translate(-50%, -50%) scale(0);
}

.magic-menu.active .spark:nth-child(2) {
    transform: translate(-150%, -50%) scale(1.2);
}

.magic-menu.active .spark:nth-child(3) {
    transform: translate(150%, -50%) scale(1.2);
}

/* Overlay */
#mobile-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

#mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


/* منوی موبایل */
.modern-menu {
    position: fixed;
    top:0; right:-100%;
    width: 80%; max-width:320px; height:100%;
    background: #fff; box-shadow: -3px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001; padding:20px 15px;
    overflow-y:auto;
    border-radius:0 10px 10px 0;
}
.modern-menu.active { right:0; }

/* لینک‌ها */
.menu-list a {
    display:block; padding:12px 15px; margin:6px 0;
    background:#f3f4f6; border-radius:8px;
    color:#111827; text-decoration:none; font-weight:600;
    transition: all 0.3s ease;
}
.menu-list a:hover { background:#4f46e5; color:#fff; }

/* زیرمنو */
.submenu {
    max-height:0; 
    overflow-y:auto;
    transition: max-height 0.3s ease; 
    padding-left:10px;
}

/* حداکثر ارتفاع زیرمنو */
.has-submenu > .submenu {
    max-height: 0;
}
.has-submenu.active > .submenu {
    max-height: 400px;
}

/* آیکون زیرمنو */
.has-children > a::after {
    content:"▸"; 
    float:left; 
    margin-left:5px; 
    transition: transform 0.3s;
}
.has-children.active > a::after { 
    transform: rotate(90deg); 
}

/* دسکتاپ ناو */
.desktop-nav {
    background-color: #2c2c2c;
    border-bottom: 1px solid #444444;
    font-family: Tahoma, sans-serif;
    direction: rtl;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
