/* ==========================================================================
   Юрист — основные стили.
   Палитра: глубокий синий (доверие) + золото (статус, акцент).
   ========================================================================== */
:root {
    --primary: #16283C;        /* тёмно-синий, основа */
    --primary-light: #24405C;
    --accent: #C8A45C;         /* золото — кнопки и акценты */
    --accent-hover: #B08D42;
    --bg-light: #F6F7F9;
    --bg-soft: #EDF1F5;
    --text-main: #22303C;
    --text-muted: #5C6B7A;
    --border: #DFE5EB;
    --success: #2E7D5B;
    --container-width: 1200px;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(22, 40, 60, .10);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', -apple-system, Segoe UI, sans-serif; }

body { color: var(--text-main); background: #fff; line-height: 1.6; font-size: 16px; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--primary); font-weight: 700; }
h1 { font-size: 2.4rem; margin-bottom: 18px; }
h2 { font-size: 1.9rem; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 10px; }

.section { padding: 70px 0; }
.section--soft { background: var(--bg-light); }
.section__title { text-align: center; margin-bottom: 12px; }
.section__subtitle { text-align: center; color: var(--text-muted); max-width: 760px; margin: 0 auto 40px; }

/* --- Кнопки --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--radius); font-weight: 700; font-size: .95rem;
    border: 2px solid transparent; cursor: pointer; transition: all .25s; text-align: center;
    line-height: 1.2;
}
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--primary); border-color: #fff; }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- Шапка --- */
.header {
    position: sticky; top: 0; z-index: 900; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: 0 2px 12px rgba(22,40,60,.06);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); display: inline-flex; }
.logo span { color: var(--accent); }

.nav__list { display: flex; gap: 22px; align-items: center; }
.nav__link { font-size: .93rem; font-weight: 600; color: var(--text-main); white-space: nowrap; }
.nav__link:hover { color: var(--accent-hover); }

/* Выпадающее меню услуг: перелинковка всех посадочных страниц */
.nav__item-drop { position: relative; }
.nav__drop {
    position: absolute; top: 100%; left: -18px; min-width: 340px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 10px; opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all .22s; max-height: 70vh; overflow-y: auto;
}
.nav__item-drop:hover .nav__drop, .nav__item-drop:focus-within .nav__drop {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__drop a {
    display: block; padding: 9px 12px; font-size: .88rem; color: var(--text-main);
    border-radius: 6px; font-weight: 500;
}
.nav__drop a:hover { background: var(--bg-light); color: var(--primary); }

.header__contacts { display: flex; align-items: center; gap: 16px; }
.header__phone { font-size: 1.05rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.header__phone:hover { color: var(--accent-hover); }

.burger-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger-btn span { width: 26px; height: 3px; background: var(--primary); border-radius: 2px; transition: .3s; }
.burger-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.active span:nth-child(2) { opacity: 0; }
.burger-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Мобильное меню --- */
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: min(360px, 88vw); height: 100vh; background: #fff;
    z-index: 1000; transition: right .3s ease; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.15);
}
.mobile-menu.active { right: 0; }
.mobile-menu__inner { padding: 80px 24px 40px; }
.mobile-menu__list { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__link { display: block; padding: 12px 0; font-size: 1.05rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.mobile-menu__services { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.mobile-menu__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px; }
.mobile-menu__sub { padding: 8px 0; font-size: .88rem; color: var(--text-muted); border-bottom: 1px dashed var(--border); }
.mobile-menu__cta { width: 100%; margin-top: 26px; }
.menu-overlay { position: fixed; inset: 0; background: rgba(10,18,28,.55); z-index: 999; opacity: 0; visibility: hidden; transition: .3s; }
.menu-overlay.active { opacity: 1; visibility: visible; }

/* --- Хлебные крошки: помогают и пользователю, и поисковику --- */
.breadcrumbs { padding: 16px 0; font-size: .84rem; color: var(--text-muted); background: var(--bg-light); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.breadcrumbs li::after { content: '/'; margin-left: 8px; color: var(--border); }
.breadcrumbs li:last-child::after { content: ''; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent-hover); }

/* --- Первый экран --- */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; padding: 70px 0; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: center; }
.hero h1 { color: #fff; font-size: 2.6rem; }
.hero__sub { font-size: 1.08rem; color: rgba(255,255,255,.88); margin-bottom: 26px; max-width: 620px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero__badge {
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
    padding: 9px 16px; border-radius: 40px; font-size: .84rem; font-weight: 600;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.hero__fact-num { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.hero__fact-label { font-size: .82rem; color: rgba(255,255,255,.78); }

/* --- Форма заявки --- */
.lead-form { background: #fff; border-radius: 14px; padding: 30px; box-shadow: var(--shadow); }
.lead-form__title { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.lead-form__label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-muted); margin: 14px 0 6px; }
.lead-form__label span { color: #C0392B; }
.lead-form__input {
    width: 100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: .95rem; background: #fff; color: var(--text-main); transition: border-color .2s;
}
.lead-form__input:focus { outline: none; border-color: var(--accent); }
textarea.lead-form__input { resize: vertical; min-height: 84px; }
.lead-form__btn { width: 100%; margin-top: 20px; }
.lead-form__note { font-size: .74rem; color: var(--text-muted); margin-top: 12px; text-align: center; line-height: 1.5; }
.lead-form__note a { text-decoration: underline; }

.lead-form__success { text-align: center; padding: 22px 6px; }
.lead-form__success-icon {
    width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; background: var(--success);
    color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center;
}
.lead-form__success-title { font-size: 1.25rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.lead-form__success p { color: var(--text-muted); font-size: .92rem; }
.lead-form__success a { font-weight: 700; white-space: nowrap; }

/* --- Сетки карточек --- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; transition: all .25s; height: 100%; display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--accent); }
.card__num { font-size: .78rem; font-weight: 800; color: var(--accent); letter-spacing: .1em; margin-bottom: 10px; }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card p { font-size: .9rem; color: var(--text-muted); flex-grow: 1; }
.card__link { margin-top: 16px; font-size: .86rem; font-weight: 700; color: var(--accent-hover); }
.card__price { font-size: .85rem; font-weight: 700; color: var(--primary); margin-top: 12px; }

/* --- Список преимуществ / что входит --- */
.checklist { display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; font-size: .94rem; color: var(--text-main); }
.checklist li::before {
    content: '✓'; position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.checklist--2 { grid-template-columns: repeat(2, 1fr); gap: 12px 26px; }

/* --- Шаги работы --- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding-top: 54px; }
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 50%;
    background: var(--primary); color: var(--accent); font-weight: 800; font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1rem; }
.step p { font-size: .88rem; color: var(--text-muted); }

/* --- Таблица цен --- */
.price-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.price-table th, .price-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; }
.price-table th { background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover { background: var(--bg-light); }
.price-table a { font-weight: 600; }

/* --- FAQ (та же информация уходит в микроразметку FAQPage) --- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq__question {
    padding: 18px 52px 18px 22px; font-weight: 700; font-size: 1rem; color: var(--primary);
    cursor: pointer; position: relative; background: none; border: none; width: 100%; text-align: left;
}
.faq__question::after {
    content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; color: var(--accent); font-weight: 400; transition: transform .25s;
}
.faq__item.open .faq__question::after { content: '−'; }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; padding: 0 22px; }
.faq__item.open .faq__answer { max-height: 600px; padding: 0 22px 20px; }
.faq__answer p { font-size: .93rem; color: var(--text-muted); }

/* --- Отзывы --- */
.review { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 24px; }
.review__text { font-size: .93rem; color: var(--text-main); font-style: italic; margin-bottom: 14px; }
.review__author { font-weight: 700; font-size: .9rem; color: var(--primary); }
.review__case { font-size: .8rem; color: var(--text-muted); }
.review__stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; }

/* --- SEO-текст: длинный контент внизу страницы --- */
.seo-text { max-width: 880px; margin: 0 auto; }
.seo-text h2, .seo-text h3 { margin-top: 30px; }
.seo-text p { margin-bottom: 14px; font-size: .95rem; color: var(--text-muted); }
.seo-text ul { margin: 0 0 16px 0; display: grid; gap: 8px; }
.seo-text ul li { padding-left: 20px; position: relative; font-size: .95rem; color: var(--text-muted); }
.seo-text ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

/* --- Конверсионная полоса перед подвалом --- */
.cta-band { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; padding: 64px 0; }
.cta-band__inner { display: grid; grid-template-columns: 1fr .8fr; gap: 44px; align-items: center; }
.cta-band__title { color: #fff; font-size: 1.85rem; }
.cta-band__sub { color: rgba(255,255,255,.86); margin-bottom: 22px; }
.cta-band__list { display: grid; gap: 10px; }
.cta-band__list li { position: relative; padding-left: 28px; font-size: .93rem; color: rgba(255,255,255,.94); }
.cta-band__list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* --- Подвал --- */
.footer { background: #0F1D2C; color: rgba(255,255,255,.72); padding: 56px 0 26px; font-size: .9rem; }
.footer .logo { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer__title { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__text { font-size: .87rem; line-height: 1.7; color: rgba(255,255,255,.66); }
.footer__list { display: grid; gap: 9px; }
.footer__list a, .footer__list li { color: rgba(255,255,255,.72); font-size: .85rem; }
.footer__list a:hover { color: var(--accent); }
.footer__list--contacts li { line-height: 1.5; }
.footer__muted { color: rgba(255,255,255,.45); font-size: .8rem; }
.footer__socials { display: flex; gap: 12px; margin-top: 16px; }
.footer__socials a {
    padding: 7px 15px; border: 1px solid rgba(255,255,255,.25); border-radius: 30px;
    font-size: .8rem; color: rgba(255,255,255,.85); font-weight: 600;
}
.footer__socials a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer__btn { margin-top: 18px; width: 100%; }
.footer__bottom {
    margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
    display: grid; gap: 8px; font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer__bottom a { color: rgba(255,255,255,.7); text-decoration: underline; }
.footer__disclaimer { font-size: .76rem; line-height: 1.6; color: rgba(255,255,255,.42); }

/* --- Модальные окна --- */
.modal {
    position: fixed; inset: 0; background: rgba(10,18,28,.72); z-index: 1100;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: opacity .25s; overflow-y: auto;
}
.modal.active { opacity: 1; visibility: visible; }
.modal__box {
    background: #fff; border-radius: 14px; padding: 36px 30px; width: 100%; max-width: 440px;
    position: relative; transform: translateY(16px); transition: transform .28s; max-height: 92vh; overflow-y: auto;
}
.modal.active .modal__box { transform: translateY(0); }
.modal__box--wide { max-width: 620px; }
.modal__close {
    position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 1.9rem;
    line-height: 1; color: var(--text-muted); cursor: pointer; transition: color .2s;
}
.modal__close:hover { color: var(--primary); }
.modal__title { font-size: 1.32rem; margin-bottom: 8px; }
.modal__sub { font-size: .9rem; color: var(--text-muted); margin-bottom: 18px; }

/* --- Квиз --- */
.quiz__progress { height: 5px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.quiz__progress-bar { height: 100%; width: 33%; background: var(--accent); transition: width .3s; }
.quiz__counter { font-size: .78rem; color: var(--text-muted); margin-bottom: 18px; font-weight: 600; }
.quiz__step { display: none; }
.quiz__step.active { display: block; animation: quizFade .3s ease; }
@keyframes quizFade { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.quiz__options { display: grid; gap: 10px; margin-top: 18px; }
.quiz__option {
    text-align: left; padding: 15px 18px; border: 1.5px solid var(--border); border-radius: 8px;
    background: #fff; font-size: .92rem; font-weight: 600; color: var(--text-main); cursor: pointer; transition: all .2s;
}
.quiz__option:hover { border-color: var(--accent); background: var(--bg-light); }
.quiz__option.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.quiz__nav { margin-top: 20px; }

/* --- Плавающие кнопки связи --- */
.float-contacts { position: fixed; right: 18px; bottom: 18px; z-index: 800; display: flex; flex-direction: column; gap: 10px; }
.float-contacts__btn {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .85rem; box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: transform .2s;
}
.float-contacts__btn:hover { transform: scale(1.08); color: #fff; }
.float-contacts__btn--wa { background: #25D366; }
.float-contacts__btn--tg { background: #2AABEE; }
.float-contacts__btn--tel { background: var(--accent); font-size: 1.3rem; }

/* --- Прочее --- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.notice {
    background: #FFF8E9; border-left: 4px solid var(--accent); padding: 18px 22px;
    border-radius: 8px; font-size: .92rem; color: var(--text-main);
}
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tags a, .tags span {
    padding: 8px 15px; background: var(--bg-soft); border-radius: 30px; font-size: .83rem;
    color: var(--text-main); font-weight: 600;
}
.tags a:hover { background: var(--accent); color: #fff; }

/* ==========================================================================
   Адаптив. Мобильный трафик по юридическим запросам — основной,
   поэтому телефон и кнопка заявки остаются доступными на любом экране.
   ========================================================================== */
@media (max-width: 1024px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: repeat(2, 1fr); }
    .hero__inner, .cta-band__inner { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.1rem; }
}

@media (max-width: 900px) {
    .nav { display: none; }
    .desktop-only { display: none; }
    .burger-btn { display: flex; }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 1.95rem; }
    h2 { font-size: 1.55rem; }
    .section { padding: 50px 0; }
}

@media (max-width: 640px) {
    body { font-size: 15px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .checklist--2 { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .hero { padding: 44px 0; }
    .hero h1 { font-size: 1.7rem; }
    .hero__facts { grid-template-columns: 1fr; gap: 12px; text-align: left; }
    .hero__fact-num { font-size: 1.5rem; }
    .header__phone { font-size: .95rem; }
    .header__inner { min-height: 64px; }
    .lead-form { padding: 22px 18px; }
    .modal__box { padding: 30px 20px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .cta-band__title { font-size: 1.45rem; }
    /* На узких экранах таблица цен прокручивается по горизонтали */
    .price-wrap { overflow-x: auto; }
    .price-table { min-width: 520px; }
    .float-contacts { right: 12px; bottom: 12px; }
    .float-contacts__btn { width: 46px; height: 46px; }
}

/* Уважаем системную настройку «уменьшить анимацию» */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Печать: скрываем интерактив, оставляем контент и контакты */
@media print {
    .header, .mobile-menu, .menu-overlay, .modal, .float-contacts, .cta-band, .lead-form { display: none !important; }
    body { color: #000; }
}
