/* Секция инструментов */
.tools-section {
    padding: 5rem 0;
    background: #F2F2FB;
}

.tools-title {
    text-align: center;
    margin-bottom: 4rem;
}

.tools-title .h1 {
    font: 700 48px/56px "Rubik", arial, sans-serif;
    color: #434343;
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .tools-title .h1 {
        font: 700 32px/40px "Rubik", arial, sans-serif;
        margin-bottom: 0.75rem;
    }
}

.tools-title p {
    font: 400 18px/28px "Rubik", arial, sans-serif;
    color: #5C5C5C;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .tools-title p {
        font: 400 16px/24px "Rubik", arial, sans-serif;
    }
}

/* Контейнер инструментов */
.tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tools-wrapper {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: none;
}

.tools-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 600px;
    gap: 2rem;
}

@media (max-width: 991.98px) {
    .tools-content {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 1.5rem;
    }
}

/* Меню инструментов */
.tools-menu {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    .tools-menu {
        padding: 0;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
    }

    .tools-menu::-webkit-scrollbar {
        display: none;
    }

    .tool-item {
        flex-shrink: 0;
        padding: 1rem 1.5rem;
        font: 500 14px/20px "Rubik", arial, sans-serif;
        white-space: nowrap;
        display: block;
        scroll-snap-align: start;
    }

    .tool-item p {
        display: none !important;
    }
}

.tool-item {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: transparent;
    border: 2px solid transparent;
    color: #5C5C5C;
    font: 500 16px/24px "Rubik", arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: auto;
    white-space: normal;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tool-item:hover {
    background: rgba(241, 137, 24, 0.1);
    border-color: transparent;
    color: #F18918;
}

.tool-item.active {
    background: #fff;
    border-color: transparent;
    color: #F18918;
    box-shadow: none;
}

.tool-item.active:hover {
    background: #fff;
    border-color: transparent;
    color: #b2620b;
}

.tool-item h4 {
    font: 600 16px/24px "Rubik", arial, sans-serif;
    color: inherit;
    margin: 0 0 0.5rem 0;
}

@media (max-width: 991.98px) {
    .tool-item h4 {
        font: 600 14px/20px "Rubik", arial, sans-serif;
        margin: 0;
    }
}

.tool-item p {
    font: 400 14px/20px "Rubik", arial, sans-serif;
    color: #7B7B7C;
    margin: 0;
    flex-grow: 1;
    white-space: normal;
    word-wrap: break-word;
}

.tool-item.active p {
    color: #5C5C5C;
}

/* Скрываем описание на мобильных */
@media (max-width: 991.98px) {
    .tool-item p {
        display: none !important;
    }

    .tool-item {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .tool-item p {
        display: none !important;
    }

    .tool-item {
        padding: 0.75rem 1.25rem;
        font: 500 14px/20px "Rubik", arial, sans-serif;
    }
}

/* Область изображений */
.tools-images {
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    min-height: 500px;
}

@media (max-width: 991.98px) {
    .tools-images {
        padding: 0;
        min-height: 300px;
    }
}

/* Заголовок инструмента */
.tool-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    width: 100%;
    margin-bottom: 0;
    display: none;
}

.tool-title h3 {
    font: 600 24px/32px "Rubik", arial, sans-serif;
    color: #434343;
    margin: 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border-left: 4px solid #F18918;
    box-shadow: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    width: 100%;
    box-sizing: border-box;
}

.tool-title.active h3 {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767.98px) {
    .tool-title h3 {
        font: 600 18px/24px "Rubik", arial, sans-serif;
        padding: 0.75rem 1rem;
    }
}

/* Изображения инструментов */
.tool-image {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: start;
    justify-content: center;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s ease;
    pointer-events: none;
    padding-top: 0rem;
    box-sizing: border-box;
}

.tool-image.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.tool-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: none;
}

@media (max-width: 767.98px) {
    .tool-image {
        padding-top: 0rem;
    }
}

/* Навигационные кнопки */
.tools-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #F18918;
    color: #F18918;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(241, 137, 24, 0.15);
}

.nav-btn:hover {
    background: #F18918;
    color: #fff;
    transform: scale(1.05);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.nav-btn:disabled:hover {
    background: #fff;
    color: #F18918;
}

/* Индикаторы */
.tools-indicators {
    display: flex;
    gap: 0.5rem;
    margin: 0 1rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(241, 137, 24, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #F18918;
    transform: scale(1.25);
}

/* Анимации для touch */
@media (max-width: 991.98px) {
    .tools-images {
        touch-action: pan-x;
    }

    .tool-image {
        transition: transform 0.3s ease;
    }

    .tool-image.swipe-left {
        transform: translateX(-100%);
    }

    .tool-image.swipe-right {
        transform: translateX(100%);
    }
}

/* Загрузочная анимация */
.tools-wrapper.loading .tool-image img {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*Мои*/
@media (max-width: 767.98px) {
    .tools-section {
        padding: 3rem 0;
    }
    .tools-section .h1 {
        font: 700 24px/28px "Rubik", arial, sans-serif !important;
        margin-bottom: 0 !important;
    }
    .tools-title{
        margin-bottom: 1.5rem;
    }
    .services__button {
        margin-top: 1rem!important;
    }
}

.schools {
    padding: 2.5rem 0 3rem 0;
    background-color: #f7f7fa;
}

.schools .h3 {
    text-align: center;
}

.school-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

@media (max-width: 767.98px) {
    .school-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 1rem 0;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .school-row::-webkit-scrollbar {
        display: none;
    }

    .school-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

.school-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s ease;
    gap: 1rem;
    min-width: 240px;
    max-width: 240px;
}

.school-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.school-name {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    text-align: left;
}

/* Стили для меню сервисов */
@media (max-width: 767.98px) {
    .services__links {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0 1rem 1rem 1rem;
        margin: 0 -1rem;
    }

    .services__links::-webkit-scrollbar {
        display: none;
    }

    .services__links .tabs__link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.5rem 1rem;
        scroll-snap-align: start;
        min-width: auto;
    }
}

/* Фиксированная высота блоков сервисов */
.services__card {
    height: 70px !important;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 1rem !important;
}

.services__card-image {
    width: 120px !important;
    height: 50px !important;
    object-fit: contain !important;
    flex-shrink: 0;
}
/*
.services__card-link {
  display: none;
}*/
.main1.h1 {
    margin-bottom: 4rem;
    text-align: center;
}
