/* legal.ua — UX lane of the top-20 wave, 28.09.2026.
   Loaded from chunk 51 FOOTER right after lead-conv.css, so it wins the cascade over main.css and lead-conv.css.
   Rollback: remove the <link> + <script> lines marked "top20-ux" in chunk 51 (backup in /root/legal-top20-20260928/ux/).
   1. Mobile header: one row of section links, messengers and phone in one row  -> H1 and the first CTA move up ~140px.
   2. FAQ questions in sentence case (the source text is sentence case; main.css forced uppercase).
   3. Trust line next to the first CTA on phones (Google rating, numbers read from the page's own widget by top20-ux.js).
   4. "What next" card after a successful form (top20-ux.js). */

/* ---------- 1. Mobile header ---------- */
@media (max-width: 768px) {
    .header_first .header_f_m { padding: 4px 0 0; }
    .header_first .header_f_m ul {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
    }
    .header_first .header_f_m ul::-webkit-scrollbar { display: none; }
    .header_first .header_f_m li { flex: 0 0 auto; margin-bottom: 0; padding: 0; }
    .header_first .header_f_m li > a {
        padding: 13px 3px;
        font-size: 12px;
        letter-spacing: 0;
    }
    /* «Вакансії» is for job seekers; on a phone it pushed «Ціни» half off-screen */
    .header_first .header_f_m li:has(> a[href*="vakans"]) { display: none; }

    .header_second { text-align: center; }
    .header_second .header_s_p_text.messengers {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    .header-wrap .header .container { padding-bottom: 6px; }
    .header_second .header_s_p_text.messengers li.hdr-ct-icon { margin: 0 1px; flex: 0 0 auto; }
    .header_second .header_s_p_text.messengers li.hdr-ct-icon a { background-size: 30px 30px; }
    .header_second .header_s_p_text.messengers li:not(.hdr-ct-icon):not(.dsdd) { flex: 0 0 auto; margin-left: 8px; }
    .header_second .header-phone {
        margin: 0;
        padding: 0 4px;
        min-height: 44px;
        font-size: 16px;
        white-space: nowrap;
    }
}

/* ---------- 2. FAQ questions: sentence case ---------- */
.faq-wrap .faq-btn { text-transform: none; font-size: 15px; line-height: 1.4; }
.faq-wrap .faq-btn p b { font-weight: 700; }

/* ---------- 3. Trust line under the first CTA ---------- */
.ux-trust { display: none; }
@media (max-width: 768px) {
    .ux-trust {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 8px;
        margin: 6px 0 10px;
        padding: 0;
        font-size: 14px;
        line-height: 1.3;
        color: #1c3143;
        text-align: center;
    }
    .ux-trust__stars { color: #f4b400; font-size: 16px; letter-spacing: 1px; }
    .ux-trust b { color: #1c3143; }
    .ux-trust a { color: #1c3143; text-decoration: underline; }
}

/* ---------- 4. "What next" card after a successful submission ---------- */
.ux-next {
    margin: 12px auto 0;
    max-width: 420px;
    padding: 0;
    text-align: center;
    font-weight: 400;
    color: #1c3143;
}
.ux-next p { margin: 0 0 10px !important; font-size: 15px !important; line-height: 1.45 !important; font-weight: 400 !important; color: #1c3143 !important; text-align: center !important; }
.ux-next__row { display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; }
.ux-next__hours { white-space: nowrap; }
.ux-next__row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    flex: 1 1 0;
    min-width: 0;
    max-width: 130px;
    padding: 0 8px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    transition: filter .15s ease;
}
.ux-next__row a:hover, .ux-next__row a:focus-visible { filter: brightness(1.12); outline: 2px solid #1c3143; outline-offset: 2px; }
.ux-next__row .ux-tg { background: #1a6fa3; }
.ux-next__row .ux-vb { background: #6f4ea8; }
.ux-next__row .ux-wa { background: #137a42; }

/* floating version: modal forms close themselves 2.7 s after success (lead-events.js),
   so the same card stays on screen until the visitor closes it */
.ux-next-float {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1400;
    width: calc(100% - 32px);
    max-width: 440px;
    padding: 18px 44px 16px 18px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #c9d3db;
    border-top: 4px solid #4ca73f;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(20, 52, 67, .25);
    transform: translate(-50%, 8px);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.ux-next-float.is-on { opacity: 1; transform: translate(-50%, 0); }
.ux-next-float .ux-next { margin: 0; max-width: none; }
.ux-next-float__title { margin: 0 0 6px !important; font-size: 17px !important; font-weight: 700; color: #2f7d2a !important; }
.ux-next-float__x {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 44px;
    color: #56636e;
    cursor: pointer;
}
.ux-next-float__x:focus-visible { outline: 2px solid #1c3143; }
@media (max-width: 768px) {
    .ux-next-float { bottom: 68px; }   /* above the 56px CTA bar */
}
@media (prefers-reduced-motion: reduce) {
    .ux-next-float { transition: none; }
}

/* ---------- 5. First CTA row: the order buttons come before the PDF/DOCX downloads ---------- */
.kartka_knopki { display: flex; flex-wrap: wrap; justify-content: center; }
.kartka_knopki > a.kartka_knop[download],
.kartka_knopki > a.kartka_knop:not([href^="#"]) { order: 2; }

/* ---------- 6. «Реєстрація ТОВ» template (23) on phones: four benefit tiles in a 2×2 grid ---------- */
@media (max-width: 768px) {
    .topblock .services.icon {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 0;
    }
    .topblock .services.icon .services-block {
        width: auto;
        min-height: 0;
        padding: 12px 10px;
        margin: 0;
        box-sizing: border-box;
        text-align: left;
    }
    .topblock .services.icon .services-title { font-size: 14px; line-height: 1.3; justify-content: flex-start; flex-direction: row; text-align: left; }
    .topblock .services.icon .services-text { font-size: 13px; line-height: 1.4; text-align: left; }
    .topblock .services.icon .services-block .services-cog { display: none !important; }
}
