.container {
    display: flex;
    flex-direction: column;
    margin: auto;
    max-width: 960px;
    width: 100%;    
}

#index__menu-container {
    margin-top: 0.5rem;
}


#index__menu-nav {
    position: sticky; 
    top: 340; 
    height: 0;
}

#index__menu-nav-list {
    position: relative;
    left: -210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    max-width: 200px;
}

#index__placeholder {
    margin-top: 130px;
    display: flex;
    justify-content: center;
}

#index__await-italic {
    font-style: italic;
}

#index__menu-image {
    display: none;
}

img.index__me-image {
    display: none;
}

.index__menu-link:hover {
    background-size: cover;
    background-image: url('../public/bg-btn-dark.png');
}

.index__menu-link {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    padding: 4px;
    background-size: cover;
    background-image: url('../public/bg-btn-light.png');
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    display: flex;
    justify-content: center;
    max-width: 200px;
}

nav#index__menu_nav {
    display: block;
}

#index__greeting {
    padding: 24px;
}

.index__greet-images {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: stretch;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.image-card {
    flex: 1 1 0;           /* Равномерно делят свободное пространство, одинаковая ширина */
    min-width: 0;          /* Важно для корректного сжатия изображений внутри flex-элемента */
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-card img {
    display: block;          /* Убираем лишние отступы снизу */
    width: 100%;            /* Ширина на всю ширину родительского блока */
    height: auto;           /* ВЫСОТА АВТОМАТИЧЕСКАЯ — сохраняет пропорции изображения */
    object-fit: contain;    
}

@media (max-width: 768px) {

    .container {
        padding: 8px;
    }

    #index__menu-image {
        order: 0;
        display: block;
    }

    img.index__me-image {
        height: auto;
        width: 100%;
        border-radius: 4px;
    }

    #index__menu-container {
        order: 1;
    }

    .index__menu-link{
        max-width: 100%;
        font-size: 14px;
    }
    
    #index__greet-images {
        order: 2;
    }

    #index__greeting-wrapper {
        order: 3;
    }

    .index__greet-images {
        gap: 0.5rem;
    }

    .index__menu-nav-item {
        padding: 4px;
        margin: 0;
    }

    #index__placeholder {
        margin-top: 24px;
        text-align: center;
    }

    #index__menu-nav {
        order: 1;
    }

    #index__menu-nav-list {
        max-width: 100%;
    }

    .image-card:nth-child(2) {
        display: none;
    }

    #index__menu-nav-list {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 0;
        left: 0;
        margin-bottom: 1rem;
    }

    #index__menu-image {
        align-self: flex-end;
    }

    #index__menu-nav-list {
        display: flex;
        flex-direction: column;
    }

    nav#index__menu-nav {
        margin-top: 0.5rem;
        display: none;
    }

    nav#index__menu-nav > ul > li > a {
        font-size: 18px;
    }

    #index__greeting {
        text-align: center;
    }

    #index__greeting-wrapper {
        flex-direction: column;
    }

    strong {
        font-weight: bold;
    }
}