﻿:root {
    --blue: #0b3a6d;
    --blue-dark: #072b52;
    --blue-light: #e8eef6;
    --accent: #0b3a6d;
    --accent-hover: #062b52;
    --danger: #a81f32;
    --text: #1f2a38;
    --muted: #5b6b7b;
    --line: #d7dfe8;
    --bg: #ffffff;
    --white: #ffffff;
    --topbar-bg: #072b52;
    --nav-grad-a: #123f78;
    --nav-grad-b: #0b3a6d;
    --nav-hover: #072b52;
    --footer-grad-a: #06305a;
    --footer-grad-b: #072b52;
    --hero-a: #123b74;
    --hero-mid: #0b3a6d;
    --hero-b: #2b5f9e;
    --hero-text: #e8eef6;
    --btn-grad-a: #2a66b8;
    --btn-grad-b: #0b3a6d;
    --flag-white: #ffffff;
    --flag-blue: #0039a6;
--flag-red: #d52b1e;
    --gold: #d9a032;
}

/* Доступность: skip-link */
.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--blue);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-size: .95rem;
    text-decoration: none;
    transition: top .15s ease;
}
.skip-link:focus-visible {
    top: 0;
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Доступность: видимый фокус для интерактивных элементов */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

body.theme-classic {
    --blue: #1d4f9c;
    --blue-dark: #0d2f63;
    --blue-light: #eaf1fb;
    --accent: #1d4f9c;
    --accent-hover: #12386f;
    --bg: #f4f6f9;
    --line: #d5dee8;
    --topbar-bg: #0d2f63;
    --nav-grad-a: #1a549e;
    --nav-grad-b: #0d3a78;
    --nav-hover: #0a2c5c;
    --footer-grad-a: #0c3063;
    --footer-grad-b: #0a2960;
    --hero-a: #0f4d8c;
    --hero-mid: #1a5a9e;
    --hero-b: #2f74b8;
    --hero-text: #eef4fb;
    --btn-grad-a: #3a78c4;
    --btn-grad-b: #17458c;
}

body.theme-minister {
    --blue: #0a2f66;
    --blue-dark: #04204a;
    --blue-light: #e7eef6;
    --accent: #0a2f66;
    --accent-hover: #062349;
    --bg: #eef2f8;
    --line: #d2dce8;
    --topbar-bg: #04204a;
    --nav-grad-a: #123a75;
    --nav-grad-b: #082a58;
    --nav-hover: #041f45;
    --footer-grad-a: #06204a;
    --footer-grad-b: #041a3e;
    --hero-a: #1a3e7a;
    --hero-mid: #204a92;
    --hero-b: #2a5aa8;
    --hero-text: #e9effa;
    --btn-grad-a: #2c56a0;
    --btn-grad-b: #0a2f66;
}

body.theme-monochrome {
    --blue: #003a70;
    --blue-dark: #00214a;
    --blue-light: #eef2f6;
    --accent: #10151c;
    --accent-hover: #000000;
    --text: #12161c;
    --bg: #ffffff;
    --line: #c8cfd6;
    --topbar-bg: #21262c;
    --nav-grad-a: #2a3038;
    --nav-grad-b: #10151c;
    --nav-hover: #0a0d12;
    --footer-grad-a: #1c2229;
    --footer-grad-b: #10151c;
    --hero-a: #181d24;
    --hero-mid: #20324d;
    --hero-b: #003a70;
    --hero-text: #eef2f6;
    --btn-grad-a: #454d58;
    --btn-grad-b: #181d24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Bahnschrift SemiCondensed", "Bahnschrift Condensed", "PT Sans", "Arial Narrow", "Arial", "Helvetica Neue", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--blue-dark); line-height: 1.3; }

/* Flags */
.flag-stripe {
    height: 4px;
    background: linear-gradient(90deg,
        var(--flag-white) 0% 33.3%,
        var(--flag-blue) 33.3% 66.6%,
        var(--flag-red) 66.6% 100%);
}
.logo-flag {
    width: 18px; height: 38px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    padding-right: 12px;
}
.logo-flag svg { display: block; width: 100%; height: 100%; }

/* Topbar */
.topbar { background: var(--topbar-bg); color: #cfd9e6; font-size: .83rem; }
.topbar-inner { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; gap: 4px; }
.topbar-phone { color: #fff; font-weight: bold; }
.topbar-right { display: inline-flex; align-items: center; gap: 14px; }
.topbar-admin-link { color: #ffd76a; font-weight: bold; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.topbar-admin-link .topbar-admin-ic { width: 1em; height: 1em; flex-shrink: 0; display: block; position: relative; top: -0.06em; fill: none; }
.topbar-admin-link:hover { text-decoration: underline; }
.topbar-admin-link:hover .topbar-admin-ic,
.topbar-admin-link:focus .topbar-admin-ic { color: #fff; fill: #fff; }
.guf-mode-switch { position: relative; display: inline-flex; align-items: center; width: 64px; height: 20px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.08); cursor: pointer; flex-shrink: 0; user-select: none; overflow: hidden; }
.guf-mode-switch:hover { border-color: rgba(255,255,255,.45); }
.guf-mode-switch .guf-knob { position: absolute; top: 2px; left: 2px; z-index: 0; width: calc(50% - 2px); height: calc(100% - 4px); border-radius: 999px; background: #ffd76a; transition: left .18s ease; }
.guf-mode-switch .guf-opt { position: relative; z-index: 1; flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 100%; }
.guf-mode-switch .guf-opt svg { width: 12px; height: 12px; display: block; }
.front-admin .guf-mode-switch .guf-knob { left: 50%; }
.front-admin .guf-mode-switch .guf-opt.guf-user { color: #cfd9e6; }
.front-admin .guf-mode-switch .guf-opt.guf-admin { color: #072b52; }
.front-user .guf-mode-switch .guf-opt.guf-user { color: #072b52; }
.front-user .guf-mode-switch .guf-opt.guf-admin { color: #cfd9e6; }

/* Header */
.site-header { position: relative; background: var(--white); border-bottom: 3px solid var(--blue); }
.site-header::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: url('../img/flag_rf.png') 85% center / auto 100% no-repeat;
    opacity: .75;
}
.header-inner { position: relative; z-index: 1; display: flex; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 14px; color: var(--blue-dark); padding-left: 20px; }
.logo:hover { text-decoration: none; }
.logo-emblem-img {
    width: 64px; height: 82px;
    flex-shrink: 0;
}
.logo-custom { max-height: 56px; width: auto; max-width: 110px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.logo-mark {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.logo-mark::after,
.logo-mark::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .75) 45%, rgba(255, 255, 255, 0) 62%);
    pointer-events: none;
}
.logo-mark::after {
    bottom: 0;
    width: 36%;
    transform: translateX(-230%) skewX(-18deg);
    will-change: transform;
    animation: logoShine 8s ease-in-out infinite;
}
.logo-mark::before {
    width: 100%;
    height: 36%;
    background: linear-gradient(200deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .75) 45%, rgba(255, 255, 255, 0) 62%);
    transform: translateY(-230%) skewY(-18deg);
    opacity: 0;
    will-change: transform;
    animation: logoShineV 8s ease-in-out infinite;
}
@keyframes logoShine {
    0% { transform: translateX(-230%) skewX(-18deg); opacity: 0; }
    6% { opacity: 1; }
    24% { transform: translateX(340%) skewX(-18deg); opacity: 1; }
    26%, 100% { transform: translateX(340%) skewX(-18deg); opacity: 0; }
}
@keyframes logoShineV {
    0%, 34% { transform: translateY(-230%) skewY(-18deg); opacity: 0; }
    40% { opacity: 1; }
    58% { transform: translateY(340%) skewY(-18deg); opacity: 1; }
    60%, 100% { transform: translateY(340%) skewY(-18deg); opacity: 0; }
}
.logo-text { display: flex; flex-direction: column; }
.logo-text strong { font-family: "Bahnschrift SemiCondensed", "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif; font-size: 1.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; line-height: 1.15; }
.logo-text span { color: var(--muted); font-size: .95rem; }

/* Nav */
.mainnav { background: linear-gradient(90deg, var(--nav-grad-a), var(--nav-grad-b)); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; }
.nav-list li a {
    display: block; color: #fff; padding: 13px 18px 11px; font-size: .95rem;
    border-right: 1px solid rgba(255,255,255,.15);
    position: relative;
    transition: background .2s ease, color .2s ease, transform .22s ease, box-shadow .22s ease, text-shadow .22s ease;
}
.nav-list li a::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: 0;
    height: 3px; background: #fff;
    transition: left .22s ease, right .22s ease;
}
.nav-list li a:hover::after, .nav-list li a.active::after { left: 0; right: 0; }
.nav-list li a:hover { background: var(--nav-hover); text-decoration: none; box-shadow: 0 0 18px rgba(110,170,255,.75); }
.nav-list li a.active {
    background:
        linear-gradient(180deg, rgba(150,195,255,.22), rgba(150,195,255,0) 45%),
        radial-gradient(120% 160% at 50% -30%, rgba(160,205,255,.35), rgba(160,205,255,0) 70%),
        linear-gradient(180deg, #1a2c49, #0f1e36 70%, #081120);
    color: #fff;
    text-shadow: 0 1px 3px rgba(3,10,30,.95), 0 0 10px rgba(5,16,38,.85);
    z-index: 2;
    overflow: hidden;
    animation: nav-soft 2s ease-in-out infinite;
}
.nav-list li a.active::after { height: 4px; background: var(--accent); }
.nav-list li a.active::before {
    content: ''; position: absolute; top: -130%; bottom: -130%; left: 0; width: 1320%;
    background: linear-gradient(112deg, transparent 38%, rgba(190,220,255,.12) 47%, rgba(220,240,255,.25) 50%, rgba(190,220,255,.12) 53%, transparent 62%);
    transform: translateX(-38.9%) skewX(-14deg);
    animation: nav-sheen .3s linear 0s 1;
    pointer-events: none;
}
@keyframes nav-sheen {
    0%   { transform: translateX(-49.5%) skewX(-14deg); }
    100% { transform: translateX(-38.9%) skewX(-14deg); }
}
@keyframes nav-soft {
    0%, 100% { box-shadow: 0 0 26px rgba(110,170,255,1), 0 0 55px rgba(110,170,255,.7); }
    50%      { box-shadow: 0 0 40px rgba(110,170,255,1), 0 0 80px rgba(110,170,255,.95), 0 0 120px rgba(110,170,255,.55); }
}
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 8px 14px; }

/* Main */
.main-content { flex: 1; padding-bottom: 20px; width: 100%; margin: 0 auto; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-mid) 55%, var(--hero-b) 100%);
    color: #fff; padding: 41.6px 0;
}
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 10px; }
.hero p { max-width: 720px; font-size: 1.05rem; color: #d9e3ef; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero slider (баннеры в шапке) */
.hero-slider { position: relative; min-height: 320px; overflow: hidden; background: var(--topbar-bg); border-radius: 0 0 18px 18px; }
.slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; z-index: 1;
    transition: opacity .7s ease;
}
.slide.active { opacity: 1; z-index: 2; }
.slide::before {
    content: '';
    position: absolute; inset: -6px;
    background-image: inherit;
    background-size: cover; background-position: center;
    will-change: transform, opacity;
}
.slide.active::before {
    animation: kenburns 20s ease-out both;
}
/* Блик вынесен в отдельный общий слой (стабилен при переключении слайдов) */
.hero-shimmer {
    position: absolute; inset: 0; z-index: 4;
    background: linear-gradient(105deg, transparent 0%, transparent 38%, rgba(255,255,255,.22) 50%, transparent 62%, transparent 100%);
    background-size: 260% 100%;
    background-position: 120% 0;
    background-repeat: no-repeat;
    pointer-events: none;
}
.hero-shimmer.on {
    animation: shimmer-bg 2.6s ease-in-out both;
}
@keyframes shimmer-bg {
    0%       { background-position: 120% 0; }
    55%, 100% { background-position: -120% 0; }
}
@keyframes kenburns {
    from { transform: scale(1.35); }
    to   { transform: scale(1.1); }
}
.hero-slider .slider-progress { position: absolute; left: 1px; right: 1px; bottom: 1px; z-index: 6; height: 1px; border-radius: 1px; background: rgba(255,255,255,.25); overflow: hidden; pointer-events: none; }
.hero-slider .slider-progress-fill { display: block; width: 0; height: 100%; border-radius: 1px; background: #fff; transition: width .1s linear; will-change: width; }
.slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(7,20,40,.74) 0%, rgba(7,20,40,.35) 55%, rgba(7,20,40,.06) 100%);
}
.slide-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; justify-content: flex-start;
    min-height: 320px; color: #fff; padding: 46.4px clamp(24px, 3.5vw, 48px) 34px;
}
.slide-title {
    color: #fff; font-size: 2.1rem; max-width: 640px;
    text-shadow: 0 2px 14px rgba(0,0,0,.45); margin-bottom: 20px;
}
.slide-btn {
    margin-top: auto; align-self: flex-start;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.55);
    padding: 9px 24px; border-radius: 30px;
    font-size: .9rem; letter-spacing: .4px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transition: background .2s ease, border-color .2s ease, transform .18s ease, box-shadow .2s ease;
}
.slide-btn:hover {
    background: rgba(255,255,255,.22);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.28);
    text-decoration: none;
}
.slide-btn:active { transform: translateY(0) scale(.98); }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 46px; height: 46px; border-radius: 50%;
    border: 0; background: rgba(255,255,255,.88); color: var(--blue);
    font-size: 1.7rem; line-height: 1; cursor: pointer;
    box-shadow: 0 2px 14px rgba(0,0,0,.28);
    transition: transform .18s ease, background .2s ease;
}
.slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.slider-arrow.prev { left: 18px; }
.slider-arrow.next { right: 18px; }
.slider-dots {
    position: absolute; bottom: 18px; left: 0; right: 0; z-index: 5;
    display: flex; justify-content: center; gap: 8px;
}
.dot {
    width: 11px; height: 11px; border-radius: 50%; border: 0;
    background: rgba(255,255,255,.55); cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.dot.active { background: #fff; transform: scale(1.25); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.slide.active .slide-title { animation: fadeUp .5s ease .15s both; }

/* Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(180deg, var(--btn-grad-a), var(--btn-grad-b));
    color: #fff;
    padding: 11px 22px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: .95rem;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(11,58,109,.18);
    transition: transform .18s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
    will-change: transform;
}
.btn:hover {
    background: linear-gradient(180deg, var(--btn-grad-b), var(--btn-grad-b));
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(11,58,109,.30);
    text-decoration: none;
}
.btn:active {
    transform: translateY(0) scale(.98);
    box-shadow: 0 2px 8px rgba(11,58,109,.22);
}
.btn-light {
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.btn-light:hover {
    background: linear-gradient(180deg, #ffffff, #dde7f1);
    filter: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,.75);
    box-shadow: none;
}
.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,.14);
    filter: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.btn.ghost {
    background: var(--blue-light);
    color: var(--blue);
    box-shadow: none;
    border: 1px solid var(--line);
}
.btn.ghost:hover {
    background: #d8e2ef;
    filter: none;
    box-shadow: 0 4px 12px rgba(11,58,109,.18);
}
.btn-back {
    background: linear-gradient(180deg, #174a86, var(--blue));
    color: #fff;
    box-shadow: 0 3px 10px rgba(11,58,109,.28);
}
.btn-back:hover {
    background: linear-gradient(180deg, var(--blue), #07294e);
    filter: none;
    box-shadow: 0 6px 16px rgba(11,58,109,.34);
}
.btn-danger {
    background: linear-gradient(180deg, #c44058, var(--danger));
}
.btn-danger:hover { filter: brightness(1.12); background: var(--danger); }
.btn-sm { padding: 6px 13px; font-size: .85rem; border-radius: 5px; }

/* Sections */
.section { padding: 36px 0; }
.section-alt { background: var(--white); }
.section-news { background: transparent; padding-bottom: 0; }
body.home-page .section-home-edit ~ .section { padding-top: 0; }
body.home-page .section-alt { padding: 0; }
body.home-page .section-news { padding-bottom: 0; }
body.home-page .section-head { margin-bottom: 2px; }
body.home-page .news-track { padding-top: 8px; }
body.home-page .hero-slider + .section,
body.home-page .hero + .section { padding-top: 20px; }
body.home-page .main-content { padding-bottom: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.more-link { font-size: .9rem; }

/* News grid (страница «Новости») */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 20px; }
.news-grid .news-card { min-width: 0; max-width: none; display: flex; flex-direction: column; }
.news-grid .news-card {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #d5dbe2 100%);
    border: 0; outline: 0;
    transition: background .35s ease, transform .3s ease, box-shadow .35s ease;
}
.news-grid .news-card:hover {
    background: linear-gradient(180deg, #f2f6fa 0%, #ffffff 50%, #d5dbe2 100%);
    border: 0; outline: 0;
    box-shadow: 0 14px 28px rgba(11,58,109,.18);
}
.news-date { color: var(--accent); font-size: .82rem; font-weight: bold; letter-spacing: .3px; }

/* Cards */
.card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: 0 2px 6px rgba(11,58,109,.08); padding: 20px;
    transition: transform .2s ease, box-shadow .25s ease;
}
.card:hover { box-shadow: 0 10px 26px rgba(11,58,109,.14); }

/* News scroll */
.news-scroll { position: relative; }
.news-scroll .news-card {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #d5dbe2 100%);
    border: 0; outline: 0;
    box-shadow: none;
    display: flex; flex-direction: column;
    transition: background .35s ease, transform .3s ease, box-shadow .35s ease;
}
.news-scroll .news-card:hover {
    background: linear-gradient(180deg, #f2f6fa 0%, #ffffff 50%, #d5dbe2 100%);
    border: 0; outline: 0;
    box-shadow: 0 14px 28px rgba(11,58,109,.18);
}
.news-track {
    display: flex; gap: 20px; overflow: hidden;
    padding: 16px 2px 46px;
    align-items: stretch;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.news-track::-webkit-scrollbar { display: none; }
.news-card {
    min-width: 300px; max-width: 300px; scroll-snap-align: start; padding: 0; overflow: hidden; flex: 0 0 auto;
    display: flex; flex-direction: column;
    position: relative;
}
.news-scroll .scroll-btn {
    position: absolute; top: 50%; z-index: 5;
    transform: translateY(-50%);
    background: linear-gradient(180deg, var(--btn-grad-a), var(--btn-grad-b));
    color: #fff;
    border-color: rgba(255,255,255,.35);
    font-size: 1.9rem; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(11,58,109,.35);
}
.news-scroll .scroll-btn:hover {
    background: linear-gradient(180deg, #4a86cf, #2a66b8);
    color: #ffd97a;
    transform: translateY(-50%) scale(1.08);
}
.news-scroll .scroll-btn:active { transform: translateY(-50%) scale(.96); }
.news-scroll .scroll-prev { left: 12px; }
.news-scroll .scroll-next { right: 12px; }
.news-cover { display: block; position: relative; overflow: hidden; }
.news-card-img { width: 100%; height: 170px; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.22,.61,.36,1), filter .35s ease, opacity .45s ease-out !important; will-change: transform; }
.news-card:hover .news-card-img { transform: scale(1.06); filter: saturate(1.2); }
.news-card:hover { transform: translateY(-4px); }
.news-card-img-ph {
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    color: rgba(255,255,255,.85);
    display: flex; align-items: center; justify-content: center;
    font-size: 3.4rem; font-weight: 700; text-transform: uppercase;
}
.news-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { font-size: 1.02rem; margin: 4px 0 8px; line-height: 1.35; }
.news-card h3 a { color: var(--blue-dark); }
.news-card p { font-size: .9rem; color: var(--muted); flex: 1; }
.read-more { font-size: .9rem; font-weight: 600; margin-top: 10px; display: inline-block; }
.scroll-btn {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--white); color: var(--blue);
    line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(11,58,109,.12);
    transition: background .2s ease, transform .18s ease, box-shadow .2s ease;
}
.scroll-btn svg { width: 18px; height: 18px; }
.scroll-btn:hover { background: var(--blue); color: #fff; transform: scale(1.08); }
.scroll-btn:active { transform: scale(.96); }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination a {
    padding: 6px 12px; background: var(--white); border: 1px solid var(--line);
    border-radius: 4px; color: var(--blue);
}
.pagination a.active, .pagination a:hover { background: var(--blue); color: #fff; text-decoration: none; }

/* Quick cards */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.quick-icon { font-size: 2rem; margin-bottom: 8px; }
.quick-card { display: flex; flex-direction: column; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.quick-card h3 { margin-bottom: 6px; text-decoration: underline; text-underline-offset: 4px; }
.quick-card p { margin-bottom: 14px; color: var(--muted); font-size: .95rem; flex: 1; }
.phones-line { color: var(--muted); font-size: .95rem; padding: 1px 0; }
.phones-val { color: #fff; font-weight: 600; }
.quick-card p strong { color: var(--text); }
.quick-card .btn { align-self: flex-start; margin-top: auto; }
.quick-card.has-bg::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, var(--qc-ov-b, rgba(15,32,53,.82)), var(--qc-ov-a, rgba(15,32,53,.4)), rgba(15,32,53,.06)); }
.quick-card.has-bg > * { position: relative; z-index: 1; }
.quick-card.has-bg { color: var(--qc-text, #fff); }
.quick-card.has-bg h3 { color: var(--qc-text, #fff); }
.quick-card.has-bg p { color: var(--qc-text, rgba(255,255,255,.92)); opacity: .94; }
.quick-card.has-bg p strong { color: var(--qc-text, #fff); }
.quick-card.has-bg .btn { background: var(--qc-btn-bg, #ffffff); border: 1px solid var(--qc-text, rgba(255,255,255,.8)); color: var(--qc-btn-color, #0f2035); }
.quick-card.has-bg .btn:hover { background: var(--qc-btn-bg, #e8eef6); opacity: .94; }

/* Article */
.article { padding: 28px; }
.article h1 { margin: 8px 0 16px; }
.article-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 6px; margin-bottom: 18px; }
.article-body { margin-bottom: 24px; }
.article-body p { margin-bottom: 14px; }

/* Home editor block */
.section-home-edit { padding: 52px 0; background-color: var(--bg-alt, #f4f7fb); background-size: cover; background-position: center; }
.section-home-edit.has-bg { position: relative; }
.section-home-edit.has-bg::before { content: ""; position: absolute; inset: 0; background: rgba(244, 247, 251, .9); }
.section-home-edit.has-bg > .container { position: relative; }
.home-edit-wrap { max-width: 1040px; }
.home-edit-title { text-align: center; margin: 0 0 24px; }
.home-edit-content { max-width: 860px; margin: 0 auto; }

/* Catalog */
.page-head { padding: 32px 0 8px; }
.page-head h1 { margin-bottom: 8px; }
.page-head p { color: var(--muted); }
.catalog-intro { margin: 14px 0 0; max-width: 820px; color: var(--muted); line-height: 1.6; }
.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding-top: 20px; align-items: start; font-size: 17px; }
.catalog-side { margin-bottom: 20px; }
.catalog-side .card {
    position: sticky; top: 16px;
    border: 0; border-radius: 14px; overflow: hidden;
    background:
        radial-gradient(120% 90% at 88% -12%, rgba(80,145,225,.45), transparent 55%),
        radial-gradient(85% 65% at -12% 112%, rgba(80,145,225,.32), transparent 60%),
        linear-gradient(160deg, #133764, #0b2440);
    color: #fff;
    box-shadow: 0 12px 30px rgba(7,20,40,.28);
}
.catalog-side .card h3 { color: #fff; letter-spacing: .6px; text-transform: uppercase; font-size: .95rem; }
.cat-list { list-style: none; margin-bottom: 12px; }
.cat-list .cat-all { margin-bottom: 8px; }
.cat-list .cat-all a {
    text-transform: uppercase; letter-spacing: .9px; font-size: .8rem; font-weight: 700;
    background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24);
    border-left: 3px solid #7db5ff; border-radius: 8px; color: #fff; padding: 10px 12px;
}
.cat-list .cat-all a:hover { background: rgba(255,255,255,.22); color: #fff; }
.cat-list .cat-all a.active { background: rgba(90,150,240,.42); border-color: rgba(255,255,255,.38); }
.cat-list a {
    display: block; padding: 9px 12px; border-left: 3px solid rgba(255,255,255,.18); border-radius: 4px;
    color: rgba(255,255,255,.85); font-size: .93rem; position: relative;
    background: linear-gradient(90deg, rgba(74,134,226,.5), rgba(74,134,226,0)) left center / 0% 100% no-repeat;
    transition: background-size .28s ease, color .18s ease, padding-left .28s ease;
}
.cat-list > li > a { color: #ffd97a; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,217,122,.5); text-underline-offset: 3px; }
.cat-list a:hover { background-size: 100% 100%; padding-left: 17px; color: #fff; text-decoration: none; }
.cat-list a.active {
    border-left-color: #7db5ff; background: rgba(90,150,240,.35); font-weight: bold; color: #fff;
    animation: cat-flash 1.6s ease-in-out infinite;
}
.cat-list a.parent-active { border-left-color: #7db5ff; color: #fff; font-weight: bold; }
@keyframes cat-flash {
    0%, 100% { box-shadow: inset 0 0 0 rgba(125,181,255,0); }
    50% { box-shadow: inset 3px 0 10px rgba(125,181,255,.35); }
}
.cat-sub {
    display: block; list-style: none;
    margin: 0 0 4px; padding-left: 16px; border-left: 1px dashed rgba(255,255,255,.2);
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .4s ease, opacity .35s ease, margin .4s ease, padding .4s ease;
}
.cat-list li.open > .cat-sub,
.cat-list li:has(> a.parent-active) > .cat-sub,
.cat-list li:has(> .cat-sub a.active) > .cat-sub {
    max-height: 420px; opacity: 1; margin: 2px 0 8px; padding-left: 16px;
}
.cat-sub a { font-size: .87rem; color: rgba(255,255,255,.62); position: relative; transition: color .18s ease, padding-left .24s ease, background-size .24s ease; background: linear-gradient(90deg, rgba(74,134,226,.42), rgba(74,134,226,0)) left center / 0% 100% no-repeat; }
.cat-sub a:hover { color: #fff; background-size: 100% 100%; padding-left: 17px; }
.cat-sub a.active { border-left-color: #7db5ff; background: rgba(90,150,240,.25); font-weight: bold; color: #fff; animation: cat-flash 1.6s ease-in-out infinite; }
.catalog-side .card hr { border-color: rgba(255,255,255,.16); }
.catalog-side .card p { color: rgba(255,255,255,.74); }
.catalog-side .card .phone-big { color: #8fc3ff; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.product-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; position: relative; isolation: isolate; background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #d5dbe2 100%); transition: box-shadow .2s ease, transform .2s ease; }
.product-card:hover, .cat-card:hover, .news-card:hover, .mng-card:hover { background: linear-gradient(180deg, #e6ecf3 0%, #f2f5f8 50%, #bfc9d5 100%); }
.product-card::after, .cat-card::after, .news-card::after, .mng-card::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%; z-index: 3;
    pointer-events: none;
    background: linear-gradient(105deg, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0));
    opacity: 0;
}
.product-card:hover::after, .cat-card:hover::after, .news-card:hover::after, .mng-card:hover::after {
    opacity: 1; animation: shimmer-slide .85s ease-in-out 1 forwards;
}
@keyframes shimmer-slide {
    from { left: -80%; }
    to { left: 130%; }
}
.product-card--link { text-decoration: none; color: var(--text); transition: transform .16s ease, box-shadow .16s ease; }
.product-card--link:hover, .product-card--link:hover * { text-decoration: none; }
.product-card--link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,58,109,.14); }
.product-card--link:hover .product-img { transform: scale(1.06); filter: saturate(1.2); }
a.product-card--link.restore-focus {
    outline: 3px solid rgba(255, 213, 106, .95);
    outline-offset: 4px;
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(255, 235, 170, .4);
    animation: restoreFocusPulse 1.5s ease;
}
@keyframes restoreFocusPulse {
    0% { outline-color: rgba(255, 213, 106, 0); }
    20% { outline-color: rgba(255, 213, 106, .95); }
    100% { outline-color: rgba(255, 213, 106, 0); }
}
.product-img-wrap { height: 170px; background: #e9edf2; overflow: hidden; }
.product-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.22,.61,.36,1), filter .35s ease, opacity .45s ease-out !important; will-change: transform; }
.product-img-ph {
    display: flex; align-items: center; justify-content: center;
    font-size: 3.2rem; font-weight: 700; text-transform: uppercase;
    color: rgba(255,255,255,.88);
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: .85rem; text-transform: uppercase; color: var(--accent); letter-spacing: .5px; }
.product-body h3 { font-size: 1.2rem; margin: 4px 0 8px; }
.product-body p {
    font-size: 1.02rem; color: var(--muted); flex: 1;
    font-weight: normal; line-height: 1.55; margin-bottom: 12px;
    max-height: 4.65em; overflow: hidden;
}
.product-card--no-thumbs .product-body p { max-height: 7.75em; }
.product-card--short-title .product-body p { max-height: 7.75em; }
.product-card--no-thumbs.product-card--short-title .product-body p { max-height: 10.85em; }
.product-price { font-size: 1.35rem; font-weight: bold; color: var(--blue-dark); margin-top: 10px; }
.product-unit { font-size: .85rem; color: var(--muted); font-weight: normal; }
.product-price-na { color: var(--muted); font-weight: bold; font-size: .95rem; }
.phone-big { font-size: 1.05rem; font-weight: bold; color: var(--blue-dark); }
.cat-cover { margin-bottom: 20px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 6px rgba(11,58,109,.08); }
.cat-cover img { width: 100%; max-height: 320px; object-fit: cover; display: block; transform: scale(1.05); will-change: transform; }
.cat-pdf-block { margin-bottom: 20px; padding: 14px 16px; background: #eef3fb; border: 1px solid var(--line); border-radius: 10px; }
.cat-pdf-title { font-size: .95rem; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.cat-pdf-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pdf-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
    background: #fff; color: var(--blue); border: 1px solid rgba(11,58,109,.25);
    border-radius: 8px; font-size: .9rem; text-decoration: none;
    transition: background .18s ease, border-color .18s ease;
}
.cat-pdf-link:hover { background: #f4f8ff; border-color: var(--blue); }
.cat-pdf-dl { flex: none; width: 15px; height: 15px; transition: transform .18s ease; }
.cat-pdf-link:hover .cat-pdf-dl { transform: translateY(1px); }
.cat-content { background: #f2f4f7; border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 2px 6px rgba(11,58,109,.08); margin-bottom: 24px; line-height: 1.6; }
.cat-content img { max-width: 100%; height: auto; border-radius: 8px; }
.cat-content p { margin-bottom: 12px; }
.cat-content h2, .cat-content h3 { margin: 18px 0 10px; }
.cat-content ul, .cat-content ol { margin: 0 0 12px 22px; }
.cat-subhead { font-size: 1.4rem; margin: 6px 0 16px; color: var(--blue-dark); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 20px; }
.cat-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: var(--text); position: relative; background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #d5dbe2 100%); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.cat-card:hover { text-decoration: none; transform: translateY(-5px); box-shadow: 0 14px 28px rgba(11,58,109,.18); }
.cat-grid--subs .cat-card:hover, .cat-grid--subs .cat-card.active { border-color: var(--line); }
.cat-card-img { height: 130px; background: #e9edf2; display: block; position: relative; overflow: hidden; }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.22,.61,.36,1), filter .35s ease, opacity .45s ease-out !important; will-change: transform; }
.cat-card:hover .cat-card-img img { transform: scale(1.06); filter: saturate(1.2); }
.cat-card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,58,109,0), rgba(11,58,109,.38)); opacity: 0; transition: opacity .3s ease; }
.cat-card:hover .cat-card-img::after { opacity: 1; }
.cat-card-img-ph {
    height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue-light), #bfd4e8);
    background-size: 200% 200%; background-position: 0 0;
    font-weight: bold; font-size: 1.3rem; color: var(--blue-dark);
    transition: background-position .35s ease;
}
.cat-card:hover .cat-card-img-ph { background-position: 100% 0; filter: saturate(1.3); }
.cat-card-name { padding: 14px 16px 4px; font-weight: bold; font-size: 1.15rem; transition: color .22s ease, padding-left .22s ease; }
.cat-card:hover .cat-card-name { color: var(--blue); }
.cat-card-count { padding: 0 16px 16px; font-size: .85rem; color: var(--muted); flex: 1; transition: color .22s ease; }
.cat-card:hover .cat-card-count { color: var(--accent); }
.cat-grid--subs .cat-card-name { padding: 14px 16px 16px; text-decoration: underline; text-underline-offset: 4px; }
.product-thumbs { display: flex; gap: 8px; padding: 8px 16px 0; }
.product-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .8; }
.product-thumb.active { border-color: var(--accent); opacity: 1; }
.product-thumb:hover { opacity: 1; }

/* Product page */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .88rem; color: var(--muted); margin: 18px 0 4px; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .current { color: var(--text); font-weight: bold; }
.crumb-root { color: var(--muted); }
.crumb-root:hover { color: var(--muted); text-decoration: underline; }
.breadcrumbs a.crumb-root { color: var(--muted); }
.breadcrumbs a.crumb-root:hover { color: var(--muted); }
.crumb-cur { color: var(--blue); }
.product-layout { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 32px; align-items: start; margin-bottom: 20px; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; gap: 20px; } }
.product-gallery { position: sticky; top: 96px; }
.product-main-frame {
    background: var(--blue-light); border-radius: 12px; overflow: hidden;
    border: 1px solid var(--line); aspect-ratio: 4 / 3;
}
.product-main-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.22,.61,.36,1), filter .6s ease, opacity .45s ease-out !important; will-change: transform, filter; }
.front-user .product-main-frame:hover .product-main-img { transform: scale(1.08) translateY(1.5%); filter: saturate(1.25); }
.product-main-ph {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 6rem; font-weight: 700; text-transform: uppercase;
    color: rgba(255,255,255,.88);
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
}
.product-gallery .product-thumbs { padding: 12px 0 0; flex-wrap: wrap; }
.product-gallery .product-thumb { width: 64px; height: 64px; }
.product-info h1 { font-size: 1.6rem; margin: 6px 0 10px; color: var(--blue-dark); }
.product-price-xl { font-size: 1.6rem; margin-bottom: 18px; }
.product-desc h2 { font-size: 1.1rem; color: var(--blue-dark); margin: 0 0 10px; }
.product-desc {
    background: var(--white); border: 1px solid var(--line); border-radius: 12px;
    padding: 20px; line-height: 1.6; box-shadow: 0 2px 6px rgba(11,58,109,.06);
}
.product-note {
    font-size: .9rem; color: var(--muted); margin: 16px 0;
    background: var(--blue-light); border-radius: 10px; padding: 12px 16px;
}
.product-note a { color: var(--blue); }

/* Map */
.map-block { padding: 8px; margin-top: 16px; }
.map-frame { width: 100%; height: 380px; border: 0; border-radius: 4px; }
.map-block iframe { width: 100% !important; height: 400px !important; border: 0; display: block; }

/* Tables */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; margin-bottom: 20px; align-items: start; }
.info-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.info-table th, .info-table td {
    text-align: left; padding: 10px 12px; border: 1px solid #fff; font-size: .95rem;
}
.info-table th { background: var(--blue-light); width: 200px; color: var(--blue-dark); }
.info-table td a { font-weight: bold; }
.info-table { position: relative; overflow: hidden; background: linear-gradient(160deg, #edf1f6, #d5dde7); border-radius: 10px; border: 1px solid #fff; }
.info-table::before {
    content: ''; position: absolute; top: -60%; bottom: -60%; left: 0; width: 60%;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.65) 50%, rgba(185,205,225,.3) 55%, transparent 65%);
    transform: translateX(-130%) skewX(-12deg);
    animation: sheen-slide 7s ease-in-out infinite;
    pointer-events: none;
}
.info-table th { background: rgba(255,255,255,.55); }

/* Forms */
.form { padding: 26px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: bold; font-size: .92rem; color: var(--blue-dark); }
.form-row label input[type="checkbox"] { margin-right: 5px; vertical-align: middle; }
.form-row label.chk { display: flex; align-items: center; font-weight: normal; width: 100%; }
.form-row label.chk input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin-right: 5px; }
.form-row label.chk span { flex: 1; }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px;
    font-family: inherit; font-size: .95rem; color: var(--text); background: #fff;
}
.form-row select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b3a6d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
    padding-right: 34px; cursor: pointer;
}
.form-row select:hover { border-color: var(--blue); }
.form-row select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.form-row select option { background: #fff; color: var(--text); }
.admin-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b3a6d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
    background-color: #fff;
    background-size: 12px 8px;
    padding: 9px 34px 9px 12px;
    border: 1px solid var(--line); border-radius: 4px;
    font-family: inherit; font-size: .95rem; color: var(--text);
    cursor: pointer;
}
.admin-select:hover { border-color: var(--blue); }
.admin-select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.admin-select option { background: #fff; color: var(--text); }
.admin-select--sm {
    padding: 5px 28px 5px 10px;
    font-size: .85rem;
    background-size: 10px 7px;
    background-position: right 9px center;
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.form--navy {
    background:
        radial-gradient(120% 90% at 88% -12%, rgba(90,150,235,.55), transparent 55%),
        radial-gradient(85% 65% at -12% 112%, rgba(90,150,235,.4), transparent 60%),
        linear-gradient(160deg, #22528f, #173f78);
    border: 0; border-radius: 14px; color: #fff;
}
.form--navy .form-row label { color: rgba(255,255,255,.92); }
.form--navy .form-row input, .form--navy .form-row textarea, .form--navy .form-row select {
    background: #fff; border: 1px solid rgba(255,255,255,.4); color: var(--text);
}
.form--navy .form-row input::placeholder, .form--navy .form-row textarea::placeholder { color: #8b98a7; }
.form--navy .form-row input:focus, .form--navy .form-row textarea:focus { outline: 2px solid rgba(140,190,255,.85); border-color: rgba(140,190,255,.9); background: #fff; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: 6px; margin-bottom: 20px; font-size: .95rem; }
.alert-success { background: #e6f4ea; border: 1px solid #b7dfc3; color: #1e6b34; }
.alert-error { background: #fbebec; border: 1px solid #edb9bd; color: #9c1c2a; }
.alert .alert-note { display: block; margin-top: 8px; font-size: .9rem; opacity: .85; }
.alert ul { margin-left: 18px; }
.alert .more-link { margin-left: 12px; }

/* Contact card */
.m-announce { padding: 9px 16px; text-align: center; font-size: .85rem; background: #bde0fe; color: #0a2a5b; }
.contact-card { position: relative; overflow: hidden; background: linear-gradient(160deg, #edf1f6, #d5dde7); border: 1px solid rgba(255,255,255,.65); }
.contact-card::before {
    content: ''; position: absolute; top: -60%; bottom: -60%; left: 0; width: 60%;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.65) 50%, rgba(185,205,225,.3) 55%, transparent 65%);
    transform: translateX(-130%) skewX(-12deg);
    animation: sheen-slide 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes sheen-slide {
    0%, 55% { transform: translateX(-130%) skewX(-12deg); }
    75%, 100% { transform: translateX(320%) skewX(-12deg); }
}
.contact-card h2 { font-size: 1.1rem; margin-bottom: 12px; }
.contact-card h3 { font-size: .95rem; margin: 14px 0 6px; text-transform: uppercase; color: var(--muted); }
.contact-list { list-style: none; }
.contact-list li { padding: 4px 0; font-size: .95rem; }

/* Footer */
.site-footer { background: linear-gradient(160deg, #0e3a75, #0a2a5b); color: #d7e0ea; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1.2fr 1fr; }
.footer-col { padding: 26px 24px; }
.footer-col strong { color: #fff; margin-bottom: 8px; display: block; }
.footer-col p { font-size: .9rem; }
.footer-col a { color: #c9d4e2; }
.footer-col a:hover { color: #fff; }
.footer-contact { font-size: .88rem; }
.footer-col--main { background: linear-gradient(160deg, #0e3a75, #0a2a5b); }
.footer-col--slate { background: linear-gradient(160deg, #184e97, #103b72); }
.footer-col--main { position: relative; z-index: 0; overflow: hidden; }
.footer-col--main::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 388px;
    height: 388px;
    background: url('../img/eagle-white.svg') left center / contain no-repeat;
    opacity: .3;
    pointer-events: none;
    z-index: -1;
}
.footer-col--main::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 388px;
    height: 388px;
    margin-top: -194px;
    background: linear-gradient(115deg, transparent 44%, rgba(255, 201, 77, .17) 50%, transparent 56%) 0 0 / 400% 100% no-repeat;
    background-position: -100% 0;
    -webkit-mask: url('../img/eagle-white.svg') left center / contain no-repeat;
    mask: url('../img/eagle-white.svg') left center / contain no-repeat;
    pointer-events: none;
    z-index: -1;
    animation: eagleGlint 15s ease-in-out infinite;
}
@keyframes eagleGlint {
    0%, 58% { background-position: -100% 0; }
    68% { background-position: 0% 0; }
    82% { background-position: 240% 0; }
    92%, 100% { background-position: 240% 0; }
}
.footer-brand { display: flex; align-items: center; gap: 14px; position: relative; }
.footer-logo--flag { width: 18px; height: 38px; flex-shrink: 0; border-right: 1px solid rgba(255,255,255,.3); padding-right: 12px; }
.footer-logo--flag svg { display: block; width: 100%; height: 100%; }
.footer-logo--emblem { width: 52px; height: 66px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 4px; }
.footer-logo--custom { max-height: 56px; width: auto; max-width: 110px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.footer-brand-text { display: flex; flex-direction: column; }
.footer-brand-text p { margin: 0; }
.footer-brand-text strong { margin: 0; }
.footer-divider { border: none; height: 1px; background: #fff; margin: 6px 0; }
.footer-col--dark { background: #141414; }
.footer-nav a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { position: relative; overflow: hidden; background: #0a0a0a; padding: 14px 0; font-size: .82rem; color: #9fadbb; }
.footer-bottom .container { position: relative; }

/* Admin shared */
.admin-body { background: #f0f3f7; }
.admin-header { background: var(--blue-dark); color: #fff; }
.admin-header .container { display: flex; justify-content: space-between; align-items: center; padding-top: 0; padding-bottom: 0; min-height: 54px; flex-wrap: wrap; }
.admin-brand { display: inline-flex; align-items: center; gap: 8px; padding-left: 2px; }
.admin-brand-drop .admin-drop-btn { padding-right: 8px; }
.admin-brand-drop .admin-drop-menu { left: 0; min-width: 180px; }
.admin-brand-logo { height: 26px; width: auto; max-width: 90px; object-fit: contain; border-radius: 4px; }
.admin-brand-name { font-weight: 700; letter-spacing: 1px; font-size: 1rem; white-space: nowrap; }
.admin-header a { color: #fff; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin-drop { position: relative; }
.admin-drop-btn { border: 0; background: transparent; color: #fff; cursor: pointer; padding: 8px 10px; font: inherit; font-family: var(--font); font-size: .93rem; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.admin-nav .grp-ic { width: 14px; height: 14px; flex-shrink: 0; }
.admin-drop-btn .ic { width: 14px; height: 14px; flex-shrink: 0; }
.admin-group-link { color: #fff; text-decoration: none; padding: 8px 10px; font-family: var(--font); font-size: .93rem; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.admin-group-link:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.admin-group-link.active { background: var(--blue); color: #fff; text-decoration: none; }
.admin-drop-btn:hover { background: rgba(255,255,255,.14); }
.admin-drop.current > .admin-drop-btn { background: var(--blue); color: #fff; }
.admin-drop-btn:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.admin-drop-btn .caret { font-size: .7rem; opacity: .8; }
.admin-drop-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; color: var(--blue-dark); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.28); padding: 6px; z-index: 120; }
.admin-drop:hover .admin-drop-menu, .admin-drop.open .admin-drop-menu, .admin-drop:focus-within .admin-drop-menu { display: block; }
.admin-drop-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: var(--blue-dark); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.admin-drop-menu a::before { display: none; }
.admin-drop-menu .ic { width: 15px; height: 15px; flex-shrink: 0; color: var(--blue); }
.admin-drop-menu a:hover { background: var(--blue-light); color: var(--blue-dark); }
.admin-drop-menu a:hover .ic { color: var(--blue); }
.admin-drop-menu a.active { background: var(--blue); color: #fff; }
.admin-drop-menu a.active .ic { color: #fff; }
.admin-logout { padding-left: 16px; font-weight: 600; opacity: .95; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.admin-logout .ic { width: 14px; height: 14px; flex-shrink: 0; }
.admin-logout:hover { opacity: 1; text-decoration: none; }
.admin-extras { display: inline-flex; align-items: center; gap: 14px; }
.admin-mail { position: relative; display: inline-flex; align-items: center; color: #fff; text-decoration: none; }
.admin-mail .ic { width: 17px; height: 17px; color: #fff; }
.admin-mail:hover { text-decoration: none; color: #fff; }
.admin-mail-badge {
    display: none; position: absolute; top: -8px; right: -11px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #ffc93c; color: #1f2836;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.admin-mail-badge.show { display: block; animation: mail-blink .9s ease-in-out infinite; }
@keyframes mail-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.admin-main { padding-top: 28px; padding-bottom: 40px; }
.admin-main--wide { max-width: none; padding-left: 24px; padding-right: 24px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 24px; }
.dash-card { text-align: center; padding: 26px; }
.dash-card .num { font-size: 2.2rem; font-weight: bold; color: var(--blue); line-height: 1.2; }
.dash-card .lbl { color: var(--muted); font-size: .9rem; }
.stat-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stat-box { background: var(--blue-light); border-radius: 6px; padding: 12px 16px; flex: 1; min-width: 220px; }
.stat-box b { display: block; color: var(--blue-dark); }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.table th { background: var(--blue-light); color: var(--blue-dark); }
.table tr:hover td { background: #fafcfe; }
.table tr.row-click { cursor: pointer; }
.table tr.row-click:hover td { background: #e9f1fb; }
.btn-icon {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; flex-shrink: 0; gap: 0;
}
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon.btn-danger { color: #fff; }
.btn-icon.btn-danger:hover { background: #b3261e; color: #fff; border-color: #7f1d15; }
.cat-actions .btn-icon { width: 30px; height: 30px; }
.cat-actions .btn-icon svg { width: 15px; height: 15px; }

.table img { width: 60px; height: 42px; object-fit: cover; border-radius: 4px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: .8rem; }
.pill-on { background: #e6f4ea; color: #1e6b34; }
.pill-off { background: #f1f2f4; color: #6b7686; }
.pill-new { background: var(--accent); color: #fff; font-weight: bold; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.card-head h2 { font-size: 1.15rem; }
.settings-card { margin-bottom: 24px; padding-top: 8px; }
.settings-card .card-head {
    border-bottom: none;
    margin: -8px -20px 18px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #3f7cbf 0%, #0b3a6d 100%);
    border-radius: 12px 12px 0 0;
}
.settings-card .card-head h2 { font-size: 1.02rem; color: #fff; letter-spacing: .3px; }
.inline-form { display: inline; }
.settings-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.settings-cols h3 { margin: 0 0 12px; color: var(--blue-dark); }
@media (max-width: 860px) { .settings-cols { grid-template-columns: 1fr; } }
.perms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; margin-top: 10px; }
.save-panel {
    position: fixed; bottom: 18px; z-index: 60;
    right: max(10px, calc((100vw - 1140px) / 2 + 10px));
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    pointer-events: none;
}
.autosave-note {
    color: var(--muted, #6b7280);
    font-size: .85rem;
    display: flex; align-items: center; gap: 8px;
    margin: 0;
}
.autosave-note::before {
    content: '';
    width: 10px; height: 10px; border-radius: 50%;
    background: #1e6b34;
    flex: none;
}
.autosave-toast {
    position: fixed; right: 20px; bottom: 84px; z-index: 80;
    background: #1e6b34; color: #fff; padding: 10px 16px; border-radius: 8px;
    font-size: .9rem; box-shadow: 0 6px 18px rgba(0,0,0,.18);
    opacity: 0; transform: translateY(6px); pointer-events: none;
    transition: opacity .25s, transform .25s;
}
.autosave-toast.show { opacity: 1; transform: translateY(0); }
.save-panel .btn-save-float {
    position: relative; pointer-events: auto;
    box-shadow: 0 4px 14px rgba(11,58,109,.35);
}
.save-panel .btn-save-float.dirty { background: #b3261e; border-color: #7f1d15; box-shadow: 0 4px 14px rgba(179,38,30,.45); }
.save-panel .btn-save-float .save-badge {
    display: none; position: absolute; top: -8px; right: -8px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #ffc93c; color: #1f2836;
    font-size: 13px; font-weight: 700; line-height: 20px; text-align: center;
    animation: mail-blink .8s ease-in-out infinite;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.save-panel .btn-save-float.dirty .save-badge { display: block; }
@media (max-width: 860px) { .save-panel { bottom: 12px; right: 10px; } }

/* Install */
.install-wrap { display: flex; justify-content: center; padding: 60px 16px; }
.install-box { max-width: 640px; width: 100%; }
.install-box h1 { margin-bottom: 16px; }
.install-list { margin-left: 20px; margin-bottom: 16px; }
.install-list li { margin-bottom: 6px; font-size: .95rem; }

/* Rich editor */
.rich-editor { border: 1px solid var(--line); border-radius: 12px; overflow: clip; background: var(--white); }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--blue-light); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.rich-toolbar button {
    min-width: 30px; height: 30px; padding: 0 7px;
    background: var(--white); border: 1px solid var(--line); border-radius: 6px;
    font-size: .82rem; cursor: pointer; color: var(--text);
}
.rich-toolbar button:hover { border-color: var(--accent); color: var(--blue-dark); }
.rich-toolbar .sep { width: 1px; background: var(--line); margin: 2px 4px; align-self: stretch; }
.rich-toolbar button[data-cmd="color"] { position: relative; }
.rich-color-palette { position: absolute; top: 100%; left: 0; z-index: 60; width: 168px; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.22); display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rich-color-palette button { min-width: 0; height: 22px; padding: 0; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; }
.rich-color-palette button.active { outline: 2px solid var(--blue); outline-offset: 1px; }
.rich-color-palette .rich-color-auto { grid-column: 1 / -1; height: 26px; font-size: .78rem; background: var(--blue-light); color: var(--text); }
.rich-color-palette .rich-color-picker { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--text); padding: 4px 2px 2px; }
.rich-color-palette input[type="color"] { width: 100%; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.rich-block-palette { width: 224px; grid-template-columns: repeat(8, 1fr); }
.rich-block-palette button { height: 26px; }
.rich-area {
    min-height: 260px; padding: 14px 16px; outline: none;
    font-size: .95rem; line-height: 1.55; color: var(--text);
}
.rich-area:empty::before { content: 'Введите текст…'; color: var(--muted); }
.rich-area img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-area a { color: var(--blue); }
.rich-area blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding: 4px 14px; color: var(--muted); }
.rich-area ul, .rich-area ol { margin: 8px 0 8px 22px; }
.rich-area h1, .rich-area h2, .rich-area h3 { margin: 12px 0 6px; line-height: 1.3; }
.rich-area h1 { font-size: 1.45rem; }
.rich-area h2 { font-size: 1.25rem; }
.rich-area h3 { font-size: 1.1rem; }
.rich-area table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.rich-area th, .rich-area td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.rich-hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* Upload */
.upload-box {
    border: 1.5px dashed var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--blue-light);
    max-width: 560px;
}
.upload-box.with-image { background: transparent; }
.upload-box .box-title { font-size: .9rem; margin-bottom: 8px; color: var(--text); }
.upload-box .box-title.on { color: var(--green); }
.upload-box input[type="file"] {
    display: block;
    width: 100%;
    padding: 8px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: .9rem;
}
.upload-box .box-hint { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.upload-box.ub-paste { cursor: pointer; }
.upload-box.ub-paste:focus { outline: none; border-color: var(--green); background: var(--blue-light); }
.upload-box.ub-paste .box-title::before { content: "📋 "; }
.current-image {
    max-width: 320px;
    border-radius: 6px;
    border: 1px solid var(--line);
    display: block;
    margin-bottom: 10px;
}
.current-image.logo-current { max-height: 70px; width: auto; }
.ub-error { color: #c62828; font-size: .85rem; margin-top: 8px; }
.ub-paste-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ub-paste-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.ub-progress { margin-top: 10px; }
.ub-progress-track { height: 8px; border-radius: 5px; background: rgba(0, 0, 0, .09); overflow: hidden; }
.ub-progress-fill { height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width .25s ease; }
.ub-progress.ok .ub-progress-fill { background: var(--green); }
.ub-progress.err .ub-progress-fill { background: #c62828; }
.ub-progress-text { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.ub-progress.err .ub-progress-text { color: #c62828; }
.check-line { display: inline-flex; align-items: center; gap: 10px; }
.check-line input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; flex: none; }
.check-line label { font-weight: 600; cursor: pointer; color: var(--text); }

.prod-edit-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.prod-edit-main { min-width: 0; }
.prod-edit-side { min-width: 0; display: flex; flex-direction: column; padding: 16px; background: var(--blue-light); border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 16px; }
.prod-edit-side .form-row { margin-bottom: 0; }
@media (max-width: 980px) {
    .prod-edit-grid { grid-template-columns: 1fr; }
    .prod-edit-side { position: static; }
    .gallery-sort { max-width: none; }
    .gallery-sort .upload-box.with-image { max-width: none; }
}
.gallery-sort { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.gallery-sort .upload-box.with-image {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 4px 12px;
    align-items: start;
    padding: 10px;
    cursor: grab;
}
.gallery-sort .upload-box.with-image .current-image {
    width: 132px;
    height: 100px;
    max-width: none;
    object-fit: cover;
    margin-bottom: 0;
    grid-row: span 3;
}
.gallery-sort .upload-box.with-image .box-title.on { grid-column: 2; margin-bottom: 2px; }
.gallery-sort .upload-box.with-image form, .gallery-sort .upload-box.with-image label { grid-column: 2; margin-top: 0; }
.gallery-sort .upload-box.with-image .btn { grid-column: 2; margin-top: 6px; }
.gallery-sort .upload-box.dragging { opacity: .5; border-color: var(--accent); }

.pdf-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pdf-list-item {
    display: flex; align-items: center; gap: 10px; justify-content: space-between;
    padding: 8px 12px; background: #f2f6fc; border: 1px solid var(--line); border-radius: 8px;
}
.pdf-name { font-size: .88rem; word-break: break-all; }

.qc-color-row input[type="color"] { width: 42px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); cursor: pointer; }
.qc-color-swatch { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); flex: none; }
.qc-color-hex {
    width: 92px; padding: 7px 10px; font-family: Consolas, Monaco, monospace; font-size: .87rem;
    border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--text);
}
.qc-color-hex.qc-hex-invalid { border-color: #d33; box-shadow: 0 0 0 2px rgba(221,51,51,.15); }

/* Responsive */
@media (max-width: 860px) {
    .catalog-layout, .two-col { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .nav-list { display: none; width: 100%; flex-direction: column; }
    .nav-list.open { display: flex; }
    .nav-list .nav-search-mobile { display: block; border-top: 1px solid rgba(255,255,255,.12); }
    .nav-search-mobile .site-search { display: flex; margin: 0; padding: 10px 14px; width: 100%; }
    .nav-search-mobile .site-search input { flex: 1; width: auto; }
    .nav-list li a { border-right: 0; border-top: 1px solid rgba(255,255,255,.15); }
    .nav-list li a.active { transform: none; animation: nav-soft 2s ease-in-out infinite; border-radius: 0; border-top-color: rgba(255,255,255,.35); }
.topbar-inner { justify-content: center; }
    .hero-slider, .slide-content { min-height: 105px; }
    .slide-title { font-size: 1.2rem; margin-bottom: 12px; }
    .slide-content { padding: 30px 24px 34px; }
    .news-scroll { gap: 4px; }
    .scroll-btn { width: 34px; height: 34px; font-size: 1.1rem; }
    .news-card { min-width: 240px; max-width: 240px; }
    .slider-arrow { width: 36px; height: 36px; font-size: 1.3rem; }
    .slider-arrow.prev { left: 8px; }
    .slider-arrow.next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Руководство */
.lead-text {
    background: linear-gradient(90deg, #f0f3f7 50%, #d9e2ec 100%);
    border: 0;
    border-radius: 10px;
    padding: 24px 26px;
    color: var(--text);
    line-height: 1.65;
    margin-bottom: 26px;
    font-size: 1.02rem;
}

.rich-content { line-height: 1.65; }
.rich-content p { margin: 0 0 10px; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content h2, .rich-content h3 { color: var(--blue); margin: 12px 0 8px; }
.rich-content ul { margin: 0 0 10px; padding-left: 22px; }
.rich-content blockquote { border-left: 3px solid var(--accent); margin: 10px 0; padding: 4px 14px; color: var(--muted); }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.rich-content th, .rich-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.rich-text { font-size: .95rem; line-height: 1.55; color: var(--text); }
.rich-text p { margin: 0 0 10px; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text h1, .rich-text h2, .rich-text h3 { margin: 12px 0 6px; line-height: 1.3; }
.rich-text h1 { font-size: 1.45rem; }
.rich-text h2 { font-size: 1.25rem; }
.rich-text h3 { font-size: 1.1rem; }
.rich-text ul, .rich-text ol { margin: 8px 0 8px 22px; }
.product-desc-text ul, .product-desc-text ol { margin: 8px 0 8px 22px; padding-left: 0; }
.product-desc-text ul ul, .product-desc-text ul ol, .product-desc-text ol ul, .product-desc-text ol ol { margin: 3px 0 3px 18px; }
.product-desc-text li { margin: 3px 0; }
.rich-text blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding: 4px 14px; color: var(--muted); }
.rich-text img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-text a { color: var(--blue); }
.rich-text table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.rich-text th, .rich-text td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

.r-block { border-radius: 12px; padding: 14px 18px; margin: 0 0 12px; }
.r-block > :first-child { margin-top: 0; }
.r-block > :last-child { margin-bottom: 0; }

.management-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 20px;
}

.mng-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 34px;
    text-align: left;
    padding: 32px 38px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f4f6f9 0%, #f4f6f9 50%, #bfc4c9 100%);
    border-radius: 14px;
    transition: background .35s, transform .3s, box-shadow .35s;
}

.mng-card:hover {
    background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 50%, #bfc4c9 100%);
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(11, 58, 109, .18);
}

.mng-photo-wrap {
    flex-shrink: 0;
}

.mng-photo {
    width: 168px;
    height: 210px;
    object-fit: cover;
    border-radius: 14px;
    border: 4px solid #fff;
    box-shadow: 0 10px 26px rgba(11, 58, 109, .22);
    background: linear-gradient(180deg, #e9edf3, #c3cfdd);
}

.mng-photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3.1rem;
    font-weight: 700;
    color: var(--blue);
}

.mng-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.mng-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 8px;
    line-height: 1.3;
}

.mng-position {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.4;
    margin-bottom: 18px;
}

.mng-bio {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.mng-card:hover .mng-bio { border-top-color: rgba(217, 155, 42, .4); }

@media (max-width: 720px) {
    .mng-card { flex-direction: column; align-items: center; text-align: center; padding: 26px 22px; }
    .mng-photo { width: 140px; height: 175px; }
    .mng-bio { width: 100%; }
}

.site-search { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-list .nav-search-mobile { display: none; }
.site-search input {
    width: 230px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px;
    background: var(--white); color: var(--text); font: inherit; font-size: .9rem; outline: none; transition: border-color .2s ease;
}
.site-search input:focus { border-color: var(--blue); }
.site-search button {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
    color: var(--blue); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.site-search button:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.site-search button svg { width: 17px; height: 17px; }

.search-page-form { display: flex; gap: 8px; max-width: 560px; margin: 0 0 20px; }
.search-page-form input {
    flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--white); color: var(--text); font: inherit; font-size: .95rem; outline: none;
}
.search-page-form input:focus { border-color: var(--blue); }

.search-none, .search-count { color: var(--muted); margin: 4px 0 16px; }
.search-results { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }
.sr-group h2 {
    display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 8px;
    color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.sr-ic { color: var(--accent); }
.sr-group ul { list-style: none; margin: 0; padding: 0; }
.sr-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 6px;
    background: var(--white); border: 1px solid var(--line); border-radius: 10px;
    text-decoration: none; color: var(--text); transition: border-color .2s ease, box-shadow .2s ease;
}
.sr-item:hover { border-color: rgba(217, 155, 42, .55); box-shadow: 0 4px 12px rgba(11, 58, 109, .08); }
.sr-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-title { font-weight: 600; color: var(--blue); }
.sr-note { font-size: .85rem; color: var(--muted); }
.sr-item mark { background: #ffe08a; color: inherit; border-radius: 3px; padding: 0 2px; }

@media (max-width: 992px) {
    .site-search { display: none; }
    .nav-toggle { display: block; }
    .nav-list { display: none; width: 100%; flex-direction: column; }
    .nav-list.open { display: flex; }
    .nav-list .nav-search-mobile { display: block; border-top: 1px solid rgba(255,255,255,.12); }
    .nav-search-mobile .site-search { display: flex; margin: 0; padding: 10px 14px; width: 100%; }
    .nav-search-mobile .site-search input { flex: 1; width: auto; }
    .nav-list li a { border-right: 0; border-top: 1px solid rgba(255,255,255,.15); }
}

/* Оптимизация под телефоны (не влияет на ПК и планшеты) */
@media (max-width: 720px) {
    html, body { overflow-x: hidden; }

    .container { padding: 0 10px; }

    /* Шапка */
    .header-inner { padding-top: 12px; padding-bottom: 12px; }
    .logo { gap: 10px; padding-left: 4px; }
    .logo-emblem-img { width: 50px; height: 62px; }
    .logo-custom { max-height: 42px; max-width: 88px; }
    .logo-text strong { font-size: 1.08rem; letter-spacing: 0; }
    .logo-text span { font-size: .76rem; }

    /* Меню */
    .nav-toggle { font-size: 1.6rem; padding: 10px 14px; }
    .nav-list li a { padding: 14px 18px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 1rem; }

    /* Заголовки и контент */
    .page-head { padding: 24px 0 6px; }
    .page-head h1 { font-size: 1.35rem; }
    .page-head p { font-size: .95rem; }
    .hero { padding: 28px 0; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: .98rem; margin-bottom: 18px; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .hero-actions .btn { width: 100%; text-align: center; }

/* Слайдер баннеров */
    .slide-content { min-height: 105px; padding: 18px 16px 28px; }
    .slide-title { font-size: 1.18rem; margin-bottom: 6px; }
    .slide-btn {
        padding: 5px 14px;
        font-size: .72rem;
        border-radius: 20px;
        letter-spacing: .2px;
    }
    .slider-arrow { display: none; }
    .slider-dots { bottom: 12px; }

    /* Секции */
    .section { padding: 24px 0; }
    .section-head h2 { font-size: 1.2rem; }

    /* Новости */
    .news-track { -webkit-mask-image: none; mask-image: none; padding: 12px 2px 40px; }
    .news-card { min-width: 260px; max-width: 260px; }
    .news-card-img { height: 150px; }
    .news-card-body { padding: 14px; }
    .news-grid { grid-template-columns: 1fr; }

/* Карточки */
    .quick-grid { grid-template-columns: 1fr; grid-auto-rows: 1fr; }
    .quick-card p { font-size: .9rem; }
    .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .cat-card-name { font-size: 1rem; }
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
    .product-body h3 { font-size: 1.05rem; }
    .product-body p { font-size: .92rem; line-height: 1.5; max-height: 3.05em; overflow: hidden; }
.product-card--no-thumbs .product-body p { max-height: 6.05em; }
.product-card--short-title .product-body p { max-height: 4.55em; }
.product-card--no-thumbs.product-card--short-title .product-body p { max-height: 10.5em; }
    .product-img-wrap { height: 130px; }

    /* PDF */
    .cat-pdf-list { flex-direction: column; align-items: stretch; }
    .cat-pdf-link { justify-content: center; }

    /* Каталог */
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-side { order: -1; }
    .catalog-side .card { position: static; }
    .cat-content { padding: 16px; }
    .cat-cover img { max-height: 220px; }

    /* Продукт */
    .product-layout { grid-template-columns: 1fr; gap: 16px; }
    .product-gallery { position: static; }
    .product-main-frame { aspect-ratio: 4 / 3; }
    .product-gallery .product-thumb { width: 54px; height: 54px; }
    .product-info h1 { font-size: 1.35rem; }
    .product-desc { padding: 16px; }
    .product-price-xl { font-size: 1.3rem; }

    /* Таблицы */
    .two-col { grid-template-columns: 1fr; gap: 16px; }
    .info-table th, .info-table td { padding: 8px 9px; font-size: .85rem; }
    .info-table th { width: auto; }

    /* Формы */
    .form { padding: 18px; }
    .form-row input, .form-row textarea, .form-row select { font-size: 16px; }

    /* Карта */
    .map-block iframe { height: 260px !important; }
    .map-frame { height: 260px; }

    /* Хлебные крошки */
    .breadcrumbs { font-size: .8rem; margin-top: 12px; }

/* Страница «О производстве» */
.page-alt { background: linear-gradient(90deg, #f4f4f4 85%, #cfcfcf 100%); padding: 24px 26px; border-radius: 10px; margin-bottom: 26px; }

/* Руководство */
    .mng-photo { width: 120px; height: 150px; }

    /* Страница статьи */
    .article { padding: 16px; }
    .article h1 { font-size: 1.35rem; }
    .article-img { max-height: 260px; }

    /* Футер */
    .footer-inner { grid-template-columns: 1fr; }
    .footer-col { padding: 20px 12px; }
    .footer-col--main::before { width: 253px; height: 253px; opacity: .22; }
    .footer-bottom { padding: 12px 0; font-size: .78rem; }

    /* Кнопки и пагинация */
    .btn { padding: 10px 18px; font-size: .92rem; }
    .pagination { gap: 4px; margin-top: 20px; }
    .pagination a { padding: 6px 10px; font-size: .88rem; }

    /* Админка */
    .admin-header .container { min-height: 0; padding-top: 6px; padding-bottom: 6px; }
    .admin-drop-btn { padding: 8px 10px; font-size: .9rem; }
    .admin-drop-menu { min-width: 200px; }
    .admin-logout { padding-left: 10px; }
    .admin-main { padding-top: 18px; }
    .dash-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .dash-card { padding: 18px; }
    .dash-card .num { font-size: 1.8rem; }
    .stat-box { min-width: 140px; font-size: .88rem; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
    .table th, .table td { padding: 8px 9px; font-size: .85rem; }
    .settings-card .card-head { margin: -8px -16px 14px; padding: 10px 14px; }

    /* Редактор */
    .rich-toolbar button { min-width: 26px; height: 28px; padding: 0 6px; font-size: .8rem; }

    /* Поиск */
    .search-page-form { flex-direction: column; }
    .search-page-form input, .search-page-form .btn { width: 100%; }
    .sr-item { padding: 9px 12px; }
}
.product-desc-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-desc-head h2 { margin: 0; }
.qe-edit-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: #1d4e89; color: #fff; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(11,58,109,.25); display: inline-flex; align-items: center; justify-content: center; flex: none; margin-left: auto; transition: transform .18s ease, filter .18s ease; }
.qe-edit-btn:hover { transform: scale(1.08); filter: brightness(1.12); }
.qe-edit-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: #1d4e89; color: #fff; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(11,58,109,.25); display: inline-flex; align-items: center; justify-content: center; flex: none; margin-left: auto; transition: transform .18s ease, filter .18s ease, background .18s ease; }
.qe-edit-btn:hover { transform: scale(1.08); filter: brightness(1.12); }
.qe-edit-btn.qe-active { background: #2e9e44; }
.qe-field { outline: 2px dashed #d9a032; outline-offset: 3px; cursor: text; box-shadow: 0 0 12px rgba(217,160,50,.25); transition: outline-color .6s ease, box-shadow .6s ease; }
.qe-field.qe-saving { outline-color: #2e9e44; box-shadow: 0 0 16px rgba(46,158,68,.45); }
.qe-field.qe-fade { outline-color: transparent; box-shadow: none; }
.qe-saved { position: absolute; right: 46px; top: 50%; transform: translateY(-50%); opacity: 0; font-weight: bold; font-size: .85rem; white-space: nowrap; }
.qe-saved.show { animation: qeBlink 1.8s ease forwards; }
@keyframes qeBlink {
    0% { opacity: 0; }
    20% { opacity: 1; }
    50% { opacity: 1; }
    62% { opacity: 0; }
    72% { opacity: 1; }
    100% { opacity: 0; }
}
.paste-hint { margin-top: 12px; font-size: .8rem; color: var(--muted); background: #f2f8ff; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.front-user .qe-edit-btn, .front-user #qeSaved, .front-user .paste-hint { display: none !important; }
img.paste-target, div.paste-target { box-shadow: 0 0 0 3px #2e9e44; cursor: copy; border-radius: 8px; }
.paste-working { opacity: .5; }
.paste-done { animation: pasteFlash 1.6s ease; }
@keyframes pasteFlash {
    0% { box-shadow: 0 0 0 3px #2e9e44; }
    60% { box-shadow: 0 0 0 3px #2e9e44; }
    100% { box-shadow: 0 0 0 3px rgba(46, 158, 68, 0); }
}
.paste-progress-window {
    position: fixed;
    z-index: 1400;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    pointer-events: none;
}
.paste-progress-window.hidden { display: none; }
.paste-progress-window .ub-progress { margin-top: 0; }
.paste-progress-window .ub-progress-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    box-shadow: 0 0 4px rgba(0, 0, 0, .25);
}
.paste-progress-window .ub-progress-fill {
    background: #ffffff;
}
.paste-progress-window.err .ub-progress-fill { background: #c62828; }
.paste-progress-window .ub-progress-text {
    margin-top: 2px;
    font-size: .62rem;
    line-height: 1;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
.paste-progress-window.err .ub-progress-text { color: #ffd0d0; }
.pager-top, .pager-bottom { margin: 14px 0; }
.catalog-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.pager-btn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); text-decoration: none; font-size: .8rem; line-height: 1; vertical-align: middle; transition: .15s; cursor: pointer; }
.pager-btn:hover { background: #000; border-color: #000; color: #ffd76a; text-decoration: none; }
.pager-btn--cur { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager-btn--cur:hover { background: #000; border-color: #000; color: #ffd76a; text-decoration: none; }
.pager-btn--arrow { min-width: 30px; padding: 0; font-size: 1.05rem; line-height: 1; }
.pager-btn--dots { cursor: default; color: var(--muted); border-style: dashed; }
.pager-btn--dots:hover { background: #fff; border-color: var(--line); color: var(--muted); }
.pager-btn--off { opacity: .45; pointer-events: none; }
#catalogGridWrap.is-loading { opacity: .45; transition: opacity .15s; }
.pager-bottom { margin-top: 0; }
.pager-top { margin-bottom: 18px; }
.pager--sm { gap: 4px; margin: 4px 0; }
.pager--sm .pager-btn { min-width: 26px; height: 26px; padding: 0 6px; font-size: .78rem; border-radius: 6px; }
.pager-top--fit { flex: 1 1 200px; max-width: 380px; margin: 0; min-width: 0; }
.pager-top--fit .catalog-pager { justify-content: flex-end; flex-wrap: nowrap; }
.pager-top--fit .pager-btn { min-width: 24px; height: 24px; padding: 0 5px; font-size: .75rem; border-radius: 5px; }
.catalog-pager .pager-btn:not(.pager-btn--arrow) { padding-top: 2px; }
.showmore-area { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 22px 0 10px; }
.showmore-indicator { font-size: .92rem; color: var(--muted); }
.showmore-indicator b { color: var(--blue-dark); }
.show-more-btn { min-width: 220px; padding: 13px 30px; font-size: 1rem; }
.showmore-loading { display: none; align-items: center; justify-content: center; gap: 10px; min-height: 44px; font-size: .92rem; color: var(--muted); }
.showmore-dots { display: inline-flex; align-items: center; gap: 5px; }
.showmore-dots span { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .25; animation: showmore-blip 1.2s ease-in-out infinite; }
.showmore-dots span:nth-child(2) { animation-delay: .2s; }
.showmore-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes showmore-blip { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.05); } }
.scroll-to-top { display: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold); background: var(--bg); color: var(--gold); font-size: 0; cursor: pointer; margin-top: 8px; transition: background .2s, color .2s; }
.scroll-to-top:hover { background: var(--gold); color: var(--bg); }
.scroll-to-top span { display: block; width: 12px; height: 12px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(-45deg); margin: 0 auto; margin-top: 12px; }
.showmore-area.done .scroll-to-top { display: block; }
.catalog-grid { scroll-margin-top: 90px; }
html.js-fade img { opacity: 0; }
html.js-fade img.fx-in { opacity: 1; transition: opacity .45s ease-out; }
html.js-fade img.nofade { opacity: 1 !important; transition: none !important; }
html.js-fade .product-img-wrap .product-img,
html.js-fade .product-thumbs .product-thumb,
html.js-fade .product-gallery img,
html.js-fade .cat-card-img img { opacity: 1 !important; }
.ip-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.ip-badge .ip-val { font-variant-numeric: tabular-nums; }
.ip-badge .ip-dev { font-size: .72rem; font-weight: 500; opacity: .75; }
.ip--desktop { background: #e3ecf6; color: #0b3a6d; border: 1px solid #c3d6ea; }
.ip--smartfon { background: #fdf3dc; color: #9a6b0a; border: 1px solid #ead9a8; }
.ip--tablet { background: #efeaf8; color: #5b3a9e; border: 1px solid #d7cae8; }
img.img-fail { background-image: linear-gradient(160deg, #eef2f8, #d7dfe8); }

/* Десктоп-слайдер: панорама целиком (contain), не влияет на мобильные правила ниже */
.hero-slider .slide { background-size: contain; background-repeat: no-repeat; background-position: center center; }
.hero-slider .slide::before { background-size: contain; background-repeat: no-repeat; background-position: center center; }

.hero-slider .slide { background-size: contain !important; background-repeat: no-repeat !important; background-position: center center !important; }
.hero-slider .slide::before { background-size: contain !important; background-repeat: no-repeat !important; background-position: center center !important; }
/* end banner-panorama-contain */

/* Мобильный слайдер: свои правила, десктоп не затрагивается */
@media (max-width: 860px) {
    .hero-slider .slide,
    .hero-slider .slide::before {
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
    }
    .slide-video {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Видео-слайд: без плавного fade (иначе композитор ресэмплит видео на стыке слайдов и оно дёргается) */
.hero-slider .slide.slide--video {
    transition: none;
}
.hero-slider .slide.slide--video::before {
    display: none;
}

.cat-intro { margin: 14px 0 4px; font-size: .95rem; line-height: 1.55; color: var(--text); }

.front-user .product-main-frame { cursor: zoom-in; }
.guf-lightbox {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(10, 20, 35, .88);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transform: scale(var(--lb-scale, .55)) translateY(var(--lb-shift, 0));
    transform-origin: var(--lb-origin-x, 50%) var(--lb-origin-y, 50%);
    transition: opacity .3s ease, visibility .3s ease, transform .5s cubic-bezier(.25, .8, .25, 1);
}
.guf-lightbox.open { opacity: 1; visibility: visible; transform: scale(1) translateY(0); }
.guf-lb-stage { position: relative; max-width: 92vw; max-height: 90vh; }
.guf-lb-img.loaded ~ .guf-lb-spinner { display: none; }
.guf-lb-spinner { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 3px solid rgba(255,255,255,.22); border-top-color: rgba(255,255,255,.85); border-radius: 50%; animation: gufLbSpin .7s linear infinite; }
@keyframes gufLbSpin { to { transform: rotate(360deg); } }
.guf-lb-img { max-width: 92vw; max-height: 88vh; border-radius: 10px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s ease; }
.guf-lb-img.loaded { opacity: 1; }
.guf-lb-close, .guf-lb-prev, .guf-lb-next { position: fixed; z-index: 2; background: rgba(255, 255, 255, .14); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .18s ease; }
.guf-lb-close:hover, .guf-lb-prev:hover, .guf-lb-next:hover { background: rgba(255, 255, 255, .28); }
.guf-lb-close { top: 16px; right: 20px; width: 40px; height: 40px; font-size: 26px; line-height: 1; }
.guf-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 22px; }
.guf-lb-next { right: 16px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 22px; }
.guf-lb-prev.hidden, .guf-lb-next.hidden, .guf-lb-count.hidden { display: none; }
.guf-lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #e8eef6; font-size: .85rem; background: rgba(0, 0, 0, .35); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
body.guf-lb-open { overflow: hidden; }
@media (max-width: 640px) {
    .guf-lb-prev { left: 8px; width: 40px; height: 40px; }
    .guf-lb-next { right: 8px; width: 40px; height: 40px; }
    .guf-lb-close { top: 10px; right: 12px; }
}

/* Доступность: визуально скрытый, но доступный скринридерам контент */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

/* Touch: убираем задержку двойного тапа на элементах, реагирующих на тап */
a, button, .card, .nav-toggle, .slider-arrow, .dot, .scroll-btn, .pager-btn, .slide-btn {
    touch-action: manipulation;
}

/* Видео-баннеры: MP4-фолбэк на фоне слайда + превью в админке */
.slide-video {
    position: absolute;
    top: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    object-fit: cover;
    transform: translateZ(0);
    z-index: 0;
}
.slide-video + .slide-overlay,
.slide-video ~ .slide-content {
    z-index: 1;
}
.current-video {
    display: block;
    max-width: 100%;
    max-height: 260px;
    margin-top: 8px;
    border-radius: 8px;
    background: #000;
}

/* Превью баннера в админке: картинка + плашка «видео» */
.upload-box.with-video .current-video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    max-height: 260px;
}
.banner-thumb {
    position: relative;
    display: inline-block;
}
.banner-thumb > img,
.banner-thumb > video.banner-video-preview {
    display: block;
    width: 120px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--blue-light);
}
.banner-video-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(11, 58, 109, .9);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* Галерея фото в редакторе/контенте */
.r-gallery {
    display: flex;
    gap: 10px;
    margin: 12px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.r-gallery::-webkit-scrollbar { display: none; }
.rich-area .r-gallery {
    flex-wrap: wrap;
    overflow: visible;
    overscroll-behavior: auto;
}
a.r-gallery-item {
    display: block;
    line-height: 0;
    border: none;
}
.r-gallery img,
img.r-gallery-thumb {
    width: 148px;
    height: 112px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    box-shadow: 0 2px 8px rgba(20, 40, 90, .12);
}
.rich-area .r-gallery img.r-gallery-thumb {
    cursor: default;
}
/* Просмотр фото галереи */
.r-gall-lb {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background: rgba(8, 12, 20, .92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
}
.r-gall-lb img.r-gall-img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 14px 50px rgba(0, 0, 0, .55);
}
.r-gall-load {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.r-gall-load-track {
    height: 6px;
    width: 230px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
}
.r-gall-load-fill {
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 999px;
    transition: width .2s ease;
}
.r-gall-load-text {
    color: #fff;
    font-size: .78rem;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.r-gall-load.err .r-gall-load-text { color: #ffb3b3; }
.r-gall-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.r-gall-lb-close:hover {
    background: rgba(255, 255, 255, .28);
}
.r-gall-count {
    position: absolute;
    top: 24px;
    left: 22px;
    color: #fff;
    font-size: .85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.r-gall-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.r-gall-nav:hover {
    background: rgba(255, 255, 255, .28);
}
.r-gall-nav.r-gall-lb-prev { left: 18px; }
.r-gall-nav.r-gall-lb-next { right: 18px; }
.r-gall-nav.hidden { display: none; }

/* Скрыть визуальный логотип/информер Яндекс Метрики, если появится */
.ym-logo,
.ym-counters,
[class*="ym-logo"] { display: none !important; }
