﻿/*
Theme Name: New-RaTeN
Theme URI: https://www.fl.ru/users/raten/portfolio/
Author: RaTeN
Author URI: https://raten-portfolio.ru/port/
Description: Андрей Левдиков
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: all-in
Text Domain: raten
*/
/*
.articles {
    & .item {
        & .category {
            &:before {
                background: var(--cat-color, #acaafe);
            }
        }
    }
}

.article_info {
    & .head {
        & .category {
            &:before {
                background: var(--cat-color, #acaafe);
            }
        }
    }
}

.cases {
    & .case {
        & .category {
            &:before {
                background: var(--cat-color, #acaafe);
            }
        }
    }
}

img:is([sizes="auto" i], [sizes^="auto," i]) {
    contain-intrinsic-size: none;
}

.persons {
    & .item {
        .photo {
            max-width: 179px;
            width: 100%;
        }
    }
}

.cases {
    & .case {
        .result {
            background: var(--cat-color-bg, #acaafe);
        }
    }
}

.text_block {
    & ul {
        & > li {
            &:before {
                position: absolute;
                top: 0.5lh;
                left: 0;
                display: block;
                width: 7px;
                height: 9px;
                content: "";
                transform: translateY(-50%);
                background: url(images/ic_list_marker.svg) 0 0 / 100% 100%
                    no-repeat;
            }
        }
    }

    & ol {
        display: flex;
        flex-direction: column;
        gap: var(--inner_gap_s);
        margin-left: 20px;
    }
}

header {
    .main_menu {
        list-style: none;
    }

    & .main_menu {
        .sub {
            list-style: none;
        }
    }
}

footer {
    .menu {
        list-style: none;
    }

    & .menu {
        .sub {
            list-style: none;
        }
    }
}

.form {
    .arr {
        position: absolute;
        top: 0;
        right: var(--inner_gap_s);
        bottom: 0;

        display: block;

        width: 8px;
        height: 6px;
        margin-block: auto;

        transition: transform 0.2s linear;
        pointer-events: none;

        color: var(--grey_color);
    }
}

.wpcf7 form .wpcf7-response-output {
    display: none !important;
}

.wpcf7 form .wpcf7-not-valid-tip:not(:has(.error_icon)){
    display: none;
}

.form {
    & .input {
        &.wpcf7-not-valid {
            border-color: var(--form_error_color);
        }
    }
}

.form {
    & .nice-select.has-value {
        & .current {
            color: var(--dark_color);
        }
    }
}

.form .title {
    margin-bottom: var(--inner_gap_xs);
    font-size: var(--font_size_title_s) !important;
}

.form .desc {
    margin-bottom: calc(var(--inner_gap_xs) * 2);
    font-size: var(--font_size) !important;
    font-weight: 400 !important;
}

.text_block #ez-toc-container {
    display: none !important;
}

#ez-toc-container ul {
    list-style: none;
}

.persons {
    & .item {
        a {
            color: var(--dark_color);
            text-decoration: none;
            transition: color 0.2s linear;

            &:hover {
                color: var(--dark_color_soft);
            }
        }
    }
}

.pagination
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--inner_gap_s);
    margin-top: var(--block_padding_l);


    .page-numbers
    {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        height: 48px;
        padding-inline: var(--inner_gap_s);

        font-size: var(--font_size);
        font-weight: 500;
        line-height: 1;
        text-decoration: none;

        transition: .2s linear;

        color: var(--secondary_color);
        border: 1px solid var(--border_color);
        border-radius: var(--border_radius_max);
        background: var(--bg);


        .icon
        {
            display: block;

            width: 22px;
            height: 22px;

            fill: none;
            stroke: currentColor;
        }


        &.current
        {
            color: var(--secondary_color);
            border-color: var(--primary_color);
            background: var(--primary_color);
        }


        &.dots
        {
            border-color: transparent;
            background: none;
        }


        @media (hover: hover) and (pointer: fine)
        {
            &:not(.current):not(.dots):hover
            {
                color: var(--light_color);
                border-color: var(--secondary_color);
                background: var(--secondary_color);
            }
        }
    }


    @media (max-width: 767px)
    {
        .page-numbers
        {
            min-width: 40px;
            height: 40px;
        }
    }
}

.articles {
    & .item {
        .bottom {
            margin-top: auto;
        }
    }
}

header {
    & .menu_modal {
        .menu {
            list-style: none;
        }
    }
}

header {
    & .menu_modal {
        & .menu {
            & .item {
                .sub {
                    list-style: none;
                }
            }
        }
    }
}


.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px;
    position: absolute;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000; 
}


.b-unisender-form__title {
    margin-bottom: var(--inner_gap_xs) !important;
    font-size: var(--font_size_title_s) !important;
    font-weight: 700 !important;
    background-color: transparent !important;
}

.b-unisender-form__description {
    margin-bottom: calc(var(--inner_gap_xs) * 2) !important;
    font-size: var(--font_size_xs) !important;
    color: #64748b !important;
    margin-top: calc(var(--inner_gap_xxxs) * -1) !important;
    background-color: transparent !important;
}

.b-unisender-form{
    background-color: transparent !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: none !important;
    padding: 0 !important;
    font-size: 14px;
    color: #191919;
}

.b-unisender-form .b-unisender-field__input{
    display: block !important;
    width: 100% !important;
    height: var(--form_input_height) !important;
    padding-inline: var(--form_input_padding_inline) !important;
    font-family: var(--font_family_primary) !important;
    font-size: var(--font_size) !important;
    transition: border-color .2s linear !important;
    color: var(--dark_color) !important;
    border: 1px solid var(--form_border_color) !important;
    border-radius: var(--form_border_radius) !important;
    background: var(--form_bg_color) !important;
}

.b-unisender-form .b-unisender-form__submit-button{
    width: 100% !important;
    max-width: 100% !important; !important;
    height: 49px !important;
    padding-inline: var(--inner_gap_xl) !important;
    color: var(--light_color) !important;
    border-radius: var(--form_border_radius) !important;
    background: var(--gradient_primary) !important;
    height: var(--form_input_height) !important;
    text-align: center !important;
    line-height: var(--form_input_height) !important;
    padding: 0 !important;
}*/

/* Пагинация (записи, рубрики, поиск) — палитра сайта */
.pagination
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--inner_gap_s);
    margin-top: var(--block_padding_l);


    .page-numbers
    {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        height: 48px;
        padding-inline: var(--inner_gap_s);

        font-size: var(--font_size);
        font-weight: 500;
        line-height: 1;
        text-decoration: none;

        transition: .2s linear;

        color: var(--secondary_color);
        border: 1px solid var(--border_color);
        border-radius: var(--border_radius_max);
        background: var(--bg);


        .icon
        {
            display: block;

            width: 22px;
            height: 22px;

            fill: currentColor;
            transition: transform .2s linear;
        }


        &.prev .icon
        {
            transform: rotate(180deg);
        }


        &.current
        {
            color: var(--secondary_color);
            border-color: var(--primary_color);
            background: var(--primary_color);
        }


        &.dots
        {
            border-color: transparent;
            background: none;
        }


        @media (hover: hover) and (pointer: fine)
        {
            &:not(.current):not(.dots):hover
            {
                color: var(--light_color);
                border-color: var(--secondary_color);
                background: var(--secondary_color);
            }
        }
    }


    @media (max-width: 767px)
    {
        .page-numbers
        {
            min-width: 40px;
            height: 40px;
        }
    }
}



.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px;
    position: absolute;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000; 
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.hidden-item {
    display: none;
}


.submitting .submit_btn{
    pointer-events: none;
}

.accordion_item {
     .head {
        width: 100%;
        text-align: left;
    }
}

.service_head {
    & .data {
        & .btns {
            a.btn {
                text-align: center;
                text-decoration: none;
                color: #fff;
                line-height: 60px;

                @media print, (max-width: 1279px) {
                    line-height: 56px;
                }
            }
        }
    }
}

.service_advantages {
    & .item {
        justify-content: flex-start;
    }
}
@media print, (min-width: 1279px) {
    .cases {
        & .data {
            .item{
                padding-block-start: 55px;      
            }
        }
    }                    
}

.action_block {
    .title {
        text-wrap: balance;
    }
}

/* =========================================================
   Инлайн-стили из редактора в записях блога.
   Приводим к дизайну сайта. Все правила только внутри .text_block.
   ========================================================= */

/* Шрифт и размер: наследуем от сайта (убираем инлайн-размеры и гарнитуру).
   Круглые маркеры (номера шагов, галочки, бейджи) исключаем: у них размер
   шрифта и line-height подогнаны под диаметр кружка, и сброс ломает центровку. */
.text_block [style*="font-family"]
{
    font-family: inherit !important;
}

.text_block [style*="font-size"]:not([style*="border-radius: 50%"]):not([style*="border-radius:50%"]),
.text_block [style*="line-height"]:not([style*="border-radius: 50%"]):not([style*="border-radius:50%"])
{
    font-size: inherit !important;
    line-height: inherit !important;
}

.text_block [style*="font-weight: 400"]
{
    font-weight: inherit !important;
}

/* Цвет текста: инлайн-цвета заменяем на цвет текста сайта */
.text_block [style*="color:"]
{
    color: inherit !important;
}

/* Золотые акценты (заголовки-метки, маркеры) — на фирменный тёмно-зелёный */
.text_block [style*="#c9a14a" i],
.text_block [style*="#c7af76" i],
.text_block [style*="#a3771f" i],
.text_block [style*="#ae873d" i],
.text_block [style*="#b18a35" i]
{
    color: var(--secondary_color) !important;
}

/* Фоны: белые и кремовые подложки — на фон сайта */
.text_block [style*="background: #ffffff" i],
.text_block [style*="background: #fff;" i],
.text_block [style*="background: #FCF4DD" i],
.text_block [style*="background: #fcf4dd" i]
{
    background: var(--bg) !important;
}

/* Золотые рамки — на рамку сайта */
.text_block [style*="#F1E3B6" i],
.text_block [style*="#E9C86A" i],
.text_block [style*="#e2d2b8" i],
.text_block [style*="#E9D8AC" i]
{
    border-color: var(--border_color) !important;
}

/* Маркеры-кружки в записях: лаймовый круг с внутренней точкой и круглые
   иконки-бейджи («!»). Точка в разметке — внешний круг с точкой внутри,
   поэтому отдельно берём внутренний круг (размеры могут отличаться от 18/7 px).
   Бейдж — круг, внутри которого только текст.
   Селекторы специальнее общего правила «.text_block :not(th)[style*="background"]»,
   иначе всё это заливается фоном страницы и пропадает. */
.text_block [style*="border-radius: 50%"]:not(:empty)
{
    color: var(--secondary_color) !important;
    background: var(--primary_color) !important;
}

.text_block [style*="border-radius: 50%"]:has(> [style*="border-radius: 50%"]) > [style*="border-radius: 50%"]
{
    background: var(--secondary_color) !important;
}

.text_block [style*="border-radius: 50%"][style*="text-align: center"],
.text_block [style*="border-radius: 50%"][style*="text-align:center"]
{
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
}

/* Выделенные блоки (градиентные карточки) — карточка сайта с акцентной полосой.
   Круглые точки-маркеры и мягкие карточки со скруглением 18px сюда не входят:
   у них своя разметка, иначе они раздуваются в блоки с полями и рамкой. */
.text_block [style*="linear-gradient"]:not([style*="border-radius: 50%"]):not([style*="border-radius: 18px"])
{
    background: var(--bg) !important;
    border: 1px solid var(--border_color) !important;
    border-left: 4px solid var(--primary_color) !important;
    border-radius: var(--border_radius_s) !important;
    padding: var(--inner_gap_l) !important;
    margin-block: var(--inner_gap_xl) !important;
}

/* Круглые точки-маркеры с градиентной заливкой — лаймовый акцент сайта */
.text_block [style*="border-radius: 50%"][style*="linear-gradient"]
{
    background: var(--primary_color) !important;
}

/* Строки-плашки внутри мягкой карточки (18px) — светлая лаймовая подложка */
.text_block [style*="border-radius: 18px"] [style*="border-radius: 14px"]
{
    background: rgba(215, 241, 142, 0.18) !important;
}

/* Карточки-плашки в записях (подпись-чип + акцентная полоса сверху) */
.text_block [style*="border-top: 3px solid"]
{
    border-top-color: var(--primary_color) !important;
}

.text_block [style*="border-top: 3px solid"] span[style*="border-radius: 4px"][style*="font-size"]
{
    background: rgba(215, 241, 142, 0.35) !important;
    background: color-mix(in srgb, var(--primary_color) 35%, var(--bg)) !important;
    color: var(--secondary_color) !important;
    font-size: var(--font_size_xs) !important;
}

/* Таблицы: аккуратная таблица в стиле сайта */
.text_block table
{
    width: 100% !important;
    margin-block: var(--inner_gap_l) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid var(--border_color) !important;
    border-radius: var(--border_radius_s) !important;
    overflow: hidden !important;
    background: var(--bg) !important;
    font-size: var(--font_size) !important;
}

.text_block td,
.text_block th
{
    padding: var(--inner_gap_s) var(--inner_gap) !important;
    border: 1px solid var(--border_color) !important;
    background: var(--bg) !important;
    color: var(--secondary_color) !important;
    text-align: left !important;
    vertical-align: top !important;
}

.text_block th
{
    background: var(--bg_grey) !important;
    font-weight: 600 !important;
}

.article_info .text_block h3 + ul, .article_info .text_block h3 + blockquote, .article_info .text_block h3 + p, .article_info .text_block p + ul, 
.article_info .text_block p + ol, .article_info .text_block h3 + ol {
    margin-top: var(--inner_gap) !important;
}

.article_info .text_block h3 + ul, .article_info .text_block p + ul, .article_info .text_block ul + p, .article_info .text_block p + ol, .article_info .text_block ol + p{
    margin-bottom: var(--inner_gap) !important;
}

.article_info .text_block h4 + ul, .article_info .text_block h4 + blockquote, .article_info .text_block h4 + p, .article_info .text_block h4 + ol {
    margin-top: var(--inner_gap) !important;
}

.article_info .text_block h4 + ul{
    margin-bottom: var(--inner_gap) !important;
}


.article_info .text_block a:not(.whatsapp_link){
    color: var(--border_color_secondary);
}


@media (max-width: 767px)
{
    .text_block [style*="linear-gradient"]:not([style*="border-radius: 50%"])
    {
        padding: var(--inner_gap) !important;
    }

    .text_block .table_wrap,
    .text_block table
    {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .text_block td,
    .text_block th
    {
        min-width: 140px !important;
        padding: var(--inner_gap_s) !important;
        font-size: var(--font_size_s) !important;
    }
}

/* Все инлайн-фоны записей → фон сайта (кроме ячеек шапки таблицы), инлайн-рамки → рамка сайта.
   Конкретные акценты ниже перекрывают эти общие правила. */
.text_block :not(th)[style*="background"]
{
    background: var(--bg) !important;
}

.text_block [style*="border"]
{
    border-color: var(--border_color) !important;
}

/* Золотые заливки (маркеры, плашки) → лаймовый акцент сайта */
.text_block [style*="background: #c9a14a" i],
.text_block [style*="background:#c9a14a" i],
.text_block [style*="background: #e9c86a" i],
.text_block [style*="background:#e9c86a" i],
.text_block [style*="background: #f2d37b" i],
.text_block [style*="background:#f2d37b" i],
.text_block [style*="background: #d4af37" i],
.text_block [style*="background:#d4af37" i],
.text_block [style*="border-radius: 50%"]
{
    background: var(--primary_color) !important;
}

/* Золотой и бронзовый текст → тёмно-зелёный сайта */
.text_block [style*="#c9a84c" i],
.text_block [style*="#c9963a" i],
.text_block [style*="#946816" i],
.text_block [style*="#b68a2a" i],
.text_block [style*="#b8871b" i],
.text_block [style*="#8a641d" i],
.text_block [style*="#7a5a12" i],
.text_block [style*="#d4af37" i],
.text_block [style*="#654a2f" i]
{
    color: var(--secondary_color) !important;
}

/* Бронзовые и кремовые цвета из редактора → палитра сайта */

/* Бронзовый текст → тёмно-зелёный */
.text_block [style*="#9b742b" i],
.text_block [style*="#8d6823" i]
{
    color: var(--secondary_color) !important;
}

/* Бронзовые заливки (кружки, полосы) → лаймовый акцент сайта */
.text_block [style*="background: #bd9443" i]
{
    background: var(--primary_color) !important;
}

/* Бронзовые рамки → лаймовый акцент сайта */
.text_block [style*="#bd9443" i]
{
    border-color: var(--primary_color) !important;
}

/* Кремовые подложки → белый фон сайта */
.text_block [style*="#fdf9f1" i],
.text_block [style*="#fdfbf7" i],
.text_block [style*="#fdfaf4" i],
.text_block [style*="#fdfaf3" i],
.text_block [style*="#f8f1e3" i]
{
    background: var(--bg) !important;
}

/* Бежевые рамки → рамка сайта */
.text_block [style*="#ded8cc" i],
.text_block [style*="#e1d8c8" i],
.text_block [style*="#e7dfd0" i],
.text_block [style*="#e5c982" i],
.text_block [style*="#dcc89f" i],
.text_block [style*="#dfc98f" i]
{
    border-color: var(--border_color) !important;
}

/* Акцентная полоса слева у выделенных блоков — лаймовая, как на сайте */
.text_block [style*="border-left: 4px solid #bd9443" i],
.text_block [style*="border-left:4px solid #bd9443" i]
{
    border-left-color: var(--primary_color) !important;
}

/* Видео в тексте записей: на всю ширину, пропорция 16:9, адаптивно */
.text_block .video-container
{
    position: relative;
    width: 100%;
    margin-block: var(--inner_gap_l) !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--border_radius_s);
    background: var(--bg_grey);
}

/* Вложенная обёртка (oEmbed + iframe) не создаёт второе соотношение сторон */
.text_block .video-container .video-container
{
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    margin: 0 !important;
    border-radius: 0;
}

.text_block .video-container iframe,
.text_block .video-container embed
{
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    border: 0 !important;
}

/* Изображения из WordPress в записях: стандартные классы выравнивания и подписи */
.text_block img
{
    max-width: 100%;
    height: auto;
}

.text_block img.aligncenter
{
    display: block;
    margin-inline: auto;
}

.text_block img.alignleft
{
    float: left;
    margin: 0 var(--inner_gap) var(--inner_gap_xs) 0;
}

.text_block img.alignright
{
    float: right;
    margin: 0 0 var(--inner_gap_xs) var(--inner_gap);
}

.text_block img.alignnone
{
    display: block;
    margin-inline: 0;
}

/* Абзац с обтекаемой картинкой не наползает на следующий текст */
.text_block p:has(> img.alignleft)::after,
.text_block p:has(> img.alignright)::after
{
    content: "";
    display: block;
    clear: both;
}

/* Подписи к картинкам: классический редактор и блоки */
.text_block .wp-caption,
.text_block figure.wp-block-image
{
    max-width: 100%;
    margin: var(--inner_gap_l) 0;
}

.text_block .wp-caption.aligncenter,
.text_block figure.wp-block-image.aligncenter
{
    margin-inline: auto;
}

.text_block .wp-caption-text,
.text_block .wp-block-image figcaption
{
    margin-top: var(--inner_gap_xs);
    font-size: var(--font_size_s);
    line-height: 1.45;
    color: var(--grey_color);
}

@media (max-width: 767px)
{
    .text_block img.alignleft,
    .text_block img.alignright
    {
        float: none;
        display: block;
        margin-inline: auto;
    }
}

.text_block p + p{
    margin-top: var(--inner_gap_m);
}

/* Адаптив блоков-колонок в записях: карточки — в одну колонку,
   строки «иконка + текст» не переносим, круглые маркеры не сжимаем */
@media (max-width: 767px)
{
    /* Перенос включаем только там, где дети заданы в процентах (колонки-карточки) */
    .text_block [style*="display: flex"]:has(> [style*="flex: 1 1"][style*="%"]),
    .text_block [style*="display: flex"]:has(> [style*="flex: 0 0 calc("]),
    .text_block [style*="display: flex"]:has(> [style*="width: 50%"]),
    .text_block [style*="display: flex"]:has(> [style*="width:50%"])
    {
        flex-wrap: wrap !important;
    }

    .text_block [style*="flex: 1 1 "][style*="%"],
    .text_block [style*="flex:1 1 "][style*="%"],
    .text_block [style*="flex: 0 0 calc("],
    .text_block [style*="flex:0 0 calc("],
    .text_block [style*="display: flex"] > [style*="width: 50%"],
    .text_block [style*="display: flex"] > [style*="width:50%"],
    .text_block [style*="width: calc(50%"],
    .text_block [style*="width:calc(50%"]
    {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Текстовые ячейки строк могут сжиматься, круглые маркеры — нет */
    .text_block [style*="display: flex"] > *:not([style*="border-radius: 50%"])
    {
        min-width: 0 !important;
    }

    .text_block [style*="border-radius: 50%"]
    {
        flex-shrink: 0 !important;
    }

    .text_block [style*="grid-template-columns"]
    {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* FAQ: иконка всегда справа и не переносится на новую строку */
@media (max-width: 767px)
{
    .accordion_item .head
    {
        flex-wrap: nowrap;
        gap: var(--inner_gap_s);
    }

    .accordion_item .head .title
    {
        flex: 1 1 auto;
        min-width: 0;
    }

    .accordion_item .head .icon
    {
        flex: 0 0 auto;
    }
}

/* Шаги-схемы («карточка → стрелка → карточка»): на телефоне — столбиком, стрелки вниз.
   Круглые значки 22px (галочки, номера) не трогаем: у них другая роль. */
@media (max-width: 767px)
{
    .text_block [style*="display: flex"]:has(> [style*="flex: 0 0 22px"]:not([style*="border-radius: 50%"]))
    {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--inner_gap_s) !important;
    }

    .text_block [style*="flex: 1; min-width: 0"]
    {
        flex: 0 0 auto !important;
        width: 100% !important;
    }

    .text_block [style*="flex: 0 0 22px"]:not([style*="border-radius: 50%"])
    {
        flex: 0 0 22px !important;
        transform: rotate(90deg);
    }
}

/* Заголовки блоков (h2 вместо div.title): без браузерных отступов, шрифт задают классы .title */
h2.title
{
    margin: 0;
}

.page_fix .text_block{
    margin-bottom: 50px;
}

.page_fix ul{
    margin-left: 20px;
}

.form {
    & .flag {
        & ~ * .input {
            padding-left: calc(var(--form_input_padding_inline) + 16px + var(--inner_gap_m));
        }
    }
}

.form {
    & *:has(> select) {
        & ~ .arr {
            position: absolute;
            z-index: 3;
            top: 0;
            right: var(--inner_gap);
            bottom: 0;
            width: 12px;
            height: 6px;
            margin-block: auto;
            transition: transform .2s linear;
            pointer-events: none;
        }
    }
}

.form {
    & .checkbox {
        .wpcf7-form-control-wrap {
            display: none;
        }
    }
}

.form {
    & .checkbox {
        &:has(input:checked) {
            & .check {
                border-color: var(--primary_color);
                background: var(--primary_color);
            }
        }
    }
}

.form {
    & .checkbox {
        &:has(input:checked) {
            .check {
                .icon {
                    opacity: 1;
                }
            }
        }
    }
}

.wpcf7-not-valid-tip, .wpcf7 form .wpcf7-response-output{
    display: none !important;
}


.form {
    & .checkbox {
        &:has(.wpcf7-not-valid) .check {
            background: var(--form_error_color) !important;
        }
    }
}

.nice-select.wpcf7-not-valid .current{
    border-color: var(--form_error_color);
    color: var(--form_error_color) !important;   
}

.text_block ul, .text_block ol {
    margin-left: 20px;
}
/* Blog menu link and category disclosure */
header .cont > .menu {
    align-items: center;
}

.blog_menu_heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .blog_menu_heading {
    position: relative;
    z-index: 3;
    gap: 4px;
}

header .blog_menu_heading .blog_menu_link {
    font-family: var(--font_family_secondary);
    font-size: var(--font_size_l);
    line-height: 135%;
    text-decoration: none;
    color: inherit;
}

header .blog_menu_item.open .blog_menu_heading,
header .blog_menu_link:hover,
header .blog_menu_toggle:hover {
    color: var(--primary_color);
}

header.blog_menu_open::before {
    opacity: 1;
    transition: none;
}

.blog_menu_toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.blog_menu_toggle svg {
    display: block;
    width: 8px;
    height: 5px;
}

.blog_menu_toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.blog_menu_toggle:focus-visible,
.blog_menu_link:focus-visible,
.blog_menu_categories a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.blog_menu_panel[hidden] {
    display: none !important;
}

header .menu .blog_menu_panel {
    min-height: 0;
}

header .menu .blog_menu_panel > .cont {
    display: block;
}

.blog_menu_categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--inner_gap_s) var(--outside_gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

header .blog_menu_categories a {
    display: block;
    font-weight: 600;
    line-height: 180%;
    text-decoration: none;
    color: inherit;
}

@media (hover: hover) and (pointer: fine) {
    header .blog_menu_categories a,
    .mob_menu .menu .blog_menu_categories a {
        transition: color .2s linear, opacity .2s linear;
    }

    header .blog_menu_categories a:hover,
    .mob_menu .menu .blog_menu_categories a:hover {
        color: var(--secondary_color);
        opacity: .75;
        text-decoration: none;
    }
}

.mob_menu .blog_menu_link {
    flex: 1;
}

.mob_menu .blog_menu_toggle {
    justify-items: end;
    width: 44px;
    height: 44px;
}

.mob_menu .blog_menu_toggle svg {
    width: 7px;
    height: 12px;
    transition: transform .2s linear;
    transform: rotate(-90deg);
}

.mob_menu .blog_menu_toggle[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

.mob_menu .blog_menu_categories {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.mob_menu .menu .blog_menu_categories a {
    min-height: 44px;
    padding-block: 8px;
}

/* Click-to-load vertical video in articles */
.article_content .text_block .article_video {
    width: 100%;
    max-width: 300px;
    margin: 0 auto var(--inner_gap_l);
    text-align: center;
}

.article_video_frame {
    position: relative;
    height: 0;
    padding-top: 177.777778%;
    overflow: hidden;
    border-radius: var(--border_radius_s);
    background: var(--secondary_color);
}

.article_content .text_block .article_video_frame img,
.article_content .text_block .article_video_frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    object-fit: cover;
}

.article_video_play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    margin-top: var(--inner_gap_s);
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--border_radius_max);
    background: var(--primary_color);
    color: var(--secondary_color);
    font: inherit;
    font-weight: 600;
    transition: background-color .2s linear, color .2s linear;
    cursor: pointer;
}

.article_video_play::before {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid currentColor;
    content: '';
}

@media (hover: hover) and (pointer: fine) {
    .article_video_play:hover {
        background: var(--secondary_color);
        color: var(--light_color);
    }
}

.article_video_play:focus-visible {
    outline: 2px solid var(--secondary_color);
    outline-offset: 3px;
}

.article_video_play[hidden] {
    display: none;
}

/* Thank-you page */
.koberg-thanks-page .wrap > .main > header,
.koberg-thanks-page .wrap > footer[role="contentinfo"] {
    display: none;
}

.koberg-thanks {
    --thanks-teal: #113138;
    --thanks-lime: #d5ef89;
    --thanks-gutter: clamp(16px, 4.5vw, 76px);
    --thanks-content: 960px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
    background: #0d252b;
    color: #f3faf9;
    font-family: Inter, Arial, sans-serif;
}

.koberg-thanks__brand,
.koberg-thanks__office {
    position: static;
    margin: 0;
    padding: 0 var(--thanks-gutter);
    border-radius: 0;
    background: var(--thanks-teal);
}

.koberg-thanks__bar {
    max-width: var(--thanks-content);
    margin-inline: auto;
}

.koberg-thanks__brand .koberg-thanks__bar {
    display: flex;
    align-items: center;
    min-height: clamp(58px, 8.3vw, 80px);
}

.koberg-thanks__brand a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font: 700 clamp(18px, 2.55vw, 24px)/1.1 "Wix Madefor Display", Inter, Arial, sans-serif;
    text-decoration: none;
}

.koberg-thanks__brand img {
    width: clamp(35px, 5vw, 46px);
    height: auto;
}

.koberg-thanks__main {
    display: grid;
    place-items: center;
    padding: clamp(26px, 6vw, 76px) var(--thanks-gutter);
}

.koberg-thanks__card {
    display: grid;
    justify-items: center;
    gap: clamp(18px, 3vw, 28px);
    width: min(100%, var(--thanks-content));
    padding: clamp(28px, 5.5vw, 58px) clamp(15px, 5vw, 52px);
    border: 1px solid #325259;
    border-radius: clamp(22px, 4vw, 38px);
    background: #17383e;
    text-align: center;
}

.koberg-thanks__icon {
    display: grid;
    width: clamp(50px, 8.2vw, 76px);
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    background: var(--thanks-lime);
    color: var(--thanks-teal);
}

.koberg-thanks__icon::before {
    content: '';
    width: 30%;
    height: 15%;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    transform: translateY(-12%) rotate(-45deg);
}

.koberg-thanks__card h1 {
    max-width: 23ch;
    margin: 0;
    color: #f3faf9;
    font: 700 clamp(27px, 5.3vw, 51px)/1.08 "Wix Madefor Display", Inter, Arial, sans-serif;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.koberg-thanks__card p {
    max-width: 52ch;
    margin: 0;
    color: #c5d4d4;
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.52;
    text-wrap: pretty;
}

.koberg-thanks__button {
    display: inline-grid;
    place-items: center;
    min-height: clamp(48px, 6.8vw, 60px);
    margin-top: 4px;
    padding: 10px clamp(26px, 4vw, 38px);
    border-radius: 999px;
    background: var(--thanks-lime);
    color: var(--thanks-teal);
    font: 600 clamp(16px, 2.25vw, 20px)/1.3 Inter, Arial, sans-serif;
    text-decoration: none;
}

.koberg-thanks__button:hover { color: var(--thanks-teal); background: #e0f4a7; }
.koberg-thanks a:focus-visible { outline: 2px solid #f3faf9; outline-offset: 4px; }

.koberg-thanks__office {
    padding-block: clamp(14px, 2.2vw, 23px);
    color: #e4eeed;
    font-size: clamp(13px, 1.8vw, 16px);
    line-height: 1.4;
}

@media (max-width: 520px) {
    .koberg-thanks__button { width: min(100%, 245px); }
}
