:root {
    --primary-color: #2a5bd7;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-gray: #e9ecef;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.topics-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
}

h1 i {
    margin-right: 15px;
    font-size: 32px;
}

.topics-menu {
    list-style: none;
    padding: 0;
}

.main-topic {
    margin-bottom: 15px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.main-topic:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.topic-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-header:hover {
    background-color: #e9ecef;
}

.topic-number {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.topic-header a {
    flex-grow: 1;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.topic-header a i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 20px;
    width: 25px;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--dark-gray);
}

.main-topic.active .toggle-icon {
    transform: rotate(180deg);
}

.sub-topics {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.main-topic.active .sub-topics {
    max-height: 5000px;
}

.sub-main-topic {
    border-bottom: 1px solid var(--light-gray);
}

.sub-main-topic:last-child {
    border-bottom: none;
}

.sub-topic-header {
    display: flex;
    align-items: center;
    padding: 15px 20px 15px 50px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-topic-header:hover {
    background-color: #f0f0f0;
}

.sub-topic-number {
    background-color: var(--dark-gray);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.sub-topic-header a {
    flex-grow: 1;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

.sub-sub-topics {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sub-main-topic.active .sub-sub-topics {
    max-height: 5000px;
}

.sub-topic {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 80px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.sub-topic:last-child {
    border-bottom: none;
}

.sub-topic:hover {
    background-color: #f8f9fa;
}

.sub-sub-topic-number {
    color: var(--dark-gray);
    font-size: 12px;
    font-weight: bold;
    margin-right: 15px;
    min-width: 40px;
}

.sub-topic a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    flex-grow: 1;
}

.sub-topic a:hover {
    color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    color: var(--dark-gray);
    font-size: 14px;
    border-top: 1px solid var(--light-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .topics-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .topic-header {
        padding: 15px;
    }
    
    .topic-header a {
        font-size: 16px;
    }
    
    .sub-topic-header {
        padding: 12px 15px 12px 40px;
    }
    
    .sub-topic {
        padding: 10px 15px 10px 60px;
    }
    
    .topic-number {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    .sub-topic-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
}