/* Only show in mobile */
.ew-menu-wrapper {
    position: relative;
    display: block;
}

@media (min-width: 769px) {
    .ew-menu-wrapper {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .ew-menu-wrapper {
        display: block;
    }
}

.ew-menu-trigger {
    cursor: pointer;
    display: inline-block;
    padding: 10px 20px;
    user-select: none;
    font-size: 16px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

.ew-menu-trigger:hover {
    opacity: 0.8;
}

.ew-menu-trigger {
    cursor: pointer;
    display: inline-block;
    padding: 10px 20px;
    user-select: none;
    font-size: 16px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 400;
}

.ew-menu-trigger::before {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    bottom: 6px;
    height: 0;
    background: #d49c7f;
    z-index: -1;
    transition: height 0.35s ease;
}

.ew-menu-trigger.active::before {
    height: 8px;
}

.ew-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ew-menu-overlay.active {
    display: flex;
    opacity: 1;
}

.ew-menu-container {
    max-width: 500px;
    width: 100%;
    padding: 30px 20px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.ew-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ew-menu-item {
    position: relative;
    margin: 8px 0;
    display: block;
}

.ew-menu-item a {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    color: #ffffff;
    font-size: 18px;
    position: relative;
    transition: all 0.35s ease;
    font-weight: 400;
}

.ew-menu-item a::before {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    bottom: 15px;
    height: 0;
    background: #d49c7f;
    z-index: -1;
    transition: height 0.35s ease;
}

.ew-menu-item a:hover::before,
.ew-menu-item.active > a::before {
    height: 8px;
}

.ew-menu-item a:hover {
    font-weight: 700 !important;
}

.ew-menu-item.active > a {
    font-weight: 700 !important;
}

.ew-menu-item.active > a::before {
    height: 8px;
}

/* Submenu styles */
.ew-submenu-toggle {
    display: inline-block;
    cursor: pointer;
    margin-left: 4px;
    color: #ffffff;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.ew-submenu-toggle:hover {
    opacity: 0.7;
}

.ew-submenu-toggle svg{
	transform: rotate(180deg);
}

.ew-submenu-toggle.active svg {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.ew-submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.ew-submenu.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

.ew-submenu .ew-menu-item a {
    font-size: 16px !important;
	font-weight: 400;
    padding: 4px 16px;
}

.ew-submenu .ew-menu-item a::before {
    bottom: 8px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
.ew-menu-container::-webkit-scrollbar {
    width: 4px;
}

.ew-menu-container::-webkit-scrollbar-track {
    background: transparent;
}

.ew-menu-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.ew-menu-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .ew-menu-container {
        max-width: 90%;
        padding: 20px 15px;
    }
    
    .ew-menu-item a {
        font-size: 16px;
        padding: 8px 16px;
    }
    
    .ew-submenu .ew-menu-item a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ew-menu-trigger {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .ew-menu-item a {
        font-size: 14px;
        padding: 6px 8px;
    }
}