/* --- Футер: базовая версия (десктоп) --- */
footer {
    background-color: #48036F;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    clear: both;
    margin: 0;
}

.footer-content {
    text-align: center;
    width: 100%;
    max-width: 800px; /* чтобы на больших экранах не растягивался на всю ширину */
}

footer p {
    margin: 0;
    padding: 5px 0;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    color: #ccc;
}

/* Telegram-блок в футере */
.telegram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;                /* расстояние между текстом и иконкой */
    margin-top: 10px;
    width: 100%;
}

.telegram-link {
    margin-left: 8px;
}

.telegram-link img {
    transition: transform 0.3s;
    height: 24px;
    width: auto;
}

.telegram-link img:hover {
    transform: scale(1.1);
}

/* Ссылки в футере: по умолчанию — в ряд, но с переносом */
.footer-links {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap; /* разрешает перенос на новую строку */
    justify-content: center;
    gap: 16px;
}

.footer-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #4CAF50;
}

@media (max-width: 1105px) {
    footer {
        flex-direction: column;
    }

    .footer-content {
        padding: 10px;
    }

    .telegram-container {
        justify-content: center;
    }

    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}

@media only screen and (max-width: 470px) {
    footer {
        padding: 16px 12px;
    }

    .footer-content {
        width: 100%;
        max-width: 100%; /* на мобильном — во всю ширину контейнера */
    }

    .footer-links {
        flex-direction: column; /* ссылки друг под другом */
        align-items: center;
        gap: 12px;
    }

    .footer-links a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 8px 0; /* добавляем вертикальный отступ для удобства нажатия пальцем */
        box-sizing: border-box;
    }

    .footer-links a:hover {
        background-color: rgba(255, 255, 255, 0.12);
        color: #4CAF50;
        text-decoration: none;
    }

    .telegram-container {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
}
