/* =====================================================================
   Общие правила оформления публичной части сайта.
   Подключаются поверх шаблона; каждое правило срабатывает только при
   наличии соответствующего класса у <html>, который выставляет CMS.
   ===================================================================== */

/* ---------- Шрифты ---------- */
html.cms-font-body body,
html.cms-font-body .el-para,
html.cms-font-body input,
html.cms-font-body textarea,
html.cms-font-body select,
html.cms-font-body button,
html.cms-font-body .el-nav-menu ul li a,
html.cms-font-body .el-top-header-bar p {
    font-family: var(--cms-body-font);
}

html.cms-font-heading h1,
html.cms-font-heading h2,
html.cms-font-heading h3,
html.cms-font-heading h4,
html.cms-font-heading h5,
html.cms-font-heading h6,
html.cms-font-heading .el-main-heading,
html.cms-font-heading .el-top-heading,
html.cms-font-heading .el-top-heading-center,
html.cms-font-heading .el-blog-title,
html.cms-font-heading .el-btn {
    font-family: var(--cms-heading-font);
}

/* ---------- Размер основного текста ---------- */
html.cms-fs .el-para,
html.cms-fs .el-blogsingle-content .el-para,
html.cms-fs .el-nav-menu ul li a {
    font-size: var(--cms-font-size);
}

/* ---------- Скругления ---------- */
html.cms-radius .el-btn,
html.cms-radius .el-btn::after,
html.cms-radius .el-top-heading,
html.cms-radius .el-top-heading-center {
    border-radius: var(--cms-radius);
}

html.cms-radius input,
html.cms-radius select,
html.cms-radius textarea,
html.cms-radius .el-sub-menu,
html.cms-radius .el-inner-blog-box,
html.cms-radius .el-team-box-inner,
html.cms-radius .el-counter-parent,
html.cms-radius .el-blogsingle-img,
html.cms-radius .el-blogsingle-img img,
html.cms-radius .cms-card {
    border-radius: var(--cms-radius) !important;
}

html.cms-radius .el-team-img > img {
    border-radius: var(--cms-radius) var(--cms-radius) 0 0;
}

html.cms-radius .el-blog-box,
html.cms-radius .el-blog-img img {
    border-radius: var(--cms-radius);
}

/* ---------- Акцентный цвет ---------- */
html.cms-accent .el-top-header-right > p > span {
    color: var(--cms-accent);
}

/* ---------- Шапка отдельной полосой ---------- */
html.cms-header-solid .el-header-wrapper {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 24px rgba(15, 35, 60, .06);
}

@media (min-width: 1200px) {
    html.cms-header-solid .el-header-wrapper.header_fixed {
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, .96);
    }
}

html.cms-header-solid .el-breadcrumb-wrapper {
    margin-top: 0;
}

html.cms-header-solid .el-banner-wrapper {
    padding: 460px 0 90px 0;
}

/* ---------- Высота главного экрана ---------- */
html.cms-hero-medium .el-banner-wrapper {
    padding: 360px 0 90px 0;
}

html.cms-hero-compact .el-banner-wrapper {
    padding: 240px 0 70px 0;
}

html.cms-header-solid.cms-hero-medium .el-banner-wrapper {
    padding: 220px 0 90px 0;
}

html.cms-header-solid.cms-hero-compact .el-banner-wrapper {
    padding: 120px 0 70px 0;
}

@media (max-width: 991px) {
    html.cms-hero-medium .el-banner-wrapper,
    html.cms-hero-compact .el-banner-wrapper,
    html.cms-header-solid .el-banner-wrapper {
        padding: 200px 0 60px 0;
    }

    html.cms-header-solid.cms-hero-medium .el-banner-wrapper,
    html.cms-header-solid.cms-hero-compact .el-banner-wrapper {
        padding: 100px 0 50px 0;
    }
}

html.cms-hero-medium .el-arrow1,
html.cms-hero-compact .el-arrow1 {
    display: none;
}

/* Главный экран отключён: оставляем место под шапку, которая лежит поверх содержимого */
html.cms-header-overlay .cms-hero-off-spacer {
    height: 160px;
}

@media (max-width: 1199px) {
    html.cms-header-overlay .cms-hero-off-spacer {
        height: 130px;
    }
}

/* ---------- Фон главного экрана ---------- */
html.cms-hero-bg-image .el-banner-wrapper {
    background-image: var(--cms-hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

html.cms-hero-bg-color .el-banner-wrapper {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

html.cms-hero-overlay .el-banner-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--cms-secondary-rgb, 10, 35, 58), var(--cms-hero-overlay, 0));
    z-index: 0;
    pointer-events: none;
}

html.cms-hero-light .el-banner-left h1,
html.cms-hero-light .el-banner-left p,
html.cms-hero-light .el-banner-play-icon a {
    color: #fff;
}

html.cms-hero-light .el-banner-left h1 {
    text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}

/* ---------- Фон заголовка внутренних страниц ---------- */
html.cms-breadcrumb-img .el-breadcrumb-wrapper {
    background-image: var(--cms-breadcrumb-image);
}

/* ---------- Пункты меню в одну строку (кроме классической темы) ---------- */
@media (min-width: 1200px) {
    html:not(.cms-theme-classic) .el-nav-menu > ul > li > a {
        white-space: nowrap;
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    html:not(.cms-theme-classic) .el-nav-menu > ul {
        gap: 20px;
    }

    html:not(.cms-theme-classic) .el-nav-menu > ul > li > a {
        font-size: 14px;
    }
}

/* ---------- Автор и дата на страницах ---------- */
.cms-page-meta.cms-no-author > li:nth-child(1),
.cms-page-meta.cms-no-date > li:nth-child(2),
.cms-page-meta.cms-no-author.cms-no-date {
    display: none !important;
}

/* ---------- Национальный орнамент ---------- */
html.cms-ornament .el-top-header-bar {
    position: relative;
}

html.cms-ornament .el-top-header-bar::after,
html.cms-ornament .cms-ornament-band {
    content: '';
    display: block;
    height: 10px;
    background-color: var(--cms-accent, #F2B705);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='10' viewBox='0 0 28 10'%3E%3Cpath d='M0 8h4V5h3V2h6v3h3v3h4V5h3V2h5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M10 6.5l1.5-1.5L13 6.5 11.5 8z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='10' viewBox='0 0 28 10'%3E%3Cpath d='M0 8h4V5h3V2h6v3h3v3h4V5h3V2h5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M10 6.5l1.5-1.5L13 6.5 11.5 8z' fill='%23000'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    -webkit-mask-size: 28px 10px;
    mask-size: 28px 10px;
}

html.cms-ornament .el-top-header-bar {
    padding-bottom: 22px !important;
}

html.cms-ornament .el-top-header-bar::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    z-index: 2;
    opacity: .9;
}

.cms-ornament-band {
    display: none;
}

html.cms-ornament .cms-ornament-band {
    display: block;
    opacity: .55;
}

/* ---------- Подвал ---------- */
.cms-footer-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 18px;
}

.cms-footer-list li {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 16px;
}

.cms-footer-list li a {
    color: var(--text-color);
}

.cms-footer-list li a:hover {
    color: var(--primary-color);
}

.cms-footer-list .fa {
    width: 18px;
    color: var(--primary-color);
    margin-right: 6px;
}

.el-footer-info .el-social-icons ul li a .fa {
    color: #fff;
    font-size: 17px;
}

.el-top-header-right .el-social-icons ul li a .fa {
    color: #fff;
    font-size: 14px;
}

/* ---------- Блоки главной страницы ---------- */
.cms-section {
    padding: 80px 0;
}

.cms-section-light {
    background-color: var(--light-bg-color);
}

.cms-section-brand {
    background: var(--secondary-color);
    color: #fff;
}

.cms-section-brand .el-main-heading,
.cms-section-brand .el-para,
.cms-section-brand .cms-rich,
.cms-section-brand .cms-rich * {
    color: #fff;
}

.cms-rich {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.75;
}

.cms-rich img {
    max-width: 100%;
    height: auto;
}

.cms-rich a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cms-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.cms-stat {
    background: var(--secondary-color);
    color: #fff;
    padding: 32px 20px;
    text-align: center;
    border-radius: 10px;
}

.cms-stat-value {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
}

.cms-stat-label {
    font-size: 16px;
    opacity: .85;
    margin-top: 8px;
}

html.cms-radius .cms-stat {
    border-radius: var(--cms-radius);
}

/* ---------- Версия для слабовидящих ---------- */
.cms-a11y-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}

.cms-a11y-toggle:hover {
    opacity: .85;
}

.cms-a11y-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: #fff;
    color: #000;
    border-bottom: 2px solid #000;
    padding: 10px 16px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

html.cms-a11y .cms-a11y-panel {
    display: block;
}

html.cms-a11y body {
    padding-top: 58px;
}

.cms-a11y-panel .cms-a11y-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    max-width: 1200px;
    margin: 0 auto;
}

.cms-a11y-panel .cms-a11y-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cms-a11y-panel button {
    border: 2px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    font-weight: 700;
    cursor: pointer;
}

.cms-a11y-panel button.active {
    background: #000 !important;
    color: #fff !important;
}

.cms-a11y-panel button.cms-a11y-wb {
    background: #000 !important;
    color: #fff !important;
}

html.cms-a11y-fs1 body {
    zoom: 1.15;
}

html.cms-a11y-fs2 body {
    zoom: 1.3;
}

html.cms-a11y-bw body *:not(img):not(video):not(svg):not(path):not(.cms-a11y-panel):not(.cms-a11y-panel *) {
    background-color: #fff !important;
    background-image: none !important;
    color: #000 !important;
    border-color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.cms-a11y-wb body,
html.cms-a11y-wb body *:not(img):not(video):not(svg):not(path):not(.cms-a11y-panel):not(.cms-a11y-panel *) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.cms-a11y-wb body a:not(.cms-a11y-panel *) {
    color: #ffeb3b !important;
}

html.cms-a11y-bw body a:not(.cms-a11y-panel *) {
    text-decoration: underline !important;
}

html.cms-a11y-bw svg,
html.cms-a11y-bw svg path {
    fill: #000 !important;
}

html.cms-a11y-wb svg,
html.cms-a11y-wb svg path {
    fill: #fff !important;
}

html.cms-a11y-gray img,
html.cms-a11y-gray video {
    filter: grayscale(1);
}

html.cms-a11y-noimg img:not(.cms-a11y-panel *),
html.cms-a11y-noimg video {
    visibility: hidden;
}

/* ---------- Полоса предпросмотра темы ---------- */
.cms-preview-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #111827;
    color: #fff;
    padding: 10px 14px 10px 18px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    font: 500 14px/1.3 Arial, Helvetica, sans-serif;
    max-width: calc(100% - 24px);
    flex-wrap: wrap;
}

.cms-preview-bar a {
    color: #111827;
    background: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.cms-preview-bar a.cms-preview-exit {
    background: transparent;
    color: #cbd5e1;
    padding: 6px 4px;
}
