/* Подвал */
/* По умолчанию футер видим */
footer {
    background-color: #f1f1f1;
    color: #333;
    font-size: 0.9rem;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    position: fixed;
    width: 100%;
    bottom: 0;
    transition: transform 0.5s ease-in-out; /* Плавное перемещение футера */
   /* transform: translateY(100%);  /* Скрываем футер за пределами экрана */
}

/* Состояние, когда футер видим */
footer.show-footer {
    transform: translateY(0); /* Показываем футер */
}


/* Контейнер подвала */
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 1rem 2rem;
    width: 100%;
}

/* Левый блок подвала */
.footer-left {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Правый блок подвала */
.footer-right {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}

.footer-right ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.footer-right li {
    margin: 0;
}

.footer-right a {
    text-decoration: none;
    color: #4A4A4A;
    font-weight: 500;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-right a:hover {
    color: #1A1A1A;
    text-decoration: underline;  /* Добавляем подчеркивание при наведении */
}

/* Скрываем кнопку по умолчанию для экранов больше 760px */
#toggle-footer {
    display: none;
}

/* Адаптивность */
@media (max-width: 760px) {
    /* По умолчанию футер скрыт */
    footer {
        transform: translateY(100%); /* Скрываем футер */
    }

        /* Кнопка будет прикреплена к верхней части футера, но видна только при малом разрешении */
    #toggle-footer {
        display: block;
        position: fixed;
        bottom: 0;    /* Прикрепляем к нижней части экрана, когда футер скрыт */
        left: 50%;
        transform: translateX(-50%);
        background-color: #4A4A4A;
        color: white;
        border: none;
        padding: 3px 30px;
        font-size: 1rem;
        border-radius: 30px 30px 0 0;  /* Закругление только верхних углов */
        cursor: pointer;
        z-index: 10;
        transition: background-color 0.3s;
        width: 150px;
    }

    #toggle-footer:hover {
        background-color: #1A1A1A;
    }

    /* Когда футер видим, кнопка будет прижата к верхней части футера */
    #footer.show-footer #toggle-footer {
        position: absolute;
        top: -30px;   /* Кнопка будет прикреплена к верхней части футера */
        left: 50%;
        transform: translateX(-50%);
    }

    /* Когда класс .show-footer добавлен, футер появляется */
    footer.show-footer {
        transform: translateY(0); /* Показываем футер */
        transition: transform 0.5s ease; /* Плавное движение */
    }

    .footer-container {
        display: flex;
        flex-direction: column; /* Элементы выстраиваются в колонку */
        align-items: flex-start; /* Выравнивание по левому краю */
        gap: 1.5rem; /* Отступы между элементами */
    }

    .footer-left {
        order: 3; /* Размещаем блок .footer-left первым в колонке */
        margin-bottom: 1rem; /* Добавляем отступ снизу, чтобы отделить от других элементов */
    }

    .footer-right {
        order: 2; /* Размещаем блок .footer-right вторым в колонке */
    }

    .footer-right ul {
        display: flex;
        flex-direction: column; /* Список будет вертикальным */
        gap: 0.75rem; /* Отступы между пунктами списка */
        margin: 0; /* Убираем внешние отступы */
    }

    .footer-right ul li {
        padding-left: 1rem; /* Добавляем отступ слева для пунктов списка */
    }
}
