/*
Theme Name: USA Travel Docs
Description: Редакционная тема для usatraveldocs.ru — запись на собеседование на визу США. Серифная типографика, тёмный hero, без сторонних библиотек.
Version: 2.0
Author: USA Travel Docs
Text Domain: usatd
*/

/* ==================== База ==================== */
:root {
    --ink: #1c2333;
    --ink-2: #3c4457;
    --muted: #6b7385;
    --navy: #0f2044;
    --navy-2: #16305e;
    --navy-3: #1d3a6e;
    --red: #b31942;
    --red-dark: #921336;
    --gold: #c9a227;
    --bg: #ffffff;
    --bg-soft: #f4f6fa;
    --cream: #faf8f4;
    --line: #e5e9f0;
    --line-2: #d2d9e4;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 2px 6px rgba(15, 32, 68, .06);
    --shadow-md: 0 14px 40px rgba(15, 32, 68, .12);
    --focus: 0 0 0 3px rgba(22, 48, 94, .2);
    --serif: Georgia, "Times New Roman", "Noto Serif", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-decoration: underline; text-decoration-color: rgba(22, 48, 94, .3); text-underline-offset: 3px; }
a:hover { color: var(--red); text-decoration-color: currentColor; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 46px); margin: 0 0 .5em; }
h2 { font-size: clamp(25px, 3.4vw, 34px); margin: 0 0 .55em; }
h3 { font-size: 21px; margin: 1.4em 0 .5em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.25em; padding-left: 1.3em; }
li { margin-bottom: .5em; }

/* Секции */
.section { padding: 76px 0; }
.section--alt { background: var(--bg-soft); }
.eyebrow {
    font-family: var(--sans);
    font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--red); margin: 0 0 14px;
}
.section__sub { font-size: 18px; color: var(--muted); max-width: 640px; margin-top: -6px; margin-bottom: 34px; }

/* ==================== Шапка ==================== */
.topbar { background: var(--navy); color: #b9c6de; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar a { color: #fff; text-decoration: none; }

.header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.header .wrap { display: flex; align-items: center; gap: 26px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand__mark {
    width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--navy-2) 0 55%, var(--red) 55% 100%);
    position: relative;
}
.brand__mark::after { content: "★"; position: absolute; top: 2px; left: 7px; color: #fff; font-size: 15px; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--ink); line-height: 1.1; }
.brand__name small { display: block; font-family: var(--sans); font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 400; padding: 9px 13px; border-radius: 10px; }
.nav a:hover { background: var(--bg-soft); color: var(--navy); }
.header__cta {
    background: var(--red); color: #fff !important; text-decoration: none;
    font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 999px;
    box-shadow: 0 6px 18px rgba(179, 25, 66, .3); white-space: nowrap;
    transition: background-color .18s, transform .18s;
}
.header__cta:hover { background: var(--red-dark); transform: translateY(-1px); }

.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.burger span { display: block; width: 21px; height: 2px; background: var(--ink); margin: 4.5px 0; border-radius: 2px; }

@media (max-width: 980px) {
    .nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        flex-direction: column; padding: 12px 18px 18px; gap: 2px;
        box-shadow: var(--shadow-md);
    }
    .nav.open { display: flex; }
    .burger { display: block; }
    .header__cta { display: none; }
}

/* ==================== Hero ==================== */
.hero {
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(179, 25, 66, .28), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #1a3a74 100%);
    color: #d7e0f2;
    position: relative;
    overflow: hidden;
    padding: 84px 0 90px;
}
/* мотив флага: тонкие полосы в углу */
.hero::before {
    content: ""; position: absolute; right: -140px; top: -60px; width: 560px; height: 560px;
    background: repeating-linear-gradient(-35deg, rgba(255,255,255,.05) 0 22px, transparent 22px 56px);
    transform: rotate(8deg); pointer-events: none;
}
.hero .wrap { position: relative; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); gap: 56px; align-items: start; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 56px 0 64px; } }

.hero .eyebrow { color: #f0b8c8; }
.hero h1 { color: #fff; font-size: clamp(32px, 4.8vw, 52px); margin-bottom: .45em; }
.hero h1 em { font-style: normal; box-shadow: inset 0 -0.28em 0 rgba(179, 25, 66, .55); }
.hero p.lead { font-size: 19.5px; line-height: 1.65; color: #c3cfe6; max-width: 560px; }
.hero__points { list-style: none; padding: 0; margin: 26px 0 0; }
.hero__points li { padding-left: 30px; position: relative; margin-bottom: 13px; color: #d7e0f2; font-size: 16.5px; }
.hero__points li::before {
    content: ""; position: absolute; left: 0; top: 8px; width: 15px; height: 8px;
    border-left: 3px solid var(--gold); border-bottom: 3px solid var(--gold);
    transform: rotate(-45deg);
}
.hero__trust { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: #9fb0d0; }
.hero__trust b { color: #fff; font-weight: 700; }

/* ==================== Карточки ==================== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin: 8px 0 0; }
.card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 28px 28px 24px; text-decoration: none; color: var(--ink);
    box-shadow: var(--shadow); position: relative; overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.card::before {
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--navy-2) 0 40%, var(--red) 40% 70%, var(--gold) 70% 100%);
    opacity: .85;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); color: var(--ink); }
.card__kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 22px; }
.card p { margin: 0 0 16px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.card__more { margin-top: auto; font-size: 14.5px; font-weight: 700; color: var(--navy-2); }
.card:hover .card__more { color: var(--red); }
.card__more::after { content: " →"; }

/* Шаги */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin: 8px 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px 22px; box-shadow: var(--shadow); }
.steps li::before {
    content: "0" counter(step);
    display: block; font-family: var(--serif); font-size: 40px; line-height: 1;
    color: var(--red); opacity: .9; margin-bottom: 14px;
}
.steps b { display: block; margin-bottom: 6px; font-size: 17.5px; }
.steps span { font-size: 14.5px; color: var(--muted); line-height: 1.55; }

/* Инфоплашка */
.note {
    background: var(--cream); border: 1px solid #ead9b0; border-left: 4px solid var(--gold);
    border-radius: 12px; padding: 18px 22px; margin: 34px 0 0; font-size: 15.5px; color: #5c4a14;
}
.note b { color: #47390d; }

/* Таблица */
.tbl-scroll { overflow-x: auto; margin: 20px 0; border-radius: 14px; border: 1px solid var(--line); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 15px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 13px 18px; text-align: left; vertical-align: top; }
.tbl td + td, .tbl th + th { border-left: 1px solid var(--line); }
.tbl th { background: var(--bg-soft); font-family: var(--sans); font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: none; }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line-2); background: transparent; }
.faq summary { cursor: pointer; font-family: var(--serif); font-weight: 700; font-size: 18.5px; padding: 20px 44px 20px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 26px; color: var(--red); font-weight: 400; font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 22px; color: var(--ink-2); font-size: 16px; max-width: 700px; }

/* ==================== Форма заявки ==================== */
.lead-form {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); padding: 30px;
    border-top: 5px solid var(--red);
}
.lead-form .lf-title b { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.lead-form .lf-sub { font-size: 14px; color: var(--muted); margin: 6px 0 18px; }
.lead-form input, .lead-form select, .lead-form textarea {
    width: 100%; font: inherit; font-size: 15.5px;
    border: 1px solid var(--line-2); border-radius: 12px;
    padding: 13px 15px; margin-bottom: 12px; background: var(--bg-soft);
    color: var(--ink);
}
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
    outline: none; background: #fff; box-shadow: var(--focus); border-color: var(--navy-2);
}
.lead-form button {
    width: 100%; font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer;
    background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 15px;
    box-shadow: 0 8px 20px rgba(179, 25, 66, .3); transition: background-color .18s, transform .18s;
}
.lead-form button:hover { background: var(--red-dark); transform: translateY(-1px); }
.lead-form .lf-msg { font-size: 14px; margin-top: 10px; display: none; }
.lead-form .lf-msg.ok { display: block; color: #14713d; }
.lead-form .lf-msg.err { display: block; color: var(--red); }
.lead-form .lf-agree { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

/* ==================== Внутренние страницы ==================== */
.page-band {
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 70%, #1a3a74 100%);
    color: #c3cfe6; padding: 46px 0 50px; position: relative; overflow: hidden;
}
.page-band::before {
    content: ""; position: absolute; right: -160px; top: -80px; width: 480px; height: 480px;
    background: repeating-linear-gradient(-35deg, rgba(255,255,255,.05) 0 20px, transparent 20px 52px);
    transform: rotate(8deg); pointer-events: none;
}
.page-band .wrap { position: relative; }
.page-band h1 { color: #fff; margin: 0; }
.crumbs { font-size: 13.5px; color: #93a5c6; margin-bottom: 16px; }
.crumbs a { color: #b9c6de; text-decoration: none; }
.crumbs a:hover { color: #fff; }

.content-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); gap: 52px; padding-top: 52px; padding-bottom: 64px; align-items: start; }
@media (max-width: 960px) { .content-grid { grid-template-columns: 1fr; padding-top: 36px; gap: 36px; } }
.sidebar { position: sticky; top: 96px; }
.sidebar .lead-form { padding: 26px; }
.sidebar__links { margin-top: 20px; background: var(--bg-soft); border-radius: var(--radius); padding: 22px 24px; }
.sidebar__links b { display: block; margin-bottom: 10px; font-family: var(--serif); font-size: 17px; }
.sidebar__links a { display: block; font-size: 14.5px; padding: 6px 0; text-decoration: none; color: var(--ink-2); }
.sidebar__links a:hover { color: var(--red); }

.content > p:first-child { font-size: 19px; line-height: 1.65; color: var(--ink-2); }
.content h2 { margin-top: 1.9em; position: relative; padding-bottom: 12px; }
.content h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; border-radius: 2px; background: var(--red); }
.content .note { margin: 28px 0; }
.content .steps { margin: 24px 0; }

/* ==================== CTA-полоса ==================== */
.cta-band {
    background: linear-gradient(140deg, var(--navy) 20%, var(--navy-3)), var(--navy);
    border-radius: var(--radius-lg); padding: 42px 44px; margin: 20px 0 0; color: #c3cfe6;
    display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
    position: relative; overflow: hidden;
}
.cta-band::before {
    content: ""; position: absolute; right: -80px; top: -60px; width: 300px; height: 300px;
    background: repeating-linear-gradient(-35deg, rgba(255,255,255,.06) 0 16px, transparent 16px 42px);
    transform: rotate(8deg);
}
.cta-band b { font-family: var(--serif); color: #fff; font-size: 24px; display: block; margin-bottom: 6px; }
.cta-band p { margin: 0; font-size: 15.5px; max-width: 520px; }
.cta-band a {
    background: var(--red); color: #fff; text-decoration: none; font-weight: 700;
    padding: 15px 30px; border-radius: 999px; white-space: nowrap; position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25); transition: background-color .18s, transform .18s;
}
.cta-band a:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ==================== Подвал ==================== */
.footer { background: var(--navy); color: #a9b8d3; margin-top: 84px; font-size: 14.5px; }
.footer a { color: #dfe7f4; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding: 52px 0 30px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 26px; } }
.footer__brand { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 21px; margin-bottom: 10px; }
.footer b { color: #fff; display: block; margin-bottom: 12px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer__disclaimer { font-size: 12.5px; color: #8296b8; margin-top: 14px; line-height: 1.55; }

/* Главная без .section-обёрток в старой разметке — совместимость */
.section .cards, .section .steps { margin-top: 6px; }

/* ==================== Плавающая кнопка заявки + модальное окно ==================== */
.header__cta--mobile { display: none; padding: 9px 14px; font-size: 13.5px; margin-left: auto; }
@media (max-width: 960px) {
    .header__cta { display: none; }
    .header__cta--mobile { display: inline-flex; align-items: center; }
    .burger { margin-left: 0; }
}
.header__cta { border: 0; cursor: pointer; font-family: inherit; }

.lead-fab {
    position: fixed; right: 18px; bottom: 18px; z-index: 900;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--red); color: #fff; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px;
    padding: 13px 18px 13px 15px; border-radius: 999px;
    box-shadow: 0 10px 26px rgba(179, 25, 66, .38);
    transition: transform .18s, background-color .18s;
}
.lead-fab:hover { background: var(--red-dark); transform: translateY(-2px); }
.lead-fab__icon { font-size: 18px; line-height: 1; }
@media (max-width: 480px) { .lead-fab { right: 14px; bottom: 14px; padding: 12px 15px 12px 13px; font-size: 14px; } }
body.lead-modal-open .lead-fab { display: none; }

.lead-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.lead-modal.open { display: block; }
.lead-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 32, 68, .55); backdrop-filter: blur(2px); }
.lead-modal__box {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto;
    background: #fff; border-radius: var(--radius-lg); border-top: 5px solid var(--red);
    box-shadow: 0 24px 60px rgba(15, 32, 68, .35); padding: 26px 24px 20px;
    animation: leadIn .18s ease-out;
}
@keyframes leadIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.lead-modal__close {
    position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border: 0; background: transparent;
    font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%;
}
.lead-modal__close:hover { background: var(--bg-soft); color: var(--ink); }
.lead-modal .lf-title b { font-family: var(--serif); font-size: 22px; }
.lead-modal .lf-sub { font-size: 14px; color: var(--muted); margin: 6px 0 16px; }
.lead-modal__form input, .lead-modal__form textarea {
    width: 100%; font: inherit; font-size: 15.5px; border: 1px solid var(--line-2); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 10px; background: var(--bg-soft); color: var(--ink);
}
.lead-modal__form input:focus, .lead-modal__form textarea:focus { outline: none; background: #fff; box-shadow: var(--focus); border-color: var(--navy-2); }
.lead-modal__form button[type="submit"] {
    width: 100%; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; background: var(--red); color: #fff;
    border: 0; border-radius: 999px; padding: 14px; box-shadow: 0 8px 20px rgba(179, 25, 66, .3);
}
.lead-modal__form button[type="submit"]:hover { background: var(--red-dark); }
.lead-modal .lf-msg { font-size: 14px; margin-top: 10px; display: none; }
.lead-modal .lf-msg.ok { display: block; color: #14713d; }
.lead-modal .lf-msg.err { display: block; color: var(--red); }
.lead-modal .lf-agree { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

/* ==================== Фикс шапки на мобильном + круглая плавающая кнопка ==================== */
@media (max-width: 960px) {
    .header .wrap { gap: 10px; }
    .brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
    .brand__name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .header__cta--mobile { flex: 0 0 auto; padding: 8px 13px; font-size: 13px; }
    .burger { flex: 0 0 auto; }
}
@media (max-width: 420px) {
    .brand__name small { display: none; }
    .brand__mark { width: 36px; height: 36px; }
    .brand__name { font-size: 17px; }
}

/* FAB: круглая, только иконка (речевой пузырь с вопросом), с тултипом на десктопе */
.lead-fab { padding: 0; width: 58px; height: 58px; border-radius: 50%; justify-content: center; }
.lead-fab__text { display: none; }
.lead-fab__icon { font-size: 0; width: 26px; height: 26px; display: block;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 11.5a8.4 8.4 0 0 1-9 8.4 8.6 8.6 0 0 1-3.6-.8L3 21l1.9-4.6A8.4 8.4 0 0 1 3 11.5a8.5 8.5 0 0 1 9-8.4 8.5 8.5 0 0 1 9 8.4z'/><path d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.7.3-1 .8-1 1.5'/><circle cx='12' cy='16.5' r='.6' fill='white'/></svg>") center/contain no-repeat; }
.lead-fab::after { content: "Задать вопрос"; position: absolute; right: 68px; top: 50%; transform: translateY(-50%);
    background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 8px;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s; }
@media (hover: hover) { .lead-fab:hover::after { opacity: 1; } }
@media (max-width: 480px) { .lead-fab { width: 54px; height: 54px; padding: 0; } .lead-fab__icon { width: 24px; height: 24px; } }

/* ==================== Современный бургер (2 линии → крестик) и мобильное меню ==================== */
.burger { border: 0; background: transparent; padding: 10px; width: 44px; height: 44px; border-radius: 12px; position: relative; -webkit-tap-highlight-color: transparent; }
.burger:hover, .burger:focus-visible { background: var(--bg-soft); outline: none; }
.burger span { display: none; }
.burger .burger__line { display: block; position: absolute; left: 12px; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); margin: 0;
    transition: transform .28s cubic-bezier(.4,0,.2,1), top .28s cubic-bezier(.4,0,.2,1), width .2s; }
.burger .burger__line:nth-child(1) { top: 16px; }
.burger .burger__line:nth-child(2) { top: 26px; width: 14px; }
.burger.open .burger__line:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.open .burger__line:nth-child(2) { top: 21px; width: 20px; transform: rotate(-45deg); }

@media (max-width: 980px) {
    .nav { display: flex; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility 0s .2s;
        padding: 10px 14px 16px; border-radius: 0 0 18px 18px; }
    .nav.open { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .2s, transform .2s, visibility 0s; }
    .nav a { padding: 13px 12px; font-size: 16px; border-radius: 12px; border-bottom: 1px solid var(--line); }
    .nav a:last-child { border-bottom: 0; }
    .nav a:active { background: var(--bg-soft); }
    body.nav-open .lead-fab { display: none; }
}

/* Мобильная шапка без кнопки заявки — только бренд и бургер (заявка — плавающей кнопкой) */
@media (max-width: 960px) {
    .header__cta--mobile { display: none !important; }
    .burger { margin-left: auto; }
    .brand__name small { display: block; }
}
@media (max-width: 380px) { .brand__name small { display: none; } }

/* ==================== Логотип-эмблема (единый стиль) ==================== */
.brand__mark { display: none; }
.brand__logo { width: 44px; height: 44px; flex: 0 0 auto; display: block; border-radius: 50%; box-shadow: 0 2px 8px rgba(15, 32, 68, .18); }
@media (max-width: 420px) { .brand__logo { width: 38px; height: 38px; } }
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__logo { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }

/* ==================== Мессенджеры в шапке (WhatsApp / Telegram) ==================== */
.header__msg { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.header__msg-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-soft); border: 1px solid var(--line); text-decoration: none; transition: background-color .18s, transform .18s, border-color .18s; }
.header__msg-btn::before { content: ""; width: 20px; height: 20px; display: block; background-position: center; background-repeat: no-repeat; background-size: contain; }
.header__msg-btn:hover { background: #fff; border-color: var(--navy-2); transform: translateY(-1px); }
.header__msg-btn--wa::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316305e'><path d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.6.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 12 12 0 0 0 4.6 4c1.7.7 2.1.6 2.9.5a2.5 2.5 0 0 0 1.6-1.1 2 2 0 0 0 .1-1.1c0-.1-.2-.2-.5-.3z'/></svg>"); }
.header__msg-btn--tg::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316305e'><path d='M21.9 4.6L18.9 19c-.2 1-.8 1.3-1.7.8l-4.6-3.4-2.2 2.1c-.2.2-.5.4-.9.4l.3-4.7 8.5-7.7c.4-.3-.1-.5-.6-.2L7.2 13 2.7 11.6c-1-.3-1-1 .2-1.4L20.6 3.4c.8-.3 1.5.2 1.3 1.2z'/></svg>"); }
@media (max-width: 960px) {
    .header__msg { margin-left: auto; margin-right: 2px; }
    .header__msg-btn { width: 38px; height: 38px; }
    .burger { margin-left: 0; }
}
@media (min-width: 961px) { .header__msg { margin-left: 8px; } }

/* ==================== Верхняя полоса: одна строка на мобильном ==================== */
.topbar__short { display: none; }
.topbar__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 960px) {
    .topbar .wrap { min-height: 32px; justify-content: center; }
    .topbar__full { display: none; }
    .topbar__short { display: inline; }
    .topbar__contacts { display: none; }   /* e-mail остаётся в меню-подвале и на странице контактов */
    .topbar__text { font-size: 12.5px; letter-spacing: .01em; }
}

/* ==================== Мобильная шапка: бренд не перекрывается иконками ==================== */
@media (max-width: 960px) {
    .header .wrap { gap: 8px; }
    .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
    .brand__name { min-width: 0; overflow: hidden; }
    .brand__name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
    .header__msg { flex: 0 0 auto; gap: 6px; margin-left: 4px; margin-right: 0; }
    .header__msg-btn { width: 36px; height: 36px; }
    .burger { flex: 0 0 auto; width: 40px; height: 40px; padding: 8px; }
    .burger .burger__line { left: 10px; }
}
@media (max-width: 480px) { .brand__name { font-size: 17px; } .brand__name small { display: none; } .brand__logo { width: 36px; height: 36px; } }

/* ==================== Мобильная шапка: слоган всегда виден, мессенджеры — в меню ==================== */
.nav__msg { display: none; }
@media (max-width: 960px) {
    .header__msg { display: none; }                 /* иконки из шапки убираем */
    .brand__name small { display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand__name { font-size: 18px; }
    .brand__logo { width: 42px; height: 42px; }
    .burger { margin-left: auto; }
    /* мессенджеры — первой строкой меню */
    .nav__msg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 4px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
    .nav__msg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; border-radius: 12px; font-weight: 700; font-size: 15px; text-decoration: none; color: #fff !important; border: 0 !important; }
    .nav__msg-btn--wa { background: #25d366; }
    .nav__msg-btn--tg { background: #229ed9; }
    .nav__msg-ic { width: 20px; height: 20px; display: inline-block; background: center/contain no-repeat; }
    .nav__msg-ic--wa { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.6.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 12 12 0 0 0 4.6 4c1.7.7 2.1.6 2.9.5a2.5 2.5 0 0 0 1.6-1.1 2 2 0 0 0 .1-1.1c0-.1-.2-.2-.5-.3z'/></svg>"); }
    .nav__msg-ic--tg { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M21.9 4.6L18.9 19c-.2 1-.8 1.3-1.7.8l-4.6-3.4-2.2 2.1c-.2.2-.5.4-.9.4l.3-4.7 8.5-7.7c.4-.3-.1-.5-.6-.2L7.2 13 2.7 11.6c-1-.3-1-1 .2-1.4L20.6 3.4c.8-.3 1.5.2 1.3 1.2z'/></svg>"); }
}
@media (max-width: 380px) { .brand__name { font-size: 16.5px; } .brand__name small { font-size: 10.5px; } }

/* ==================== Мобильная шапка: короткий слоган, иконки мессенджеров в шапке ==================== */
.brand__tag-short { display: none; }
@media (max-width: 960px) {
    .header__msg { display: flex; margin-left: auto; margin-right: 2px; gap: 6px; }
    .header__msg-btn { width: 36px; height: 36px; }
    .burger { margin-left: 0; }
    .nav__msg { display: none; }
    .brand__tag-full { display: none; }
    .brand__tag-short { display: inline; }
    .brand__name small { display: block !important; white-space: nowrap; }
    .brand { flex: 1 1 auto; min-width: 0; }
}

/* слоган под логотипом — чуть выразительнее */
.brand__name small { font-weight: 600; color: var(--red); letter-spacing: .02em; }
@media (max-width: 960px) { .brand__name small { font-size: 11px; } }

/* слоган под логотипом — серый, спокойный */
.brand__name small { color: var(--muted); font-weight: 500; }

/* ==================== Доверие: флаги, гарантии, кейсы, реквизиты ==================== */
.hero__flags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 18px; font-size: 13.5px; }
.hero__flags-label { color: #9fb0d0; margin-right: 4px; }
.hero__flags a { display: inline-flex; align-items: center; gap: 7px; color: #e6ecf6; text-decoration: none; padding: 5px 10px 5px 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.05); }
.hero__flags a:hover { background: rgba(255,255,255,.12); color: #fff; }
.fl { display: inline-block; width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); background-size: cover; }
.fl-il { background: linear-gradient(#fff 0 18%, #0038b8 18% 32%, #fff 32% 68%, #0038b8 68% 82%, #fff 82%); }
.fl-kz { background: #00afca; position: relative; }
.fl-kz::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: #fec50c; }
.fl-am { background: linear-gradient(#d90012 0 33.3%, #0033a0 33.3% 66.6%, #f2a800 66.6%); }
.fl-uz { background: linear-gradient(#1eb53a 0 30%, #ce1126 30% 34%, #fff 34% 66%, #ce1126 66% 70%, #0099b5 70%); }
.fl-ae { background: linear-gradient(90deg, #ff0000 0 28%, transparent 28%), linear-gradient(#00732f 0 33.3%, #fff 33.3% 66.6%, #000 66.6%); }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 8px; }
.trust__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow); position: relative; padding-left: 54px; }
.trust__item::before { content: ""; position: absolute; left: 20px; top: 24px; width: 18px; height: 10px; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); }
.trust__item b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 6px; }
.trust__item span { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }

.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 8px; }
.case { background: var(--cream); border: 1px solid #ecdfbf; border-radius: var(--radius-lg); padding: 24px 24px 20px; position: relative; }
.case::before { content: "“"; position: absolute; right: 18px; top: 4px; font-family: var(--serif); font-size: 64px; line-height: 1; color: rgba(179,25,66,.18); }
.case__meta { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.case h3 { margin: 0 0 8px; font-size: 18px; }
.case p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.6; }

.footer__legal { font-size: 13px; color: #c9d4e8; margin: 12px 0 0; line-height: 1.6; }
.footer__legal a { color: #e6ecf6; }

/* Реквизиты в футере — построчно, без рваных переносов */
.footer__legal { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; color: #c9d4e8; line-height: 1.7; }
.footer__legal li { margin: 0; }
.footer__legal .nowrap { white-space: nowrap; }
.footer__sep { color: #7f92b5; margin: 0 2px; }
.footer__bottom span { line-height: 1.6; }
@media (max-width: 480px) { .footer__bottom { flex-direction: column; gap: 6px; } }

/* Таблицы: скролл строго внутри контейнера, страница не расползается */
.content, .content-grid > * , .sidebar { min-width: 0; }
.content { max-width: 100%; overflow-wrap: anywhere; }
.tbl-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { min-width: 520px; }
@media (max-width: 640px) {
    table.tbl { font-size: 13.5px; }
    .tbl th, .tbl td { padding: 10px 12px; }
    .tbl-scroll::after { content: "← прокрутите таблицу →"; display: block; font-size: 11.5px; color: var(--muted); padding: 6px 12px 8px; }
}

/* «Читайте также» */
.related { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line-2); }
.related__title { font-size: 20px !important; margin: 0 0 12px !important; padding-bottom: 0 !important; }
.related__title::after { display: none !important; }
.related__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 22px; }
.related__list li { margin: 0; padding-left: 18px; position: relative; font-size: 15.5px; }
.related__list li::before { content: "→"; position: absolute; left: 0; color: var(--red); }
.related__list a { text-decoration: none; color: var(--navy-2); }
.related__list a:hover { color: var(--red); text-decoration: underline; }

/* Таблицы v2: слова не рвём, первая колонка не сжимается, ширина по числу колонок */
.content { overflow-wrap: normal; word-break: normal; }
.content p, .content li { overflow-wrap: anywhere; }          /* длинные ссылки в тексте — можно */
table.tbl { min-width: 0; width: 100%; table-layout: auto; }
.tbl th, .tbl td { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.tbl th:first-child, .tbl td:first-child { white-space: nowrap; }  /* «Пакет», «Астана» — целиком */
.tbl td:first-child b, .tbl th:first-child { font-weight: 700; }
/* 3+ колонок: на узком экране таблица шире экрана и скроллится внутри рамки */
@media (max-width: 640px) {
    table.tbl { min-width: 560px; }
    .tbl th:first-child, .tbl td:first-child { white-space: normal; min-width: 130px; }
    .tbl th, .tbl td { min-width: 120px; }
}
/* 2 колонки (плюсы/минусы) — влезают без скролла */
@media (max-width: 640px) {
    table.tbl.tbl--2 { min-width: 0; }
    table.tbl.tbl--2 th, table.tbl.tbl--2 td { min-width: 0; }
}

/* ==================== Таблицы на мобильном: карточки вместо скролла ==================== */
@media (max-width: 640px) {
    .tbl-scroll { overflow: visible; border: 0; border-radius: 0; }
    .tbl-scroll::after { display: none; }
    table.tbl, table.tbl.tbl--2 { min-width: 0; width: 100%; display: block; border: 0; }
    table.tbl thead, table.tbl tr:first-child:has(th) { display: none; }   /* строка заголовков скрыта — метки идут в ячейки */
    table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; min-width: 0; }
    table.tbl tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 6px 0; box-shadow: var(--shadow); overflow: hidden; }
    table.tbl tr:nth-child(even) td { background: transparent; }
    table.tbl td { border: 0 !important; padding: 8px 16px; font-size: 15px; white-space: normal !important; }
    table.tbl td + td { border-top: 1px dashed var(--line) !important; }
    table.tbl td::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
    /* первая ячейка — заголовок карточки, крупно, без метки */
    table.tbl td:first-child { padding-top: 12px; font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); }
    table.tbl td:first-child::before { display: none; }
    table.tbl td:last-child { padding-bottom: 12px; }
    /* двухколоночные «плюсы/минусы»: метки-заголовки видны */
    table.tbl.tbl--2 td:first-child { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--ink-2); padding-top: 8px; }
    table.tbl.tbl--2 td:first-child::before { display: block; }
}

/* header-fit-20260819 */
/* Шапка на десктопе: бренд + 8 пунктов (у стран — флаги) + кнопка помещаются в 1140px без переносов.
   Мессенджеры из шапки убраны — они есть в верхней плашке (topbar) и в мобильном меню. */
@media (min-width: 981px) {
    .header .wrap { gap: 12px; }
    .header__msg { display: none; }
    .nav { gap: 0; flex-wrap: nowrap; }
    .nav a { white-space: nowrap; font-size: 13px; font-weight: 400; padding: 8px 6px; display: inline-flex; align-items: center; gap: 5px; }
    .header__cta { padding: 11px 16px; font-size: 14px; }
}
@media (min-width: 981px) and (max-width: 1180px) {
    .nav a { font-size: 12px; padding: 7px 4px; gap: 4px; }
    .header__cta { padding: 10px 12px; font-size: 13px; }
    .brand__name small { display: none; }
    .brand__logo { width: 38px; height: 38px; }
}
/* Флаги стран в меню */
.nav__flag { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: 0 0 auto; }
@media (min-width: 981px) and (max-width: 1180px) { .nav__flag { width: 16px; height: 11px; } }
@media (max-width: 980px) { .nav a { display: flex; align-items: center; gap: 8px; } .nav__flag { width: 20px; height: 14px; } }
