.teacher-page {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.teacher-block {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: white;
    padding: 30px;
}

.teacher-block .one-row {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.teacher-header {
    display: flex;
    gap: 25px;
}

.teacher-header .photo {
    width: 290px;
    height: 290px;
}

.teacher-title {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 15px;
}

.teacher-block h2 {
    display: block;
    color: var(--gray-text-color);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.discipline-block {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-page .discipline {
    padding: 5px 10px;
    background: rgba(67, 11, 81, 0.1);
}

.page .teacher-title h1 {
    margin-bottom: 0;
}

.teacher-title a {
    font-size: 22px;
    font-weight: 500;
    color: var(--orange-text-color);
}

.teacher-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.teacher-info.no-all section:nth-child(n+6) {
    display: none;
}


.course-row-menu {
    display: flex;
    justify-content: space-around;
}

.course-row-menu div {
    width: 100%;
    text-wrap: nowrap;
    text-align: center;
    padding: 10px 20px;
    color: var(--gray-text-color);
    border-bottom: 2px solid var(--gray-line-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.5s, color 0.5s, border 0.5s;
}

.course-row-menu div.active {
    background: white;
    color: black;
    border-bottom: 2px solid var(--orange-color);
    cursor: default;
}


.course-row-item {
    display: none!important;
    margin-top: 20px;
}

.course-row-item.active {
    display: flex!important;
    flex-direction: column;
}

@media (max-width: 780px) {
    .teacher-block {
        padding: 10px;
    }

    .teacher-page {
        gap: 25px;
    }
    .teacher-block .one-row {
        margin-bottom: 0;
    }
    .teacher-block h2 {
        font-size: 16px;
    }

    .teacher-block .one-row {
        flex-direction: column;
    }

    .teacher-header {
        flex-direction: column;
    }

    .teacher-header .photo {
        width: 100%;
        height: auto;
    }

    .teacher-info section {
        flex-direction: column;
    }

    .course-table {
        grid-template-columns: repeat(1, 1fr);
    }

    .course-table .info {
        flex-direction: column;
        align-items: start;
        gap: 5px;
    }

    .course-table article {
        background: white;
        padding: 40px 10px 10px 10px;
    }
}
