html {
    background: #0a0a0a;
}

body.site-dark-background {
    background: #0a0a0a;
    color: #cfcfcf;
    isolation: isolate;
}

.site-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background:
            radial-gradient(
                    1200px 600px at 80% -10%,
                    rgba(220, 30, 50, .5),
                    transparent 60%
            ),
            radial-gradient(
                    900px 600px at 0% 110%,
                    rgba(20, 30, 80, .65),
                    transparent 60%
            ),
            linear-gradient(
                    160deg,
                    #16060a 0%,
                    #2a0a12 45%,
                    #05060f 100%
            );
}

.site-background::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .1;

    background-image:
            linear-gradient(
                    30deg,
                    rgba(255, 255, 255, .25) 1px,
                    transparent 1px
            ),
            linear-gradient(
                    150deg,
                    rgba(255, 255, 255, .25) 1px,
                    transparent 1px
            );

    background-size: 44px 44px;
}

.site-glow {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .5;
    pointer-events: none;
}

.site-glow-red {
    width: 440px;
    height: 440px;
    top: -120px;
    right: -80px;
    background: #e02233;
}

.site-glow-blue {
    width: 400px;
    height: 400px;
    bottom: -120px;
    left: -100px;
    background: #1a2f8a;
}

/* Убираем сплошные фоны основных секций. */
body.site-dark-background > header,
body.site-dark-background .content,
body.site-dark-background .section-bg,
body.site-dark-background .page-title {
    background: transparent;
}

body.site-dark-background > footer {
    background: rgba(0, 0, 0, .35);
}

/* Черный текст старого шаблона делаем читаемым на темном фоне. */
body.site-dark-background h1,
body.site-dark-background h2,
body.site-dark-background h3,
body.site-dark-background h4,
body.site-dark-background h5,
body.site-dark-background h6,
body.site-dark-background .h1,
body.site-dark-background .h2,
body.site-dark-background .list li,
body.site-dark-background .news-detail b,
body.site-dark-background .link,
body.site-dark-background .articles-list .item .item-title a span,
body.site-dark-background ul.breadcrumb-navigation,
body.site-dark-background ul.breadcrumb-navigation a,
body.site-dark-background .title-contacts,
body.site-dark-background .text-contacts,
body.site-dark-background #main-nav > li > a {
    color: #e8e8e8;
}

/* The fixed header paints its own opaque copy of the viewport background.
   Transparent gradient stops blend with the final opaque gradient, not content. */
body.site-dark-background > header.fixed {
    background-color: #16060a;
    background-image:
        linear-gradient(30deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(150deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
        radial-gradient(1200px 600px at 80% -10%, rgba(220, 30, 50, .5), transparent 60%),
        radial-gradient(900px 600px at 0% 110%, rgba(20, 30, 80, .65), transparent 60%),
        linear-gradient(160deg, #16060a 0%, #2a0a12 45%, #05060f 100%);
    background-size: 44px 44px, 44px 44px, auto, auto, auto;
    background-attachment: fixed;
    background-position: 0 0;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

/* Sidebar navigation for the dark site theme. */
body.site-dark-background ul.left_menu {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    background: linear-gradient(160deg, #2a0a12, #10142e);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

body.site-dark-background ul.left_menu > li {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

body.site-dark-background ul.left_menu > li:last-child {
    border-bottom: 0;
}

body.site-dark-background ul.left_menu > li > a {
    display: block;
    padding: 15px 18px;
    border: 0;
    background: transparent;
    color: #e8e8e8;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: background .2s, color .2s;
}

body.site-dark-background ul.left_menu > li:first-child > a {
    border-radius: 13px 13px 0 0;
}

body.site-dark-background ul.left_menu > li:last-child > a {
    border-radius: 0 0 13px 13px;
}

body.site-dark-background ul.left_menu > li > a:hover {
    background: rgba(224, 34, 51, .18);
    color: #fff;
}

body.site-dark-background ul.left_menu > li > a.selected,
body.site-dark-background ul.left_menu > li.selected > a {
    background: linear-gradient(160deg, #e02233, #8c0f1e);
    color: #fff;
}

/* Primary buttons use the colors and shape of index4. */
body.site-dark-background .btn.btn-primary,
body.site-dark-background .btn.btn-primary:visited {
    background: linear-gradient(160deg, #e02233, #8c0f1e);
    border: 1px solid transparent;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(224, 34, 51, .3);
    transition: transform .2s, box-shadow .2s;
}

body.site-dark-background .btn.btn-primary.small_btn {
    padding: 11px 24px;
    font-size: 12px;
    line-height: 20px;
}

body.site-dark-background .btn.btn-primary.small_btn .icon-arrow::before {
    content: "→";
    font-family: Arial, sans-serif;
}

body.site-dark-background .btn.btn-primary:hover {
    background: linear-gradient(160deg, #ef3042, #a01224);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(224, 34, 51, .45);
}

body.site-dark-background ul.left_menu > li > a:focus-visible,
body.site-dark-background .btn.btn-primary:focus-visible {
    outline: 2px solid #e86a78;
    outline-offset: -3px;
}

body.site-dark-background .btn.btn-primary:active {
    transform: translateY(0);
}

body.site-dark-background .btn.btn-primary:disabled,
body.site-dark-background .btn.btn-primary.disabled {
    opacity: .6;
    transform: none;
    box-shadow: none;
}

/* Training timetable, scoped to the existing schedule component. */
body.site-dark-background .xs-schedule-table-light {
    margin: 24px 0;
    overflow-x: auto;
    background: linear-gradient(160deg, #2a0a12, #10142e);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
    scrollbar-color: #8c0f1e #16060a;
}

body.site-dark-background .xs-schedule-table-light .table {
    width: 100%;
    min-width: 1040px;
    margin: 0;
    table-layout: fixed;
    border: 0;
    background: transparent;
}

body.site-dark-background .xs-schedule-table-light .table th,
body.site-dark-background .xs-schedule-table-light .table td {
    padding: 12px 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: transparent;
    color: #e8e8e8;
    text-align: center;
    vertical-align: middle;
}

body.site-dark-background .xs-schedule-table-light .table thead th {
    width: auto;
    height: auto;
    padding: 18px 8px;
    background: rgba(224, 34, 51, .18);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

body.site-dark-background .xs-schedule-table-light .table th:first-child {
    width: 130px;
}

body.site-dark-background .xs-schedule-table-light .table tbody th {
    background: rgba(0, 0, 0, .18);
    color: #f1a2ab;
    font-size: 13px;
    line-height: 1.5;
    border-color: rgba(255, 255, 255, .1) !important;
}

body.site-dark-background .xs-schedule-table-light .table thead th span {
    min-width: 0;
}

body.site-dark-background .xs-schedule-table-light .table tbody td {
    height: auto;
}

body.site-dark-background .xs-schedule-table-light .table thead th.xs-calendar-index {
    background-color: rgba(224, 34, 51, .18) !important;
}

body.site-dark-background .xs-schedule-table-light .xs-calendar-index .icon-calendar1::before {
    content: "▦";
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: #f1a2ab;
}

body.site-dark-background .xs-schedule-table-light .table tbody td .xs-schedule-info {
    position: static;
    width: auto;
    height: auto;
    min-height: 100px;
    padding: 14px 6px;
    background: rgba(224, 34, 51, .12) !important;
    border: 1px solid rgba(224, 34, 51, .3);
    border-radius: 8px;
}

body.site-dark-background .xs-schedule-table-light .table tbody td .xs-schedule-info h4 {
    margin: 0;
    padding: 0;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

body.site-dark-background .xs-schedule-table-light .table tbody td .xs-schedule-info p {
    margin: 8px 0 0;
    padding: 0;
    color: #f1a2ab !important;
    font-size: 12px;
    line-height: 1.5;
}

body.site-dark-background .xs-schedule-table-light .table tbody td .xs-schedule-info:hover {
    height: auto;
    background: rgba(224, 34, 51, .2) !important;
    box-shadow: none;
}

/* Match the home page dropdowns without changing top-level menu links. */
body.site-dark-background #main-nav li > ul {
    min-width: 240px;
    width: auto;
    margin: 0;
    padding: 12px 0;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 6px;
    background: #210c16;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
    text-align: left;
}

body.site-dark-background #main-nav li > ul > li {
    float: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    white-space: normal;
}

body.site-dark-background #main-nav li > ul > li > a {
    display: block;
    margin: 0;
    padding: 9px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #e8e8e8;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s, color .2s;
}

body.site-dark-background #main-nav li > ul > li > a:hover,
body.site-dark-background #main-nav li > ul > li > a:focus-visible,
body.site-dark-background #main-nav li > ul > li.item-selected > a,
body.site-dark-background #main-nav li > ul > li > a.current {
    background: rgba(224, 34, 51, .14);
    color: #fff;
}

body.site-dark-background #main-nav li > ul > li > a:focus-visible {
    outline: 2px solid #e86a78;
    outline-offset: -2px;
}

@media (max-width: 767px) {
    body.site-dark-background #main-nav li > ul {
        min-width: 0;
        max-width: 100%;
        box-shadow: none;
    }
}

/* Header callback button, matching the home page. */
body.site-dark-background .sp-top-bar__contact.call > .request-call,
body.site-dark-background .sp-top-bar__contact.call > .request-call:visited {
    display: inline-block;
    padding: 8px 18px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(160deg, #e02233, #8c0f1e);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(224, 34, 51, .4);
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
}

body.site-dark-background .sp-top-bar__contact.call > .request-call > span {
    color: inherit;
    border: 0;
}

body.site-dark-background .sp-top-bar__contact.call > .request-call:hover,
body.site-dark-background .sp-top-bar__contact.call.open > .request-call {
    border: 0;
    background: linear-gradient(160deg, #ef3042, #a01224);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(224, 34, 51, .5);
}

body.site-dark-background .sp-top-bar__contact.call > .request-call:focus-visible {
    outline: 2px solid #e86a78;
    outline-offset: 3px;
}


/* Shared callback and training dialogs, matching the home page. */
  .b4-dialog { position:fixed; inset:0; margin:auto; width:calc(100% - 32px); max-width:540px; max-height:calc(100dvh - 32px);
    padding:34px; overflow:auto; border:1px solid rgba(224,34,51,.5); border-radius:14px; color:#fff;
    background:linear-gradient(160deg,#2a0a12,#10142e); box-shadow:0 24px 90px rgba(0,0,0,.7); font-family:Arial,sans-serif; }
  .b4-dialog::backdrop { background:rgba(0,0,0,.78); backdrop-filter:blur(4px); }
  .b4-dialog h2 { font-family:'Arial Black',Arial,sans-serif; font-size:24px; line-height:1.25; padding-right:24px; margin-bottom:24px; }
  .b4-close { position:absolute; right:14px; top:10px; padding:6px 10px; border:0; background:transparent; color:#fff; font-size:28px; cursor:pointer; }
  .b4-dialog h3 { display:none; }
  .b4-dialog .hidden { display:none!important; }
  .b4-dialog .form-group { margin-bottom:16px; }
  .b4-dialog label { display:block; margin-bottom:7px; font-size:14px; color:#cfcfcf; }
  .b4-dialog .form-control { width:100%; padding:12px 14px; border:1px solid rgba(255,255,255,.25); border-radius:6px;
    background:rgba(0,0,0,.3); color:#fff; font:16px Arial,sans-serif; }
  .b4-dialog textarea { resize:vertical; min-height:110px; }
  .b4-dialog .form-control:focus { outline:2px solid #e02233; outline-offset:2px; }
  .b4-dialog .form-control::placeholder { color:#9b9baa; }
  .b4-dialog .btn { margin-top:8px; }
  .b4-dialog .btn:disabled { opacity:.65; cursor:wait; transform:none; }
  .b4-dialog .warning-buy { margin-top:18px; color:#b9b9c6; line-height:1.5; }
  .b4-dialog .warning-buy a { color:#e86a78; text-decoration:underline; }
  .b4-dialog .alert { padding:12px; margin-bottom:16px; border-radius:6px; line-height:1.5; }
  .b4-dialog .alert-success { background:#16352c; color:#b0efcc; }
  .b4-dialog .alert-danger { background:#501824; color:#ffcad1; }
  html.b4-popup-open { overflow:hidden; }

.b4-dialog, .b4-dialog * { box-sizing: border-box; }
.b4-dialog:not([open]) { display: none; }
.b4-dialog { text-transform: none; text-align: left; }
.b4-dialog h2 { margin: 0 0 24px; color: #fff; text-transform: none; font-weight: 700; }
.b4-dialog .sng-easyform { width: 100%; }
.b4-dialog .form-control { height: auto; box-shadow: none; }
.b4-dialog .btn {
    display: inline-block; padding: 15px 34px; border: 0; border-radius: 6px;
    background: linear-gradient(160deg, #e02233, #8c0f1e); color: #fff;
    font: 700 16px/1.5 Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase;
    box-shadow: 0 10px 26px rgba(224,34,51,.5); cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.b4-dialog .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(224,34,51,.65); }
.b4-dialog .btn:disabled { transform: none; }
.b4-dialog .warning-buy { margin-bottom: 0; padding: 0; font-size: 16px; text-transform: none; }
.b4-dialog .warning-buy small { font-size: 13px; line-height: 1.5; }
.b4-dialog .alert { font-size: 16px; }
@media (max-width: 600px) { .b4-dialog { padding: 28px 22px; } }
