/* Сайт buhprofi.kz. Цвета и шрифты — как на прежнем сайте: красный 1С, жёлтый 1С, Montserrat. */
:root {
  --red: #d71921;
  --red-dark: #b3141b;
  --yellow: #ffd200;
  --yellow-soft: #fff6cc;
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  --font: "Montserrat", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--red); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.section-head p { color: var(--muted); margin: 0; }

/* Кнопки */
.btn { display: inline-block; border: 0; border-radius: 6px; padding: 14px 28px; background: var(--red); color: #fff;
  font: 600 16px var(--font); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--yellow); padding: 10px 18px; font-size: 14px; }
.btn-outline:hover { background: var(--yellow); }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar { display: flex; align-items: center; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.logo img { display: block; }
.tagline, .offices { margin: 0; font-size: 14px; line-height: 1.35; }
.offices { color: var(--muted); }
.offices strong { color: var(--ink); font-weight: 600; }
.social { display: flex; gap: 8px; }
.social img { display: block; }
.contacts { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hours { font-size: 12px; color: var(--muted); }
.phone { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 2px; position: relative; content: ""; }
.burger span::before { position: absolute; top: -8px; }
.burger span::after { position: absolute; top: 8px; }

.nav { background: var(--red); }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; flex-wrap: wrap; margin: 0 auto; padding: 0 16px; }
.nav a { display: block; padding: 12px 16px; color: #fff; text-decoration: none; font-weight: 500; }
.nav > ul > li > a:hover { background: var(--red-dark); }
.has-sub { position: relative; }
.has-sub > ul { display: none; position: absolute; left: 0; top: 100%; min-width: 320px; background: #fff; box-shadow: var(--shadow); border-radius: 0 0 var(--radius) var(--radius); padding: 6px 0; }
.has-sub > ul a { color: var(--ink); padding: 9px 18px; font-weight: 400; }
.has-sub > ul a:hover { background: var(--yellow-soft); }
.has-sub:hover > ul, .has-sub:focus-within > ul { display: block; }

/* Первый экран */
.hero { position: relative; color: #fff; background: #222 center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.25)); }
.hero .container { position: relative; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 48px); font-weight: 800; text-transform: uppercase; max-width: 820px; }
.hero .lead { font-size: clamp(17px, 2vw, 22px); max-width: 720px; margin: 0 0 24px; }
.hero ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 6px; }
.hero li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--yellow); border-radius: 2px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.hero-cta small { opacity: .85; }

/* Карточки и сетки */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.features .card { display: flex; gap: 14px; align-items: flex-start; }
.features img { flex: none; }
.features p { margin: 0; }
.perks .card { text-align: center; font-weight: 600; border-top: 4px solid var(--yellow); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split img { border-radius: var(--radius); }
.cta-band { background: var(--yellow-soft); border-radius: var(--radius); overflow: hidden; }
.cta-band .split { gap: 0; }
.cta-band .split > div { padding: 32px; }
.cta-band img { border-radius: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band img.whole { object-fit: contain; padding: 24px; } /* рисунок, который нельзя обрезать (коробка 1С) */

.about { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; margin: 28px 0 0; }
.stats b { display: block; font-size: 40px; color: var(--red); line-height: 1; }
.certs { grid-template-columns: repeat(6, 1fr); }
.certs a { display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.certs img { display: block; width: 100%; aspect-ratio: 178 / 250; object-fit: cover; }

.services .card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.services h3 { font-size: 18px; flex: 1; margin: 0; }
.services img { width: 72px; height: 72px; }

.tariffs .card { display: flex; flex-direction: column; }
.tariffs .price { font-size: 28px; font-weight: 800; margin: 8px 0 0; }
.tariffs .per { color: var(--muted); margin: 0 0 16px; }
.tariffs ul { padding-left: 20px; margin: 0 0 20px; flex: 1; }
.tariffs .card > img { width: 56px; height: 56px; }
.tariffs .card.featured { border: 2px solid var(--red); }
.note-free { text-align: center; font-weight: 600; margin: 0 0 32px; }

/* Формы заявок */
.lead-form { display: grid; gap: 12px; }
.lead-title { font-size: 22px; margin: 0; }
.lead-note { margin: 0 0 4px; color: var(--muted); }
.lead-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
.lead-form input:not([type=checkbox]), .lead-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfcfcf; border-radius: 6px; font: 16px var(--font); }
.lead-form input:focus, .lead-form textarea:focus { outline: 2px solid var(--yellow); border-color: var(--yellow); }
.lead-form .consent { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.lead-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-status { margin: 0; min-height: 1.4em; font-size: 14px; }
.lead-status.ok { color: #1c7c2e; font-weight: 600; }
.lead-status.err { color: var(--red); }
.form-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.inline-form .lead-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
.inline-form .lead-title, .inline-form .lead-note, .inline-form .consent, .inline-form .lead-status { grid-column: 1 / -1; }
.inline-form .consent, .inline-form .lead-status { order: 1; }
.form-narrow { max-width: 640px; } /* полная форма (с почтой и комментарием) — одной колонкой */ /* кнопка — в одной строке с полями */

.modal { border: 0; border-radius: var(--radius); padding: 28px; width: min(440px, calc(100% - 32px)); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0, 0, 0, .55); }
.modal-close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }

/* Подвал */
.site-footer { background: #1f1f21; color: #d8d8d8; padding: 48px 0 20px; font-size: 14px; }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: 16px; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-footer .phone { color: #fff; font-size: 18px; }
.copyright { margin-top: 32px; padding-top: 16px; border-top: 1px solid #333; color: #9a9a9a; }

/* Хлебные крошки */
.crumbs { background: var(--bg-alt); font-size: 13px; color: var(--muted); padding-top: 14px; }
.crumbs .container { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); }
.crumbs i { font-style: normal; margin: 0 4px; opacity: .6; }
.crumbs + .page-hero, .crumbs + .page-title { padding-top: 20px; }

/* Ссылки на другие услуги */
.link-cards .link-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.link-cards .link-card:hover { border-color: var(--red); box-shadow: var(--shadow); }
.link-cards span { color: var(--red); font-weight: 700; }

/* Внутренние страницы: первый экран с картинкой справа */
.page-hero { background: var(--bg-alt); padding: 48px 0; }
.page-hero .split { gap: 48px; }
.page-hero h1 { font-size: clamp(28px, 3.8vw, 42px); }
.page-hero .lead { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
.page-hero img { width: 100%; box-shadow: var(--shadow); }
.page-hero .btn { margin-top: 8px; }

/* Обычная текстовая страница */
.page-title { background: var(--bg-alt); padding: 36px 0; }
.page-title h1 { margin: 0; font-size: clamp(26px, 3.6vw, 40px); }
.page-title .meta { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.prose { max-width: 860px; }
.prose h2 { font-size: clamp(22px, 2.6vw, 28px); margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1em; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-alt); }
.table-wrap { overflow-x: auto; }

/* Карточки с заголовком и текстом (преимущества, причины) */
.cards .card { border-top: 4px solid var(--yellow); }
.cards h3 { font-size: 18px; margin-bottom: .4em; }
.cards p { margin: 0; color: var(--muted); }

/* Списки с галочкой */
.check { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.check li { position: relative; padding-left: 30px; }
.check li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 10px; border: solid var(--red); border-width: 0 0 3px 3px; transform: rotate(-45deg) scale(.8); }

/* Нумерованные шаги */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 72px; position: relative; min-height: 76px; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; margin-bottom: 4px; }

/* Цены */
.prices .card { display: flex; flex-direction: column; }
.prices h3 { font-size: 18px; margin: 0; }
.prices .price { font-size: 24px; font-weight: 800; color: var(--red); margin: 6px 0 12px; }
.prices .when { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.prices ul { padding-left: 18px; margin: 0 0 16px; flex: 1; }
.prices .btn { align-self: flex-start; }

/* Отзывы */
.quotes .card { display: flex; flex-direction: column; gap: 12px; }
.quotes blockquote { margin: 0; flex: 1; font-style: italic; }
.quotes cite { font-style: normal; font-weight: 600; font-size: 14px; }
.quotes time { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }

/* Короткий призыв в полосе */
.cta-line { background: var(--yellow-soft); border-radius: var(--radius); padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.cta-line h2, .cta-line h3 { margin: 0 0 4px; font-size: 22px; }
.cta-line p { margin: 0; color: var(--muted); }

/* Вопросы и ответы */
.faq { max-width: 900px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 26px; color: var(--red); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 20px 18px; }

/* Список статей */
.posts { display: grid; gap: 20px; }
.posts article { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.posts h2 { font-size: 20px; margin: 4px 0 8px; }
.posts h2 a { color: var(--ink); text-decoration: none; }
.posts h2 a:hover { color: var(--red); }
.posts time { color: var(--muted); font-size: 14px; }
.posts p { margin: 0; }

/* Контакты */
.contact-cards .card h3 { font-size: 18px; }
.contact-cards p { margin: 0 0 6px; }
.map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); }

@media (max-width: 1100px) {
  .tagline, .offices { display: none; }
  .certs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .about, .footer-grid { grid-template-columns: 1fr; }
  .about img { max-width: 220px; }
  .inline-form .lead-form { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; }
  .social, .contacts .hours, .contacts .btn { display: none; }
  .phone { font-size: 16px; }
  .contacts { margin-left: auto; }
  .burger { display: block; margin-left: 0; }
  .nav { display: none; }
  .nav.open { display: block; max-height: calc(100vh - 80px); overflow: auto; }
  .nav > ul { flex-direction: column; }
  .has-sub > ul { display: block; position: static; box-shadow: none; background: var(--red-dark); border-radius: 0; min-width: 0; }
  .has-sub > ul a { color: #fff; padding-left: 32px; }
  .has-sub > ul a:hover { background: transparent; }
  .section { padding: 44px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .cta-band .split > div { padding: 24px 16px; }
  .page-hero { padding: 32px 0; }
  .cta-line { padding: 24px 16px; }
}
