html {
    font-size: 18px;
}

header {
    grid-row: 1 / 2;
    background-color: var(--main-color);
    width: 100%;
    overflow: hidden; /* Чтобы избежать прокрутки хедера */
}

.image-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%) scale(0.75);
    transition: transform 0.2s;
}

.short-menu,
.long-menu {
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav {
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1300px) {
    nav {
        padding-left: 0;
        padding-right: 0;
    }
}

.short-menu {
    justify-content: space-between;
    flex-grow: 1;
}

.short-menu button {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.menu-item a {
    padding: 10px;
    display: flex;
    color: white;
    text-decoration: none;
    font-size: 20px;
    height: 100%;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease;
    font-weight: 500;
}

.enter-item a {
    background-color: #fec502;
    color: #262525;
    font-weight: 600;
}

.enter-item a:hover {
    background-color: var(--dark-theme);
    color: white;
}

.menu-item:hover {
    background-color: var(--dark-theme);
}

.logo-menu-item {
    margin-left: auto;
}

main {
    grid-row: 2 / 3;
    padding: 8px;
    width: 100%;
    min-height: 90vh;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
}

footer {
    grid-row: 3 / 4;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
}

.mark-main-color {
    color: var(--main-color);
}

.content-block {
    margin-top: 20px;
    margin-bottom: 20px;
}

.logo-tele-icon {
    width: 22px;
    height: 22px;
    padding: 0;
    margin-right: 8px;
}

.logo-tele-icon a {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
}

.messages {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.messages li {
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid;
    border-radius: 5px;
}

.error {
    color: rgba(255, 0, 0, 0.55);
    background-color: #fdd;
}

.success {
    color: #0daaaf;
    background-color: #dfd;
}

.error-list li {
    color: rgba(255, 0, 0, 0.55) !important;
}

/* ---------- Мобильная адаптация (банковский стандарт) ---------- */
@media (max-width: 730px) {
    html {
        font-size: 16px; /* базовый размер для мобильных */
    }

    body {
        line-height: 1.5;
        letter-spacing: 0.1px;
        font-weight: 400;
    }

    .menu-item a {
        font-size: 1rem; /* ~16px */
        font-weight: 500;
        padding: 12px 8px;
    }

    .enter-item a {
        font-size: 1rem;
        font-weight: 600;
    }

    main {
        font-size: 1rem;
        line-height: 1.6;
    }

    footer {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .messages li {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .long-menu {
        display: none;
        flex-direction: column;
        margin-left: 10px;
    }

    .long-menu .menu-item {
        margin-right: 10px;
        border-radius: 10px;
    }

    .long-menu .menu-item a {
        border-radius: 10px;
    }

    .lm-marker {
        display: none !important;
    }

    .short-menu {
        display: flex;
        flex-direction: row;
    }
}

/* ---------- Десктоп ---------- */
@media (min-width: 730px) {
    .long-menu {
        display: flex;
        flex-direction: row;
    }

    .long-menu .menu-item {
        margin-right: 0;
        border-radius: 0;
    }

    .long-menu .menu-item a {
        border-radius: 0;
    }

    .lm-marker {
        display: flex;
    }

    .short-menu {
        display: none;
    }
}
