/* ========================================= */
/* АДАПТАЦИЯ ДЛЯ TELEGRAM MINI APP (МОБИЛЬНЫЕ) */
/* ========================================= */

@media (max-width: 768px) {
    /* Общие стили для мобильных */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
        overscroll-behavior-y: none;
    }

    /* Шапка с лого и текстом слева */
    .logo-header {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .header-text {
        text-align: left !important;
        margin-top: 0;
        flex: 1;
    }

    .header-text h1 {
        font-size: 1.6rem;
        line-height: 1.1;
        text-align: left !important;
        margin-bottom: 5px;
        white-space: nowrap;
    }

    .logo {
        width: 100px;
        height: auto;
        margin-left: 0;
        margin-bottom: 0;
        order: 2;
    }

    /* Список достижений */
    .achievements {
        padding-top: 15px;
    }

    .achievements li {
        font-size: 1rem;
        padding: 8px 0;
        margin-bottom: 10px;
        align-items: center;
    }

    .check-icon {
        width: 25px;
        height: 25px;
        margin-right: 10px;
    }

    /* Блок с кнопками */
    .content-block {
        padding: 50px 0 0 0;
    }

    .system-description {
        font-size: 1.2rem;
        text-align: center !important;
        line-height: 1.3;
    }

    .manager-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .choose-role {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .role-buttons {
        flex-direction: column;
        gap: 20px;
    }

    .button-wrapper {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 0px;
    }

    .role-button {
        height: 60px;
        font-size: 0.95rem;
    }

    /* Футер */
    .site-footer {
        padding: 25px 0;
        margin-top: 40px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo-img {
        max-width: 90px;
    }

    .footer-info p {
        font-size: 0.8rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 40px;
    }

    .footer-links a {
        font-size: 0.75rem;
    }

    .social-icon {
        font-size: 1.1rem;
    }
}

/* Особые стили для очень маленьких экранов */
@media (max-width: 360px) {
    .header-text h1 {
        font-size: 1.4rem;
        white-space: normal;
    }

    .logo {
        width: 80px;
    }

    .achievements li {
        font-size: 0.9rem;
    }

    .role-button {
        height: 55px;
        font-size: 0.9rem;
    }
}