/*
Theme Name: Betheme Kristall Child
Template: betheme
Version: 1.0.2
Text Domain: betheme-kristall-child
*/

/* Точечное исключение: логотип ZetaLine в нижнем меню Betheme. */
#Footer .footer_copy .social-menu {
    display: block !important;
}

@media (max-width: 767px) {
    #Footer .footer_copy .mcb-column-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    #Footer .footer_copy .copyright {
        float: none;
        margin: 0;
        text-align: left;
    }
    #Footer .footer_copy .social-menu {
        float: none;
        margin: 0;
    }
}

/*
 * CRISTALL-CSS-001
 * Задача: скрыть ловушку для автоматических отправок от посетителей.
 * Где используется: MetForm Builder, форма 356, поле website_check.
 * Почему нельзя Elementor: установленный MetForm не содержит honeypot и
 * не даёт полю штатного режима «скрыть визуально, но отправить на сервер».
 * Проверено: предпросмотр и редактор формы, 27.10.2026; адаптивность ниже.
 * Как удалить: удалить правило после замены на штатный серверный honeypot.
 */
body:not(.metform-builder-canvas) .metform-element-el-381aed92-d9b7-4641-9de2-d51279567b3b,
body.metform-builder-preview .metform-element-el-381aed92-d9b7-4641-9de2-d51279567b3b {
    display: none !important;
}

/*
 * CRISTALL-CSS-002
 * Задача: компактная типографика и интервалы штатных виджетов футера Betheme.
 * Почему нельзя только настройками темы: h3 общий для всего сайта, а отступы
 * widget 30px и оформление shortcode-кнопки ZetaLine Cookie не настраиваются
 * отдельно для футера. Текст и ссылки остаются редактируемыми блоками WP.
 */
#Footer .widgets_wrapper .widget_block {
    margin-top: 12px;
    margin-bottom: 12px;
}
#Footer .widgets_wrapper .widget_block h3 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 16px;
}
#Footer .widgets_wrapper .kristall-footer-legal {
    font-size: 13px;
    line-height: 1.6;
    margin-top: 20px;
}
#Footer .widgets_wrapper .zetaline-cookie-settings-link {
    background: transparent;
    border: 1px solid #4B5B6D;
    border-radius: 6px;
    box-shadow: none;
    color: #AFC0D0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    padding: 7px 10px;
    min-height: 0;
}
#Footer .widgets_wrapper .zetaline-cookie-settings-link:hover,
#Footer .widgets_wrapper .zetaline-cookie-settings-link:focus-visible {
    background: #1A2633;
    border-color: #7B91A6;
    color: #FFFFFF;
}
@media (max-width: 767px) {
    #Footer .widgets_wrapper .widget_block h3 {
        font-size: 17px;
        margin-bottom: 12px;
    }
}

/*
 * CRISTALL-CSS-003
 * Задача: оформить штатный архив и записи WordPress в стиле сайта.
 * Почему нельзя только Elementor: новые записи публикуются в обычном редакторе,
 * а архив и шапка записи выводятся системными шаблонами Betheme.
 * Меняются только эти шаблоны; контент, фото, заголовок, дата и рубрики остаются
 * динамическими полями WordPress. Удалить после замены настройками шаблона темы.
 */
body:is(.blog, .category, .tag) #Subheader,
body.single-post #Subheader {
    position: relative;
    padding: 164px 24px 86px;
    background-color: #111B28;
    background-size: cover;
    background-position: center 42%;
}
body:is(.blog, .category, .tag) #Subheader::before,
body.single-post #Subheader::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(8, 16, 29, .91), rgba(10, 25, 44, .75) 57%, rgba(8, 16, 29, .75));
    pointer-events: none;
}
body:is(.blog, .category, .tag) #Subheader .container,
body.single-post #Subheader .container {
    position: relative;
    z-index: 1;
}
body:is(.blog, .category, .tag) #Subheader .title,
body.single-post #Subheader .title {
    color: #F7F9FD;
    font-family: Oswald, sans-serif;
    font-size: clamp(38px, 5vw, 72px);
    font-weight: 600;
    line-height: 1.1;
    max-width: 1120px;
    text-transform: none;
}
body:is(.blog, .category, .tag) #Subheader .breadcrumbs,
body.single-post #Subheader .breadcrumbs,
body:is(.blog, .category, .tag) #Subheader .breadcrumbs a,
body.single-post #Subheader .breadcrumbs a {
    color: #BED0E0;
}
body:is(.blog, .category, .tag) .post-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #2A394B;
    border-radius: 12px;
    background-color: #192532 !important;
}
body:is(.blog, .category, .tag) .posts_group:is(.masonry, .grid) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
    height: auto !important;
}
body:is(.blog, .category, .tag) .posts_group:is(.masonry, .grid) .post-item {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    margin: 0;
}
body:is(.blog, .category, .tag) .post-item .post-desc {
    padding: 22px 24px 26px;
}
body:is(.blog, .category, .tag) .post-item .post-photo-wrapper .image_wrapper {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
body:is(.blog, .category, .tag) .post-item .post-photo-wrapper .image_wrapper > a,
body:is(.blog, .category, .tag) .post-item .post-photo-wrapper .image_wrapper img {
    display: block;
    width: 100%;
    height: 100%;
}
body:is(.blog, .category, .tag) .post-item .post-photo-wrapper .image_wrapper img {
    object-fit: cover;
}
body:is(.blog, .category, .tag) .post-item .post-desc-wrapper {
    flex: 1;
    background: #192532;
}
body:is(.blog, .category, .tag) .post-item .post-title .entry-title a {
    color: #F3F7FB;
}
body:is(.blog, .category, .tag) .post-item .post-title .entry-title a:hover,
body:is(.blog, .category, .tag) .post-item .post-title .entry-title a:focus-visible {
    color: #8AC5F0;
}
body:is(.blog, .category, .tag) .post-item .post-excerpt {
    color: #AFBDCB;
}
body:is(.blog, .category, .tag) .post-item .post-footer {
    display: none;
}
body:is(.blog, .category, .tag) .post-item .post-meta .category {
    display: block;
    float: right;
    width: auto;
}
body:is(.blog, .category, .tag) .post-item .post-meta .category .cat-btn {
    display: none;
}
body:is(.blog, .category, .tag) .post-item .post-meta .category .cat-wrapper {
    display: block;
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
body:is(.blog, .category, .tag) .post-item .post-categories {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: transparent;
    list-style: none;
}
body:is(.blog, .category, .tag) .post-item .post-categories li {
    display: inline-block;
    margin: 0;
}
body:is(.blog, .category, .tag) .post-item .post-meta .category .post-categories a {
    color: #9DCEF0;
    font-size: 12px;
    line-height: 1.3;
}
body:is(.blog, .category, .tag) .post-item .post-categories li:has(> a[href*="/category/novosti-i-stati/"]) {
    display: none;
}
body.single-post .post-meta .mata-tags {
    display: none;
}
body.single-post .post-wrapper-content .the_content_wrapper {
    box-sizing: border-box;
    max-width: 900px;
    margin-inline: auto;
    color: #CBD7E3;
}
body.single-post .post-wrapper-content .the_content_wrapper p {
    color: #CBD7E3;
    font-family: Manrope, sans-serif;
    font-size: 18px;
    line-height: 1.75;
}
body.single-post .post-wrapper-content .the_content_wrapper .kristall-story-lead {
    color: #E7F0F8;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.6;
}
body.single-post .post-wrapper-content .the_content_wrapper h2 {
    color: #F7F9FD;
    font-family: Oswald, sans-serif;
    font-size: 36px;
    line-height: 1.2;
    margin: 42px 0 16px;
}
/* CRISTALL-CSS-003, продолжение: системные карточки и навигация записей Betheme. */
body:is(.blog, .category, .tag, .single-post) #Content {
    background: #17202C;
    color: #CAD6E2;
}
body:is(.blog, .category, .tag) #Subheader .title {
    font-size: clamp(36px, 4vw, 58px);
}
body.single-post #Subheader .title {
    font-size: clamp(34px, 3.7vw, 54px);
    max-width: 1000px;
}
body:is(.blog, .category, .tag) .post-item .post-title .entry-title,
body:is(.blog, .category, .tag) .post-item .post-title .entry-title a {
    font-family: Manrope, sans-serif;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.35;
}
body:is(.blog, .category, .tag) .post-item .post-meta,
body.single-post .post-meta {
    color: #AFC0D0;
}
body:is(.blog, .category, .tag) .post-item .post-meta .category .post-categories a:hover,
body:is(.blog, .category, .tag) .post-item .post-meta .category .post-categories a:focus-visible {
    color: #FFFFFF;
}
body:is(.blog, .category, .tag) .pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 44px 0 64px;
    font-family: Manrope, sans-serif;
}
body:is(.blog, .category, .tag) .pager .pages {
    display: flex;
    gap: 8px;
    padding: 0;
    background: transparent;
}
body:is(.blog, .category, .tag) .pager a {
    color: #D9E7F3;
    background: #24384C;
    border: 1px solid #3A5E7A;
    border-radius: 7px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    padding: 8px 13px;
}
body:is(.blog, .category, .tag) .pager a:hover,
body:is(.blog, .category, .tag) .pager a:focus-visible,
body:is(.blog, .category, .tag) .pager a.active {
    color: #FFFFFF;
    background: #0F4C81;
    border-color: #4A94C7;
}
body.single-post .section-post-related {
    background: #1B2938;
    padding: 52px 0 68px;
}
body.single-post .section-post-related .related-heading {
    color: #F5F8FC;
    font-family: Oswald, sans-serif;
    font-size: clamp(27px, 3vw, 36px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 26px;
}
body.single-post .section-post-related .post-related .mcb-column-inner {
    overflow: hidden;
    background: #243547;
    border: 1px solid #38506A;
    border-radius: 10px;
}
body.single-post .section-post-related .post-related .desc {
    padding: 20px 20px 24px;
}
body.single-post .section-post-related .post-related h4,
body.single-post .section-post-related .post-related h4 a {
    color: #F5F8FC;
    font-family: Manrope, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.38;
}
body.single-post .section-post-related .post-related h4 a:hover { color: #9FD1F3; }
body.single-post .section-post-related .post-related .button {
    background: #0F4C81;
    border-radius: 7px;
    color: #FFFFFF;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    padding: 9px 14px;
}
body.single-post .section-post-related .post-related .button .button_icon { display: none; }
body.single-post .section-post-related .post-related .button .button_label { padding: 0; }
body.single-post .section-post-related .post-related .button:hover,
body.single-post .section-post-related .post-related .button:focus-visible { background: #17659F; }
body.single-post .kristall-post-bottom-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 46px;
    padding-top: 26px;
    border-top: 1px solid #38506A;
}
body.single-post .kristall-post-bottom-nav a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 76px;
    padding: 16px 18px;
    background: #243547;
    border: 1px solid #38506A;
    border-radius: 9px;
    color: #F7F9FD;
    font: 600 15px/1.4 Manrope, sans-serif;
}
body.single-post .kristall-post-bottom-nav a:hover,
body.single-post .kristall-post-bottom-nav a:focus-visible { border-color: #75B2DE; color: #FFFFFF; }
body.single-post .kristall-post-bottom-nav small { color: #91BEDC; font: 600 12px/1.4 Manrope, sans-serif; }
body.single-post .kristall-post-bottom-nav .next { text-align: right; }
body.single-post .kristall-post-bottom-nav .next:only-child { grid-column: 2; }
body.single-post .kristall-post-bottom-nav .prev:only-child { grid-column: 1; }
/* CRISTALL-CSS-004: кегль динамической ленты; виджет Posts остаётся редактируемым в Elementor. */
body.home #home-news .elementor-post__title,
body.home #home-news .elementor-post__title a {
    font-size: 18px;
    line-height: 1.35;
}
body.single-post .post-wrapper-content .the_content_wrapper .wp-block-image {
    margin: 30px 0;
}
body.single-post .post-wrapper-content .the_content_wrapper .wp-block-image img {
    border-radius: 10px;
}
body.single-post .post-nav.minimal a.prev::before {
    content: "Предыдущая запись";
    font: 600 14px Manrope, sans-serif;
    margin-right: 8px;
}
body.single-post .post-nav.minimal a.next::after {
    content: "Следующая запись";
    font: 600 14px Manrope, sans-serif;
    margin-left: 8px;
}

/* CRISTALL-CSS-005: мобильная панель навигации Betheme Header Builder. */
@media (max-width: 1260px) {
    #mfn-header-template .mfn-header-tmpl-menu-sidebar {
        width: min(420px, 100vw);
        background: #101A28;
        box-shadow: -16px 0 48px rgba(4, 12, 23, .36);
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar:not([aria-expanded="true"]) {
        right: calc(-1 * min(420px, 100vw));
        pointer-events: none;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar-wrapper {
        display: block;
        height: 100%;
        overflow-y: auto;
        padding: 96px 28px 32px;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar-wrapper::before {
        content: "";
        position: absolute;
        top: 22px;
        left: 28px;
        width: 152px;
        height: 42px;
        background: url('/wp-content/uploads/2026/10/kristall-logo-white-wordmark.svg') left center / contain no-repeat;
        pointer-events: none;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-close-icon {
        top: 22px;
        right: 24px;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu {
        display: flex;
        width: 100%;
        align-items: stretch;
        text-align: left;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu > li.mfn-menu-li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #26374A;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu > li.mfn-menu-li > a.mfn-menu-link {
        display: flex;
        min-height: 52px;
        justify-content: flex-start;
        text-align: left;
        padding: 12px 2px;
        color: #F5F8FC;
        font: 600 17px/1.35 Manrope, sans-serif;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu > li.mfn-menu-li.current-menu-item > a.mfn-menu-link,
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu > li.mfn-menu-li > a.mfn-menu-link:hover,
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu > li.mfn-menu-li > a.mfn-menu-link:focus-visible {
        color: #91C9F0;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-header-menu > li.mfn-menu-li > a .menu-sub {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        margin-left: auto;
        align-items: center;
        justify-content: center;
        color: #91C9F0;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu {
        width: 100%;
        margin: 0 0 12px;
        padding: 4px 0 4px 14px;
        border: 0;
        border-left: 2px solid #3A83BD;
        border-radius: 0;
        background: #17283A;
        box-shadow: none;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu li.mfn-menu-li,
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu li.mfn-menu-li > a.mfn-menu-link {
        width: 100%;
        background: transparent;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu li.mfn-menu-li > a.mfn-menu-link {
        display: flex;
        min-height: 44px;
        justify-content: flex-start;
        text-align: left;
        padding: 10px 12px;
        color: #CDDAE7;
        font: 500 15px/1.4 Manrope, sans-serif;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu li.mfn-menu-li > a.mfn-menu-link:hover,
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu li.mfn-menu-li > a.mfn-menu-link:focus-visible,
    #mfn-header-template .mfn-header-tmpl-menu-sidebar .mfn-submenu li.current-menu-item > a.mfn-menu-link {
        background: #234464;
        color: #FFFFFF;
    }
}
@media (max-width: 767px) {
    #mfn-header-template .mfn-header-tmpl-menu-sidebar {
        width: 100vw;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar-wrapper {
        padding-inline: 24px;
    }
    #mfn-header-template .mfn-header-tmpl-menu-sidebar-wrapper::before {
        left: 24px;
    }
}

/* CRISTALL-CSS-006: виджет MetForm внутри редактируемой секции Elementor. */
#forma-zapisi {
    scroll-margin-top: 88px;
}
#forma-zapisi .mfb-form,
#forma-zapisi .mfb-form input,
#forma-zapisi .mfb-form select,
#forma-zapisi .mfb-form textarea,
#forma-zapisi .mfb-form button {
    font-family: Manrope, sans-serif;
}
#forma-zapisi .mfb-form .mfb-field__label {
    color: #203248;
    font-size: 14px;
    font-weight: 600;
}
#forma-zapisi .mfb-form .mfb-field__required {
    color: #0F4C81;
}
#forma-zapisi .mfb-form :is(input, select, textarea):focus {
    outline: 2px solid #589ACB;
    outline-offset: 1px;
    border-color: #0F4C81;
}
#forma-zapisi .mfb-form .mfb-button {
    min-height: 48px;
    border: 0;
    border-radius: 7px;
    background: #0F4C81;
    color: #FFFFFF;
    font: 600 15px/1.35 Manrope, sans-serif;
    padding: 13px 20px;
    box-shadow: none;
}
#forma-zapisi .mfb-form .mfb-button:hover,
#forma-zapisi .mfb-form .mfb-button:focus-visible {
    background: #17659F;
    color: #FFFFFF;
}
#forma-zapisi .mfb-form a {
    color: #0F4C81;
}
@media (max-width: 767px) {
    body.single-post .kristall-post-bottom-nav { grid-template-columns: 1fr; }
    body.single-post .kristall-post-bottom-nav .next:only-child,
    body.single-post .kristall-post-bottom-nav .prev:only-child { grid-column: 1; }
    body.single-post .section-post-related { padding: 38px 0 48px; }
    body:is(.blog, .category, .tag) .pager { padding: 32px 0 48px; }
    body:is(.blog, .category, .tag) #Subheader,
    body.single-post #Subheader {
        padding: 142px 18px 62px;
    }
    body:is(.blog, .category, .tag) #Subheader .title,
    body.single-post #Subheader .title {
        font-size: clamp(32px, 9vw, 46px);
    }
    body:is(.blog, .category, .tag) .post-item .post-desc {
        padding: 18px 18px 22px;
    }
    body:is(.blog, .category, .tag) .posts_group:is(.masonry, .grid) {
        grid-template-columns: minmax(0, 1fr);
    }
    body:is(.blog, .category, .tag) .post-item .post-meta .category {
        float: none;
    }
    body:is(.blog, .category, .tag) .post-item .post-categories {
        flex-wrap: wrap;
    }
    body.single-post .post-nav.minimal a.prev::before,
    body.single-post .post-nav.minimal a.next::after {
        display: none;
    }
    body.single-post .post-wrapper-content .the_content_wrapper {
        padding-inline: 18px;
    }
    body.single-post .post-wrapper-content .the_content_wrapper p {
        font-size: 16px;
        line-height: 1.7;
    }
    body.single-post .post-wrapper-content .the_content_wrapper .kristall-story-lead {
        font-size: 18px;
    }
    body.single-post .post-wrapper-content .the_content_wrapper h2 {
        font-size: 28px;
        margin-top: 34px;
    }
}
