/* Custom Sidebar Styling */
.custom-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.custom-sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-logo img {
    height: 40px;
}

.close-sidebar-btn {
    background: #f8f9fa;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-sidebar-btn:active {
    transform: scale(0.9);
    background: #e9ecef;
}

.sidebar-content {
    padding: 20px 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav>li {
    border-bottom: 1px solid #f8f9fa;
}

.parent-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.2s;
}

.parent-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.has-submenu.open>.parent-link i {
    transform: rotate(180deg);
}

.has-submenu.open>.parent-link {
    color: #1E59FF;
    background: rgba(30, 89, 255, 0.05);
}

/* Submenu Styles */
.submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.has-submenu.open .submenu {
    max-height: 2000px;
    /* Large enough to fit content */
}

.submenu-item {
    border-bottom: 1px solid #f0f0f0;
}

.submenu-header {
    display: flex;
    align-items: center;
    padding: 12px 25px 12px 40px;
}

.feature-title-side {
    flex-grow: 1;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.desc-toggle {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1E59FF;
    transition: all 0.3s ease;
}

.submenu-item.open .desc-toggle {
    transform: rotate(90deg);
    background: #1E59FF;
    color: #ffffff;
}

.feature-desc {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0 25px 0 40px;
    background: #fafafa;
}

.submenu-item.open .feature-desc {
    max-height: 200px;
    padding: 10px 25px 15px 40px;
}

.feature-desc a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

/* Sidebar Footer Extras */
.sidebar-footer {
    padding: 25px;
    margin-top: auto;
    background: #f8f9fa;
}

.sidebar-contact {
    margin-bottom: 20px;
}

.sidebar-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.sidebar-contact img {
    width: 20px;
}

.sidebar-social {
    display: flex;
    gap: 15px;
}

.sidebar-social a {
    color: #1E59FF;
    font-size: 20px;
}

/* Fix for standard nav links in sidebar */
.sidebar-nav>li>a:not(.parent-link) {
    display: block;
    padding: 15px 25px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav>li>a:active {
    background: rgba(0, 0, 0, 0.05);
}

/* Active Page Highlighting */


.submenu-item.active-page .feature-desc {
    background: rgba(30, 89, 255, 0.1) !important;
    color: #1E59FF !important;
    border-left: 4px solid #1E59FF;
}

.submenu-item.active-page {
    background: rgba(30, 89, 255, 0.05);
}

.parent-link.active-page {
    background: rgba(30, 89, 255, 0.1) !important;
    color: #1E59FF !important;
}