.main__sch{
    margin: 20px 187px 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, auto));
    row-gap: 30px;
    column-gap: 30px;
    justify-content: center;
    align-content: center;
    align-items: stretch;
}
.table__sch{
    font-family: TTFirsNeue-Medium;
    font-size: 40px;
    text-align: center;
    margin: 17px auto 30px auto;
    background-color: rgb(255, 176, 92);
    padding: 0 1px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    line-height: 0.1;
    padding-bottom: 13px;
}

/* Панель выбора школ */
.schools-selector {
    margin: 50px 187px 0px 187px;
    background: #F8F8F8;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.schools-container {
    display: flex;
    gap: 15px;
    align-items: center;
    overflow-x: auto;
    padding: 10px;
    justify-content: space-between;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Скрытие скроллбара для WebKit браузеров */
.schools-container::-webkit-scrollbar {
    display: none;
}

.school-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.school-item:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.school-item.active {
    border-color: #333;
    background: #333;
    color: white;
}

.school-item.active:hover {
    background: #555;
    border-color: #555;
}

.school-name {
    font-family: TTFirsNeue-Medium;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}
.slot_sub{
    max-width: 350px;
    background-color: white;
    border-radius: 30px;
    padding: 7px;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}
.shell{
    padding: 7px;
    background-color: #EDEDED;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}
.subject-title {
    font-family: TTFirsNeue-Medium;
    font-size: 16px;
    text-align: center;
    margin: 10px 0px 0px 0px;
    padding: 0 15px;
}
.tags-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 5px 0px 0px 0px;
    padding: 0 15px;
    flex-wrap: wrap;
}

.subject-tag1 {
    border-radius: 4px;
    padding: 4px 8px;
    font-family: TTFirsNeue-Regular;
    font-size: 8px;
    color: #333;
    white-space: nowrap;
}
.subject-tag2 {
    background-color: #D0AEFD;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: TTFirsNeue-Regular;
    font-size: 8px;
    color: #333;
    white-space: nowrap;
}
.subject-tag3 {
    background-color: #FFF373;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: TTFirsNeue-Regular;
    font-size: 8px;
    color: #333;
    white-space: nowrap;
}

.teacher-description {
    padding: 10px 15px;
    margin: 5px 0;
}

.description-text {
    font-family: TTFirsNeue-Regular;
    font-size: 12px;
    line-height: 1.2;
    color: #666;
    margin: 0;
    text-align: left;
}
.description-text br {
    display: block;
    content: "";
    margin-top: 10px;
    line-height: normal;
}
.description-list {
    padding-left: 18px;
    margin: 0;
}
.description-list li {
    list-style-type: disc;
    font-family: TTFirsNeue-Regular;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    margin: 0 0 0 0;
    text-align: left;
}
.content_sub{
    display: flex;
    justify-content: space-between;
    padding: 25px 25px 2px 25px;
    font-family: TTFirsNeue-Regular;
    font-size: 12px;
}
.slot_sub img{
    width: 100%;
}

.bottom_sub {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.sub_button{
    display: flex;
    margin: 0px auto;
    margin-bottom: 10px;
    align-items: center;
    background-color: black;
    color: white;
    border-radius: 7px;
    padding: 14px 33%;
    font-family: TTFirsNeue-Regular;
    font-size: 14px;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.sub_button:hover{
    background-color: white;
    color: black;
    outline: 1px solid black;
    outline-offset: -1px;
}

.shell a{
    text-decoration: none;

}
.kurs_count {
    margin-bottom: 0;
    font-size: 14px;
}
.price {
    margin-bottom: 0;
    font-size: 14px;
}
@media (max-width: 728px) {   
    .content_sub{
    padding-top: 10px;
    padding-bottom: 0px;
    }
    .table__sch{
        font-size: 28px;
        margin: 8px auto 0px auto;
        padding-bottom: 9px;
    }
    .main__sch{
        margin: 15px 25px 30px;
    }
    .subject-title {
        font-size: 16px;
        margin: 10px 0;
    }
    .tags-container {
        margin-bottom: 10px;
    }
    .subject-tag {
        padding: 3px 6px;
    }
    .teacher-description {
        padding: 8px 12px;
    }
    .description-text {
        font-size: 11px;
    }
    
    /* Мобильные стили для панели выбора школ */
    .schools-selector {
        margin: 30px 25px 0px 25px;
        padding: 0px;
    }
    
    .schools-container {
        gap: 10px;
        padding: 8px;
        justify-content: flex-start;
    }
    
    .school-item {
        padding: 10px 15px;
    }
    
    .school-name {
        font-size: 12px;
    }
}

@media (max-width: 540px) {
    .table__sch {
        font-size: 26px;
        padding-bottom: 9px;
    }
}

@media (max-width: 420px) {
    .table__sch {
        font-size: 24px;
        padding-bottom: 8px;
    }
}
