.sidebar {
    flex: 0 0 280px;
    background-color: var(--dark-light);
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.sidebar h3 {
    color: var(--light);
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar h3 i {
    transition: var(--transition);
}

.sidebar h3.expanded i {
    transform: rotate(180deg);
}



.sidebar-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar-nav.expanded {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav i {
    margin-right: 5px;
}

.sidebar-nav a {
    color: var(--gray);
    font-weight: 500;
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--primary);
    background-color: rgba(100, 108, 255, 0.1);
    border-left-color: var(--primary);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(100, 108, 255, 0.2), rgba(139, 92, 246, 0.2));
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Nested Menu Styles */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-toggle.active-parent {
    color: var(--primary) !important;
    background-color: rgba(100, 108, 255, 0.1) !important;
    border-left-color: var(--primary) !important;
    font-weight: 600;
}

.submenu-toggle.active-parent i:first-child {
    color: var(--primary);
}

.submenu-toggle.active-parent .submenu-icon {
    color: var(--primary);
}

.submenu-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.has-submenu.expanded .submenu-icon {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 2px solid var(--primary);
    margin-left: 10px;
}

.has-submenu.expanded .submenu {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding: 10px 20px 10px 30px !important;
    font-size: 0.9rem;
}

.submenu a i {
    font-size: 0.8rem;
    margin-right: 8px;
}

.sub-section {
    padding-left: 30px;
    font-size: 0.9rem;
}

/* Content type sections (for main content) - could also be moved to cards.css */
.content-type-section {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.content-type-section:last-child {
    border-bottom: none;
}

.section-intro {
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.rule-subsection {
    background-color: rgba(30, 30, 46, 0.3);
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
    border-left: 4px solid var(--secondary);
}

.rule-subsection h3 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-subsection h4 {
    color: var(--primary);
    margin: 20px 0 10px;
    font-size: 1.1rem;
}