﻿
.navbar_3 {
    background: #fff;
    display: flex;
    justify-content: center;
}

.nav-3 {
    width: 1200px;
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 0px;
    margin-bottom: 0px;
}

.nav-item {
    list-style: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}


.nav-icon {
    font-size: 14px;
    color: #4a4a4a;
}

.arrow {
    font-size: 11px;
    margin-right: 4px;
    transition: .3s;
}

.nav-link-3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
    padding: .6rem;
}

    .nav-link-3:hover {
        color: chocolate;
    }

.has-mega .nav-link-3 {
    display: flex;
    align-items: center;
    gap: 6px;
}


.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    display: none; /* تا قبل از کلیک مخفی است */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px 10px;
    width: min(900px, 96vw);
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,.18);
    z-index: 1000;
}

.nav-item.has-mega.open .mega-menu {
    display: grid; 
}
.mega-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    white-space: nowrap;
    transition: .15s;
}

    .mega-item i {
        font-size: 11px;
        color: orange;
    }

    .mega-item:hover {
        background: #f1f5f9;
        color: #2563eb;
    }

.mega-item-parent {
    position: relative; 
}

.sub-mega-menu {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 1000;
    min-width: 180px;
}
.mega-item-parent:hover .sub-mega-menu {
    display: flex;
}


.sub-mega-item {
    padding: 4px 6px;
    border-radius: 6px;
    text-decoration: none;
    color: #334155;
    transition: .15s;
}

    .sub-mega-item:hover {
        background: #f1f5f9;
        color: #2563eb;
    }


.has-mega.open .arrow {
    transform: rotate(180deg);
}
