﻿@charset "utf-8";

/* ========== CSS Custom Properties ========== */
:root {
    /* Цвета */
    /* --color-black: #000;
    --color-white: #fff;
    --color-grey-light: #666;
    --color-grey: #444;
    --color-grey-dark: #333;
    --color-link: #22f;
    --color-link-hover: #f00;
    --color-highlight: rgba(255,255,0,0.4);
    --color-overlay: rgba(0,0,0,0.3);
    --color-overlay-light: rgba(0,0,0,0.2);
    --color-overlay-bg: rgba(255,255,255,0.75);
    --color-overlay-bg-hover: rgba(255,255,255,0.9);
    --color-overlay-menu: rgba(255,255,255,0.7);
    --color-text-body: #111;
    --color-bg-body: #f4f4f4;
    --color-bg-content: rgba(255,255,255,0.95);
    --color-border-accent: rgba(0,0,0,0.1); */
    
    /* Шрифты */
    --font-primary: Calibri, 'Century Gothic', sans-serif;
    --font-secondary: 'Latol', 'Century Gothic', Calibri, sans-serif;
    --font-mono: monospace, 'Courier New', 'Lucida Console';

    /* Отступы контента (важно для адаптивности) Отступ внутри content-wrapper  */
    /* --gap-outer: 50px;
    --gap-outer2: 100px; */

    /* Анимации */
    /* --transition-default: all 0.4s ease-out;
    --transition-fast: all 0.2s; */
}

/* ========== Шрифты ========== */
@font-face {
    font-family: 'Latol';
    font-display: swap;
    src: url('font/lato-light.woff2') format('woff2');
}
@font-face {
    font-family: 'Latoi';
    font-display: swap;
    src: url('font/lato-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'fontello';
    font-display: swap;
    src: url('font/fontello.eot?14990714');
    src: url('font/fontello.eot?14990714#iefix') format('embedded-opentype'),
         url('font/fontello.woff?14990714') format('woff'),
         url('font/fontello.ttf?14990714') format('truetype'),
         url('font/fontello.svg?14990714#fontello') format('svg');
    font-weight: normal;
    font-style: normal;
}

[class^="icon-"]::before,
[class*=" icon-"]::before {
    font-family: 'fontello';
    font-style: normal;
    font-weight: normal;
    margin-right: 5px;
}

.icon-book::before { content: '\e800'; }
.icon-videocam::before { content: '\e801'; }
.icon-eye::before { content: '\e802'; }
.icon-download::before { content: '\e803'; }

/* ========== Базовые стили ========== */
html, body {
    height: 100%;
    margin: 0;
}

body {
    background-attachment: fixed;
    background-color: #000;
    background-image: url('images/bg-1280.jpg');
    background-image: image-set(
        url('images/bg-1280.avif') type('image/avif'),
        url('images/bg-1280.webp') type('image/webp'),
        url('images/bg-1280.jpg') type('image/jpeg')
    );
    background-position: 0 -14vw;
    background-repeat: no-repeat;
    -webkit-background-size: 100% auto;
    -moz-background-size: 100% auto;
    -o-background-size: 100% auto;
    background-size: 100% auto;
}
@media screen and (min-width: 1281px) {
    body {
        background-image: image-set(
            url('images/bg-1920.avif') type('image/avif'),
            url('images/bg-1920.webp') type('image/webp'),
            url('images/bg-1920.jpg') type('image/jpeg')
        );
    }
}
@media screen and (min-width: 1921px) {
    body {
        background-image: image-set(
            url('images/bg-2502.avif') type('image/avif'),
            url('images/bg-2502.webp') type('image/webp'),
            url('images/bg-2502.jpg') type('image/jpeg')
        );
    }
}

a img, img {
    border: 0;
}

/* ========== Анимация wrapper ========== */
@-webkit-keyframes wrapper {0%, 50% {background: #000;}}
@-moz-keyframes wrapper {0%, 50% {background: #000;}}
@-o-keyframes wrapper {0%, 50% {background: #000;}}
@keyframes wrapper {0%, 50% { background: #000; }}

#wrapper {
    min-height: 100%;
    margin-bottom: -140px;
    -webkit-animation:wrapper 4s 0s 1;
    -moz-animation:wrapper 4s 0s 1;
    -o-animation:wrapper 4s 0s 1;
    animation: wrapper 4s 0s 1;
}

/* ========== Шапка сайта ========== */
#header {
    height: 16vw;
    position: relative;
    overflow: hidden;
    -webkit-transition: height 0.3s;
    -moz-transition: height 0.3s;
    -o-transition: height 0.3s;
    transition: height 0.3s;
}

#top-text {
    width: 100%;
    position: absolute;
    bottom: 0.8vw;
    text-align: center;
    font-size: 1.28vw;
    font-family: var(--font-primary);
    color: #fff;
}
#top-text span {
    text-shadow: 1px 0 #000, 1px 1px #000, 
                 0 1px #000, -1px 1px #000,
                 -1px 0 #000, -1px -1px #000,
                 0 -1px #000, 1px -1px #000;
}

#logo {
    width: 9%;
    position: absolute;
    left: 2%;
    top: 2.5vw;
    opacity: 0.7;
}

#logo:hover {
    opacity: 1;
}

#vk_logo {
    width: 3.78%;
    position: absolute;
    left: 12.4%;
    top: 2.5vw;
    opacity: 0.7;
}

#youtube_logo {
    width: 10%;
    position: absolute;
    left: 17.9%;
    top: 2.5vw;
    opacity: 0.7;
}

#vk_logo:hover,
#youtube_logo:hover {
    opacity: 1;
}

#vk_logo ~ span,
#youtube_logo ~ span {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 12.4%;
    top: 5.5vw;
    color: #fff;
    font-size: 20px;
    font-family: var(--font-primary);
    text-decoration: none;
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}

#vk_logo:hover ~ span,
#youtube_logo:hover ~ span {
    visibility: visible;
    opacity: 1;
}

#name-1 {
    width: 23.5%;
    position: absolute;
    /* -webkit-text-stroke: 0.05vw #fff;
    font-size: 3.2vw; */
    left: 51%;
    top: 2.5vw;
}

#name-2 {
    width: 32.5%;
    position: absolute;
    /* -webkit-text-stroke-color: rgb(255, 196, 33);
    -webkit-text-stroke-width: 0.08vw ;
    font-size: 4.7vw; */
    left: 64%;
    top: 6.5vw;
    /* animation: neon 5s linear infinite alternate-reverse; */
}

/* @keyframes neon {
    from {-webkit-text-stroke-color: rgb(255, 255, 255);}
    to {-webkit-text-stroke-color: rgb(255, 196, 33); }
} */

/* #name-link img {
    filter: drop-shadow(0 0 6px #000) contrast(150%);
} */

#name-link:hover img {
    opacity: 0.7;
}

/* ========== Меню (полностью на CSS) ========== */
#menu::before {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 70px);
    content: 'Теоретические и практические знания по комплексному восстановлению здоровья — для тех, кто в тупике, или ходит по замкнутому кругу болезней.';
    text-align: left;
    padding: 5px 15px;
    font-size: 18px;
    font-family: var(--font-primary);
    color: #fff;
    text-shadow:0 0 5px #000;
    /* text-shadow: 1px 0 #000, 1px 1px #000, 
                 0 1px #000, -1px 1px #000,
                 -1px 0 #000, -1px -1px #000,
                 0 -1px #000, 1px -1px #000; */
}

#menu {
    margin: 0 0 25px 0;
    /* position: sticky;
    top: 0;
    z-index: 100; */
}

#menu-left {
    position: relative;
    float:left;
    /* display: flex; */
}

#menu-left::before {
    width: 100%;
    height: 1px;
    content: '';
    background: rgba(0,0,0,0.3);
    position: absolute;
    top: 0;
    left: 0;
}

#menu-left::after {
    width: 100%;
    height: 1px;
    content: '';
    background: rgba(0,0,0,0.3);
    position: absolute;
    bottom: -1px;
    left: 0;
}

#menu-ul {
    margin: 1px 1px 0 7px;
    padding: 0;
    width: 100%;
    list-style: none;
}

#menu-ul li {
    position: relative;
    display: inline-block;
    list-style-type: none;
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}

#menu-ul > li {
    margin: 0 -1px 0 0;
    background: rgba(255,255,255,0.7);
}

#menu-ul > li::before {
    width: 3px;
    height: 100%;
    content: '';
    background: rgba(0,0,0,0.3);
    position: absolute;
    top: 0;
    left: -3px;
}

#menu-ul > li:first-child::before {
    width: 7px;
    left: -7px;
}

#menu-ul > li:hover {
    background: #000;
}
#menu-ul > li:has(> a:focus) {
    background: #000;
}

#menu-ul > li:hover > a {
    color: #fff;
}
#menu-ul > li:has(> a:focus) > a {
    color: #fff;
}

#menu-ul > li > a {
    display: inline-block;
    height: 45px;
    padding: 12px 15px 0 15px;
    font-size: 19px;
    font-family: var(--font-secondary);
    color: #000;
    text-decoration: none;
}

#menu-ul > li.current > a {
    cursor: default;
    color: #1a1a1a;
}

#menu-ul > li.current:hover {
    background: rgba(255,255,255,0.7);
}

#menu-ul > li.two-lines {
    vertical-align: top;
}

#menu-ul > li.two-lines > a {
    padding-top: 5px;
    height: 52px;
    line-height: 22px;
}

/* Выпадающее меню */
#menu-ul ul {
    margin: 0;
    padding: 0;
    display: none;
    width: 350px;
    z-index: 10;
    list-style: none;
}

#menu-ul > li > ul {
    padding-top: 8px;
}

#menu-ul li:hover > ul {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
}
#menu-ul li:has(> a:focus) > ul {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
}

#menu-ul ul li {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-bottom: 1px solid #666;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
}

#menu-ul ul li:first-child {
    border-top: 1px solid #000;
}

#menu-ul ul li:last-child {
    border-bottom: 1px solid #000;
}

#menu-ul ul li a {
    display: block;
    padding: 8px 15px;
    color: #fff;
    font-size: 18px;
    font-family: var(--font-primary);
    text-decoration: none;
}

#menu-ul ul li:hover {
    background: #fff;
}
#menu-ul ul li:has(> a:focus) {
    background: #fff;
}

#menu-ul ul li:hover > a {
    color: #000;
}
#menu-ul ul li:has(> a:focus) > a {
    color: #000;
}

#menu-ul li:hover ul ul {
    position: absolute;
    top: 0;
    left: 100%;
    border-left: 1px solid #666;
    box-shadow: -30px 0 200px rgba(255, 255, 255, 0.5), -3px 0 20px rgba(255, 255, 255, 0.3);
}
#menu-ul li:has(> a:focus) ul ul {
    position: absolute;
    top: 0;
    left: 100%;
    border-left: 1px solid #666;
    box-shadow: -30px 0 200px rgba(255, 255, 255, 0.5), -3px 0 20px rgba(255, 255, 255, 0.3);
}

#menu-ul ul ul li:hover {
    border-left-color: #fff;
}
#menu-ul ul ul li:has(> a:focus) {
    border-left-color: #fff;
}

#menu-ul ul ul li:first-child:hover {
    border-left-color: #000;
}
#menu-ul ul ul li:first-child:has(> a:focus) {
    border-left-color: #000;
}

/* Стрелочки меню */
#menu-ul ul > li:first-child::after {
    content: '';
    position: absolute;
    left: 60px;
    top: -8px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #000;
}

#menu-ul ul > li:first-child::before {
    content: '';
    z-index: 12;
    position: absolute;
    left: 62px;
    top: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid transparent;
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}

#menu-ul ul > li:first-child:hover::before {
    border-bottom-color: #fff;
    top: -6px;
}
#menu-ul ul > li:first-child:has(> a:focus)::before {
    border-bottom-color: #fff;
    top: -6px;
}

#menu-ul ul ul li:first-child::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    border-bottom: 8px solid transparent;
    border-top: 8px solid transparent;
    border-right: 8px solid #000;
    border-left: 0;
}

#menu-ul ul ul li:first-child::before {
    content: '';
    z-index: 12;
    position: absolute;
    left: 0;
    top: 14px;
    border-bottom: 6px solid transparent;
    border-top: 6px solid transparent;
    border-right: 6px solid transparent;
    border-left: 0;
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}

#menu-ul ul ul li:first-child:hover::before {
    border-right-color: #fff;
    left: -6px;
}
#menu-ul ul ul li:first-child:has(> a:focus)::before {
    border-right-color: #fff;
    left: -6px;
}

#menu-right {
    height: 59px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
}

/* Стили для гамбургера (скрыты на ПК) */
.menu-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 20;
    margin: 15px; /* Отступ кнопки */
    float: right; /* Или left, как вам удобнее */
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff; /* Цвет полосок */
    margin-bottom: 5px;
    border-radius: 2px;
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}

/* Анимация превращения гамбургера в крестик */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Стрелочка для подменю */
.submenu-arrow {
    display: none; /* На ПК скрыта, там работает ховер */
}



/* ========== Основной контент ========== */
/* #content {
    display:inline-block;
    position: relative;
    left: 50%;
    margin: 0 0 0 -38%;
    width: 76%;
    max-width: 1300px;
    min-height: 150px;
    background: rgba(255,255,255,0.75);
    font-family: var(--font-primary);
    border-radius: 2px;
    box-shadow: 0 0 0 5px rgba(0,0,0,0.2);
    box-sizing: border-box;
    transition: all 1s ease-out;
} */
#content {
    display: block;
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    /* background: rgba(255,255,255,0.95); */
    background: rgba(255,255,255,0.75);
    font-family: var(--font-primary);
    box-shadow: 0 0 0 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden; /* Чтобы дочерние элементы не вылезали за скругления */
    -webkit-transition: all 1s ease-out;
    -moz-transition: all 1s ease-out;
    -o-transition: all 1s ease-out;
    transition: all 1s ease-out;
}

#content-wrapper {
    /* margin: 35px 50px 80px 50px; */
    padding: 35px 0 80px 0;
    width: calc(100vw - 100px);
    max-width: 1180px;
    margin: 0 auto;
}

/* Эффект прокрутки (стандартный) */
#content.scrolled {
    background: rgba(255,255,255,0.9);
}
/* Уникальные эффекты (перебивают .scrolled благодаря порядку в CSS) */
#content.dark-mode {
    background: rgb(243,255,155);
    width: 100%;
    max-width: 100%;
    -webkit-filter: blur(0.5px);
    filter: blur(0.5px);
}
/* #content.blue-accent {
    background: #e3f2fd;
    box-shadow: 0 0 0 10px #2196f3;
} */
#content.transparent-mode {
    /* background: transparent;
    box-shadow: 0 0 0 5px transparent; */
    width: 100%;
    max-width: 100%;
    -webkit-transition:width 0s;
    -moz-transition:width 0s;
    -o-transition:width 0s;
    transition:width 0s;
}
/* #content.transparent-mode .full-width-hero {
    width: calc(100% + 100px + (100vw - 1280px)); 
    margin-left: calc(((100px + (100vw - 1280px)) / 2) * -1);
    margin-right: calc(((100px + (100vw - 1280px)) / 2) * -1);
} */
#content.transparent-mode #content-wrapper {
    width: 100%;
    max-width: 100%;
    /* margin: 0 auto; */
}


/* === Типографика === */
#content h1 {
    font-size: clamp(28px, 2.2vw, 50px); /* Адаптивный размер */
    font-family: var(--font-primary);
    color: #332b24;
    line-height: 1.1;
    margin: 0 0 30px 25px;
    /* border-bottom: 3px solid rgba(255,255,0,0.4); */
    /* display: inline-block; */
    padding-bottom: 5px;
}
/* #content h1 {
    margin: 10px 0 40px 25px;
    padding: 0 10% 0 0;
    font: 34px var(--font-primary);
    word-spacing: 2px;
} */

#content h2 {
    font-size: clamp(22px, 1.75vw, 36px);
    font-family: var(--font-primary);
    color: #332b24;
    line-height: 1.1;
    margin: 50px 0 20px 25px;
    position: relative;
}
/* #content h2 {
    margin: 40px 0 10px 25px;
    font: bold 23px var(--font-primary);
    color: #333;
}
#content h2:first-letter {
    font: bold 28px var(--font-primary);
}
*/

#content h3 {
    font-size: clamp(18px, 1.4vw, 28px);
    font-family: var(--font-primary);
    color: #332b24;
    line-height: 1.1;
    margin: 0 0 20px 25px;
    /* word-spacing: 2px; */
}

#content p {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #111;
    text-indent: 25px;
    text-align: justify;
    /* word-spacing: 2px; */
}

#content blockquote {
    /* margin: 1em 40px; 
    border-left: 5px solid rgba(0,0,0,0.2);
    padding-left: 15px;
    font-size: 17px;
    font-style: italic; */

    margin: 0;
    padding: 30px 30px 30px 60px;
    border-left: 5px solid rgba(0,0,0,0.2);
    position: relative;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    /* font-family: var(--font-secondary); */
    font-weight: 300;
}
#content blockquote::before {
    content: '\201C';
    font-family: Arial;
    color: rgba(0,0,0,0.2);
    font-size: 90px;
    position: absolute;
    left: 15px;
    top: 5px;
}
#content blockquote p {
    /* font-style: italic; */
    color: #444;
    font-size: 17px;
    margin-top: 0;
    text-indent: 0;
}
#content blockquote h3 {
    color: #444;
    font-weight: normal;
    margin-left: 0;
}
#content blockquote cite {
    color: #333;
    font-weight: bold;
}

/* Ссылка */
#content a {
    color: #22f;
    text-decoration: none;
    border-bottom: 1px dashed #22f;
    text-shadow:0 0 5px #fff;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    -o-transition: color 0.2s;
    transition: color 0.2s;
}
#content a:hover {
    color: #f00;
    border-color: #f00;
}
/* #content a:hover,
#content a:focus,
#content-wrapper > span a:hover {
    color: #f00;
} */

/* Утилиты выравнивания и цвета */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

#content .font-normal {font-weight:normal}
#content .font-bold {font-weight:bold}
#content .font-ultra {font-size: clamp(56px, 4.5vw, 90px); /* transform: scale(2.05); */}
#content .font-max-plus {font-size: clamp(50px, 3.7vw, 78px); /* transform: scale(1.68); */}
#content .font-max {font-size: clamp(46px, 3vw, 66px); /* transform: scale(1.36); */} /* 28px, 2.2vw, 50px */
#content .font-min {font-size: clamp(28px, 1.6vw, 42px);}
#content .font-min-minus {font-size: clamp(23px, 1.3vw, 34px);}
#content .font-ugly {font-family:'Comic Sans MS', 'Courier New', 'Arial Black', 'Times New Roman';}
#content .margin-top-20 {margin-top: 20px;}
#content .margin-top-40 {margin-top: 40px;}
#content .padding-30 {padding-top:30px;padding-bottom:30px;}
#content .padding-50 {padding-top:50px;padding-bottom:50px;}
#content .padding-100 {padding-top:100px;padding-bottom:100px;}

#content .color-accent { color: #c0392b; }
#content .color-red { color: #dd4939; }
#content .color-green { color: #459e1c; }
#content .color-blue { color: #314883; }
#content .color-black { color: #000000; }
#content .color-white { color: #fbf9f3; }
#content .color-grey { color: #383735; }

span.ye { background: rgba(255,255,0,0.4); padding: 0 4px; border-radius: 2px; }
/* span.ye {background: rgba(255,255,0,0.4);} */

/* === Списки === */
/* Класс для кастомных маркеров */
ul.custom-list {
    display: grid;
    list-style: none;
    padding-left: 25px;
}
ul.custom-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 18px;
}
ul.custom-list li::before {
    content: '✔'; /* Можно заменить на любой символ или url('icon.svg') */
    position: absolute;
    left: 0;
    color: green; /* Цвет маркера */
    font-weight: bold;
}
ul.custom-list.ul-center {
    justify-content: center;
    padding-left: 0;
}
/* Вариант с точками */
ul.custom-list.dots li::before { content: '•'; color: rgba(0,0,0,0.2); font-size: 24px; line-height: 18px; }
/* #content ol,
#content ul {
    font: 17px var(--font-primary);
    margin-top: 5px;
    margin-bottom: 5px;
}

#content ol li,
#content ul li {
    margin-top: 6px;
} */


/* === Изображения Тип 1: Обтекаемые === */
.img-wrap {
    margin-top: 20px;
    margin-bottom: 20px;
}
.img-wrap img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.img-wrap video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
/* #content img {
    margin: 40px 0 20px 0;
} */

.float-left {
    float: left;
    margin-right: 30px;
    /* Ширина регулируется инлайн стилем или доп классом, по умолчанию, например, 40% */
}
.float-right {
    float: right;
    margin-left: 30px;
}
/* Очистка потока после float */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* === Изображения Тип 2: На всю ширину (Full Bleed) === */
.full-width-hero {
    /* Магия отрицательных отступов для выхода за границы wrapper */
    width: calc(100% + (50px * 2)); 
    margin-left: calc(50px * -1);
    margin-right: calc(50px * -1);
    /* margin-top: 150px;
    margin-bottom: 150px; */
    
    position: relative;
    overflow: hidden;
    /* min-height: 300px; */
}

.full-width-hero .bg-img  {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполняет блок, обрезаясь при необходимости */
    display: block;
}

/* Контент поверх изображения */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* max-height: 720px; */
    /* Гибкое позиционирование контента */
    display: flex; 
    flex-direction: column;
    padding: 40px;
}
/* верх растворяется */
.blur-box {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.3);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%);
    mask-image: linear-gradient(to bottom, transparent, black 40%);
}
/* Модификаторы положения текста на картинке */
.hero-overlay.pos-center { justify-content: center; align-items: center; text-align: center; }
.hero-overlay.pos-top { justify-content: flex-start; align-items: flex-start; padding: 0; }
.hero-overlay.pos-top h1 { margin:0 0 0 25px !important; }
.hero-overlay.pos-bottom { justify-content: flex-end; align-items: flex-start; padding: 0; }
.hero-overlay.pos-bottom-left { justify-content: flex-end; align-items: flex-start; }

.hero-content {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px 30px;
    border-radius: 4px;
    max-width: 500px;
    backdrop-filter: blur(5px);
}
.hero-transparent {
    background: rgba(255, 255, 255, 0.2);
    max-width: 100%;
}
.hero-black {
    background: rgba(0, 0, 0, 0.4);
    max-width: 100%;
    backdrop-filter: blur(10px);
}
.hero-black-blur {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    max-width: 100%;
    /* padding: 80px 30px 20px 30px; */
    backdrop-filter: blur(15px);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%);
    mask-image: linear-gradient(to bottom, transparent, black 30%);
}
#content .hero-black-blur h1 {margin:60px 0 0 25px;}

/* === Блок Отзывов === */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.review-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ddd;
    object-fit: cover;
    margin-right: 15px;
}
.review-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold; color: #fff;
    margin-right: 15px;
}

.review-name { font-weight: bold; display: block; }
.review-date { font-size: 12px; color: #888; }

.review-body {
    font-size: 16px;
    line-height: 1.5;
    max-height: 200px; /* Ограничение высоты для длинных отзывов */
    overflow-y: auto; /* Скролл, если текста много */
    margin-bottom: 15px;
    padding-right: 5px; /* Отступ для скроллбара */
}
/* Стилизация скроллбара */
.review-body::-webkit-scrollbar { width: 4px; }
.review-body::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 2px; }

.review-attachments {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.review-attachments img {
    height: 60px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    -webkit-transition: transform 0.2s;
    -moz-transition: transform 0.2s;
    -o-transition: transform 0.2s;
    transition: transform 0.2s;
}
.review-attachments img:hover {
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -o-transform: scale(1.1);
    transform: scale(1.1);
}

/* Видео отзыв */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}

/* === Анимации === */
.animate-on-scroll {
    /* border-top:5px solid green;
    border-bottom:5px solid red; */
    /* margin-top: 150px; */
    margin-bottom: 200px;
    min-height: 100vh;
    display: grid;
    align-content: center;
    opacity: 0;
    -webkit-transform: translateY(30px);
    -moz-transform: translateY(30px);
    -o-transform: translateY(30px);
    transform: translateY(30px);
    -webkit-transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
    -moz-transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
    -o-transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
    transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
}
.animate-slow {
    -webkit-transform: translateY(30px) scale(0.9);
    -moz-transform: translateY(30px) scale(0.9);
    -o-transform: translateY(30px) scale(0.9);
    transform: translateY(30px) scale(0.9);
    -webkit-transition: opacity 2s ease-out 0.8s, transform 2s ease-out 0.8s;
    -moz-transition: opacity 2s ease-out 0.8s, transform 2s ease-out 0.8s;
    -o-transition: opacity 2s ease-out 0.8s, transform 2s ease-out 0.8s;
    transition: opacity 2s ease-out 0.8s, transform 2s ease-out 0.8s;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -o-transform: translateY(0);
    transform: translateY(0);
}
.animate-slow.is-visible {
    position: relative;
    top: 5vh;
    -webkit-transform: translateY(0) scale(1.0);
    -moz-transform: translateY(0) scale(1.0);
    -o-transform: translateY(0) scale(1.0);
    transform: translateY(0) scale(1.0);
}
.fade-on-view {
    opacity: 0;
    -webkit-transform: translateY(-60px) scale(0.9);
    -moz-transform: translateY(-60px) scale(0.9);
    -o-transform: translateY(-60px) scale(0.9);
    transform: translateY(-60px) scale(0.9);
    -webkit-transition: opacity 2s ease-out 2s, transform 6s ease-out 2s;
    -moz-transition: opacity 2s ease-out 2s, transform 6s ease-out 2s;
    -o-transition: opacity 2s ease-out 2s, transform 6s ease-out 2s;
    transition: opacity 2s ease-out 2s, transform 6s ease-out 2s;
}
.fade-on-view.fade-on-view-is-visible {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1.1);
    -moz-transform: translateY(0) scale(1.1);
    -o-transform: translateY(0) scale(1.1);
    transform: translateY(0) scale(1.1);
}

/* === Кнопки === */
.btn2 {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(43, 143, 0, 0.6);
    color: #fff !important; /* Перебиваем дефолтный цвет ссылок */
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}
.btn2:hover {
    background: #f00;
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.btn-outline {
    background: transparent;
    border: 2px solid #22f;
    color: #22f !important;
}
.btn-outline:hover {
    background: #22f;
    color: #fff !important;
}




#content-wrapper > span {
    display:inline-block;
    color: #666;
    font-size: 13px;
    position:relative;
    top:-22px;
    left:24px;
}

#content-wrapper > span a {
    color: #666;
    border-bottom: 1px dashed #666;
    padding: 0 3px;
}

.hr {
    width: 100%;
    height: 5px;
    background: rgba(0,0,0,0.2);
    margin: 80px 0 60px 0;
    clear: both;
}
.hr2 {
    /* width: 100%; */
    height: 5px;
    background: rgba(0,0,0,0.2);
    margin: 10px 0 20px 0;
    overflow: hidden;
}
.hr3 {
    /* width: 100%; */
    height: 5px;
    background: rgba(0,0,0,0.2);
    margin: 0 0 20px 0;
    overflow: hidden;
}

#bord_bot {
    width: 100%;
    height: 2px;
    background: #333;
    margin: 80px 0 60px 0;
}

div#published {
    margin: 40px 0 5px 25px;
    color: #555;
    font-size: 14px;
    font-family: var(--font-mono);
    word-spacing: 5px;
}

#text-img-top {
    width: 30%;
    float: left;
    padding: 0 20px 10px 0;
    margin: 0;
}

.text-img-top2 {
    width: 30%;
    margin-right: 20px;
}

#social-buttons {
    margin: 30px 0;
    padding: 30px 0;
    clear: both;
    border-top: 5px solid rgba(0,0,0,0.2);
    border-bottom: 5px solid rgba(0,0,0,0.2);
}

#social-buttons > div {
    position: relative;
    left: 50%;
    margin: 0 0 0 -200px;
    width: 400px;
}

#social-buttons > div:first-child {
    margin: 0 0 15px -196px;
    font-size: 31px;
    font-family: var(--font-secondary);
    color: #000;
}

/* ========== Sidebar ========== */
#stat {
    width: 232px;
    /* display: inline-block; */
    float: right;
    margin: 0 0 25px 25px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 0 5px rgba(0,0,0,0.2);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#stat span {
    display: block;
    color: #000;
    padding: 7px 0;
    font-size: 16px;
    font-family: var(--font-primary);
    border-top: 1px solid rgba(0,0,0,0.2);
    word-spacing: 3px;
}

#stat span a {
    margin-left: 10px;
}

#stat .zag {
    display: inline-block;
    width: 100%;
    color: #000;
    font-size: 24px;
    font-family: var(--font-primary);
    text-align: center;
    padding-bottom: 10px;
}
#stat .zag-2 {
    display: inline-block;
    width: 100%;
    color: #000;
    font-size: 24px;
    font-family: var(--font-primary);
    text-align: center;
    padding-bottom: 10px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 5px solid rgba(0,0,0,0.2);
}

#table-of-contents {
    width: 232px;
    float: right;
    margin: 0 0 25px 25px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 0 5px rgba(0,0,0,0.2);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
#table-of-contents::before {
    content: 'Содержание:';
    display: inline-block;
    width: 100%;
    padding: 0 0 15px 0;
    color: #000;
    font-size: 24px;
    font-family: var(--font-primary);
    text-align: center;
    border-bottom: 5px solid rgba(0,0,0,0.2);
}

#content #table-of-contents ul {
    /* margin: 0; */
    /* list-style-type: none; */
    padding-inline-start: 18px;
}
#content #table-of-contents ol {
    padding-inline-start: 18px;
}

#content #table-of-contents ul li {
    padding: 1px 0;
    /* color: #000; */
    font-size: 16px;
    font-family: var(--font-primary);
    /* word-spacing: 1px; */
    text-align:left;
}
#content #table-of-contents ol li {
    padding: 1px 0;
    font-size: 16px;
    font-family: var(--font-primary);
    text-align:left;
}

/* ========== Details/Summary ========== */
details {
	position: relative;
	/* margin-bottom: 0.5rem; */
	min-height: 1rem;
	max-height: 3rem;
	-webkit-transition: min-height 0.3s linear, max-height 1s linear;
	-moz-transition: min-height 0.3s linear, max-height 1s linear;
	-o-transition: min-height 0.3s linear, max-height 1s linear;
	transition: min-height 0.3s linear, max-height 1s linear;
	will-change: max-height;
	overflow: hidden;
}
details summary {
    color: #22f;
	display: inline-block;
	padding-left: 1.5em;
	cursor: pointer;
	outline: 0;
	-webkit-transition: color 0.2s;
	-moz-transition: color 0.2s;
	-o-transition: color 0.2s;
	transition: color 0.2s;
}
details summary::-webkit-details-marker {
	display: none;
}
details summary::-moz-list-bullet {
	list-style-type: none;
}
details summary::before {
	content: '';
	left: 0;
	top: 0.2em;
	position: absolute;
	background: url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIzNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC41OSAxNi4zNGw0LjU4LTQuNTktNC41OC00LjU5TDEwIDUuNzVsNiA2LTYgNnoiLz48L3N2Zz4=') no-repeat 50% 50% / 1em 1em;
	width: 1em;
	height: 1em;
	-webkit-transition: transform 0.2s linear;
	-moz-transition: transform 0.2s linear;
	-o-transition: transform 0.2s linear;
	transition: transform 0.2s linear;
}
details summary:hover {
	color: #f00;
}
details summary ~ * {
	opacity: 0;
	-webkit-transition: opacity 0.3s linear;
	-moz-transition: opacity 0.3s linear;
	-o-transition: opacity 0.3s linear;
	transition: opacity 0.3s linear;
}
details[open] {
	min-height: 2em;
	max-height: 40em;
}
details[open] summary {
	color: #f00;
}
details[open] summary ~ * {
	opacity: 1;
}
details[open] summary::before {
	-webkit-transform: rotate(90deg);
	-moz-transform: rotate(90deg);
	-o-transform: rotate(90deg);
	transform: rotate(90deg);
}

#stat details a {
    width: 80%;
}

/* ========== Новости ========== */
.news {
    width: 100%;
    margin: 0 0 10px 0;
    border-bottom: 1px dashed #ccc;
    font-size: 17px;
    font-family: var(--font-primary);
    padding: 10px 0 40px 0;
}

.news span {
    background: #cc5a3d;
    color: #fff;
    font-size: 12px;
    font-family: Arial;
    padding: 2px 6px;
    margin: 0 0 0 25px;
    border-radius: 3px;
}

.news h6 {
    font-size: 20px;
    font-weight: bold;
    font-family: var(--font-primary);
    margin: 10px 0 0 25px;
    color: #332b24;
    word-spacing: 2px;
}

/* ========== Footer ========== */
#footer_correct {
    height: 220px;
    clear: both;
}

#footer {
    position: absolute;
    width: 100%;
    height: 200px;
    /* background: url('images/footer.png') repeat-x; */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 1.0));
    box-shadow: 0 0 0 5px rgba(0,0,0,0.3);
}

#footer-center {
    position: relative;
    margin: 54px auto 0 auto;
    width: 76%;
    max-width: 1280px;
}

#copyright {
    display: inline-block;
    width: 140px;
    font-size: 19px;
    font-family: var(--font-primary);
    color: #fff;
}

#social_bottom {
    position: absolute;
    top: 0;
    right: 0;
}

#social_bottom a {
    display: inline-block;
    margin-left: 34px;
    font-size: 21px;
    font-family: var(--font-primary);
    color: #fff;
    text-decoration: none;
}

#social_bottom a:hover {
    color: #f00;
}
#social_bottom a:focus {
    color: #f00;
}

#footer_text {
    position: absolute;
    bottom: -18px;
    right: 0;
    width: 432px;
    font-size: 15px;
    font-family: var(--font-primary);
    color: #fff;
    text-align: justify;
}

#footer_text span {
    visibility: hidden;
}

.scroll-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Чтобы нельзя было нажать, пока невидима */
    -webkit-transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    -moz-transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    -o-transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    z-index: 1000;
}
.scroll-to-top.show {
    opacity: 0.4;
    visibility: visible;
    pointer-events: auto;
}
.scroll-to-top:hover {
    opacity: 1 !important;
}

.border {
    display: inline-block;
    border: 1px solid #666;
    padding: 0 20px 10px 10px;
    margin: 30px 0 0 0;
    border-radius: 5px;
}

#content a.btn {
    display: inline-block;
    position: relative;
    margin: 2px 6px 3px 0;
    padding: 6px 15px;
    white-space: nowrap;
    background: linear-gradient(#E248C8, #842975);
    border: 1px solid #802971;
    font-size: 14px;
    font-family: Verdana;
    color: #fff;
    vertical-align: middle;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 2px #541a4a;
    border-radius: 7px;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
}

#content a.btn:hover {
    background: linear-gradient(#B539A0, #6A205E);
}

#content a.btn:active {
    background: linear-gradient(#691F5D, #B4389F);
}
#content a.btn:focus {
    background: linear-gradient(#691F5D, #B4389F);
}

#content a.btn span {
    z-index: 11;
    position: absolute;
    top: 80px;
    left: 0;
    visibility: hidden;
    opacity: 0;
    color: transparent;
    font-size: 13px;
    font-family: Verdana;
    text-align: left;
    text-shadow: none;
    -webkit-transition: all 0.4s ease-out;
    -moz-transition: all 0.4s ease-out;
    -o-transition: all 0.4s ease-out;
    transition: all 0.4s ease-out;
}

#content a.btn:hover span {
    top: 38px;
    visibility: visible;
    opacity: 1;
    color: #000;
    background: #fff;
    box-shadow: 0 0 8px 6px #fff, 0 -8px 0 #fff;
}
#content a.btn:focus span {
    top: 38px;
    visibility: visible;
    opacity: 1;
    color: #000;
    background: #fff;
    box-shadow: 0 0 8px 6px #fff, 0 -8px 0 #fff;
}

#content a.btn_inset {
    background: linear-gradient(#691F5D, #B4389F);
    color: #eee6f2;
    cursor: default;
}

#content a.btn_inset:hover {
    background: linear-gradient(#691F5D, #B4389F);
}

#content a.btn_inset span {
    display: none;
}

#content button {
    display: inline-block;
    background: #f7df94;
    border: 0;
    font-size: 18px;
    font-family: var(--font-primary);
    color: #33251f;
    padding: 5px;
    text-decoration: none;
    text-align: center;
    border-radius: 3px;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
}

#content button:hover {
    background: #f7be94;
}

/* ========== Popup окна ========== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity 0.3s ease, visibility 0s 0.3s;
    -moz-transition: opacity 0.3s ease, visibility 0s 0.3s;
    -o-transition: opacity 0.3s ease, visibility 0s 0.3s;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    -webkit-transition: opacity 0.3s ease;
    -moz-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	-o-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
    min-width: 200px;
    min-height: 120px;
    padding: 30px 40px;
    background: #eee url(images/modal-gloss.png) no-repeat -200px -80px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    font-size: 17px;
    font-family: var(--font-primary);
}

.popup.is-visible {
    display: block;
}

.popup h2 {
    color: #666;
    font-weight: normal;
}

.popup .b_close {
    position: absolute;
    top: 8px;
    right: 11px;
    font-size: 24px;
    font-weight: bold;
    font-family: var(--font-primary);
    color: #aaa;
    line-height: 0.5;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.popup .b_close:hover {
    color: #e6735c;
}

.content2 {
    overflow: scroll;
    height: 120px;
    z-index: -3;
    position: absolute;
    opacity: 0;
}


/* ========== Уважение к предпочтению снизить движение ========== */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    transform: none;
  }
}

/* ========== Адаптивная верстка ========== */
@media screen and (min-width: 840px) {
    #menu-ul > li > a {
        font-size: 18px;
        padding: 12px 10px 0 10px;
    }
}
@media screen and (min-width: 1000px) {
    #menu-ul > li > a {
        font-size: 19px;
        padding: 12px 15px 0 15px;
    }
}
@media screen and (min-width: 1200px) {
    #menu-ul > li > a {
        padding: 12px 20px 0 20px;
    }
}
@media screen and (min-width: 1600px) {
    #menu-ul > li > a {
        font-size: 20px;
        padding: 12px 25px 0 25px;
    }
}
@media screen and (min-width: 1900px) {
    #content p {
        font-size: 19px;
    }
}

@media screen and (max-width: 1494px) {
    .scroll-to-top {
        right: calc(((100vw - 15px - 1280px) / 4) - 20px);
        width: 40px;
        height: 40px;
    }
}
@media screen and (max-width: 1394px) {
    .scroll-to-top {
        right: calc(20px + ((100vw - 15px - 1280px) / 2));
    }
}
@media screen and (max-width: 1294px) {
    .scroll-to-top {
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
@media screen and (max-width: 1100px) {
    #content {
        width: 100%;
        border-radius: 0;
        background: #fff !important;
    }
    #content.scrolled {
        background: #fff !important;
    }
    #footer-center {
        width: 100%;
        margin: 54px 0 0 0;
        border-radius: 0;
    }
    #copyright {
        margin-left: 50px;
    }
    #social_bottom,
    #footer_text {
        right: 50px;
    }
}
@media screen and (max-width: 839px) {
    #menu-ul > li > a {
        font-size: 16px;
        height: 36px;
        padding: 7px 5px 0 5px;
    }
    #menu-ul > li.two-lines > a {
        padding: 3px 15px 0 15px;
        height: 40px;
        line-height: 18px;
    }
    #menu-right {
        height: 45px;
    }
}
@media screen and (max-width: 768px) {
    /* Уменьшаем отступы на мобильных */
    #content-wrapper {
        width: calc(100vw - 50px);
    }
    .full-width-hero {
        width: calc(100% + (25px * 2)); 
        margin-left: calc(25px * -1);
        margin-right: calc(25px * -1);
    }
    /* :root {
        --gap-outer: 25px;
        --gap-outer2: 50px;
    } */

    #content {
        width: 100%;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }
    /* Отключаем обтекание картинок на мобильном */
    .float-left, .float-right {
        float: none;
        width: 100% !important; /* Принудительно на всю ширину */
        margin: 0 0 20px 0;
    }
    .hero-content { max-width: 100%; }
    /* Заголовки */
    #content h1 { font-size: 32px; }

    body {
        background-position: 0 -11vw;
    }
    #header {
        height: 24vw;
    }
    #logo, #name-1, #name-2, #vk_logo, #youtube_logo {opacity: 1;}
    #logo {
        width: 15.7%;
        left: 17px;
    }
    #name-1 {
        width: 40%;
        /* font-size: 5.1vw; */
        left: 15%;
        /* top: 2.5vw; */
    }
    #name-2 {
        width: 40%;
        /* font-size: 5.7vw; */
        left: 57%;
        top: 2.2vw;
    }
    #top-text {
        display: none;
    }
    #vk_logo {
        width: 6.8%;
        left: 70%;
        top: 11vw;
    }
    #youtube_logo {
        width: 18%;
        left: 79%;
        top: 11vw;
    }
    #vk_logo ~ span,
    #youtube_logo ~ span {
        display: none;
    }

    /* =========================================
       МОБИЛЬНОЕ МЕНЮ
       ========================================= */
    #menu::before {
        display: block;
    }
    /* =========================================
       1. СБРОС ДЕКОРАЦИЙ И ЛИШНИХ ЭЛЕМЕНТОВ
       ========================================= */
    #menu-right,
    #menu-left::before,
    #menu-left::after,
    #menu-ul li br,              /* Убираем перенос строки в тексте ссылок */
    #menu-ul li::before,         /* Убираем палочки-разделители 1 уровня */
    #menu-ul li::after,
    #menu-ul ul > li:first-child::after,   /* Убираем треугольники подменю */
    #menu-ul ul > li:first-child::before,
    #menu-ul ul ul li:first-child::after,
    #menu-ul ul ul li:first-child::before {
        display: none !important;
    }

    /* =========================================
       2. КОНТЕЙНЕРЫ МЕНЮ
       ========================================= */
    #menu {
        position: relative;
        background: rgba(0,0,0,0.3);
        height: auto;
        min-height: 60px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        margin: 0;
        border-bottom: 1px solid #ccc;
    }

    #menu-left {
        float: none;
        width: 100%;
        display: block;
    }

    /* Гамбургер */
    .menu-toggle {
        display: block;
        /* Убедитесь, что стили самой кнопки описаны вне media query или продублированы */
    }

    /* =========================================
       3. ОСНОВНОЙ СПИСОК (UL)
       ========================================= */
    #menu-ul {
        display: none;          /* Скрыто по умолчанию */
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        background: #fff;
        position: absolute;     /* Выпадает поверх контента сайта */
        top: 60px;
        left: 0;
        z-index: 1000;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        border-top: 1px solid #eee;
    }

    /* Класс open добавляется JS */
    #menu-ul.open {
        display: flex;
        -webkit-animation: slideDown 0.3s ease-out forwards;
        -moz-animation: slideDown 0.3s ease-out forwards;
        -o-animation: slideDown 0.3s ease-out forwards;
        animation: slideDown 0.3s ease-out forwards;
    }

    @-webkit-keyframes slideDown {
        from { opacity: 0; -webkit-transform: translateY(-10px); -moz-transform: translateY(-10px); -o-transform: translateY(-10px); transform: translateY(-10px); }
        to { opacity: 1; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); }
    }
    @-moz-keyframes slideDown {
        from { opacity: 0; -webkit-transform: translateY(-10px); -moz-transform: translateY(-10px); -o-transform: translateY(-10px); transform: translateY(-10px); }
        to { opacity: 1; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); }
    }
    @-o-keyframes slideDown {
        from { opacity: 0; -webkit-transform: translateY(-10px); -moz-transform: translateY(-10px); -o-transform: translateY(-10px); transform: translateY(-10px); }
        to { opacity: 1; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); }
    }
    @keyframes slideDown {
        from { opacity: 0; -webkit-transform: translateY(-10px); -moz-transform: translateY(-10px); -o-transform: translateY(-10px); transform: translateY(-10px); }
        to { opacity: 1; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); }
    }

    /* =========================================
       4. ПУНКТЫ МЕНЮ (LI) - FLEX КОНТЕЙНЕРЫ
       ========================================= */
    /* Применяем ко ВСЕМ уровням вложенности одинаковую логику */
    #menu-ul li,
    #menu-ul li.two,
    #menu-ul ul li {
        display: flex;       /* ВАЖНО: Flex, чтобы ссылка и стрелка были в ряд */
        flex-wrap: wrap;     /* ВАЖНО: Wrap, чтобы подменю переносилось на новую строку */
        align-items: stretch;
        width: 100%;
        height: auto;        /* Сброс высоты с ПК */
        margin: 0;
        border-bottom: 1px solid #eee;
        background: #fff;
        position: relative;
        box-shadow: none;    /* Убираем тени внутри списка */
    }

    /* Сброс hover-эффектов фона с ПК версии */
    #menu-ul > li:hover,
    #menu-ul > li:has(> a:focus) {
        background: #fff;
    }

    /* =========================================
       5. ССЫЛКИ (A)
       ========================================= */
    /* Селектор сделан специфичным, чтобы перебить ПК стили */
    #menu-ul > li > a,
    #menu-ul ul li a {
        display: flex;
        flex: 1 1 auto;      /* Занимает всю ширину минус стрелка */
        width: 1%;           /* Хак для корректной работы flex-grow */
        height: auto;
        line-height: 1.3;
        padding: 15px;
        font-size: 16px;
        font-weight: normal;
        text-align: left;
        color: #333;
        white-space: normal; /* Разрешаем перенос текста */
        background: transparent;
        border: none;
        align-items: center;
    }

    /* Сброс цвета текста при наведении */
    #menu-ul > li:hover > a {
        color: #000;
    }

    /* Активный пункт */
    #menu-ul li.current > a {
        background: #f9f9f9;
        font-weight: bold;
        color: #000;
        cursor: pointer; /* Возвращаем курсор, если на ПК он default */
    }

    /* =========================================
       6. СТРЕЛКА (SPAN)
       ========================================= */
    .submenu-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 50px;      /* Жесткая ширина 50px */
        width: 50px;
        border-left: 1px solid #eee;
        cursor: pointer;
        /* Высота авто, растянется по высоте LI */
    }

    .submenu-arrow::after {
        content: '';
        width: 10px;
        height: 10px;
        border-right: 2px solid #333;
        border-bottom: 2px solid #333;
        transform: rotate(45deg);
        transition: transform 0.2s;
        margin-top: -4px;
    }

    .submenu-arrow.active {
        background: #f9f9f9;
    }

    .submenu-arrow.active::after {
        transform: rotate(225deg);
        margin-top: 4px;
    }

    /* =========================================
       7. ПОДМЕНЮ (UL UL) - ЛОГИКА АККОРДЕОНА
       ========================================= */
    
    /* 
       Самая важная часть! 
       Мы перечисляем все возможные варианты ховера с ПК, 
       чтобы ПЕРЕБИТЬ их через !important 
    */
    #menu-ul ul,
    #menu-ul ul ul,
    #menu-ul li:has(> a:focus) ul {
        display: none !important;     /* Скрываем, даже если навели мышь */
        position: static !important;  /* Убиваем absolute, чтобы работало как аккордеон */
        width: 100% !important;
        float: none;
        box-shadow: none !important;
        border: none !important;
        
        /* Flex настройки для переноса на новую строку */
        flex-basis: 100%; 
        order: 10;
        
        /* Сброс координат вылета */
        left: auto !important;
        top: auto !important;
        margin: 0 !important;
        transform: none !important;
        
        background: #f5f5f5; /* Фон для 2 уровня */
    }

    /* Показываем ТОЛЬКО если есть класс open (добавляется JS) */
    #menu-ul ul.open,
    #menu-ul ul ul.open {
        display: block !important;
    }
    
    /* Стили ссылок 2 уровня */
    #menu-ul ul li a {
        padding: 12px 15px 12px 30px; /* Отступ слева */
        font-size: 15px;
        color: #555;
    }

    /* Стили 3 уровня */
    #menu-ul ul ul {
        background: #eaeaea; /* Фон темнее для 3 уровня */
    }
    #menu-ul ul ul li a {
        padding-left: 50px; /* Еще больше отступ */
    }


    #content-wrapper {
        /* margin: 35px 25px 50px 25px; */
        padding: 35px 0 50px 0;
    }
    /* #content > span {
        margin-left: 32px;
    } */
    #content-wrapper > span {
        left:0;
    }
    #table-of-contents {
        width:100%;
    }
    #table-of-contents::before {
        border-bottom: none;
    }
    #content #table-of-contents ul {
        padding-inline-start: 30px;
    }
    #content #table-of-contents ul li {
        padding: 2px 0;
        /* word-spacing: 1px; */
    }
    /* .video {
        width: 100%;
        height: 360px;
    } */

    #footer-center {
        width: 450px;
        margin: 20px auto 0 auto;
    }
    #copyright {
        display: block;
        width: 450px;
        margin: 0;
    }
    #social_bottom {
        position: static;
        margin-top: 20px;
        width: 450px;
    }
    #social_bottom a:first-child {
        margin-left: 0;
    }
    #footer_text {
        position: static;
        margin-top: 20px;
        margin-left: 6px;
    }
}

@media screen and (max-width: 520px) {
    #header {
        height: 32vw;
    }
    #logo {
        width: 24%;
    }
    #name-1 {
        width: 64%;
        left: 33%;
    }
    #name-2 {
        width: 64%;
        left: 33%;
        top: 11vw;
    }
    #vk_logo {
        width: 6%;
        left: 71%;
        top: 22vw;
    }
    #youtube_logo {
        width: 15.8%;
        left: 81%;
        top: 22vw;
    }
    #menu::before {
        font-size: 12px;
        padding: 7px 0 0 15px;
    }
    #stat {
        width: 100%;
        margin: 0;
    }

    #footer-center {
        width: 90%;
    }
    #copyright {
        width: 100%;
    }
    #social_bottom {
        width: 240px;
    }
    #social_bottom a {
        width: 94px;
    }
    #social_bottom a:nth-child(3) {
        margin-left: 0;
    }
    #footer_text {
        width: 100%;
        margin-left: 0;
    }
}

@media screen and (max-width: 480px) {
    body {
        background-attachment: scroll;
    }
    /* #header {
        height: 41vw;
    } */
    #logo,
    #vk_logo,
    #youtube_logo {
        opacity: 1;
    }
    /* #menu {
        margin: 0;
    } */
    #content {
        background: #fff;
    }
    #social-buttons > div:first-child {
        width: 180px;
        margin-left: -90px;
    }
}
/* 
@media screen and (max-width: 400px) {
    #header {
        height: 44vw;
    }
} */

@media screen and (max-width: 360px) {
    /* #header {
        min-height: 180px;
    } */
    /* #menu-ul {
        width: 100%;
    } */
    #content {
        word-wrap: break-word;
    }
    #content p,
    #content ul,
    #content ol {
        font-size: 15px;
        word-spacing: normal;
    }
    #content-wrapper {
        /* margin: 40px 5px; */
        padding: 40px 5px;
    }
    #content img {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .popup {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        margin: 0;
        -webkit-transform: none;
        -moz-transform: none;
        -o-transform: none;
        transform: none;
    }
    .b_close {
        right: 50px;
    }
    #top-text {
        text-align: justify;
        width: 94%;
    }
}