/* Общий layout */
.teachers-page {
    width: 100%;
    margin-top: -85px;
    /* padding-top: 85px; */
}

/* Hero секция */
.teachers-hero {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #4942E4 0%, #8696FE 50%, #C4B0FF 100%);
    overflow: hidden;
}

.teachers-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

.teachers-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #e0e0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGradient 8s ease infinite;
    margin-top: 85px;
}

@keyframes titleGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Навигация по категориям */
.categories-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.category-item.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.category-item .school-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
    flex-shrink: 0;
}

.category-item span {
    display: inline-block;
}

/* Основной контент */
.teachers-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    align-items: start;
}

/* Правая колонка с карточками */
.teachers-content > :last-child {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-content: start;
    height: fit-content;
}

/* Боковая панель со школами */
.schools-sidebar {
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1.5rem;
    height: fit-content;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
}

.schools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.schools-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark, #333);
}

.schools-toggle {
    font-size: 1rem;
    color: var(--text-color, #666);
    transition: transform 0.2s ease;
    display: none;
}

.schools-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.schools-list.collapsed {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

.school-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: 'Golos Text', sans-serif;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    background: var(--bg-light);
    transition: all 0.2s ease;
    width: 100%;
}

.school-item:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.school-item.active {
    background: var(--primary-color);
    color: white;
}

.school-item .school-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
}

.school-item.active .school-logo {
    /* filter: brightness(0) invert(1); */
}

/* Карточки преподавателей */
.teacher-card {
    display: flex;
    align-items: center;
    background: var(--card-background, #fff);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    gap: 1.5rem;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.teacher-photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.teacher-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teacher-card:hover .teacher-photo img {
    transform: scale(1.1);
}

.teacher-info {
    flex-grow: 1;
    min-width: 0; /* Для корректного переноса текста */
}

.teacher-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark, #333);
}

.teacher-role {
    font-size: 0.875rem;
    color: var(--text-muted, #666);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.teacher-description {
    font-size: 0.875rem;
    color: var(--text-light, #777);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.teacher-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #4942E4;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.teacher-link:hover {
    background: #3935b3;
    transform: translateY(-2px);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted, #666);
    font-size: 1rem;
}

/* Медиа-запросы */
@media (max-width: 1024px) {
    .teachers-hero-inner {
        padding: 3rem 2rem;
    }

    .teachers-hero h1 {
        font-size: 1.75rem;
    }

    .teachers-content {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .teachers-content > :last-child {
        gap: 1.5rem;
    }

    .teacher-photo {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .teachers-hero {
        margin-top: -85px;
        padding-top: 85px;
    }

    .teachers-hero-inner {
        padding: 2rem 1rem;
    }

    .teachers-hero h1 {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.875rem;
    }

    .categories-nav {
        padding: 1rem;
    }

    .categories-list {
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .category-item {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
        border-radius: 1.5rem;
    }

    .category-item .school-logo {
        width: 14px;
        height: 14px;
    }

    .category-item span {
        font-size: 0.8125rem;
    }

    .teachers-content {
        grid-template-columns: 1fr;
    }

    .teachers-content > :last-child {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .schools-sidebar {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .schools-header {
        padding: 0.5rem 0;
    }

    .schools-toggle {
        display: block !important;
    }

    .schools-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        max-height: 1000px;
    }

    .schools-list.collapsed {
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        padding: 0;
    }

    .school-item {
        font-size: 0.8125rem;
        padding: 0.375rem 0.625rem;
        border-radius: 1rem;
        white-space: nowrap;
    }

    .school-item .school-logo {
        width: 14px;
        height: 14px;
    }

    .teacher-card {
        padding: 1rem;
        gap: 1rem;
    }

    .teacher-photo {
        width: 80px;
        height: 80px;
    }

    .teacher-name {
        font-size: 1.125rem;
    }

    .teacher-role {
        font-size: 0.8125rem;
    }

    .teacher-description {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .categories-nav {
        padding: 0.75rem;
    }

    .categories-list {
        gap: 0.375rem;
    }

    .category-item {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        gap: 0.375rem;
    }

    .category-item .school-logo {
        width: 12px;
        height: 12px;
    }

    .schools-sidebar {
        padding: 0.75rem;
    }

    .school-item {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        gap: 0.375rem;
    }

    .school-item .school-logo {
        width: 12px;
        height: 12px;
    }
} 