:root {
    --brand: #2c5697;
    --brand-dark: #1f4278;
    --brand-soft: #eaf0fa;
    --ink: #17233a;
    --muted: #5d6a80;
    --bg-soft: #f5f7fb;
    --line: #e4e9f2;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 6px 24px rgba(23, 35, 58, .08);
    --shadow-lg: 0 14px 40px rgba(23, 35, 58, .16);
    --header-h: 76px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
}

/* clip, а не hidden: hidden ломает position: sticky у шапки и сайдбара */
body {
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    padding: 0 0 .6em 0;
    margin: 0;
    color: var(--ink);
}

h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
h3 { font-size: clamp(1.2rem, 1rem + .8vw, 1.45rem); }
h4 { font-size: 1.15rem; }

b, strong {
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--brand);
    transition: color .2s, background-color .2s, box-shadow .2s, transform .2s;
}

a:hover {
    color: var(--brand-dark);
}

:focus-visible {
    outline: 3px solid rgba(44, 86, 151, .45);
    outline-offset: 2px;
    border-radius: 6px;
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--brand);
    color: #fff;
}

.page {
    min-height: 500px;
}

/* ---------- Контент ---------- */
.content-main {
    min-width: 0;
}

.content-main p {
    padding: 0 0 1.1em 0;
    margin: 0;
}

.content-main ul,
.content-main ol {
    padding-left: 1.4em;
    margin-bottom: 1.2em;
}

.content-main ul {
    list-style: none;
    padding-left: 1.5em;
}

.content-main ul li {
    position: relative;
    margin-bottom: .5em;
}

.content-main ul li:before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--brand);
    border-radius: 50%;
    top: .6em;
    position: absolute;
    left: -1.3em;
}

.content-main h2 {
    margin-top: 1.6em;
}

.content-main h3 {
    margin-top: 1.2em;
}

.content-main > .row > .page > :first-child,
.home-about > :first-child {
    margin-top: 0;
}

.content-main img {
    border-radius: var(--radius);
}

.content-main a img {
    transition: transform .3s, box-shadow .3s;
}

.content-main a[data-lightbox] img {
    cursor: zoom-in;
}

.content-main a[data-lightbox]:hover img {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5em;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
}

.content-main table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.table-wrap > table {
    margin: 0;
}

.content-main table td,
.content-main table th {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    vertical-align: top;
}

.content-main table td:last-child,
.content-main table th:last-child {
    border-right: 0;
}

.content-main table tr:last-child td {
    border-bottom: 0;
}

.content-main table th,
.content-main table:not(.kv):not(:has(thead)) tr:first-child td {
    background: var(--bg-soft);
    font-weight: 700;
    text-align: left;
}

.content-main table.kv td:first-child {
    width: 40%;
    background: var(--bg-soft);
    font-weight: 600;
}

.content-main iframe,
.content-main video {
    max-width: 100%;
    border-radius: var(--radius);
}

/* ---------- Карточки каталога ---------- */
.content-main-img {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    isolation: isolate;
}

.content-main-img img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover;
    aspect-ratio: 4/3;
    transition: transform .5s ease;
}

.content-main-img:hover img {
    transform: scale(1.06);
}

.content-main-img .content-main-text {
    padding: 48px 20px 18px;
    font-weight: 700;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    background: linear-gradient(rgba(10, 20, 40, 0), rgba(10, 20, 40, .85));
    z-index: 1;
}

.content-main-img:hover {
    box-shadow: var(--shadow-lg);
}

/* ---------- Новости ---------- */
.news-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: block;
    position: relative;
    color: var(--ink);
    overflow: hidden;
    background: #fff;
    height: 100%;
    transition: box-shadow .3s, transform .3s;
}

.news-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    color: var(--ink);
}

.news-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4/3;
    display: block;
}

.news-title {
    font-weight: 800;
    padding: 20px 22px 8px;
    line-height: 1.3;
}

.news-text {
    font-size: .9rem;
    padding: 0 22px 60px 22px;
    color: var(--muted);
}

.news-date {
    font-size: .85rem;
    color: var(--muted) !important;
    position: absolute;
    bottom: 20px;
    left: 22px;
}
