/* Центр СМТК — стили сайта. Цвета из логотипа: #00679F, #009EE3. */

@font-face {
    font-family: 'Onest';
    src: url('fonts/onest-cyrillic-wght.woff2') format('woff2-variations'),
         url('fonts/onest-cyrillic-wght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Onest';
    src: url('fonts/onest-latin-wght.woff2') format('woff2-variations'),
         url('fonts/onest-latin-wght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --c-ink: #0b2236;
    --c-ink-2: #12324d;
    --c-brand: #00679f;
    --c-brand-hover: #005685;
    --c-brand-light: #009ee3;
    --c-brand-soft: #e6f3fa;
    --c-bg: #f5f7f9;
    --c-surface: #ffffff;
    --c-surface-2: #eef2f5;
    --c-text: #1b2733;
    --c-muted: #5a6876;
    --c-border: #dde4ea;
    --c-on-dark: #ffffff;
    --c-on-dark-muted: rgba(255, 255, 255, 0.7);
    --c-success-bg: #e7f6ec;
    --c-success-text: #17663a;
    --c-error-bg: #fdecec;
    --c-error-text: #a61b1b;
    --font: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(11, 34, 54, 0.06), 0 1px 3px rgba(11, 34, 54, 0.06);
    --shadow-md: 0 6px 20px rgba(11, 34, 54, 0.08);
    --shadow-lg: 0 16px 40px rgba(11, 34, 54, 0.14);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --container: 1240px;
    --gutter: 1.5rem;
    --header-h: 72px;
}

/* ---------- Основа ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--c-brand); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--c-brand-hover); }

:focus-visible { outline: 3px solid var(--c-brand-light); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--c-surface); padding: .5rem 1rem; border-radius: var(--r-sm); }
.skip-link:focus { top: 1rem; }

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .7rem 1.4rem;
    font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
    border: 2px solid transparent; border-radius: var(--r-pill);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--c-brand); color: #fff; }
.btn-accent:hover { background: var(--c-brand-hover); color: #fff; }
.btn-outline { border-color: var(--c-border); color: var(--c-ink); background: var(--c-surface); }
.btn-outline:hover { border-color: var(--c-brand); color: var(--c-brand); }
.btn-light { background: #fff; color: var(--c-ink); }
.btn-light:hover { background: var(--c-brand-soft); color: var(--c-ink); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn-sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .95rem; }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.link-arrow .i { transition: transform .15s var(--ease); }
.link-arrow:hover .i { transform: translateX(3px); }

/* ---------- Шапка ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    /* без backdrop-filter: он делает шапку контейнером для position: fixed и ломает мобильное меню */
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .75rem; color: var(--c-ink); flex: none; }
.brand img { width: auto; height: 48px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: .8rem; color: var(--c-muted); max-width: 13rem; }
.brand-text strong { font-size: 1rem; color: var(--c-ink); }

.site-nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.nav-list > li { position: relative; }
.nav-link {
    display: flex; align-items: center; gap: .3rem;
    padding: .55rem .8rem; border-radius: var(--r-pill);
    color: var(--c-ink); font-weight: 500; font-size: .98rem; white-space: nowrap;
    background: none; border: 0; font-family: inherit; cursor: pointer;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--c-surface-2); color: var(--c-ink); }
.nav-link.active { color: var(--c-brand); }
.nav-link .i { width: 1em; height: 1em; transition: transform .15s var(--ease); }
.nav-link[aria-expanded="true"] .i { transform: rotate(180deg); }

.nav-drop {
    position: absolute; left: 50%; top: calc(100% + 10px);
    transform: translateX(-50%);
    width: min(760px, 90vw);
    padding: .75rem;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    display: grid; grid-template-columns: 1fr 1fr; gap: .25rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .15s var(--ease), visibility .15s;
}
.nav-drop.is-narrow { width: 300px; grid-template-columns: 1fr; }
.nav-drop.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-drop a { display: block; padding: .7rem .9rem; border-radius: var(--r-md); color: var(--c-ink); }
.nav-drop a:hover { background: var(--c-brand-soft); }
.nav-drop strong { display: block; font-weight: 600; line-height: 1.3; }
.nav-drop small { display: block; color: var(--c-muted); font-size: .85rem; line-height: 1.35; margin-top: .2rem; }
.nav-drop .nav-drop-all { grid-column: 1 / -1; color: var(--c-brand); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; flex: none; }
.header-phone { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; color: var(--c-ink); font-weight: 700; white-space: nowrap; }
.header-phone small { font-weight: 400; color: var(--c-muted); font-size: .78rem; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--c-brand); color: var(--c-brand); }
.nav-burger, .header-call { display: none; }

.search-panel { border-top: 1px solid var(--c-border); background: var(--c-surface); padding: 1rem 0; }
.search-panel[hidden] { display: none; }

.search-form { display: flex; gap: .5rem; max-width: 640px; }
.search-form input { flex: 1; }

/* ---------- Формы ---------- */

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field label small { color: var(--c-brand); font-size: 1em; }
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], textarea {
    width: 100%; min-height: 48px; padding: .7rem 1rem;
    font: inherit; font-size: 1rem; color: var(--c-text);
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 4px var(--c-brand-soft); }
.field-error { color: var(--c-error-text); font-size: .85rem; min-height: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid .field-wide { grid-column: 1 / -1; }
.form-note { color: var(--c-muted); font-size: .85rem; }
.alert { padding: .9rem 1.1rem; border-radius: var(--r-md); margin-bottom: 1rem; }
.alert-success { background: var(--c-success-bg); color: var(--c-success-text); }
.alert-danger { background: var(--c-error-bg); color: var(--c-error-text); }

/* ---------- Главная: первый экран ---------- */

.hero { background: var(--c-surface); border-bottom: 1px solid var(--c-border); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding-block: 4rem; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .35rem .85rem; border-radius: var(--r-pill);
    background: var(--c-brand-soft); color: var(--c-brand);
    font-size: .9rem; font-weight: 600; margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); margin-bottom: 1.25rem; }
.hero h1 span { color: var(--c-brand); }
.hero-lead { font-size: 1.15rem; color: var(--c-muted); max-width: 34rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.hero-media::before {
    content: ""; position: absolute; inset: auto -24px -24px auto; width: 55%; height: 55%;
    background: radial-gradient(circle at center, var(--c-brand-light) 1.5px, transparent 1.6px) 0 0 / 16px 16px;
    opacity: .35; z-index: -1;
}
.hero-media { z-index: 0; }

.facts { background: var(--c-ink); color: var(--c-on-dark); }
.facts-list { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.facts-list li { padding: 1.75rem 1.5rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.facts-list li:first-child { border-left: 0; padding-left: 0; }
.facts-list strong { display: block; font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: .3rem; }
.facts-list span { color: var(--c-on-dark-muted); font-size: .92rem; line-height: 1.4; display: block; }

/* ---------- Секции ---------- */

.section { padding-block: 4.5rem; }
.section-alt { background: var(--c-surface); border-block: 1px solid var(--c-border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .5rem 0 0; color: var(--c-muted); max-width: 40rem; }

/* карточки направлений */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.service-card {
    display: flex; flex-direction: column;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
    overflow: hidden; color: var(--c-text);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; color: var(--c-text); }
.service-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-surface-2); }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.service-card:hover .service-card-img img { transform: scale(1.04); }
.service-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.35rem 1.4rem; flex: 1; }
.service-card h3 { font-size: 1.15rem; margin: 0; }
.service-card p { margin: 0; color: var(--c-muted); font-size: .95rem; line-height: 1.5; flex: 1; }
.service-card .link-arrow { margin-top: .5rem; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 1.5rem; background: var(--c-bg); border-radius: var(--r-lg); counter-increment: step; }
.steps li::before {
    content: counter(step, decimal-leading-zero);
    display: block; font-size: .95rem; font-weight: 700; color: var(--c-brand); margin-bottom: .75rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.steps p { margin: 0; color: var(--c-muted); font-size: .95rem; line-height: 1.5; }

/* о центре на главной */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; }
.about img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--r-lg); }
.check-list { margin: 0 0 1.75rem; padding: 0; list-style: none; display: grid; gap: .75rem; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: .2em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
    background: var(--c-brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300679f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* методы сварки — «облако» */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.tags li { padding: .45rem .9rem; border-radius: var(--r-pill); background: var(--c-surface); border: 1px solid var(--c-border); font-size: .95rem; }

/* ---------- Новости ---------- */

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.news-card {
    display: flex; flex-direction: column;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
    overflow: hidden; color: var(--c-text);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--c-text); }
.news-card-img { aspect-ratio: 3 / 2; background: var(--c-surface-2); overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img-empty { display: flex; align-items: center; justify-content: center; color: var(--c-brand); }
.news-card-img-empty .i { width: 3rem; height: 3rem; opacity: .4; }
.news-card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-card time, .news-date { color: var(--c-muted); font-size: .88rem; display: inline-flex; align-items: center; gap: .4rem; }
.news-card h3 { font-size: 1.1rem; line-height: 1.35; margin: 0; }
.news-card p { margin: 0; color: var(--c-muted); font-size: .95rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.news-list-compact { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.news-list-compact a { display: grid; grid-template-columns: 64px 1fr; gap: .75rem; align-items: center; padding: .5rem; border-radius: var(--r-md); color: var(--c-ink); }
.news-list-compact a:hover { background: var(--c-surface-2); }
.news-list-compact img, .news-list-compact .ph { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); background: var(--c-surface-2); }
.news-list-compact strong { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.news-list-compact time { color: var(--c-muted); font-size: .82rem; }

/* ---------- Внутренние страницы ---------- */

.page-head { background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.page-head-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; padding-block: 2.25rem 2.5rem; }
.page-head.has-image .page-head-inner { grid-template-columns: 1fr 340px; }
.page-head h1 { margin: 0; }
.page-head-meta { margin-top: 1rem; color: var(--c-muted); }
.page-head-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .9rem; color: var(--c-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .5rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--c-border); }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-brand); }

.page-body { padding-block: 2.5rem 4.5rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.layout.with-nav { grid-template-columns: 280px minmax(0, 1fr); }
.layout.with-aside { grid-template-columns: minmax(0, 1fr) 320px; }

.content-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2.5rem); }

.side-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 1.25rem; }
.side-card + .side-card { margin-top: 1.25rem; }
.side-card h2 { font-size: 1rem; margin-bottom: .75rem; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 1.25rem); }

.section-nav ul { margin: 0; padding: 0; list-style: none; }
.section-nav ul ul { margin: .15rem 0 .35rem .9rem; padding-left: .6rem; border-left: 2px solid var(--c-border); }
.section-nav a { display: block; padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--c-text); font-size: .95rem; line-height: 1.35; }
.section-nav a:hover { background: var(--c-surface-2); color: var(--c-ink); }
.section-nav a.active { background: var(--c-brand-soft); color: var(--c-brand); font-weight: 600; }
.section-nav .section-nav-root { font-weight: 700; color: var(--c-ink); }

.cta-card { background: var(--c-ink); color: var(--c-on-dark); border-radius: var(--r-lg); padding: 1.5rem; }
.cta-card h2 { color: #fff; font-size: 1.15rem; }
.cta-card p { color: var(--c-on-dark-muted); font-size: .95rem; }
.cta-card a.phone { color: #fff; font-weight: 700; font-size: 1.15rem; display: block; margin-bottom: 1rem; }

/* ---------- Текст страниц из БД (+ совместимость со старой вёрсткой MODX/Canvas) ---------- */

.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.prose h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
.prose h4 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--c-brand); }
.prose a:not(.doc-link):not(.btn) { text-decoration: underline; text-decoration-color: rgba(0, 103, 159, .35); text-underline-offset: 3px; }
.prose a:not(.doc-link):not(.btn):hover { text-decoration-color: currentColor; }
.prose img { border-radius: var(--r-md); margin-block: .5rem; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--c-brand); background: var(--c-brand-soft); border-radius: 0 var(--r-md) var(--r-md) 0; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-md); }
.prose video { width: 100%; height: auto; border-radius: var(--r-md); background: #000; }
/* иконочный шрифт старой темы удалён */
.prose i[class^="icon-"], .prose i[class*=" icon-"] { display: none; }
.prose [style*="text-indent"] { text-indent: 0 !important; }
/* выключка по ширине из старых текстов даёт «реки» пробелов — читаемее по левому краю */
.prose [style*="justify"] { text-align: left !important; }

.table-scroll { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--c-border); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.prose th, .prose td { padding: .65rem .85rem; border-bottom: 1px solid var(--c-border); vertical-align: top; text-align: left; }
.prose tr:last-child td { border-bottom: 0; }
.prose thead th, .prose th { background: var(--c-surface-2); font-weight: 600; color: var(--c-ink); }
.prose tbody tr:nth-child(even) td { background: #fafbfc; }
.prose .table-bordered td + td, .prose .table-bordered th + th { border-left: 1px solid var(--c-border); }

.doc-link {
    display: inline-flex; align-items: baseline; gap: .45rem; flex-wrap: wrap;
    padding: .15rem 0; font-weight: 600;
}
.doc-link-icon { color: var(--c-brand); align-self: center; }
.doc-meta {
    font-size: .75rem; font-weight: 600; color: var(--c-muted);
    padding: .1rem .45rem; border-radius: var(--r-pill); background: var(--c-surface-2);
    letter-spacing: .02em; white-space: nowrap;
}

/* сетка Bootstrap (row / col-*) из старых текстов */
.prose .row { display: flex; flex-wrap: wrap; margin: 0 -.75rem 1rem; }
/* ширина — с той же специфичностью, что col-md-*, чтобы медиазапросы ниже её перебивали */
.prose [class*="col"] { width: 100%; }
.prose .row > * { padding: 0 .75rem; margin-bottom: 1.5rem; }
/* ряды карточек подстраниц (feature-box) — компактная сетка вместо двух огромных колонок */
.prose .row:has(.feature-box) { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.prose .row:has(.feature-box) > * { width: auto; padding: 0; margin: 0; }
.prose .align-items-center { align-items: center; }
@media (min-width: 768px) {
    .prose .col-md-4 { width: 33.333%; } .prose .col-md-5 { width: 41.666%; } .prose .col-md-6 { width: 50%; }
    .prose .col-md-7 { width: 58.333%; } .prose .col-md-8 { width: 66.666%; }
}
@media (min-width: 992px) {
    .prose .col-lg-3 { width: 25%; } .prose .col-lg-4 { width: 33.333%; } .prose .col-lg-5 { width: 41.666%; }
    .prose .col-lg-6 { width: 50%; } .prose .col-lg-7 { width: 58.333%; } .prose .col-lg-12 { width: 100%; }
}
.prose .heading-block span { display: block; color: var(--c-muted); margin-top: -.4rem; margin-bottom: 1rem; }
.prose .fancy-title h3 { font-size: 1.35rem; margin: 2.25rem 0 1.25rem; padding-bottom: .6rem; border-bottom: 1px solid var(--c-border); }
.prose .center { text-align: center; }

/* карточки-ссылки (feature-box media-box) */
.prose .feature-box { height: 100%; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.prose .feature-box:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.prose .fbox-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: 0; border-radius: 0; }
.prose .fbox-content { padding: .85rem 1rem 1rem !important; }
.prose .fbox-content h3 { margin: 0; font-size: .98rem; line-height: 1.35; font-weight: 600; }
.prose .fbox-content p:empty { display: none; }
.prose .feature-box a { text-decoration: none !important; color: var(--c-ink); }
.prose .feature-box a:hover { color: var(--c-brand); }

/* карусель сертификатов (owl-carousel с «замороженным» состоянием) → сетка */
.prose .owl-stage-outer { overflow: visible; }
.prose .owl-stage { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; transform: none !important; width: auto !important; transition: none !important; }
.prose .owl-item { width: auto !important; margin: 0 !important; }
.prose .owl-nav, .prose .owl-dots, .prose .bg-overlay { display: none; }
.prose .product { height: 100%; display: flex; flex-direction: column; background: var(--c-bg); border-radius: var(--r-lg); padding: 1rem; }
.prose .product-image img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #fff; margin: 0; border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.prose .product-desc { padding-top: .85rem; }
.prose .product-title h3 { font-size: .95rem; line-height: 1.35; margin: 0; font-weight: 600; }
.prose .product-title a { text-decoration: none !important; color: var(--c-ink); }
.prose .product-title .doc-link { flex-direction: column; align-items: center; gap: .35rem; }
.prose .product-title .doc-link-icon { display: none; }

/* фотоленты в тексте новостей */
.prose .fotorama, .prose .photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.prose .fotorama img, .prose .photo-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; cursor: zoom-in; }
.prose .photo-list { padding: 0; list-style: none; }

/* вложенный в текст старый сайдбар (новость про форум «Пробация») */
.prose .sidebar, .prose .widget { display: none; }

/* ---------- Новость ---------- */

.article-cover { margin: 0 0 1.75rem; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r-lg); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; margin-top: 2rem; }
.gallery a { display: block; border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s var(--ease); }
.gallery a:hover img { transform: scale(1.05); }

/* ---------- Лайтбокс ---------- */

.lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(6, 18, 29, .92); padding: 4rem 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1200px, 100%); max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }
.lightbox-caption { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; color: var(--c-on-dark-muted); font-size: .9rem; padding: 0 1rem; }
.lightbox button {
    position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .12); color: #fff; display: flex; align-items: center; justify-content: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Контакты ---------- */

.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.contact-items { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.contact-item { display: flex; gap: .85rem; padding: 1.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.contact-item-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--c-brand-soft); color: var(--c-brand); display: flex; align-items: center; justify-content: center; }
.contact-item h2 { font-size: .85rem; font-weight: 600; color: var(--c-muted); margin: 0 0 .2rem; text-transform: none; }
.contact-item p { margin: 0; font-weight: 600; color: var(--c-ink); line-height: 1.45; }
.contact-item a { color: var(--c-ink); }
.contact-item a:hover { color: var(--c-brand); }
.map { border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface-2); min-height: 420px; border: 1px solid var(--c-border); }

/* ---------- Подвал ---------- */

.footer-cta { background: linear-gradient(120deg, var(--c-brand) 0%, #00507d 100%); color: #fff; }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 2.5rem; flex-wrap: wrap; }
.footer-cta h2 { color: #fff; margin: 0 0 .35rem; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
.footer-cta p { margin: 0; color: rgba(255, 255, 255, .82); }
.footer-cta-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.site-footer { background: var(--c-ink); color: var(--c-on-dark-muted); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-brand img { height: 56px; width: auto; background: #fff; border-radius: var(--r-sm); padding: 6px 8px; margin-bottom: 1rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.site-footer a { color: var(--c-on-dark-muted); }
.site-footer a:hover { color: #fff; }
.footer-contacts a { color: #fff; font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

/* ---------- Адаптив ---------- */

/* подпись у логотипа длинная: с ней шапка (телефон, поиск, кабинет, кнопка) не влезает в контейнер */
@media (max-width: 1400px) {
    .brand-text { display: none; }
}

@media (max-width: 1180px) {
    .header-phone small { display: none; }
    .nav-link { padding: .5rem .6rem; }
}

@media (max-width: 1100px) {
    :root { --header-h: 64px; }
    .nav-burger { display: inline-flex; }
    .header-cta { display: none; }
    .site-nav {
        position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
        background: var(--c-surface); overflow-y: auto; padding: 1rem var(--gutter) 2rem;
        display: none;
    }
    .site-nav.is-open { display: block; animation: nav-in .22s var(--ease); }
    @keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-list > li { border-bottom: 1px solid var(--c-border); }
    .nav-link { width: 100%; justify-content: space-between; padding: 1rem .25rem; border-radius: 0; font-size: 1.05rem; }
    .nav-link:hover, .nav-link[aria-expanded="true"] { background: none; }
    .nav-drop {
        position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: 0 0 .75rem;
        grid-template-columns: 1fr; display: none; opacity: 1; visibility: visible; pointer-events: auto;
    }
    .nav-drop.is-open { display: grid; }
    .nav-drop.is-narrow { width: auto; }
    .nav-mobile-extra { display: block !important; padding-top: 1.5rem; }

    .hero-inner { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem 3rem; }
    .hero-media { order: -1; }
    .hero-media img { aspect-ratio: 16 / 9; }
    .hero-media::before { display: none; }
    .facts-list { grid-template-columns: 1fr 1fr; }
    .facts-list li { padding: 1.25rem 1rem; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
    .facts-list li:nth-child(-n+2) { border-top: 0; }
    .facts-list li:first-child { padding-left: 1rem; }
    .steps { grid-template-columns: 1fr 1fr; }
    .about { grid-template-columns: 1fr; gap: 2rem; }
    .layout.with-nav, .layout.with-aside { grid-template-columns: minmax(0, 1fr); }
    .layout.with-nav .section-nav-wrap { order: 2; }
    .sticky-side { position: static; }
    .page-head.has-image .page-head-inner { grid-template-columns: 1fr; }
    .page-head-img { display: none; }
    .contacts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    :root { --gutter: 1rem; }
    body { font-size: 16px; }
    .brand img { height: 40px; }
    .header-phone { display: none; }
    .header-call { display: inline-flex; color: var(--c-brand); }
    .header-inner { gap: .75rem; }
    .header-actions { gap: .5rem; }
    .section { padding-block: 3rem; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .steps { grid-template-columns: 1fr; }
    .form-grid, .contact-items { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-actions .btn { flex: 1; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
    .lightbox-caption { bottom: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
