/**
 * Dream Apex Slide Menu CSS - Professional White Design with Depth (Narrower Width)
 */

/* Menu Toggle Button */
#da-menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: rgba(204, 0, 0, 0.9); /* Semi-transparent brand red */
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#da-menu-toggle:hover {
    background-color: #8D4925; /* Autumn burnt umber */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

#da-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 3px 0;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.da-menu-open #da-menu-toggle {
    background-color: transparent;
    box-shadow: none;
}

.da-menu-open #da-menu-toggle span {
    background-color: #fff;
}

.da-menu-open #da-menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.da-menu-open #da-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.da-menu-open #da-menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Menu Overlay */
#da-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 99997;
    display: none;
    backdrop-filter: blur(3px); /* Blur effect behind the menu */
}

/* Slide Menu Container - Adjusted to 250px width */
#da-slide-menu {
    position: fixed;
    top: 0;
    right: -250px; /* Changed from -400px to -250px */
    width: 250px; /* Changed from 400px to 250px */
    max-width: 90%;
    height: 100%;
    background-color: #fff;
    z-index: 99998;
    overflow-y: auto;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); /* Smooth easing */
    transform: translateX(0);
    
    /* Depth effects */
    box-shadow: 
        -5px 0 25px rgba(0, 0, 0, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.02);
}

#da-slide-menu.da-open {
    transform: translateX(-250px); /* Changed from -400px to -250px */
}

.da-slide-menu-inner {
    padding: 70px 25px 40px; /* Adjusted padding for narrower menu */
    height: 100%;
    box-sizing: border-box;
    background-color: #fff; /* Pure white background */
    border-left: 3px solid #cc0000; /* Brand red accent line */
    
    /* Subtle gradient for depth */
    background: linear-gradient(to right, #ffffff, #f9f9f9);
}

/* Close Button */
#da-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #5E5E5E;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#da-menu-close:hover {
    color: #cc0000;
    transform: rotate(90deg);
}

/* Menu Styling */
#da-slide-menu .menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

#da-slide-menu .menu-item {
    margin: 0;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06); /* Very subtle separator */
}

#da-slide-menu .menu-item:last-child {
    border-bottom: none;
}

#da-slide-menu .menu-item a {
    display: block;
    padding: 14px 0; /* Slightly reduced padding */
    color: #5E5E5E;
    text-decoration: none;
    font-size: 15px; /* Slightly smaller font */
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

#da-slide-menu .menu-item a:hover,
#da-slide-menu .current-menu-item > a {
    color: #cc0000;
    transform: translateX(5px);
}

/* Submenu Styling */
#da-slide-menu .sub-menu {
    display: none;
    margin: 0;
    padding: 0 0 0 15px; /* Reduced padding */
    list-style: none;
    background-color: rgba(0, 0, 0, 0.015); /* Very subtle background */
    border-left: 2px solid #E3A738; /* Harvest gold accent */
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02); /* Inner shadow for depth */
}

#da-slide-menu .menu-item-has-children > a {
    position: relative;
}

#da-slide-menu .da-submenu-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 25px; /* Slightly smaller */
    height: 25px; /* Slightly smaller */
    cursor: pointer;
    display: inline-block;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-align: center;
}

#da-slide-menu .da-submenu-toggle:after {
    content: '+';
    font-size: 16px; /* Slightly smaller */
    display: block;
    text-align: center;
    line-height: 25px; /* Match height */
    color: #8D4925; /* Autumn burnt umber */
    transition: all 0.3s ease;
}

#da-slide-menu .da-submenu-open > a .da-submenu-toggle {
    background-color: rgba(0, 0, 0, 0.03); /* Very light background */
}

#da-slide-menu .da-submenu-open > a .da-submenu-toggle:after {
    content: '−'; /* Using minus sign instead of hyphen */
    color: #cc0000; /* Brand red */
}

#da-slide-menu .sub-menu .menu-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03); /* Even more subtle separator */
}

#da-slide-menu .sub-menu .menu-item:last-child {
    border-bottom: none;
}

#da-slide-menu .sub-menu .menu-item a {
    padding: 10px 0; /* Reduced padding */
    font-size: 13px; /* Smaller font */
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

/* Menu section separator */
#da-slide-menu .menu:before {
    content: '';
    display: block;
    width: 30px; /* Smaller width */
    height: 3px;
    background: linear-gradient(to right, rgba(204, 0, 0, 0.7), rgba(204, 0, 0, 0));
    margin-bottom: 15px;
}

/* Body modifications when menu is open */
body.da-menu-open {
    overflow: hidden;
}

/* Animation for menu items */
#da-slide-menu .menu > li {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0.1s;
}

#da-slide-menu.da-open .menu > li {
    opacity: 1;
    transform: translateY(0);
}

/* Sequential animation for menu items */
#da-slide-menu .menu > li:nth-child(1) { transition-delay: 0.1s; }
#da-slide-menu .menu > li:nth-child(2) { transition-delay: 0.15s; }
#da-slide-menu .menu > li:nth-child(3) { transition-delay: 0.2s; }
#da-slide-menu .menu > li:nth-child(4) { transition-delay: 0.25s; }
#da-slide-menu .menu > li:nth-child(5) { transition-delay: 0.3s; }
#da-slide-menu .menu > li:nth-child(6) { transition-delay: 0.35s; }
#da-slide-menu .menu > li:nth-child(7) { transition-delay: 0.4s; }
#da-slide-menu .menu > li:nth-child(8) { transition-delay: 0.45s; }
#da-slide-menu .menu > li:nth-child(9) { transition-delay: 0.5s; }
#da-slide-menu .menu > li:nth-child(10) { transition-delay: 0.55s; }

/* Add depth to the scroll bar */
#da-slide-menu::-webkit-scrollbar {
    width: 6px; /* Narrower scrollbar */
}

#da-slide-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

#da-slide-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

#da-slide-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    #da-slide-menu {
        width: 85%;
        right: -85%;
    }
    
    #da-slide-menu.da-open {
        transform: translateX(-100%);
    }
    
    .da-slide-menu-inner {
        padding: 60px 20px 30px; /* Reduced padding */
    }
    
    #da-menu-toggle {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
}