/* rabotaplus.kz — стили блога. Наследуют дизайн-систему лендинга. */
:root {
    --brand-red: #BC2B2B;
    --brand-black: #0F172A;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-gray: #475569;
    --card-border: #E2E8F0;
    --match-green-bg: #DCFCE7;
    --match-green-text: #166534;
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #fff; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff; color: var(--brand-black);
    overflow-x: hidden; line-height: 1.65;
    padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
a { color: inherit; text-decoration: none; transition: .25s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }

/* ---------- HEADER ---------- */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
    border-bottom: 1px solid #F1F5F9; padding: 14px 0;
}
.nav-wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: -.5px; flex-shrink: 0; }
.logo span { color: var(--brand-red); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-weight: 600; color: var(--text-gray); font-size: .95rem; white-space: nowrap; }
.nav-links a:hover { color: var(--brand-red); }
/* «Бизнесу» и «Блог» — отдельные страницы, отделяем разделителем перед первой */
.nav-links a.nav-sep { position: relative; margin-left: 6px; padding-left: 26px; color: var(--brand-black); font-weight: 700; }
.nav-links a.nav-sep::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 2px; height: 20px; border-radius: 2px; background: #CBD5E1;
}
.nav-links a.nav-blog { color: var(--brand-black); font-weight: 700; }
.nav-links a.is-active { color: var(--brand-red) !important; }
.nav-links a.nav-sep:hover, .nav-links a.nav-blog:hover { color: var(--brand-red); }
.nav-cta { white-space: nowrap; }

/* Бургер */
.nav-buttons-mobile { display: none; }

/* Правая часть шапки */
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-switcher {
    display: flex; align-items: center; gap: 4px;
    background: var(--bg-light); border-radius: 10px; padding: 4px;
}
.lang-btn {
    padding: 6px 13px; border: none; border-radius: 8px; font-family: inherit;
    font-weight: 600; font-size: .85rem; cursor: pointer;
    background: transparent; color: var(--text-gray); transition: .25s;
}
.lang-btn:hover { color: var(--brand-black); }
.lang-btn.active { background: #fff; color: var(--brand-red); box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* Пометка «статья на русском» */
.lang-note {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-light); border-radius: 10px;
    padding: 12px 16px; margin: 0 0 26px;
    font-size: .92rem; color: var(--text-gray);
}
.lang-note i { color: var(--brand-red); }
.post-card .card-lang {
    display: inline-flex; align-items: center;
    background: #F1F5F9; color: #64748B;
    font-size: .68rem; font-weight: 800; letter-spacing: .6px;
    padding: 3px 7px; border-radius: 5px; line-height: 1;
}
.nav-burger {
    display: none; flex-direction: column; justify-content: center; gap: 4px;
    width: 36px; height: 36px; min-width: 36px; background: none; border: none;
    cursor: pointer; padding: 6px;
}
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--brand-black); transition: .3s; }
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Промежуточные экраны: держим меню в одну строку */
@media (min-width: 1081px) and (max-width: 1340px) {
    .logo { font-size: 1.32rem; }
    .nav-links { gap: 13px; }
    .nav-links a { font-size: .85rem; }
    .nav-links a.nav-sep { margin-left: 4px; padding-left: 17px; }
    .nav-cta { padding: 9px 15px; font-size: .85rem; }
    .nav-right { gap: 7px; }
    .lang-switcher { padding: 3px; }
    .lang-btn { padding: 5px 9px; font-size: .78rem; }
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: 12px; font-weight: 700; cursor: pointer;
    border: none; transition: .3s; font-size: .95rem; font-family: inherit;
}
.btn-red { background: var(--brand-red); color: #fff; box-shadow: 0 8px 18px rgba(188,43,43,.28); }
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(188,43,43,.34); }
.btn-outline { border: 2px solid var(--card-border); background: transparent; color: var(--brand-black); }
.btn-outline:hover { border-color: var(--brand-red); color: var(--brand-red); }

/* ---------- ARTICLE ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 120px 20px 60px; }
.breadcrumbs { font-size: .85rem; color: #94A3B8; margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--brand-red); }
.breadcrumbs span { margin: 0 6px; }
h1 { font-size: 2.7rem; font-weight: 900; line-height: 1.15; letter-spacing: -1px; margin-bottom: 20px; }
.article-meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    font-size: .88rem; color: var(--text-gray); padding-bottom: 28px;
    border-bottom: 1px solid var(--card-border); margin-bottom: 32px;
}
.article-meta i { color: var(--brand-red); margin-right: 5px; }
.lead { font-size: 1.18rem; color: #334155; font-weight: 500; line-height: 1.7; margin-bottom: 32px; }

/* TL;DR — блок прямого ответа (ключ к цитированию в AI) */
.tldr {
    background: var(--bg-light); border-left: 4px solid var(--brand-red);
    border-radius: 12px; padding: 24px 28px; margin: 32px 0;
}
.tldr-title {
    font-size: .78rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--brand-red); margin-bottom: 12px;
}
.tldr p, .tldr li { font-size: 1rem; color: #334155; line-height: 1.65; }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin-bottom: 7px; }

/* Оглавление */
.toc { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 24px 28px; margin: 32px 0; }
.toc-title { font-weight: 800; font-size: 1rem; margin-bottom: 14px; }
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 9px; color: var(--text-gray); font-size: .96rem; }
.toc a:hover { color: var(--brand-red); }

.article-body h2 {
    font-size: 1.75rem; font-weight: 800; line-height: 1.3;
    margin: 48px 0 18px; scroll-margin-top: 90px; letter-spacing: -.4px;
}
.article-body h3 { font-size: 1.25rem; font-weight: 700; margin: 32px 0 12px; scroll-margin-top: 90px; }
.article-body p { margin-bottom: 18px; color: #334155; font-size: 1.05rem; }
.article-body ul, .article-body ol { margin: 0 0 20px 22px; color: #334155; font-size: 1.05rem; }
.article-body li { margin-bottom: 10px; }
.article-body strong { font-weight: 700; color: var(--brand-black); }
.article-body a:not(.btn) { color: var(--brand-red); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

/* Таблицы */
.table-wrap { overflow-x: auto; margin: 26px 0; border-radius: 12px; border: 1px solid var(--card-border); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 480px; }
th { background: var(--bg-light); font-weight: 800; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--card-border); }
td { padding: 14px 16px; border-bottom: 1px solid #F1F5F9; color: #334155; vertical-align: top; }
tr:last-child td { border-bottom: none; }

/* Врезки */
.callout {
    display: flex; gap: 16px; padding: 20px 24px; border-radius: 14px;
    margin: 28px 0; border: 1px solid var(--card-border); background: #fff;
}
.callout-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; }
.callout p { margin: 0; font-size: .99rem; }
.callout.tip { background: #F0FDF4; border-color: #BBF7D0; }
.callout.tip .callout-icon { background: #22c55e; }
.callout.warn { background: #FEF2F2; border-color: #FECACA; }
.callout.warn .callout-icon { background: var(--brand-red); }
.callout.info { background: var(--bg-light); border-color: var(--card-border); }
.callout.info .callout-icon { background: var(--brand-black); }
.callout.info p + p { margin-top: 10px; }

/* Чеклист / нумерованные шаги */
.steps { list-style: none; margin: 26px 0 !important; padding: 0 !important; counter-reset: st; }
.steps li {
    position: relative; padding: 0 0 0 52px; margin-bottom: 24px; counter-increment: st;
}
.steps li::before {
    content: counter(st); position: absolute; left: 0; top: -2px;
    width: 34px; height: 34px; border-radius: 10px; background: var(--brand-red); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem;
}
.steps li strong { display: block; margin-bottom: 5px; font-size: 1.06rem; }

/* CTA */
.cta-box {
    background: var(--brand-black); border-radius: 20px; padding: 40px 36px;
    margin: 48px 0; text-align: center; color: #fff;
}
.cta-box h3 { font-size: 1.55rem; font-weight: 800; margin-bottom: 12px; color: #fff; }
.cta-box p { color: rgba(255,255,255,.72); margin-bottom: 24px; font-size: 1.02rem; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-box .btn-outline { border-color: rgba(255,255,255,.25); color: #fff; }
.cta-box .btn-outline:hover { border-color: #fff; color: #fff; }

/* FAQ статьи */
.faq-section { margin: 48px 0; }
.faq-q {
    background: #fff; border: 1px solid var(--card-border); border-radius: 12px;
    margin-bottom: 12px; overflow: hidden; transition: .3s;
}
.faq-q:hover { border-color: #94A3B8; }
.faq-q summary {
    padding: 18px 22px; cursor: pointer; font-weight: 700; font-size: 1.05rem;
    display: flex; justify-content: space-between; align-items: center; gap: 14px; list-style: none;
}
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary::after {
    content: '+'; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    background: #FFF1F2; color: var(--brand-red); display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; font-weight: 700; transition: .3s;
}
.faq-q[open] summary::after { content: '−'; background: var(--brand-red); color: #fff; }
.faq-q[open] { border-color: rgba(188,43,43,.3); }
.faq-a { padding: 0 22px 20px; color: var(--text-gray); font-size: 1rem; line-height: 1.7; }
.faq-a p { margin-bottom: 12px; }
.faq-a p:last-child { margin-bottom: 0; }

/* Автор / доверие (E-E-A-T) */
.author-box {
    display: flex; gap: 16px; align-items: flex-start; padding: 24px;
    background: var(--bg-light); border-radius: 14px; margin: 44px 0 0;
}
.author-avatar {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
    background: var(--brand-red); color: #fff; display: flex; align-items: center;
    justify-content: center; font-weight: 900; font-size: 1.1rem;
}
.author-box .author-name { font-weight: 800; margin-bottom: 4px; }
.author-box p { font-size: .92rem; color: var(--text-gray); margin: 0; line-height: 1.6; }

/* Читайте также */
.related { margin: 48px 0 0; }
.related h2 { font-size: 1.4rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card {
    border: 1px solid var(--card-border); border-radius: 14px; padding: 22px;
    transition: transform .35s var(--ease-bounce), box-shadow .35s, border-color .3s;
}
.related-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px rgba(0,0,0,.08); border-color: rgba(188,43,43,.25); }
.related-card .rc-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--brand-red); margin-bottom: 8px; }
.related-card .rc-title { font-weight: 700; font-size: 1.02rem; line-height: 1.4; }

/* ---------- BLOG INDEX ---------- */
.blog-hero { padding: 140px 0 50px; text-align: center; }
.blog-hero h1 { font-size: 3rem; margin-bottom: 16px; }
.blog-hero p { color: var(--text-gray); font-size: 1.12rem; max-width: 620px; margin: 0 auto; }
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding-bottom: 80px; }
.post-card {
    border: 1px solid var(--card-border); border-radius: 18px; padding: 30px;
    display: flex; flex-direction: column; background: #fff;
    transition: transform .4s var(--ease-bounce), box-shadow .4s, border-color .3s;
}
.post-card:hover { transform: translateY(-8px); box-shadow: 0 24px 48px rgba(0,0,0,.1); border-color: rgba(188,43,43,.25); }
.post-card .pc-tag {
    display: inline-block; align-self: flex-start; background: #FFF1F2; color: var(--brand-red);
    font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
    padding: 5px 11px; border-radius: 20px; margin-bottom: 16px;
}
.post-card h2 { font-size: 1.35rem; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.post-card p { color: var(--text-gray); font-size: .97rem; margin-bottom: 20px; flex-grow: 1; }
.post-card .pc-meta { font-size: .84rem; color: #94A3B8; display: flex; gap: 14px; align-items: center; }
.post-card .pc-meta i { color: var(--brand-red); margin-right: 4px; }

/* ---------- FOOTER ---------- */
footer { background: #0F0F0F; color: #fff; padding: 50px 0 30px; margin-top: 60px; }
.footer-top {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 26px; padding-bottom: 26px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-logo { font-size: 1.4rem; font-weight: 900; }
.footer-logo span { color: var(--brand-red); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
    width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center;
    justify-content: center; color: rgba(255,255,255,.5); font-size: 1rem;
}
.footer-socials a:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateY(-2px); }
.footer-contacts { font-size: .86rem; text-align: right; }
.footer-contacts a { color: rgba(255,255,255,.85); font-weight: 600; }
.footer-contacts a:hover { color: var(--brand-red); }
.footer-phone { color: rgba(255,255,255,.45); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 18px; padding-top: 22px;
    color: rgba(255,255,255,.3); font-size: .78rem; line-height: 1.6;
}
.footer-bottom a { color: rgba(255,255,255,.35); }
.footer-bottom a:hover { color: var(--brand-red); }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- MOBILE ---------- */
/* До 1080px меню прячем в бургер — как на главной */
@media (max-width: 1080px) {
    header { padding: 12px 0; }
    .nav-wrap { flex-wrap: wrap; gap: 8px; }
    .nav-burger { display: flex; order: 2; }
    /* Шапка: логотип, переключатель языков, бургер. Кнопка — внутри меню */
    header .nav-cta { display: none; }
    .nav-right { order: 2; margin-left: auto; gap: 4px; }
    .nav-right .lang-switcher { padding: 3px; }
    .nav-right .lang-btn { padding: 6px 11px; font-size: .8rem; }
    header.nav-open { background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.07); }
    .nav-links.open .nav-buttons-mobile {
        display: flex; width: 100%; margin-top: 18px; padding-top: 18px;
        border-top: 1px solid var(--card-border);
    }
    .nav-links.open .nav-buttons-mobile .btn { width: 100%; padding: 13px 20px; font-size: .95rem; }
    /* .nav-links a перекрашивает ссылки в серый — возвращаем кнопке белый текст */
    .nav-links .nav-buttons-mobile a.btn-red { color: #fff; }
    .nav-links {
        display: none; width: 100%; order: 4; flex-direction: column;
        align-items: flex-start; gap: 0; padding: 16px 0 6px;
        border-top: 1px solid var(--card-border); margin-top: 12px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { margin: 11px 0; font-size: 1rem; }
    .nav-links a.nav-blog {
        margin-left: 0; padding-left: 0; padding-top: 15px; margin-top: 3px;
        width: 100%; border-top: 1px solid var(--card-border);
    }
    .nav-links a.nav-blog::before { display: none; }
}

@media (max-width: 400px) {
    .logo { font-size: 1.05rem; }
    .nav-right .lang-btn { padding: 5px 8px; font-size: .74rem; }
}

@media (max-width: 768px) {
    header { padding: 10px 0; }
    .nav-links {
        display: none; width: 100%; order: 3; flex-direction: column;
        align-items: flex-start; gap: 0; padding: 16px 0 6px;
        border-top: 1px solid var(--card-border); margin-top: 12px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { margin: 11px 0; font-size: 1rem; }
    .nav-links a.nav-blog {
        margin-left: 0; padding-left: 0; padding-top: 15px; margin-top: 3px;
        width: 100%; border-top: 1px solid var(--card-border);
    }
    .nav-links a.nav-blog::before { display: none; }
    .logo { font-size: 1.2rem; }
    .btn { padding: 9px 16px; font-size: .88rem; }
    .article-wrap { padding: 96px 18px 40px; }
    h1 { font-size: 1.95rem; letter-spacing: -.5px; }
    .lead { font-size: 1.06rem; }
    .article-body h2 { font-size: 1.4rem; margin: 38px 0 14px; }
    .article-body h3 { font-size: 1.13rem; }
    .article-body p, .article-body ul, .article-body ol { font-size: 1rem; }
    .tldr, .toc { padding: 20px 22px; }
    .cta-box { padding: 32px 24px; }
    .cta-box h3 { font-size: 1.3rem; }
    .cta-buttons { flex-direction: column; }
    .cta-buttons .btn { width: 100%; }
    .related-grid, .posts-grid { grid-template-columns: 1fr; }
    .blog-hero { padding: 110px 0 36px; }
    .blog-hero h1 { font-size: 2.1rem; }
    .blog-hero p { font-size: 1rem; }
    .footer-top { flex-direction: column; text-align: center; }
    .footer-contacts { text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .steps li { padding-left: 46px; }
}
