/* Container chính */
.taxonomy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset list styles */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Parent Category - Cấp cao nhất */
.parentCate {
    margin-bottom: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary-color);
}

.parentCate:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.parentCate > span {
    display: block;
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: white;
    cursor: pointer;
    position: relative;
    font-size: 130% !important;
    font-weight: 700 !important;
}

.parentCate > span::after {
    content: '▼';
    position: absolute;
    right: 25px;
    transition: transform 0.3s ease;
}

.parentCate.open > span::after {
    transform: rotate(180deg);
}

/* Indent - Khoảng cách thụt vào */
.indent {
    padding: 15px 20px 15px 20px;
    margin-top: 0;
}

/* Hidden class */
.hidden {
    display: none;
}

/* Toggle - Phần tử có thể click */
.toggle {
    cursor: pointer;
    position: relative;
}

/* Country/Region Level - Cấp quốc gia */
.parentCate > ul > li.toggle {
    background: rgba(252, 252, 252, 1);
    margin: 0 0 10px 0;
    border-radius: 10px;
    border-left: 5px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.parentCate > ul > li.toggle:hover {
    border-left-color: var(--secondary-color-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.parentCate > ul > li.toggle > span {
    display: block;
    padding: 15px 20px;
    color: #2c3e50;
    font-size: 110% !important;
    font-weight: 600 !important;
    position: relative;
    transition: color 0.3s ease;
}

.parentCate > ul > li.toggle > span::before {
    content: '🌍';
    margin-right: 10px;
    font-size: 1.2em;
}

.parentCate > ul > li.toggle > span::after {
    content: '▼';
    position: absolute;
    right: 20px;
    font-size: 0.8em;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.parentCate > ul > li.toggle.open > span::after {
    transform: rotate(180deg);
}

/* School Info Cards */
.school-info {
    background: #f8f9fa;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.school-info:hover {
    background: white;
    border-left-color: #764ba2;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(8px);
}

.school-info::before {
    content: '🎓';
    margin-right: 8px;
}

/* School Details */
.school-info > ul {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.school-info > ul > li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 0.95em;
}

.school-info > ul > li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.school-info > ul > li strong {
    display: inline-block;
    min-width: 120px;
    color: #667eea;
    font-weight: 600;
}

/* Animation when showing */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
}

.toggle > ul:not(.hidden) {
    animation: slideDown 0.4s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .taxonomy-container {
        padding: 10px;
    }
    
    .parentCate > span {
        font-size: 110% !important;
        padding: 15px;
    }
    
    .indent {
        padding-left: 10px;
    }
    
    .school-info > ul > li strong {
        display: block;
        margin-bottom: 5px;
    }
}

/* Hover Effects cho các cấp khác nhau */
.toggle:not(.parentCate):not(.school-info) {
    transition: all 0.2s ease;
}

.toggle:not(.parentCate):not(.school-info):hover {
    opacity: 0.9;
}

/* Icon indicators */
.toggle > span {
    position: relative;
    padding-right: 30px;
}

/* Active state */
.toggle.open {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), transparent);
}

/* Open state - Màu chữ khi mở */
.toggle.open > span {
    color: #667eea !important;
    font-weight: 700 !important;
}

/* Parent Category open state */
.parentCate.open > span {
    color: white !important;
}

/* Country/Region open state */
.parentCate > ul > li.toggle.open > span {
    color: #667eea !important;
}

/* School info open state */
.school-info.open {
    background: white;
    border-left-color: #764ba2;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* School fee highlight */
.school-info > ul > li:has(strong:contains("School Fee")) {
    color: #28a745;
    font-weight: 500;
}

/* Loading state (optional) */
.taxonomy-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.toggle:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}