/* Mega Menu Enhanced Styles */
.megamenu-wrapper {
    position: relative;
}

.megamenu {
    background: #ffffff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 25px;
    margin-top: 0;
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

/* Hover Effect */
.dropdown:hover .megamenu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Grid Layout */
.megamenu-area {
    margin: 0 -15px;
}

.megamenu-area .row {
    display: flex;
    flex-wrap: wrap;
}

/* Brand Sections */
.megamenu-section {
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.megamenu-section:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Brand Title */
.megamenu-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef2f7;
}

[lang="ar"] .megamenu-title {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

[lang="en"] .megamenu-title {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
}

/* Brand Logo */
.megamenu-title img.photo_menu {
    width: 35px !important;
    height: 35px !important;
    object-fit: contain;
    margin-inline-end: 10px;
    border-radius: 8px;
    padding: 3px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.megamenu-title:hover img.photo_menu {
    transform: scale(1.1);
}

.megamenu-title a {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    width: 100%;
}

[lang="ar"] .megamenu-title a {
    justify-content: flex-start;
}

.megamenu-title a:hover {
    color: #3498db;
}



/* List Style for Dropdown Items */
.megamenu .dropdown-item::after {
    content: '→';
    position: absolute;
    right: 10px;
    opacity: 0.6;
    font-size: 14px;
    transition: transform 0.3s ease;
}

[lang="ar"] .megamenu .dropdown-item::after {
    content: '←';
    right: auto;
    left: 10px;
}

.megamenu .dropdown-item:hover::after {
    opacity: 1;
    transform: translateX(5px);
}

[lang="ar"] .megamenu .dropdown-item:hover::after {
    transform: translateX(-5px);
}
/* Models List */
.megamenu .dropdown-item {
    padding: 8px 15px;
    margin: 2px 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #505f6f;
    display: block;
    position: relative;
    overflow: hidden;
}

[lang="ar"] .megamenu .dropdown-item {
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    text-align: right;
    padding-right: 25px;
}

[lang="en"] .megamenu .dropdown-item {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-align: left;
    padding-left: 25px;
}

.megamenu .dropdown-item:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #3498db;
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: all 0.3s ease;
}

[lang="ar"] .megamenu .dropdown-item:before {
    left: auto;
    right: 10px;
}

.megamenu .dropdown-item:hover {
    background: #eef2f7;
    color: #3498db;
    padding-left: 30px;
}

[lang="ar"] .megamenu .dropdown-item:hover {
    padding-right: 30px;
    padding-left: 15px;
}

.megamenu .dropdown-item:hover:before {
    transform: translateY(-50%) scale(1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .megamenu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 15px 0;
        background: transparent;
    }

    .megamenu-section {
        padding: 10px;
        margin-bottom: 10px;
        background: #f8f9fa;
    }

    .megamenu-title {
        margin-bottom: 10px;
    }

    .megamenu-title img.photo_menu {
        width: 30px !important;
        height: 30px !important;
    }

    [lang="ar"] .megamenu .dropdown-item,
    [lang="en"] .megamenu .dropdown-item {
        padding: 8px 12px;
    }

    .dropdown:hover .megamenu {
        transform: none;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.megamenu-section {
    animation: fadeInUp 0.4s ease forwards;
}

/* Stagger animation for sections */
.megamenu-section:nth-child(2) { animation-delay: 0.1s; }
.megamenu-section:nth-child(3) { animation-delay: 0.2s; }
.megamenu-section:nth-child(4) { animation-delay: 0.3s; }
.megamenu-section:nth-child(5) { animation-delay: 0.4s; }
.megamenu-section:nth-child(6) { animation-delay: 0.5s; }