/* Skip-to-content link (PLAN.md 5.4) — the first focusable element of every
   page. Parked just above the viewport and slid into view while focused, so a
   keyboard visitor can jump past the header instead of tabbing through it.
   position: fixed (not absolute) keeps it reachable at any scroll offset;
   z-index clears the fixed header's 999 and the top bars' 1000. The move is
   deliberately not animated: a focus indicator should be where the eye is
   already looking, not 200ms behind it. */
.skip-link {
    position: fixed;
    top: 0;
    left: 20px;
    z-index: 1001;
    transform: translateY(-100%);
    padding: 12px 20px;
    background-color: var(--color-navy);
    color: var(--color-text-inverse);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 6px;
}

/* :focus, not :focus-visible — the link is off-screen until it takes focus, so
   the only way to reach it is the keyboard anyway. */
.skip-link:focus {
    transform: translateY(0);
    /* Ring sits inside the plate: at the top edge of the viewport an offset ring
       would be clipped. White on navy, the inverse of the site's red-on-light. */
    outline: 2px solid var(--color-text-inverse);
    outline-offset: -5px;
}

/* Top bars styles */
#top-bars {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    margin: 0;
    padding: 0;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

/* Весь жёлтый баннер — настоящая <button>, а не кликабельный абзац
   (решение владельца, 2026-08-09). Раньше обработчик висел на <p>: мышью
   работало, с клавиатуры баннер был недостижим, а скринридер не объявлял
   его элементом управления. Отсюда сбросы стилей кнопки ниже — без них
   браузер подставит свою рамку, фон и шрифт. */
.top-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 15px 10px;
    background-color: var(--color-yellow);
    color: var(--color-navy);
    text-align: center;
    font-weight: 700;
    text-decoration: underline;
    font-size: 16px;
    /* сбросы <button> */
    appearance: none;
    border: 0;
    border-radius: 0;
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
}

.top-banner:focus-visible {
    outline: none;
}

.top-banner:focus-visible .banner-text {
    /* Keep keyboard focus visible without drawing the dark inset rectangle
       that persisted after tapping the banner on mobile. */
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.top-info-bar {
    width: 100%;
    margin: 0;
    padding: 7px 20px;
    background-color: var(--color-surface-off);
    font-size: 16px;
    
}

.top-info-bar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
}

.contact-info, .action-buttons {
    display: flex;
    align-items: center;
}

.contact-info {
    margin-right: 48px;
}

.contact-info .help-text {
    user-select: none;
    cursor: default;
    margin-right: 10px;
    font-weight: bold;
    color: var(--color-text);
}

.phone-number {
    color: var(--color-text);
    text-decoration: none;
    font-weight: normal;
    transition: text-decoration 0.3s ease;
}

.phone-number:hover {
    text-decoration: underline;
}

.action-buttons > a {
    text-decoration: none;
    color: var(--color-text);
    margin-right: 24px;
    font-weight: 600;
    transition: text-decoration 0.3s ease;
}

.action-buttons > a:hover {
    text-decoration: underline;
}

.business-link {
    background-color: var(--color-navy);
    color: var(--color-text-inverse) !important;
    padding: 5px 20px;
    border-radius: 15px;
    transition: text-decoration 0.3s ease;
}

.business-link:hover {
    text-decoration: underline;
}

/* Header styles */
header {
    background-color: var(--color-surface);
    color: var(--color-text);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
}

.header-top {
    width: 100%;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 20px;
}


.logo-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 6px var(--header-gutter);
    background-color: var(--color-surface);
}

.logo img {
    max-height: 60px;
    width: auto;
}

.header-buttons {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

.header-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 210px;
    width: auto;
    white-space: nowrap;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}

header a:focus-visible,
.header-button:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 3px;
}

header a:focus-visible {
    border-radius: 2px;
}

.burger-menu:focus-visible {
    outline: none;
}

.burger-menu:focus-visible span {
    background-color: var(--color-red);
}

.header-button .button-icon {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.header-button .button-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: fill 0.3s ease;
}

.call-button {
    background-color: var(--color-red);
    color: var(--color-text-inverse);
}

.order-button {
    background-color: transparent;
    border-color: var(--color-navy);
    color: var(--color-navy);
}

.call-button:hover {
    color: var(--color-text-inverse);
}

.order-button:hover {
    background-color: var(--color-navy);
    border-color: transparent;
    color: var(--color-text-inverse);
}

main {
    padding-top: var(--header-height);
}

@media (max-width: 1320px) {
    /* Info bar is hidden below this width, so the real header is shorter.
       Keep the fallback close to reality; JS still refines to the exact px. */
    :root {
        --header-height: 175px;
    }

    .top-info-bar {
        display: none;
    }

    .header-top {
        padding: 0 10px;
    }

    .logo-container {
        justify-content: flex-start;
        padding-left: 60px;
        position: relative;
    }
    
    .logo {
        margin-left: 20px;
    }

    .header-buttons {
        margin-left: auto;
    }
}

@media (max-width: 1030px) {
    .header-top {
        padding: 12px 0;
    }

    .logo-container {
        padding: 0 40px;
    }
}

@media (max-width: 980px) {
    .header-top {
        padding: 6px 0;
    }

    .logo-container {
        padding: 0 30px;
    }

    .header-buttons {
        padding-left: 30px;
    }
}

@media (max-width: 860px) {
    .order-button {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Mobile header drops the desktop nav row; measured ~134px. A tight
       fallback here removes the ~66px white gap that the old 200px default
       left between the fixed header and the hero before JS runs. */
    :root {
        --header-height: 140px;
    }

    .logo-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .burger-menu {
        order: 1;
        position: static;
        padding: 0;
    }

    .logo {
        order: 2;
        margin-left: 10px;
    }

    .logo img {
        max-height: 50px;
    }

    .header-buttons {
        order: 3;
        margin-top: 0;
        padding-left: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-button {
        padding: 10px 15px;
        border-radius: 20px;
        width: auto;
        font-size: 12px;
    }
    
    .header-button .button-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .call-button {
        padding: 10px 10px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        padding-inline: 10px;
    }

    .logo {
        margin-left: 4px;
    }

    .logo img {
        max-height: 36px;
    }

    /* .hero was dropped from this leftover pre-redesign rule: the current
       hero is full-bleed on mobile and must sit flush under the header. */
    .about {
        padding: 30px 15px;
    }

    .view-more {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    

    .header-button {
        justify-content: center;
        padding: 8px 10px;
        border-radius: 20px;
        font-size: 12px;
        height: auto;
    }

    .header-button .button-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* The header itself switches to its mobile composition at 768px. Keep the
   callback action circular throughout that range instead of tying it to a
   narrower device-specific cutoff. */
@media (max-width: 768px) {
    .call-button .button-text {
        display: none;
    }

    .call-button {
        width: 48px;
        min-width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 50%;
    }

    .call-button .button-icon {
        margin: 0;
    }

    .call-button .button-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* The ring sits on the Telegram-blue button, so it is inverse ink, not surface. */
.telegram-btn:focus-visible {
    outline: 2px solid var(--color-text-inverse);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    #top-bars,
    header,
    .header-button,
    .burger-menu span,
    .main-menu-container {
        transition: none !important;
    }
}
