
@view-transition {
    navigation: auto;
}
::view-transition(*){
    animation-duration: 400ms;
    animation-timing-function: ease;
}

/**
    Нормализация блочной модели
*/
*,
::before,
::after {
    box-sizing: border-box;
}

/**
    Убираем внутренние отступы слева тегам списков,
    у которых есть атрибут class
 */
:where(ul, ol):where([class]) {
    padding-left: 0;
}

/**
    Убираем внешние отступы body и двум другим тегам,
    у которых есть атрибут class
 */
body,
:where(blockquote, figure):where([class]) {
    margin: 0;
}

/**
    Убираем внешние отступы вертикали нужным тегам,
    у которых есть атрибут class
 */
:where(h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    ul,
    ol,
    dl):where([class]) {
    margin-block: 0;
}

:where(dd[class]) {
    margin-left: 0;
}

:where(fieldset[class]) {
    margin-left: 0;
    padding: 0;
    border: none;
}

/**
    Убираем стандартный маркер маркированному списку,
    у которого есть атрибут class
 */
:where(ul[class]) {
    list-style: none;
}

:where(address[class]) {
    font-style: normal;
}

/**
    Обнуляем вертикальные внешние отступы параграфа,
    объявляем локальную переменную для внешнего отступа вниз,
    чтобы избежать взаимодействие с более сложным селектором
 */
p{
    margin: 1em 0;
    &:last-child{ margin-bottom: 0; }
}


/**
    Упрощаем работу с изображениями и видео
 */
img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

/**
    Наследуем свойства шрифт для полей ввода
 */
input,
textarea,
select,
button {
    font: inherit;
}

html {
    /**
            Пригодится в большинстве ситуаций
            (когда, например, нужно будет "прижать" футер к низу сайта)
         */
    height: 100%;
    /**
            Убираем скачок интерфейса по горизонтали
            при появлении / исчезновении скроллбара
            !!!! мешает фансибоксу
         */
    scrollbar-gutter: stable;
}

/**
    Плавный скролл
 */
html,
:has(:target) {
    scroll-behavior: smooth;
}

body {
    /**
            Пригодится в большинстве ситуаций
            (когда, например, нужно будет "прижать" футер к низу сайта)
         */
    min-height: 100%;
    /**
            Унифицированный интерлиньяж
         */
    line-height: 1.5;

    /**
            Убираем скачок интерфейса по горизонтали
            при появлении / исчезновении скроллбара (как у html)
         */
    scrollbar-gutter: stable;

    /**
	 Отменять увеличение шрифта на мобильных экранах
	 */
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/**
    Нормализация высоты элемента ссылки при его инспектировании в DevTools
 */
a:where([class]) {
    display: inline-flex;
}

/**
    Курсор-рука при наведении на элемент
 */
button,
label {
    cursor: pointer;
}

/**
    Приводим к единому цвету svg-элементы
    (за исключением тех, у которых уже указан
    атрибут fill со значением 'none' или начинается с 'url')
 */
:where([fill]:not([fill="none"],
        [fill^="url"])) {
    fill: currentColor;
}

/**
    Приводим к единому цвету svg-элементы
    (за исключением тех, у которых уже указан
    атрибут stroke со значением 'none')
 */
:where([stroke]:not([stroke="none"],
        [stroke^="url"])) {
    stroke: currentColor;
}

/**
    Чиним баг задержки смены цвета при взаимодействии с svg-элементами
 */
svg * {
    transition-property: fill, stroke;
}

/**
    Приведение рамок таблиц в классический 'collapse' вид
 */
:where(table) {
    border-collapse: collapse;
    border-color: currentColor;
}

/**
    Удаляем все анимации и переходы для людей,
    которые предпочитают их не использовать
 */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/**
    Clearfix class
 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}




a, button, label{
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

a{
}


/* links */
a {
    color: var(--link-color, currentColor);
    transition: all 200ms ease;
    text-decoration: underline;
    touch-action: manipulation;
    user-select: none;
    outline: none;
    -webkit-user-select: none;

    &.no-underline{
        text-decoration: none;
    }
}

a:active {
    text-decoration: none;
}

@media (hover:hover) and (pointer:fine) {
    a:hover {
        text-decoration: none;
        &.no-underline{
            text-decoration: underline;
        }
    }
}

/* links - END */


/* svg */
svg:not(svg[fill]) {
    fill: currentColor;
}

svg.svg--inline {
    display: inline-block;
    vertical-align: middle;
    height: 1lh;
    width: auto;
}

/* svg - END */


/* bg steps */
.base-bg{
    --bg: var(--base-bg);
    --text: var(--base-text);
    background-color: var(--bg);
    color: var(--text);
}
.step-bg{
    --bg: color-mix(in hsl, var(--text) calc(var(--step-bg) * var(--step-bg-level)), var(--base-bg));
    background-color: var(--bg);
}
.step-bg{ --step-bg-level: 1; }
.step-bg .step-bg{ --step-bg-level: 2; }
.step-bg .step-bg .step-bg{ --step-bg-level: 3; }
.step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 4; }
.step-bg .step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 5; }
.step-bg .step-bg .step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 6; }
.step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 7; }
.step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 8; }
.step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 9; }
.step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg .step-bg{ --step-bg-level: 10; }
/* bg steps - END */


/* card */
.card{
    border-radius: var(--base-border-radius);
    padding: var(--base-padding);

    &:not(:last-child){ margin-bottom: var(--base-padding); }
}
/* card - END */

/* hr */
:root{
    --hr-contrast: 2%;
}
hr{
    margin-block: var(--base-padding);
    margin-inline: 0;
    display: block;
    border: none;
    height: 1px;
    background-color: color-mix(in hsl, var(--text) var(--hr-contrast), transparent);
}
/* hr - END */

/* btn */
:root{
    --btn-contrast: 5%;
}
.btn {
    --btn-color: color-mix(in hsl, var(--bg), var(--text) calc(2 * var(--step-bg)));
    --btn-color-active: color-mix(in hsl, var(--bg), var(--text) calc(4 * var(--step-bg)));

    color: contrast-color(var(--btn-color));
    background-color: var(--btn-color);

    font-size: var(--btn-font-size, var(--base-font-size));
    font-weight: var(--btn-font-weight, var(--base-font-weight));
    line-height: 1.2;
    text-decoration: none!important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.625em 1.5em;
    gap: 1em;

    border: 1px solid transparent;
    border-radius: var(--btn-border-radius, var(--base-border-radius));

    position: relative;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;

    transition-timing-function: ease;
    transition-duration: var(--transition-speed);
    transition-property: background-color, border-color, color, transform, box-shadow;

    -webkit-tap-highlight-color: transparent;

    &:active{
        scale: 1.05 .95;
        background-color: var(--btn-color-active);
    }

    &.btn--fullwidth{
        width: 100%;
    }

    &:disabled, &[disabled] {
        opacity: 0.2;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
        pointer-events: none;
    }
    &:focus-visible {
        outline: 1px solid color-mix(in hsl, currentColor 10%, transparent);
        outline-offset: 2px;
    }

    &::after{
        content: "";
        position: absolute;
        width: 1em;
        height: 1em;
        border: 2px solid contrast-color(var(--btn-color));
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        opacity: 0;
        scale: 0;
    }
    &[loading] {
        pointer-events: none;
        color: transparent !important;

        &::after {
            opacity: 1;
            scale: 1;
        }
        &.btn--outline::after{
            border: 2px solid var(--btn-color);
        }
    }

    .btn__icon {
        display: inline-flex;
        fill: currentColor;
        &:first-child{ margin-left: -.25em; }
        &:last-child{ margin-right: -.25em; }

        svg{
            height: 1lh;
            width: auto;
        }
    }

    &.btn--primary{
        --btn-color: color-mix(in hsl, var(--text), var(--bg) calc(var(--step-bg) * 5));
        --btn-color-active: var(--text);
    }
    &.btn--accent {
        --btn-color: var(--accent);
        --text: var(--accent-contrast);
        color: var(--text);
        --btn-color-active: color-mix(in hsl, var(--accent), var(--text));
    }
    &.btn--outline {
        --btn-color: var(--text);
        border-color: color-mix(in hsl, var(--btn-color) 50%, var(--bg));
        
        color: var(--btn-color);
        background-color: transparent;

        &:active{
            background-color: var(--btn-color);
            border-color: var(--btn-color);
            color: contrast-color(var(--btn-color));
        }
    }
}

@keyframes spin { to { rotate: 360deg; } }

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
        
        &.btn--icon{
            padding: 0.625em;
            .btn__icon{
                margin-inline: 0;
                svg {
                    scale: 1.5;
                }
            }
            & > *:not(.btn__icon){
                display: none;
            }
        }
    }
}

@media (hover: hover) and (pointer: fine){
    .btn:hover:not(:active){
        background-color: color-mix(in hsl, var(--btn-color), var(--btn-color-active));

        &.btn--outline{
            background-color: var(--btn-color);
            border-color: var(--btn-color);
            color: contrast-color(var(--btn-color));
        }
    }
}

/* btn - END */



/* menu-opener icon */
.menu-opener-icon {
    font-size: clamp(1.25rem, 1.75vw, 1.75rem);
    display: block;
    width: 1em;
    aspect-ratio: 1;
    position: relative;
    vertical-align: middle;

    span,
    &::before,
    &::after {
        content: "";
        background: currentColor;
        border-radius: .5px;
        position: absolute;
        display: block;
        inset: 50% 0 auto 0;
        height: 1px;
        opacity: 1;

        transition-property: rotate, translate, opacity;
        transition-duration: 200ms;
        transition-timing-function: (.37, -0.84, .55, 1.83);

        &span {
            transition-property: opacity;
            transition-duration: 100ms;
            transition-delay: 100ms;
        }
    }

    &::before,
    &::after {
        transition-delay: 0ms, 100ms, 100ms;
    }

    &::before {
        translate: 0 -.35em;
    }

    &::after {
        translate: 0 .35em;
    }
}

body[opened="mainmenu"] {
    .menu-opener-icon {
        span {
            opacity: 0;
            transition-delay: 0ms;
        }

        &::before,
        &::after {
            transition-delay: 100ms, 0ms, 0ms;
        }

        &::before {
            rotate: -45deg;
            translate: 0 0;
        }

        &::after {
            rotate: -135deg;
            translate: 0 0;
        }
    }
}

/* menu-opener icon - END */


.no-margin-top {
    margin-top: 0;
}

.no-margin-bottom {
    margin-bottom: 0;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-inline: auto;
    padding-inline: var(--base-padding);
}



/* for scroll anchor*/
*[id] {
    scroll-margin-top: 1rem;
}


h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
    font-family: var(--title-font-family);
    margin: 1.5em 0 0.5em;
    font-weight: 500;
    &:last-child{ margin-bottom: 0; }
}

h1,
.h1 {
    font-size: 2rem;
    line-height: 110%;
}

h2,
.h2 {
    font-size: 1.5rem;
    line-height: 120%;
}

h3,
.h3 {
    font-size: 1.1875rem;
    line-height: 140%;
}

h4,
.h4 {
    font-size: 1rem;
    line-height: 150%;
}

h5,
.h5 {
    font-size: 1em;
    line-height: 150%;
}

h6,
.h6 {
    font-size: 1em;
    line-height: 150%;
}

@media only screen and (max-width: 1100px) {

    h1,
    .h1 {
        font-size: 1.75rem;
    }

    h2,
    .h2 {
        font-size: 1.375rem;
    }

    h3,
    .h3 {
        font-size: 1.125rem;
    }

    h4,
    .h4 {
        font-size: 1rem;
    }

    h5,
    .h5 {
        font-size: 1em;
    }

    h6,
    .h6 {
        font-size: 1em;
    }
}

@media only screen and (max-width: 767px) {

    h1,
    .h1 {
        font-size: 1.5rem;
    }

    h2,
    .h2 {
        font-size: 1.25rem;
    }

    h3,
    .h3 {
        font-size: 1.125rem;
    }

    h4,
    .h4 {
        font-size: 1rem;
    }

    h5,
    .h5 {
        font-size: 1em;
    }

    h6,
    .h6 {
        font-size: 1em;
    }
}

.block-title{
    margin-top: 0;
}

.nowrap {
    white-space: nowrap;
}


/* simple-content */
.simple-content{
    font-size: clamp(1rem, 1.125vw, 1.125rem);

    & > *:first-child{
        margin-top: 0;
    }

    a{
        color: var(--accent);
    }
    b, strong{
        color: var(--base-dark);
    }
    p{
        color: color-mix(in hsl, currentColor 60%, transparent);
        margin-bottom: 1em;
    }
    blockquote{
        font-style: italic;
        border-left: 1px solid var(--accent);
        padding: .5em .5em 1px 1.5em;
        box-shadow: 0 0 1em rgba(0,0,0,.05);
    }
    ul, ol{
        padding-left: 2em;
        margin-block: 1em 2em;
        list-style-position: outside;

        &:is(ul){
            list-style-type: disc;
            ::marker{
                color: color-mix(in hsl, currentColor 75%, transparent);
            }
        }

        li{
            margin-bottom: .5em;

            ul{
                margin-top: .5em;
                font-size: .875em;

                &:is(ul){
                    list-style-type: circle;
                    ::marker{
                        color: color-mix(in hsl, currentColor 75%, transparent);
                    }
                }
            }
        }
    }
    .wp-block-table{
        width: auto;
        overflow-x: auto;
        margin-inline: var(--base-padding);
        padding-inline: var(--minus-base-padding);
        margin-block: 1.5em 2em;
        background-color: var(--container-bg);
        box-shadow: 0 0 1em rgba(0,0,0,.05);

        table{
            font-size: .875em;
            
            th{
                min-width: 5em;
                text-wrap: balance;
                padding: .5em;
                border-bottom: 2px solid color-mix(in hsl, currentColor 80%, transparent);
            }
            td{
                min-width: 5em;
                padding: .5em;
                border-bottom: 1px solid color-mix(in hsl, currentColor 10%, transparent);
            }
            tr:last-child td{
                border-bottom: none;
            }
        }
    }
}
@media screen and (width >= 768px) {
    .simple-content{
        .wp-block-table{
            margin-inline: 0;
            padding-inline: 1em;
        }
    }
}
@media (hover: hover) and (pointer: fine){
    .simple-content{
        a:hover{
            text-decoration: underline;
        }
    }
}
/* simple-content - END */


body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100%;
}

body::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track {
    background: color-mix(in hsl, var(--base-bg), var(--base-text) 5%);
}

body::-webkit-scrollbar-thumb {
    background-color: color-mix(in hsl, var(--base-bg), var(--base-text) 50%);;
    border-radius: 3px;
    border: none;
}

@media only screen and (max-width: 767px) {
    .hidden-xs {
        display: none !important;
    }
}

@media only screen and (min-width: 768px) {
    .visible-xs {
        display: none !important;
    }
}



:root{
    --popup-duration: var(--transition-speed);
}
[popover] {
    position: fixed;
    width: fit-content;
    max-width: calc(var(--container-max-width) - 2 * var(--base-padding));
    height: fit-content;
    inset: 0px;
    margin: auto;
    border: none;
    padding: 0;
    opacity: 1;
    border-radius: var(--base-border-radius);
    box-shadow: 0 .5rem 2rem rgba(0,0,0,1);
    background-color: var(--base-bg);
    color: var(--base-text);
    transition-property: opacity, translate;
    transition-duration: var(--popup-duration);

    &::backdrop{
        background-color: rgba(0,0,0,.8);
        opacity: 1;
        transition-property: opacity;
        transition-duration: var(--popup-duration);
    }

    .popover__closer{
        all: unset;
        position: absolute;
        right: 0;
        top: 0;
        padding: .5em;
        opacity: .5;
        transition-property: opacity;
        transition-duration: var(--transition-speed);

        &:active{
            opacity: 1;
        }
        svg{
            display: block;
        }
    }

    .popup__block{
        min-height: 20em;
        width: calc(100vw - 2 * var(--base-padding));
        max-width: 100%;
    }
}
@starting-style {
    [popover]:popover-open {
        opacity: 0;
        translate: 0 1rem;

        &::backdrop{
            opacity: 0;
        }
    }
}
@media (hover: hover) and (pointer: fine) {
    [popover]{
        .popover__closer:hover{
            opacity: .75;
        }
    }
}


.cookie-accept{
	--bg: #fefefe;
	--color: #202020;
	--fsize: clamp(9px,1vw,12px);

    background: var(--bg);
	color: var(--color);
	border: 1px solid color-mix(in hsl, currentColor 10%, transparent);
	font-size: var(--fsize);
	border-radius:  calc(var(--fsize) * 1.5);
	position: fixed;
	z-index: 999999;
	left: clamp(1em, 2vw, 2em);
	bottom: clamp(1em, 2vw, 2em);
	max-width: calc(100vw - 2em);
	padding: 1.5em 2em;
	display: flex;
	align-items: center;
	transition: all 200ms ease;
	opacity: 0;
	transform: translateY(10%);

    &.cookie-accept--dark{
        --bg: #202020;
        --color: #efefef;
    }

    &[visible="true"]{
        opacity: 1;
        transform: translateY(0);
    }

    & > div:first-child{
        text-wrap: balance;
        max-width: 25em;
        opacity: .9;
    }
    .cookie-accept__btn{
        background: var(--color);
        color: var(--bg);
        padding: .5em 1em;
        border-radius: calc(var(--fsize) * 1);
        font-size: 1.3em;
        transition: opacity 200ms ease;
    }
}
@media only screen and (max-width: 767px) {
	.cookie-accept{
		
	}
}