<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <base href="https://t.bud-online.ru/">
    <link href="favicon.ico" rel="shortcut icon" />	
    <link rel="icon" href="">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/jquery.fancybox.min.css">
    <link rel="stylesheet" href="/assets/css/slick.css">
    <link rel="stylesheet" href="/assets/css/slick-theme.css">
    <link rel="stylesheet" href="/assets/css/style.css?T=20261129083900">
    
<meta property="og:title" content="sitemap">
<meta property="og:image" content="https://t.bud-online.ru/assets/img/tozuche_img.jpg">
<meta property="og:url" content="https://t.bud-online.ru/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="СК Төзүче">    
    
    <style>
    html {
        scroll-behavior: smooth;
    }
    .hero {
        position: relative;
    }
    
    .hero-content {
        width: 80%;
    }
    
    .hero-content.center {
        text-align: center;
        margin: auto;
    }
    
    .hero-content.right {
        text-align: right;
        margin: auto;
    }
    
    .hero-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 750px;
        
        @media (max-width: 660px) {
            height: 650px;
        }
    }
    
    .hero-heading{
        color: #fff;
        font-size: 70px;
        line-height: 1.2;
        font-weight: 800;
        margin-bottom: 25px;
    }
    
    .hero-subheading {
        color: #fff;
        font-size: 26px;
        line-height: 1.2;
        font-weight: 500;
        margin-bottom: 40px;
    }
    
    .main-btn {
        position: relative;
        display: inline-block;
        text-decoration: none;
        color: black;
        font-size: 16px;
        font-weight: 400;
        border-radius: 30px;
        background: var(--main-color);
        transition: all 0.3s ease;
        padding: 18px 30px;
    }

    .main-btn:hover {
        transform: scale(1.1);
        <!-- box-shadow: 0 2px 20px 5px var(--main-color); -->
    }
    
    .main-btn svg {
        position: absolute;
        top: -7px;
        right: -13px;
        transform: rotate(5deg) scale(1.3);
        
    }
    
    .second-btn {
        display: inline-block;
        text-decoration: none;
        color: black;
        font-size: 16px;
        font-weight: 400;
        border: 1px solid var(--main-color);
        background: transparent;
        transition: all 0.3s ease;
        border-radius: 30px;
        padding: 18px 30px;
    }

    .second-btn:hover {
        background: var(--main-color);
        color: black;
        transform: scale(1.1);
        <!-- box-shadow: 0 2px 20px 5px var(--main-color); -->
    }

    .hero__image {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        object-fit: contain;
        background-repeat: no-repeat;
        filter: brightness(0.7);
        z-index: -1;
        
    }
    
    .hero__image img {
        object-fit: cover;
    }
    
    .hero__video {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: -1;
        background: black;
    }
    
    .hero__video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .5;
    }
    
    
    @media (max-width: 991px) {
        .hero-content {
            width: 100%;
        }
        
        .hero-heading {
            text-align: center;
            font-size: 70px;
        }
        
        .hero-subheading {
            text-align: center;
            font-size: 26px;
        }
        
        .hero-btn {
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 9px;
        }
    }
    
    @media (max-width: 768px) {
        .hero-heading {
            font-size: 50px;
        }
        
        .hero-subheading {
            font-size: 24px;
        }
    }
    
    @media (max-width: 575px) {
        .hero-heading {
            font-size: 40px;
        }
        
        .hero-subheading {
            font-size: 20px;
        }
    }
    :root {
      --main-color: ;
      --secondary-color: ;
      --header-footer: black;
      --black-color: #1C1B15;
      --text-color: #555555;
      --pt: 120px;
      --pb: 120px;
    }
    
.pt { padding-top: var(--pt); }
.pb { padding-bottom: var(--pb); }


    h2 {
        font-size: 36px;
    }
    
    p {
        font-size: 18px;
        margin: 0;
    }
    
    .slider-container .arrows-container .container {
        position: relative;
        max-width: 1420px;
        padding: 0;
    }
    
    .heading {
        margin-bottom: 30px;
    }
    
    .media-benefit {
        margin-top: 30px;
    }
    
    [class$="benefit__item"] {
        border-radius: 10px;
        box-shadow: 0 0 30px -8px rgba(0, 0, 0, 0.0705882353);
        background: white;
        padding: 20px;
        height: 100%;
    }
    
    
    [class$="benefit__item"] h3 {
        font-size: 18px;
    }
    
    [class$="benefit__item"] p {
        font-size: 14px;
    }
    
    [class$="benefit__item-top"] {
        content: "";
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        background: var(--main-color);
        border-radius: 50%;
        margin-bottom: 20px;
    }
    
    .benefit {
        position: relative;
        overflow: hidden;
        background-attachment: fixed;
    }
    
    .benefit-info {
        height: 100%;
        color: white;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: start;
        margin-bottom: 30px;
    }
    
    .row-gap {
        row-gap: 20px;
    }
    
    .card {
        border: none;
    }
    
    .card img {
        object-fit: cover;
        font-family: 'object-fit: cover;';
    }
    
    #mapcons {
        width: 100%;
        height: 500px;
        border-radius: 10px;
        overflow: hidden;
    }   
    
    
    
    
    .site-header__body {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        position: relative;
        z-index: 1000;
    }
    
    .header-logo img {
        display: block;
    }
    
    .header-contacts {
        display: flex;
        align-items: center;
        margin-left: auto;
    }
    .header-contacts__content {
        display: flex;
        flex-direction: column;
    }
    
    .burger-button, .burger-close {
        width: 40px;
        height: 40px;
        display: none;
        background: var(--main-color);
        border-radius: 50%;
        border: none;
        cursor: pointer;
        color: white;
    }
    
    .header_right {
        display: flex;
        flex-direction: row-reverse;
    }
    
    @media (max-width: 992px) {
        .header-menu {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: 100%;
            height: auto;
            background-color: var(--black-color);
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transform: translateY(-100%);
            transition: transform 0.3s ease;
            z-index: 999;
            padding: 80px 20px 30px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        
        .header-menu.active {
            transform: translateX(0);
        }
        
        .header-menu ul {
            height: 100%;
            justify-content: center;
            flex-direction: column;
            align-items: center;
        }
        
        .burger-button, .burger-close {
            display: block;
        }
        
        .header-contacts {
            display: flex;
            margin-left: auto;
            position: relative;
            z-index: 998;
        }
        
        .header-contacts__content {
            display: flex;
        }
    }
    .site-footer__bottom {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 20px;
      padding: 20px 0;
    }
    
    .bvc_ico {
       width: 8px;
       height: 8px;
       display: inline-block;
       background: #0AC33E;
       border-radius: 100%;
       margin-right: 2px;         
    }
    
    .bvc_text {
       color: white;
       font-weight: 400;
       font-size: 14px; 
       text-decoration: none!important;
       margin-left: 5px;
    }  
    
    .bvc_text:hover {
        text-decoration: none!important;
    }
    
    .price {
        color: var(--main-color);
        font-size: 20px;
        font-weight: 600;
    }
    

    .marquee {
        padding: 20px 0;
        height: 30px;
        top: 72px;
        position: absolute;
        display: flex;
        width: 100%;
        overflow: hidden;
        white-space: nowrap;
        box-sizing: border-box;
        background: #fff595;
        align-items: center;
    }


    .marquee span {
        display: inline-block;
        color: black;
        animation: marquee 15s linear infinite;
        padding-left: 50%;
    }

    @keyframes marquee {
        0%   { transform: translateX(0); }
        100% { transform: translateX(-100%); }
    }
    
</style>

    <!-- Yandex.Metrika counter -->
    <script type="text/javascript">
        (function(m,e,t,r,i,k,a){
            m[i]=m[i]||function(){ (m[i].a=m[i].a||[]).push(arguments) };
            m[i].l=1*new Date();
            for (var j = 0; j < document.scripts.length; j++) { if (document.scripts[j].src === r) { return; } }
            k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
        })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=104153004', 'ym');
    
        ym(104153004, 'init', { ssr:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true });
    </script>
    <noscript><div><img src="https://mc.yandex.ru/watch/104153004" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
    <!-- /Yandex.Metrika counter -->

</head>
<body>
                <header class="header">
        <div class="container">
            <div class="site-header__body">
        		<a href="/" class="header-logo ">
        			<img class="main-logo" src="" alt="logo">
        		</a>
        		<!--<nav class="header-menu">-->
        		<!--    -->
          <!--          -->
        		<!--	<button class="burger-close" title="close">-->
        		<!--		<i class="fa-solid fa-xmark"></i>-->
        		<!--	</button>-->
        		<!--</nav>-->
        		<!--<div class="header_right">-->
        		<!--    <div class="header-contacts">-->
        		<!--    	<a href="tel:" class="header-contacts__icon">-->
        		<!--    		<i class="fa-solid fa-phone"></i>-->
        		<!--    	</a>-->
  <div class="header-contacts__content">
  <a href="#section-contacts" class="header-contacts__tel icon-link">Связаться
  <svg xmlns="http://www.w3.org/2000/svg" class="bi" viewBox="0 0 16 16" aria-hidden="true">
    <path d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z"/>
  </svg></a>
  <!--<a href="https://api.whatsapp.com/send?phone=&text=Здравствуйте!%20Меня%20интересует" class="header-contacts__whatsapp">Написать в Whatsapp</a>-->
  </div>
        		<!--    </div>-->
        		    
        		<!--    <button class="burger-button" title="menu">-->
        		<!--    	<i class="fa-solid fa-bars"></i>-->
        		<!--    </button>-->
        		<!--</div>-->
        	</div>
        </div>
         
    </header>
    
    <div class="wrapper">
        <main>
                                    <!--<style>


body.fix_scroll {
        overflow: hidden;
    }

    .stories_row {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        overflow: auto;
        -ms-flex-wrap: nowrap;
            flex-wrap: nowrap;
        margin-left: -10px;
        margin-right: -10px;
        padding: 30px 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .stories_modal * {
        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .stories_row::-webkit-scrollbar {
          width: 0;
          height: 0;
    }    
    
    .stories_item_border {
        border-radius: 22px;
        margin-right: 35px;
        padding: 1.5px;        
        border: 1px solid #004965;
        cursor:pointer;
        -webkit-transition: 0.4s;
        -o-transition: 0.4s;
        transition: 0.4s;
    }
    .stories_item.shown {
        background: #b4b4b4;
    }
    
    .stories_item {
        width: 90px;
        min-width: 90px;
        height: 90px;
        position: relative;
    cursor: pointer;
        display: inline-flex;
    text-decoration: none;
    border-radius: 15px;
    margin: 0 7px;
    position: relative;
    border-radius: 100%;
    background: linear-gradient(to right, var(--main-color) 0%, var(--secondary-color) 51%, var(--main-color) 100%);
    background-size: 200%;
    animation: gradient 4s ease infinite;
    padding: 5px;
    transition: all 0.3s ease;
    }
    
    .stories_item:hover {
    transform: scale(1.05);
}
    
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
    
    .stories_item_border:hover, .stories_item_border.active {
        -webkit-transform: translate(-10px,10px);
            -ms-transform: translate(-10px,10px);
                transform: translate(-10px,10px);
        -webkit-box-shadow: 9px -8px 0px #59595933; 
               box-shadow: 9px -8px 0px #59595933; 
    }
    .stories_item_img {
        
        border-radius: 50%;
        border: 4px solid white;
        width: 100%;
        -o-object-fit: cover;
           object-fit: cover;
    }
    .stories_item_text {
        padding: 0 10px;
        font-size: 10px;
        font-weight: bold;
        line-height: 1.2;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        width: 100%;
        text-align: center;
    }    
    
    .stories_item_modal {
        position: fixed;
        display: none;
        width: 100%;
        z-index: 99999;
        top: 0;
        background: #000000eb;
        bottom: 0;
    }
    .stories_item_modal.show {
        display: block;      
    }


    .stories_slides {
        text-align: center;
        height: calc(var(--vh, 1vh) * 100);
padding: 40px 0px;
    }
    .stories_slide {
        height: 100%;
        width: -webkit-min-content;
        width: -moz-min-content;
        width: min-content;
        margin: auto;
        border-radius: 30px;
        overflow: hidden;
        position: relative;
        font-size: 16px;
        display:none;
    }
    .stories_slide.active {
        display:block;
    }
    
    
    .stories_item_modal_img {
        height: 100%;
    }
    
    .stories_item_modal_content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        padding: 40px 30px 30px;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        color: white;
        background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(#000000));
        background: -o-linear-gradient(transparent, #000000);
        background: linear-gradient(transparent, #000000);
        text-align: left;
    }
    
    .stories_item_modal_title {
        font-size: 2em;
        margin-bottom: 0.6em;
        font-weight: bold;
        line-height: 1.2;
    }
    .stories_item_modal_text {
        font-size: 1.2em;
    }    
    
    .stories_item_modal_btn {
        display: block;
        margin-top:10px;
        position: relative;
        z-index: 9;
    }
    
    .btn-stor-primary {
        font-weight: 600;
        font-size: 14px;
        color: #fff;
        background: #40c351;
        border-radius: 10px;
        border: 0;        
    }
    .btn-stor-primary:hover,.btn-stor-primary:focus {
        background: #40ab4e;
        filter: drop-shadow(0px 0px 15px rgba(0,0,0,.4))
    }    
    
    .stories_modal_close_btn {
        position: absolute;
        right: 20px;
        top: 30px;
        background: #0000004f;
        border-radius: 100%;
        width: 30px;
        height: 30px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
        cursor: pointer;
        z-index: 9;
    }
    
    .stories_modal_close_btn svg path {
        fill: white;
    }
    
    .stories_slide-nav {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
    }
    .stories_slide-thumbs {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        position: absolute;
        width: 100%;
        height: 20px;
        top: 0px;
        z-index: 9;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;  
        padding: 0 10px;
    }
    
    .stories_slide-thumb-item {
        width: 100%;
        height: 2px;
        margin: 0 3px;
        background: #0000004f;
        border-radius: 3px;
        overflow: hidden;
    }
    .stories_slide-thumb-item.old_slide:not(.active) {
        background: white;
    }
    .stories_slide-thumb-item.active::after {
        content: '';
        background: white;
        width: 0%;
        height: 2px;
        border-radius: 3px;
        display: block;
        -webkit-animation: inherit;
                animation: inherit;
    }
    
    @keyframes thumb {
        to {
            width: 100%;
        }
    }    
    
    
    .stories_slide_btn {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 100%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: justify;
            -ms-flex-pack: justify;
                justify-content: space-between;
        z-index: 8;
    }
    .stories_slide_prev, .stories_slide_next {
        width: 100%;
cursor:pointer;
    }
    
    .stories_item_modal_backbg {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(#000000a3));
        background: -o-linear-gradient(transparent, #000000a3);
        background: linear-gradient(transparent, #000000a3);
    }
    
    @media only screen and (min-width: 768px) {
        .stories_slide-thumbs {
            max-width: 400px;
        }
        
        .stories_slide-thumbs {
            top: 50px;
        }
    }
    @media only screen and (max-width: 768px) {
        
        .stories_item_border {
            margin-right: 5px;
        }
        
        .stories_slides {
            padding: 0px;
        }   
        .stories_slide {
            border-radius: 0px;
            width: auto;
        }
        
        .stories_item_modal_img {
            width: 100%;
            height: auto;
            -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, color-stop(90%, black), to(transparent));
            -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
                    mask-image: -webkit-gradient(linear, left top, left bottom, color-stop(90%, black), to(transparent));
                    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
        }
    
    
        .stories_item_modal.open {
            -webkit-animation: show_stor 0.2s normal linear;
                    animation: show_stor 0.2s normal linear;
        }    
        .stories_item_modal.close {    
            -webkit-animation: close_stor 0.2s normal linear;    
                    animation: close_stor 0.2s normal linear;
        }  
        .stories_item_modal.prev {    
            -webkit-animation: prev_stor 0.2s normal linear;    
                    animation: prev_stor 0.2s normal linear;
        }   
        .stories_item_modal.next {    
            -webkit-animation: next_stor 0.2s normal linear;    
                    animation: next_stor 0.2s normal linear;
        }  
        @-webkit-keyframes show_stor {
          from {
            -webkit-transform: scale(0.2);
                    transform: scale(0.2);
          }
          to {
            -webkit-transform: scale(1);
                    transform: scale(1);
          }
        }  
        @keyframes show_stor {
          from {
            -webkit-transform: scale(0.2);
                    transform: scale(0.2);
          }
          to {
            -webkit-transform: scale(1);
                    transform: scale(1);
          }
        }
        @-webkit-keyframes close_stor {
          from {
            -webkit-transform: scale(1);
                    transform: scale(1);
          }
          to {
            -webkit-transform: scale(0);
                    transform: scale(0);
          }
        }
        @keyframes close_stor {
          from {
            -webkit-transform: scale(1);
                    transform: scale(1);
          }
          to {
            -webkit-transform: scale(0);
                    transform: scale(0);
          }
        } 
        @-webkit-keyframes prev_stor {
          from {
            -webkit-transform: translateX(-100%);
                    transform: translateX(-100%);
          }
          to {
            -webkit-transform: translateX(0%);
                    transform: translateX(0%);
          }
        } 
        @keyframes prev_stor {
          from {
            -webkit-transform: translateX(-100%);
                    transform: translateX(-100%);
          }
          to {
            -webkit-transform: translateX(0%);
                    transform: translateX(0%);
          }
        } 
        @-webkit-keyframes next_stor {
          from {
            -webkit-transform: translateX(100%);
                    transform: translateX(100%);
          }
          to {
            -webkit-transform: translateX(0%);
                    transform: translateX(0%);
          }
} 
        @keyframes next_stor {
          from {
            -webkit-transform: translateX(100%);
                    transform: translateX(100%);
          }
          to {
            -webkit-transform: translateX(0%);
                    transform: translateX(0%);
          }
        }           
    }
    
</style>-->
                                                        </main>
    </div>
    <footer class="footer site-footer">
    	<div class="container">
    		<div class="site-footer__bottom">
    			<!-- <span class="site-copyright text-light">© 2026Название</span> -->
    				<a href="/" class="header-logo ">
        			<img class="main-logo" src="" alt="logo">
        		</a>
                <div style="color: #a1a1a1;font-size: 14px;" class="footer__text">
                    Разработка сайта - <a target="blank" href="https://bud-online.ru/" class="footer__dop-link bvc_text"><span class="bvc_ico"></span> Будь в сети</a>
                </div>   
    		</div>
    	</div>
    </footer>
    
    <div class="modal fade" id="modalProductDynamic" tabindex="-1" aria-hidden="true"></div>
    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/js/bootstrap.bundle.min.js"></script>
    <script src="assets/js/jquery.fancybox.min.js"></script>
    <script src="assets/js/script.js"></script>
    <script src="assets/js/slick.min.js"></script>
    <script src="https://api-maps.yandex.ru/2.1/?apikey=33073ef0-04db-4777-8319-00b78e0a2c82&lang=ru_RU" type="text/javascript"></script>
    <script>
    $(document).on('click','.open_chats',function(e){
            e.preventDefault();
            if($('.chats_row').hasClass('hide')){
                $('.chats_row').removeClass('hide');
                $('.open_chats').addClass('active');
                $('.bread-steam').addClass('none');
            } else {
                $('.chats_row').addClass('hide');
                $('.open_chats').removeClass('active');
                $('.bread-steam').removeClass('none');
            }
        });
    
    $(document).ready(function() {
        $('.catalog-cards__link').on('click', function(e) {
            e.preventDefault();
    
            const prod_id = $(this).data('id');
    
            $.ajax({
                type: 'POST',
                url: 'ajax.html', // Здесь ваш ресурс MODX, обрабатывающий запрос
                data: {
                    target: 'get_modal_product',
                    id: prod_id
                },
                success: function(res) {
                    $('#modalProductDynamic').html(res);
                    
                    const modal = new bootstrap.Modal(document.getElementById('modalProductDynamic'));
                    modal.show();
    
                },
                error: function() {
                    alert('Ошибка загрузки модального окна');
                }
            });
        });
    });
</script>

<script>
//     document.addEventListener('DOMContentLoaded', function() {
//         const burgerButton = document.querySelector('.burger-button');
//         const burgerClose = document.querySelector('.burger-close');
//         const headerMenu = document.querySelector('.header-menu');
        
//       burgerButton.addEventListener('click', function() {
//           headerMenu.classList.add('active');
//           document.body.style.overflow = 'hidden';
//       });
        
//         burgerClose.addEventListener('click', function() {
//             headerMenu.classList.remove('active');
//             document.body.style.overflow = '';
//         });
        
//         const menuLinks = document.querySelectorAll('.header-menu a');
//         menuLinks.forEach(link => {
//             link.addEventListener('click', function() {
//                 headerMenu.classList.remove('active');
//                 document.body.style.overflow = '';
//             });
//         });
//     });
</script>

<script type="text/javascript">
    const markersData = [
                
    ];
    ymaps.ready(initMap);
    function initMap() {
        // Создаем карту с фиксированным центром
        const map = new ymaps.Map("mapcons", {
            center: [55.813167, 49.181226],
            zoom: 12
        });
        
        markersData.forEach(marker => {
            ymaps.geocode(marker.address).then(function (res) {
                const firstGeoObject = res.geoObjects.get(0);
                const coordinates = firstGeoObject.geometry.getCoordinates();
                if (markersData.indexOf(marker) === 0) {
                    map.setCenter(coordinates);
                }
                const placemark = new ymaps.Placemark(coordinates, {
                    iconCaption: marker.hint,
                    balloonContent: marker.balloon
                }, {
                    preset: marker.markerstyle,
                    iconColor: marker.markercolor
                });
                map.geoObjects.add(placemark);
                
                //map.setBounds(map.geoObjects.getBounds(), { checkZoomRange: true, zoomMargin: 20 });
                if (window.innerWidth <= 768) {
                    //map.setZoom(14);
                }  
            });
        });
    }
</script>

<script>
$(document).ready(function() {
    const $sections = $("section");
    const $navLinks = $(".nav-link");
    let isProgrammaticScroll = false;

    // Обработка кликов по навигационным ссылкам
    $navLinks.on("click", function(e) {
        e.preventDefault();
        const targetId = $(this).attr("href").substring(1);
        const $targetSection = $("#" + targetId);
        
        if ($targetSection.length) {
            isProgrammaticScroll = true;
            $("html, body").stop().animate({
                scrollTop: $targetSection.offset().top
            }, {
                duration: 100,
                complete: function() {
                    setTimeout(function() {
                        isProgrammaticScroll = false;
                    }, 200);
                }
            });
        }
    });

    const observer = new IntersectionObserver(
        function(entries) {
            if (isProgrammaticScroll) return;
            
            entries.forEach(function(entry) {
                if (entry.isIntersecting) {
                    const id = entry.target.id;
                    
                    $navLinks.each(function() {
                        const $link = $(this);
                        const isActive = $link.attr("href") === "#" + id;
                        $link.toggleClass("active", isActive);
                    });
                }
            });
        },
        { threshold: 0.5 }
    );

    // Наблюдаем за всеми секциями
    $sections.each(function() {
        observer.observe(this);
    });
});
</script>

<script>
    const $categoriesContainer = $('.category_menu');

    $('.scroll_to_cat').on('click', function() {
        const catId = $(this).data('catid');
        const targetBlock = $('[data-catblock="' + catId + '"]');

        if (targetBlock.length) {
            $('.scroll_to_cat.active').removeClass('active');
            $(this).addClass('active');

            $('html, body').animate({
                scrollTop: targetBlock.offset().top - 200
            }, 100);
            
            scrollToActiveCategory();
        }
    });
$(window).on('scroll', throttle(function() {
    const scrollPosition = $(this).scrollTop() + 250;

    let found = false;

    $('[data-catblock]').each(function() {
        const $block = $(this);
        const blockTop = $block.offset().top;
        const blockBottom = blockTop + $block.outerHeight();
        const blockId = $block.data('catblock');

        if (scrollPosition >= blockTop && scrollPosition < blockBottom) {
            const $targetButton = $('.scroll_to_cat[data-catid="' + blockId + '"]');
            if (!$targetButton.hasClass('active')) {
                $('.scroll_to_cat.active').removeClass('active');
                $targetButton.addClass('active');
                scrollToActiveCategory();
            }
            found = true;
            return false; 
        }
    });

    // если мы не нашли ни одного блока — убираем active
    if (!found) {
        $('.scroll_to_cat.active').removeClass('active');
    }
}, 100));;

    function scrollToActiveCategory() {
        if (!$categoriesContainer.length) {
            console.error('Контейнер с категориями не найден! Проверьте селектор.');
            return;
        }

        const $activeCat = $('.scroll_to_cat.active');
        if (!$activeCat.length) return;
        
        const container = $categoriesContainer[0];
        const containerWidth = container.clientWidth;
        const containerScrollLeft = container.scrollLeft;
        const activeCatPos = $activeCat.position().left;
        const activeCatWidth = $activeCat.outerWidth();
        
        const targetScroll = containerScrollLeft + activeCatPos - (containerWidth / 2) + (activeCatWidth / 2);
    
        $categoriesContainer.stop().animate({
            scrollLeft: targetScroll
        }, 300);
    }

    function throttle(fn, wait) {
        let time = Date.now();
        return function() {
            if ((time + wait - Date.now()) < 0) {
                fn.apply(this, arguments);
                time = Date.now();
            }
        };
    }
</script>
    <script src="/assets/js/jquery.touchSwipe.min.js"></script>

<script>
var auto = true;

var timerClick;
var longClickExecuted = false;
var click_true = true;

var timeoutID;
var timeoutID_count = 0; 
var timeoutID_stop = 0;

var scrWidth = window.outerWidth;

function onStartPress(e) {
    timerClick = setTimeout(pause_stor, 300);
    longClickExecuted = false;
}

function onEndPress(e) {
    clearTimeout(timerClick);

    let paused = document.querySelector('.stories_slide-thumb-item.paused');
    if (paused) {
        paused.style.animationPlayState = 'running';
        paused.classList.remove('paused');

        // продолжить видео текущего слайда
        let activemodal = document.querySelector('.stories_item_modal.show');
        if (activemodal) {
            let activeSlide = activemodal.querySelector('.stories_slide.active');
            if (activeSlide) {
                let video = activeSlide.querySelector('video');
                if (video) {
                    video.play().catch(()=>{}); // безопасный play
                }
            }
        }

        let activeThumb = document.querySelector('.stories_slide-thumb-item.active');
        let time = activeThumb?.getAttribute('data-time');
        let time2 = activeThumb?.getAttribute('data-time2');

        let newtime;
        if (time2 !== null && time !== time2) {
            newtime = (parseFloat(time2) * 1000) - timeoutID_stop;
        } else {
            newtime = (parseFloat(time) * 1000) - timeoutID_stop;
        }

        if ((newtime / 1000) > 0) {
            activeThumb.setAttribute('data-time2', (newtime / 1000));
        } else {
            activeThumb.setAttribute('data-time2', time);
        }

        timeoutID_count = Date.now();

        if (newtime > 0) {
            timeoutID = setTimeout(function () {
                let this_num = parseInt(document.querySelector('.stories_slide.active').getAttribute('data-snum'));
                active_slide(this_num + 1, 'next');
            }, newtime);
        }
    }

    if (!longClickExecuted) {
        click_true = true;
    }
}

if (scrWidth <= 768) {
    document.addEventListener('touchstart', function(e) {
        if (e.target.closest('.stories_slide_btn')) onStartPress(e);
    });

    document.addEventListener('touchend', function(e) {
        if (e.target.closest('.stories_slide_btn')) onEndPress(e);
    });
} else {
    document.addEventListener('mousedown', function(e) {
        if (e.target.closest('.stories_slide_btn')) onStartPress(e);
    });

    document.addEventListener('mouseup', function(e) {
        if (e.target.closest('.stories_slide_btn')) onEndPress(e);
    });
}

function pause_stor() {
    console.log('длинный клик');
    longClickExecuted = true;
    click_true = false;

    // найдём текущий активный thumb
    let activeThumb = document.querySelector('.stories_slide-thumb-item.active');
    if (activeThumb) {
        activeThumb.classList.add('paused');
        activeThumb.style.animationPlayState = 'paused';
        
        // ставим на паузу видео с соответствующего слайда
        let activemodal = document.querySelector('.stories_item_modal.show');
        if (activemodal) {
            let activeSlide = activemodal.querySelector('.stories_slide.active');
            if (activeSlide) {
                let video = activeSlide.querySelector('video');
                if (video) {
                    video.pause();
                }
            }
        }
    }

    clearTimeout(timeoutID);
    timeoutID_stop = Date.now() - timeoutID_count;
}

// ios height fix
function adjustHeight() {
    var vh = window.innerHeight * 0.01;
    document.documentElement.style.setProperty('--vh', vh+'px');
}
adjustHeight();
window.addEventListener('resize', adjustHeight);

function getCookie(name) {
    let matches = document.cookie.match(new RegExp(
        "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
    ));
    return matches ? decodeURIComponent(matches[1]) : undefined;
}

function autotime(time){
    if(!auto){ return false; }
    timeoutID = setTimeout(function() {
        let this_num = parseInt(document.querySelector('.stories_slide.active').getAttribute('data-snum'));
        active_slide(this_num+1,'next');
    }, time * 1000);           
}

function active_slide(num,type){
    clearTimeout(timeoutID);
    timeoutID_count = Date.now();

    let activemodal = document.querySelector('.stories_item_modal.show');
    if (!activemodal) return;

    // снять active/animation со всех элементов и остановить предыдущие видео
    activemodal.querySelectorAll('.stories_slide-thumb-item').forEach(el => {
        el.classList.remove('active');
        // убрать inline-анимацию (чтобы потом можно было установить новую)
        el.style.animation = '';
    });
    activemodal.querySelectorAll('.stories_slide').forEach(el => {
        el.classList.remove('active');
        const v = el.querySelector('video');
        if (v) {
            try { v.pause(); } catch(e){}
        }
    });

    let targetThumb = activemodal.querySelector(`.stories_slide-thumb-item[data-snum="${num}"]`);
    let targetSlide = activemodal.querySelector(`.stories_slide[data-snum="${num}"]`);

    if (targetThumb && targetSlide) {
        targetThumb.classList.add('active');
        targetSlide.classList.add('active');

        // --- пометим как просмотренное (cookie) ---
        let hash = targetSlide.getAttribute('data-hash');
        let all_see = getCookie('see_stor');
        if(all_see){
            if(all_see.indexOf(hash) < 0){
                all_see = all_see + "|=|=|" + hash;
            }
        } else {
            all_see = hash;
        }
        document.cookie = "see_stor=" + all_see + ";domain=" + location.hostname;

        targetThumb.classList.add('old_slide');

        if (activemodal.querySelectorAll('.stories_slide-thumb-item:not(.old_slide)').length === 0) {
            document.querySelector(`.stories_item[data-num="${activemodal.getAttribute('data-num')}"]`)?.classList.add('shown');
        }

        // Хэлперы для установки анимации и автотаймера
        const setThumbAnimationAndAutotime = (seconds) => {
            let dur = parseFloat(seconds);
            if (isNaN(dur) || dur <= 0) dur = 3; // fallback 3s
            targetThumb.setAttribute('data-time', dur);
            targetThumb.setAttribute('data-time2', dur);

            // сбросить предыдущую анимацию и установить новую (force reflow)
            targetThumb.style.animation = 'none';
            void targetThumb.offsetWidth;
            targetThumb.style.animation = `thumb ${dur}s forwards linear`;

            // старт таймера автопереключения
            autotime(dur);
        };

        // --- если слайд видео ---
        let video = targetSlide.querySelector('video');
        if (video) {
            // попытка сразу взять duration, если уже загружено
            if (video.readyState >= 1 && !isNaN(video.duration) && video.duration > 0) {
                try { video.currentTime = 0; video.play().catch(()=>{}); } catch(e){}
                setThumbAnimationAndAutotime(video.duration);
            } else {
                // если метаданные еще не пришли — ждать loadedmetadata
                const onLoaded = function() {
                    try { video.currentTime = 0; video.play().catch(()=>{}); } catch(e){}
                    setThumbAnimationAndAutotime(video.duration);
                    video.removeEventListener('loadedmetadata', onLoaded);
                };
                video.addEventListener('loadedmetadata', onLoaded);

                // запасной таймаут — если метаданные не прилетели, дать fallback через 1s
                setTimeout(() => {
                    // если всё ещё нет нормальной длительности — использовать fallback
                    let cur = parseFloat(targetThumb.getAttribute('data-time'));
                    if (!cur || cur === 0) {
                        setThumbAnimationAndAutotime(3);
                    }
                }, 1000);
            }
        } else {
            // --- картинка / обычный слайд ---
            let time = parseFloat(targetThumb.getAttribute('data-time')) || 3;
            setThumbAnimationAndAutotime(time);
        }

    } else {
        // Если слайда нет — переключаем модалку на следующий/предыдущий сторис
        if(type === 'next'){
            let nextModal = document.querySelector(`.stories_item_modal[data-num="${parseInt(activemodal.getAttribute('data-num'))+1}"]`);
            if (nextModal) {
                open_slide_modal(parseInt(activemodal.getAttribute('data-num'))+1,'next');
            } else {
                close_slide_modal();
            }
        } else {
            let prevModal = document.querySelector(`.stories_item_modal[data-num="${parseInt(activemodal.getAttribute('data-num'))-1}"]`);
            if (prevModal) {
                open_slide_modal(parseInt(activemodal.getAttribute('data-num'))-1,'prev');
            } else {
                close_slide_modal();
            }
        }
    }
}

function close_slide_modal(){
    clearTimeout(timeoutID);
    let modal = document.querySelector('.stories_item_modal.show');
    if (!modal) return;
    modal.classList.add('close');
    setTimeout(function() {
        document.querySelectorAll('.stories_slide').forEach(el => el.classList.remove('active'));
        document.querySelectorAll('.stories_item_modal').forEach(el => el.classList.remove('show','close'));
        document.body.classList.remove('fix_scroll');
        setTimeout(function() {
            document.querySelectorAll('.stories_item').forEach(el => el.classList.remove('active'));
        }, 100);
    }, 200);    
}

function open_slide_modal(num,type){
    clearTimeout(timeoutID);
    document.querySelectorAll('.stories_item').forEach(el => el.classList.remove('active'));
    document.querySelectorAll('.stories_item_modal').forEach(el => el.classList.remove('show'));
    document.querySelectorAll('.stories_slide').forEach(el => el.classList.remove('active'));

    let modal = document.querySelector(`.stories_item_modal_num_${num}`);
    if (!modal) return;
    modal.classList.add('show');
    document.querySelector(`.stories_item[data-num="${num}"]`)?.classList.add('active');
    document.body.classList.add('fix_scroll');

    if (!modal.querySelector('.stories_slide.active')) {
        let startSlide;

        if (type === 'next') {
            // ищем первый непросмотренный
            let notOld = modal.querySelector('.stories_slide-thumb-item:not(.old_slide)');
            if (notOld) {
                startSlide = notOld.getAttribute('data-snum');
            } else {
                startSlide = 1;
            }

            active_slide(startSlide, 'next');
            modal.classList.add('next');
            setTimeout(()=>modal.classList.remove('next'),200);

        } else if (type === 'prev') {
            let lastSlide = modal.querySelector('.stories_slide:last-child');
            if (lastSlide) {
                active_slide(lastSlide.getAttribute('data-snum'),'prev');
            }
            modal.classList.add('prev');
            setTimeout(()=>modal.classList.remove('prev'),200);

        } else {
            // "start" или клик по item
            let notOld = modal.querySelector('.stories_slide-thumb-item:not(.old_slide)');
            if (notOld) {
                startSlide = notOld.getAttribute('data-snum');
            } else {
                startSlide = 1;
            }

            active_slide(startSlide,'next');
            modal.classList.add('open');
            setTimeout(()=>modal.classList.remove('open'),200);
        }
    }
}


// навигация
document.addEventListener('click', function(e) {
    if (e.target.closest('.stories_slide_next, .stories_slide_prev')) {
        if(!click_true) return;
        let this_num = parseInt(document.querySelector('.stories_slide.active').getAttribute('data-snum'));
        if (e.target.closest('.stories_slide_next')) {
            active_slide(this_num+1,'next');
        } else {
            active_slide(this_num-1,'prev');
        }
    }

    if (e.target.closest('.stories_item')) {
        let num = e.target.closest('.stories_item').getAttribute('data-num');
        open_slide_modal(num,'start');
    }

    if (e.target.closest('.stories_modal_close_btn')) {
        close_slide_modal();
    }
});

// ⚠️ Свайпы — тут нужен свой JS-код вместо jQuery TouchSwipe!
window.addEventListener("beforeunload", function () {
    close_slide_modal();
});
</script>


</body>
</html>