/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    scroll-behavior: smooth;
    font-family: "Plus Jakarta Sans", "Noto Sans", sans-serif;
    background: #fcf9f8;
}

/* HEADER */
.header {
    background: white;
    will-change: transform;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99999;
    padding: 0.5rem 1rem;
    transform: translateZ(0); /* Критично! */
    flex-wrap: wrap;
}

img.logo {
    height: 4rem;
    cursor: pointer;
}

.header_navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.headers_text_buttons_container,
.headers_buttons_container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

a.header_text_button {
    text-decoration: none;
    color: black;
    letter-spacing: 1px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
}

a.header_text_button:hover {
    background-color: #F2E8E8;
}

button.menu {
    background-color: #B82133;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 3rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    min-width: 5rem;
    height: 3rem;
}

button.menu:hover {
    background-color: #000;
}

/* TRANSLATE BUTTON */
.custom_translate_wrapper {
    position: relative;
}

.custom_translate_button {
    background-color: #f4e8e8;
    border: none;
    border-radius: 3rem;
    height: 48px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.custom_translate_button_img {
    width: 24px;
    height: 24px;
}

.custom_translate_dropdown {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    z-index: 9999;
    background: white;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-width: 160px;
}

.custom_translate_button_text {
    margin-left: 6px;
    color: black;
}

/* HR */
.sticky-hr {
    position: sticky;
    top: 64px;
    background-color: #E5E8EB;
    height: 1px;
    border: none;
    z-index: 9999;
}

/* CONTAINER STYLES */
.main_container,
.menu_list_container,
.margin_container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    overflow: visible; /* или auto, только если нужно */
    max-height: none;  /* важно! */
    height: auto;
}

.main_container_element {
    width: 100%;
    margin-bottom: 2rem;
}

/* HERO */
.main_photo {
    width: 100%;
    height: auto;
    min-height: 512px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 2rem;
}

.main_photo_menu_button {
    margin-top: 32px;
}

h1.main_photo_title,
h1.menu_title {
    color: white;
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

h2.main_photo_description {
    color: white;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    max-width: 720px;
    margin-bottom: 2rem;
}

/* TITLES & TEXT */
h2.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

p.common_text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* MENU SCROLL SECTION */
.menu_section_wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -6rem;
    z-index: 10;
    margin-right: -6rem;
    gap: 1rem;
}

.menu_scroll_container {
    width: 960px;
    overflow: hidden;
}

.menu_container {
    display: flex;
    gap: 30px;
    transition: transform 0.3s ease;
}

.menu_item {
    width: 300px;
    flex-shrink: 0;
}

.menu_item_image {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    background-position: center;
    background-size: cover;
    margin-bottom: 1rem;
}

.menu_item_title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.menu_item_description {
    font-size: 0.95rem;
    margin-top: 16px;
}

/* MENU LIST PAGE */
.menu_item_container {
    display: flex;
    background: white;
    border: 1px solid #f3eeed;
    border-radius: 12px;
    padding: 1rem;
    gap: 1rem;
    z-index: 10;
    margin-bottom: 1.5rem;
}

.menu_image {
    width: 12rem;
    height: 12rem;
    border-radius: 12px;
    aspect-ratio: 1;
    object-fit: cover;
}

.menu_item_price {
    color: #B82133;
    font-weight: bold;
}

.menu_item_allergens {
    font-size: 0.85rem;
    color: #97674e;
    font-style: italic;
    margin-top: 16px;
}

/* MAP IMAGE */
.static_image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 1rem;
    object-fit: cover;
}

/* FOOTER */
.footer_container {
    width: 100%;
    text-align: center;
    padding: 2rem 1rem;
    background: #fcf9f8;
    margin-top: 3rem;
}

.footer_icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer_text {
    font-size: 0.9rem;
    color: #B82133;
}

/* SCROLL BUTTONS */
.scroll-btn {
    background-color: #B82133;
    border: none;
    color: white;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.scroll-btn:hover {
    background-color: black;
}

.scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

svg.footer_icon {
    width: 24px;
    height: 24px;
}

/* RESPONSIVE */
@media (max-width: 1280px) and (hover: none) and (pointer: coarse) {
    .main_container,
    .menu_list_container {
        width: 90%;
    }

    img.logo {
        height: 8rem;
    }

    a.header_text_button {
        display: none;
    }

    button.menu {
        font-size: 1.8rem;
        min-width: 10rem;
        height: 6rem;
    }

    .custom_translate_button {
        height: 6rem;
        padding: 6px 10px;
    }

    .custom_translate_button_img {
        margin-left: 12px;
        width: 40px;
        height: 40px
    }

    .custom_translate_button_text {
        font-size: 1.8rem;
        margin-left: 12px;
        margin-right: 12px;
    }

    .menu_item {
        width: 240px;
    }

    .menu_item_title {
        font-size: 2rem;
    }

    .scroll-btn {
        display: none;
    }

    .menu_image {
        width: 18rem;
        height: 18rem;
    }

    .menu_item_price {
        font-size: 2rem;
    }

    .menu_item_description {
        font-size: 1.35rem;
        margin-top: 16px;
    }

    .menu_item_allergens {
        font-size: 1.45rem;
        margin-top: 16px;
    }

    h2.subtitle {
        font-size: 2.5rem;
        margin-top: 3rem;
        margin-bottom: 2rem;
    }

    p.common_text {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    h1.menu_title {
        font-size: 3.5rem;
        margin-top: 4rem;
        margin-bottom: 4rem;
    }

    h1.main_photo_title {
        font-size: 3.5rem;
        margin-top: 64px;
        margin-bottom: 2rem;
    }

    h2.main_photo_description {
        font-size: 2rem;
    }

    .main_photo_menu_button {
        margin-bottom: 64px;
    }

    .menu_scroll_container {
        width: 100%;
    }

    .menu_container {
        gap: 5%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 0;
        transition: none;
        padding: 0 10%; /* отступы внутри */
    }

    .menu_item {
        width: 400px;
        flex-shrink: 0;
    }

    .menu_item_image {
        height: 400px;
    }

    .menu_item_title {
        font-size: 2.5rem;
    }

    .menu_item_description {
        font-size: 2rem;
        margin-top: 24px;
    }

    .footer_text {
        font-size: 2rem;
    }

    svg.footer_icon {
        width: 48px;
        height: 48px;
    }

    .footer_icons {
        margin-bottom: 2rem;
    }

    .footer_container {
        padding: 2rem 1rem;
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) and (hover: none) and (pointer: coarse) {

    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .header_navigation {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 1rem;
    }

    .headers_text_buttons_container,
    .headers_buttons_container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .menu_section_wrapper {
        flex-direction: column;
    }

    .menu_item_container {
        flex-direction: column;
        align-items: center;
    }

    h1.main_photo_title,
    h1.menu_title {
        font-size: 2rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    h2.main_photo_description {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px)  and (hover: none) and (pointer: coarse) {
    .menu_item_container {
        padding: 1rem 0.5rem;
    }

    .custom_translate_button {
        height: 40px;
        font-size: 12px;
        padding: 6px 10px;
    }

    a.header_text_button {
        font-size: 0.8rem;
    }

    .footer_text {
        font-size: 0.75rem;
    }

    h2.subtitle {
        font-size: 1.25rem;
    }
}
