﻿:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f97316;
    --bg-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #03a9f4;
    --hover-bg: #f1f5f9;
}

.tree-container {
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);    
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tree-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tree-view {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tree-item {
    margin: 0;
}

.tree-item-content {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    user-select: none;
    gap: 8px;
}

    /*.tree-item-content:hover {
        background-color: var(--hover-bg);
        color: var(--primary-color);
    }
*/
.tree-toggle {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

    .tree-toggle.collapsed {
        transform: rotate(-90deg);
    }
/*
.tree-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.tree-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}*/

.tree-children {
    list-style: none;
    margin: 4px 0 0 20px;
    border-left: 2px dotted var(--border-color);
    padding-left: 30px;
    transition: max-height 0.3s ease;
}

    .tree-children.hidden {
        max-height: 0;
        overflow: hidden;
    }

.tree-item.has-children > .tree-item-content .tree-toggle {
    visibility: visible;
}

.tree-item:not(.has-children) > .tree-item-content .tree-toggle {
    visibility: hidden;
}

/* Color variations for different item types */
.tree-item.course > .tree-item-content .tree-icon {
    color: var(--primary-color);
}

.tree-item.module > .tree-item-content .tree-icon {
    color: var(--secondary-color);
}

.tree-item.lesson > .tree-item-content .tree-icon {
    color: var(--accent-color);
}

.tree-item.topic > .tree-item-content .tree-icon {
    color: #8b5cf6;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;    
}

@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr;
    }
}
