/**
 * Header2 Menu Styles Only
 * 
 * @package Melodica
 */

/* Main Header Layout */
.desktop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .desktop-header {
        display: none !important;
    }
}

.primary-navigation {
    flex-grow: 1;
}

.desktop-logo {
    flex-shrink: 0;
    width: 161px !important;
    height: 100px !important;
}

/* Primary Navigation Menu Styles */
.main-menu-header2 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 29px;
    list-style: none;
    margin: 0;
    padding: 0;
    direction: rtl;
    padding-right: 30px;
}

.main-menu-header2 li {
    position: relative;
}

.main-menu-header2 a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 20px 10px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Distribute items */
    gap: 8px;
    flex-direction: row-reverse;
    /* Puts icon first (right in RTL) */
}

.main-menu-header2 .menu-title {
    flex-grow: 1;
    /* Title takes up available space */
    text-align: center;
    margin-right: 14px;
}

.main-menu-header2 a:hover {
    /* color: #9800F5; */
}

/* Active Menu Item Underline */
.main-menu-header2 li>a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 0;
    /* Initial width is 0 */
    height: 3px;
    background: var(--color-purple);
    border-radius: 2px;
    transition: width 0.3s ease-in-out;
    /* Animate the width */
}

/* Show badge on hover or for the current page */
.main-menu-header2 li:hover>a::after,
.main-menu-header2 .current-menu-item>a::after,
.main-menu-header2 .current-menu-ancestor>a::after {
    width: 30px;
    /* Expand width on hover/active */
}

/* Menu Icons */
.main-menu-header2 .menu-icon svg,
.main-menu-header2 .menu-icon img {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.main-menu-header2 .menu-icon img.menu-icon-svg {
    filter: brightness(0) invert(1);
    /* Force icon to be white */
}

.main-menu-header2 a:hover .menu-icon img.menu-icon-svg {
    /* filter: invert(48%) sepia(90%) saturate(6000%) hue-rotate(260deg) brightness(95%) contrast(100%); */
    /* Changes color to purple on hover */
}


/* Submenu Arrow */
.main-menu-header2 .submenu-arrow {
    margin-left: 0;
    margin-right: 0;
    flex-shrink: 0;
    /* Prevent arrow from shrinking */
    display: flex;
    align-items: center;
    color: var(--color-white);
    transition: transform 0.3s ease;
    transform: rotate(180deg);
    /* Point left in RTL */
}

.main-menu-header2 li:hover>a .submenu-arrow {
    transform: rotate(270deg);
    /* Point down on hover */
}

/* Submenu Styles */
.main-menu-header2 .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(17, 17, 17, 1);
    /* Darker background */
    border: 2px solid var(--color-purple);
    /* Purple border */
    border-radius: 12px;
    box-shadow: 0 10px 40px var(--overlay-purple-245-20);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 15px;
    direction: rtl;
    list-style: none;
    /* Remove bullet points */
    margin: 0;
    /* Reset default margin */
}

.main-menu-header2 li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.main-menu-header2 .sub-menu li {
    margin: 0;
    width: 100%;
    list-style: none;
}

.main-menu-header2 .sub-menu a {
    color: var(--color-white);
    /* White text */
    padding: 12px 15px;
    font-size: 15px;
    width: 100%;
    justify-content: flex-start;
}

.main-menu-header2 .sub-menu a:hover {
    color: var(--color-white);
    background: var(--overlay-purple-25);
    border-radius: 8px;
}

.main-menu-header2 .sub-menu .current-menu-item>a::after {
    display: none;
    /* No underline for active submenu items */
}

/* Mobile Menu Styles */
@media (max-width: 1023px) {
    .primary-navigation {
        display: none;
    }
}

.header-border-line2 {
    position: absolute;
    top: 180px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-color-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: -1;
    direction: rtl;
}

@media (max-width: 768px) {
    .header-border-line2 {
        top: 135px !important;
        background-color: #DCE1F42B !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        width: 100% !important;
    }
}