﻿




/* *{margin:0;padding:0;box-sizing:border-box}
  body{direction:rtl;font-family:sans-serif} */
/* هدر */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

/* همبرگر */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

    .hamburger span {
        width: 24px;
        height: 3px;
        background: #333;
        border-radius: 2px;
    }

/* ناوبری */
.main-nav {
    display: flex;
    align-items: center;
    width: 100%;
}

/* منو */
.menu {
    list-style: none;
    display: flex;
    gap: 24px;
    margin-left: auto;
}

    .menu li {
        position: relative
    }

        .menu li a {
            text-decoration: none;
            color: #000000;
            border-bottom: 1px solid #cfcfcf26;
            font-size: 14px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 0;
            cursor: pointer;
        }

/* فلش */
.arrow-down {
    width: 6px;
    height: 6px;
    border-right: 2px solid #bbbbbb;
    border-bottom: 2px solid #bbbbbb;
    transform: rotate(45deg);
}

.arrow-right {
    width: 7px;
    height: 7px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(-45deg);
}

/* دکمه‌های سمت چپ */
.auth-actions {
    display: flex;
    gap: 10px;
    margin-right: auto;
}

.btn {
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

.outline {
    border: 1px solid #06060629;
    color: #007bff
}

.primary {
    background: #007bff;
    color: #fff;
    border: 1px solid #007bff
}

/* مگا منو (پیش‌فرض بسته) */
.mega-menu {
    /* display:none; */
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: #191970;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3 ease;
}


/* وقتی کلاس open روی li باشد → باز شود */
.has-mega.open .mega-menu {
    display: grid;
    /* grid-template-columns:repeat(3,1fr); */
    grid-template-columns: repeat(1,1fr);
    gap: 20px;
}


.mega-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.mega-column a {
    display: block;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    padding: 3px 0;
}

/* زیرمنو */
.submenu {
    margin-top: 10px;
}

.submenu-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* زیرمنو پیش‌فرض بسته */
.submenu-panel {
    display: none;
    margin-top: 6px;
    padding-right: 10px;
    border-right: 1px solid #eee;
    background-color: #66828d5c;
}

/* وقتی open شود */
.submenu.open .submenu-panel {
    display: block;
}

@media(min-width:993px) {
    .has-mega:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}
/* موبایل */
@media(max-width:992px) {

    .hamburger {
        display: flex;
        margin-left: 10px
    }

    .main-nav {
        position: absolute;
        top: 73px;
        right: 0;
        width: 280px;
        height: calc(100vh - 72px);
        background: #191970;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 10px;
        transform: translateX(100%);
        transition: .25s;
        box-shadow: -4px 0 20px rgba(0,0,0,.12);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

        .main-nav.open {
            transform: translateX(0)
        }

    .menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin: 0;
    }

        .menu li {
            width: 100%;
            border-bottom: 1px solid #eee;
        }

            .menu li a {
                width: 100%;
                padding: 12px 0;
                justify-content: space-between;
                color: white;
            }

    .has-mega.open .mega-menu {
        display: block;
    }
    /* مگا منو در موبایل هم کلیکی است */
    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 10px 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
  
        .has-mega.open .mega-menu {
            display: block !important;
            opacity: 1 !important;
            visibility: visible !important;
            transform: none !important;
        }
 

}
.has-mega.open .mega-menu {
    display: block !important;
}

.submenu.open .submenu-panel {
    display: block !important;
}

.has-mega.open .mega-menu {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}




