/* ===== Extracted from БЛОГ СЕТКА.txt: style block 1 ===== */

        body.custom-blog-grid-page {
            background:
                linear-gradient(180deg, #0b1018 0%, #101724 48%, #090e15 100%),
                linear-gradient(90deg, rgba(220, 180, 82, 0.035), transparent 25%, transparent 74%, rgba(255, 255, 255, 0.018));
        }

        body.custom-blog-grid-page .site-content,
        body.custom-blog-grid-page .site-content > .ast-container,
        body.custom-blog-grid-page .content-area,
        body.custom-blog-grid-page .site-main,
        body.custom-blog-grid-page .entry-content {
            display: block;
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 0;
        }

        /* Убираем отступы, которые появляются при выводе shortcode внутри Elementor */
        body.custom-blog-grid-page .elementor,
        body.custom-blog-grid-page .elementor-section,
        body.custom-blog-grid-page .elementor-container,
        body.custom-blog-grid-page .elementor-column,
        body.custom-blog-grid-page .elementor-widget-wrap,
        body.custom-blog-grid-page .elementor-widget-shortcode,
        body.custom-blog-grid-page .elementor-shortcode {
            margin-top: 0 !important;
            margin-bottom: 0 !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
        }

        body.custom-blog-grid-page .elementor-widget:not(:last-child),
        body.custom-blog-grid-page .elementor-widget-shortcode:not(:last-child) {
            margin-bottom: 0 !important;
        }

        body.custom-blog-grid-page .e-con,
        body.custom-blog-grid-page .e-con.e-parent,
        body.custom-blog-grid-page .e-con.e-flex {
            --padding-top: 0px !important;
            --padding-bottom: 0px !important;
            --padding-left: 0px !important;
            --padding-right: 0px !important;
            --container-default-padding-top: 0px !important;
            --container-default-padding-bottom: 0px !important;
            padding-block-start: 0 !important;
            padding-block-end: 0 !important;
            margin-block-start: 0 !important;
            margin-block-end: 0 !important;
        }

        .custom-blog-section,
        .custom-blog-section * {
            box-sizing: border-box;
        }

        .custom-blog-section {
            --ra-hp-bg: #0f141e;
            --ra-hp-text: #dad5aa;
            --ra-hp-text-soft: #c8c099;
            --ra-hp-gold: #dcb452;
            --ra-hp-gold-bright: #ffe48b;
            --ra-hp-side-padding: clamp(18px, 5vw, 56px);

            position: relative;
            left: 50%;
            width: 100vw;
            margin-left: -50vw;
            overflow: hidden;
            padding: clamp(60px, 5.4vw, 86px) var(--ra-hp-side-padding) clamp(64px, 5.8vw, 92px);
            color: var(--ra-hp-text);
            background: var(
                --ra-section-bg,
                linear-gradient(180deg, #0b1018 0%, #101724 48%, #090e15 100%),
                linear-gradient(90deg, rgba(220, 180, 82, 0.035), transparent 25%, transparent 74%, rgba(255, 255, 255, 0.018))
            );
            box-shadow: var(
                --ra-section-shadow,
                inset 0 1px 0 rgba(255, 255, 255, 0.04),
                inset 0 -1px 0 rgba(220, 180, 82, 0.14)
            );
            isolation: isolate;
            font-family: "Montserrat", sans-serif;
        }

        .custom-blog-section::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            opacity: var(--ra-section-pattern-opacity, 0.74);
            background: var(
                --ra-section-pattern-bg,
                repeating-radial-gradient(
                    circle at 50% 50%,
                    rgba(255, 255, 255, 0.017) 0 0.8px,
                    transparent 0.8px 10px
                )
            );
            mix-blend-mode: var(--ra-section-pattern-blend-mode, normal);
            -webkit-mask-image: var(
                --ra-section-pattern-mask,
                repeating-conic-gradient(
                    from 0deg at 50% 50%,
                    #000 0deg 0.67deg,
                    transparent 0.67deg 1.34deg
                ),
                radial-gradient(
                    circle at 50% 50%,
                    transparent 0%,
                    #000 13%,
                    #000 80%,
                    transparent 100%
                )
            );
            mask-image: var(
                --ra-section-pattern-mask,
                repeating-conic-gradient(
                    from 0deg at 50% 50%,
                    #000 0deg 0.67deg,
                    transparent 0.67deg 1.34deg
                ),
                radial-gradient(
                    circle at 50% 50%,
                    transparent 0%,
                    #000 13%,
                    #000 80%,
                    transparent 100%
                )
            );
            -webkit-mask-composite: var(--ra-section-pattern-webkit-composite, source-in);
            mask-composite: var(--ra-section-pattern-composite, intersect);
        }


        .custom-blog-wrap {
            position: relative;
            z-index: 2;
            width: 100%;
            max-width: 1320px;
            margin: 0 auto;
            padding: 0 18px;
        }

        .custom-blog-frame__head {
            max-width: 900px;
            margin: 0 auto clamp(38px, 5vw, 58px);
            text-align: center;
        }

        .custom-blog-frame__title {
            margin: 0;
            color: var(--ra-hp-text);
            font-size: clamp(28px, 3vw, 36px);
            line-height: 1.12;
            font-weight: 700;
            letter-spacing: 0.01em;
        }

        .custom-blog-frame__decor {
            --decor-bg: var(--ra-section-decor-bg, #0f141e);
            --decor-width: 180px;
            color: #F3EAB8;
            margin: 25px auto 25px;
        }

        .custom-blog-frame__lead {
            max-width: 800px;
            margin: 0 auto;
            color: var(--ra-hp-text-soft);
            font-family: 'Inter', sans-serif;
            font-size: clamp(16px, 1.55vw, 18px);
            line-height: 1.64;
            font-weight: 400;
        }

       /* ===== ВЕРХНИЙ БЛОК ФИЛЬТРОВ — В СТИЛЕ RA LUXURY ===== */

.custom-blog-filters-anchor {
    display: block;
    height: 30px;
    margin-top: -30px;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

.custom-blog-filters {
    position: relative;
    z-index: 20;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 18px 24px;
    overflow: visible;
    isolation: isolate;
    border: 1px solid rgba(255, 205, 87, 0.25);
    border-radius: 40px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.040), rgba(255, 255, 255, 0.006)),
        #111824;
    box-shadow:
        0 0 6px rgba(220, 180, 82, 0.075),
        0 0 12px rgba(220, 180, 82, 0.055),
        0 0 22px rgba(220, 180, 82, 0.032),
        inset 0 1px 0 rgba(255, 255, 255, 0.048),
        0 0 0 1px rgba(220, 180, 82, 0.018);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.custom-blog-section .ra-map-filter-count {
    display: block;
    width: 100%;
    color: #e1b759;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
}

.custom-blog-section .ra-map-filter-count--between {
    width: fit-content;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 9px 18px;
    border: 1px solid rgba(220, 180, 82, 0.20);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.030), rgba(255, 255, 255, 0.006)),
        rgba(17, 24, 36, 0.78);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.custom-blog-section .ra-map-filter-count--between + .custom-blog-panel {
    margin-top: 24px;
}


.custom-blog-filter-form {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    margin: 0;
}

/* ===== ПОИСК С ЛУПОЙ ===== */

.custom-blog-search-wrap {
    position: relative;
    flex: 0 0 310px;
    min-width: 250px;
    max-width: 310px;
}

.custom-blog-search-wrap::before {
    content: "";
    position: absolute;
    right: 16px;
    left: auto;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ffe79c 0%, #dcb452 48%, #f5a623 100%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'%3E%3C/line%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'%3E%3C/line%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
    z-index: 2;
    opacity: 0.94;
}

.custom-blog-search-submit {
    position: absolute;
    top: 50%;
    right: 7px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0 !important;
    border-radius: 10px;
    background: transparent !important;
    color: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    box-shadow: none !important;
    transform: translateY(-50%);
    appearance: none;
    -webkit-appearance: none;
    transition:
        background 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.custom-blog-search-submit:hover,
.custom-blog-search-submit:focus-visible {
    background: rgba(220, 180, 82, 0.085) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 224, 141, 0.12) !important;
    outline: none;
}

.custom-blog-search-submit:active {
    transform: translateY(-50%) scale(0.97);
}

.custom-blog-search-field,
.custom-blog-category-trigger {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(220, 180, 82, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
        #101722;
    color: #dad5aa;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    outline: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    transition:
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease,
        border-radius 0.22s ease;
}

.custom-blog-search-field {
    padding: 9px 47px 9px 17px;
    box-sizing: border-box;
    cursor: text;
}

.custom-blog-search-field::placeholder,
.custom-blog-category-trigger .selected-option-text,
.custom-blog-category-option {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.custom-blog-search-field::placeholder {
    color: rgba(218, 213, 170, 0.72);
    opacity: 1;
}

.custom-blog-search-field:hover,
.custom-blog-category-trigger:hover {
    border-color: rgba(255, 224, 141, 0.46);
    color: #ffe79c;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.19),
        0 0 18px rgba(220, 180, 82, 0.065);
}

.custom-blog-search-field:focus,
.custom-blog-category-trigger:focus-visible {
    border-color: rgba(255, 224, 141, 0.72);
    color: #ffe79c;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
        #101722;
    box-shadow:
        0 0 0 4px rgba(220, 180, 82, 0.055),
        0 0 24px rgba(220, 180, 82, 0.12),
        0 13px 26px rgba(0, 0, 0, 0.22);
}

/* Перебиваем глобальные стили темы только для поля поиска */
.custom-blog-section input[type="text"].custom-blog-search-field {
    height: 46px !important;
    border: 1px solid rgba(220, 180, 82, 0.28) !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)), #101722 !important;
    color: #dad5aa !important;
    font-family: "Inter", sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    padding: 9px 47px 9px 17px !important;
    box-sizing: border-box !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16) !important;
}

.custom-blog-section input[type="text"].custom-blog-search-field:hover {
    border-color: rgba(255, 224, 141, 0.46) !important;
    color: #ffe79c !important;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.19),
        0 0 18px rgba(220, 180, 82, 0.065) !important;
}

.custom-blog-section input[type="text"].custom-blog-search-field:focus {
    border-color: rgba(255, 224, 141, 0.72) !important;
    color: #ffe79c !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
        #101722 !important;
    box-shadow:
        0 0 0 4px rgba(220, 180, 82, 0.055),
        0 0 24px rgba(220, 180, 82, 0.12),
        0 13px 26px rgba(0, 0, 0, 0.22) !important;
}

/* ===== КНОПКИ — В СТИЛЕ RA BADGE ===== */

.custom-blog-filter-button,
.custom-blog-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 13px;
    align-self: center;
    line-height: 1;
    border-radius: 40px;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none !important;
    flex: 0 1 auto;
    min-width: 0;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.19),
        inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.custom-blog-filter-button {
    border: 1px solid rgba(220, 180, 82, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.026) !important;
    color: rgba(255, 231, 156, 0.94) !important;
}

.custom-blog-reset {
    border: 1px solid rgba(220, 180, 82, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.026) !important;
    color: rgba(220, 180, 82, 0.74) !important;
}

.custom-blog-filter-button:hover,
.custom-blog-filter-button:focus-visible {
    border-color: rgba(255, 224, 141, 0.50) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.024)),
        rgba(255, 255, 255, 0.034) !important;
    color: #ffe79c !important;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.19),
        0 0 18px rgba(220, 180, 82, 0.065),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.custom-blog-reset:hover,
.custom-blog-reset:focus-visible {
    border-color: rgba(255, 224, 141, 0.50) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.024)),
        rgba(255, 255, 255, 0.034) !important;
    color: rgba(255, 231, 156, 0.88) !important;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.19),
        0 0 18px rgba(220, 180, 82, 0.065),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.custom-blog-filter-button:active,
.custom-blog-reset:active {
    transform: translateY(0);
}

/* ===== КАСТОМНЫЙ SELECT КАТЕГОРИЙ ===== */

.custom-blog-category-filter {
    position: relative;
    width: auto;
    min-width: 270px;
    user-select: none;
    flex: 0 1 auto;
    isolation: isolate;
    z-index: 30;
    --custom-blog-dropdown-h: 0px;
}

/* Единое свечение всего раскрытого блока: trigger + options */
.custom-blog-category-filter::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(100% - 1px + var(--custom-blog-dropdown-h));
    border-radius: 14px;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    box-shadow:
        0 0 0 4px rgba(220, 180, 82, 0.055),
        0 0 24px rgba(220, 180, 82, 0.12),
        0 13px 26px rgba(0, 0, 0, 0.22);
    transition:
        height 0.24s ease-out,
        opacity 0.12s ease-out;
}

.custom-blog-category-filter.is-open,
.custom-blog-category-filter.is-closing {
    z-index: 60;
}

.custom-blog-category-filter.is-open::before,
.custom-blog-category-filter.is-closing::before {
    opacity: 1;
}

.custom-blog-category-trigger {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0 42px 0 17px;
    cursor: pointer;
}

.custom-blog-category-trigger .selected-option-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-blog-category-trigger.open,
.custom-blog-category-filter.is-open .custom-blog-category-trigger,
.custom-blog-category-filter.is-closing .custom-blog-category-trigger {
    border-color: rgba(255, 224, 141, 0.72);
    border-bottom-color: rgba(255, 224, 141, 0.72) !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    color: #ffe79c;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
        #101722;
    box-shadow: none !important;
}

.custom-blog-category-trigger::after {
    content: "";
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #dcb452;
    pointer-events: none;
    transition: transform 0.22s ease, border-top-color 0.22s ease;
}

.custom-blog-category-trigger:hover::after,
.custom-blog-category-trigger.open::after {
    border-top-color: #ffe79c;
}

.custom-blog-category-trigger.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-blog-category-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    border: 0;
    border-top: 0 !important;
    border-radius: 0 0 14px 14px;
    background: transparent;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        max-height 0.24s ease-out,
        opacity 0.08s ease-out,
        visibility 0s linear 0.24s;
}

.custom-blog-category-options.open {
    top: calc(100% - 1px);
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(255, 224, 141, 0.72);
    border-top: 0 !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006)),
        #101722;
    box-shadow: none !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        max-height 0.24s ease-out,
        opacity 0.08s ease-out,
        visibility 0s;
}

.custom-blog-category-filter.is-closing .custom-blog-category-options {
    top: calc(100% - 1px);
    max-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 224, 141, 0.72);
    border-top: 0 !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006)),
        #101722;
    box-shadow: none !important;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition:
        max-height 0.24s ease-out,
        opacity 0.08s ease-out,
        visibility 0s;
}

.custom-blog-category-options::-webkit-scrollbar {
    width: 7px;
}

.custom-blog-category-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
}

.custom-blog-category-options::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 224, 141, 0.62), rgba(220, 180, 82, 0.32));
    border-radius: 999px;
}

.custom-blog-category-option {
    position: relative;
    padding: 11px 14px;
    cursor: pointer;
    color: rgba(218, 213, 170, 0.86);
    border-bottom: 1px solid rgba(220, 180, 82, 0.16);
    background-clip: padding-box;
    line-height: 1.25;
    transition:
        background 0.22s ease,
        color 0.22s ease,
        padding-left 0.22s ease,
        border-color 0.22s ease;
}

.custom-blog-category-option:last-child {
    border-bottom: none;
}

.custom-blog-category-option:hover,
.custom-blog-category-option.selected {
    padding-left: 18px;
    border-bottom-color: rgba(16, 23, 34, 0.42);
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 244, 204, 0.065) 24%, transparent 48%),
        linear-gradient(135deg, #ffd966 0%, #f5b63d 48%, #e4971f 100%);
    background-clip: padding-box;
    color: #101722;
}

.custom-blog-category-option.selected::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 13px;
    height: 13px;
    transform: translateY(-50%);
    background: #101722;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5l4.5 4.2L19 7' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5l4.5 4.2L19 7' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}



        /* ===== БЛОК С КАРТОЧКАМИ ===== */

        .custom-blog-panel {
            width: 100%;
            padding: 0;
            border: 1px solid rgba(255, 205, 87, 0.15);
            border-radius: 15px;
            box-shadow:
                0 0 6px rgba(220, 180, 82, 0.075),
                0 0 12px rgba(220, 180, 82, 0.055),
                0 0 22px rgba(220, 180, 82, 0.032),
                inset 0 1px 0 rgba(255, 255, 255, 0.048),
                0 0 0 1px rgba(220, 180, 82, 0.018);
            position: relative;
            overflow: hidden;
        }

        .custom-blog-inner {
            position: relative;
            z-index: 2;
            background: #DEDBB2;
        }

        /* ===== СЕТКА БЕЗ ЛИШНИХ ГРАНИЦ СПРАВА И СНИЗУ ===== */

        .custom-blog-grid {
            display: grid;
            grid-template-columns: repeat(var(--custom-blog-columns, 4), minmax(0, 1fr));
            gap: 1px;
            margin: 0;
            padding: 0;
            width: 100%;
            background: #c9c587;
        }

        .custom-blog-card {
            display: flex;
            flex-direction: column;
            min-height: 100%;
            min-width: 0;
            background: #DEDBB2;
            border-radius: 0;
            overflow: hidden;
            box-shadow: none;
            border: 0;
            padding: 20px;
            transform: none !important;
            cursor: pointer;
            transition:
                background 0.24s ease,
                box-shadow 0.24s ease;
        }

        .custom-blog-card:hover {
    background: #d3d09a;
    transform: none !important;
    box-shadow: none;
}

        .custom-blog-card:focus-visible {
            outline: 2px solid rgba(232, 189, 88, 0.72);
            outline-offset: -4px;
        }
        .custom-blog-card a,
        .custom-blog-card a:hover,
        .custom-blog-card a:focus,
        .custom-blog-card a:active {
            text-decoration: none !important;
            border-bottom: 0 !important;
            box-shadow: none !important;
        }

        /* ===== ИЗОБРАЖЕНИЕ ===== */

        .custom-blog-image {
            position: relative;
            width: 100%;
            height: 190px;
            margin: 0;
            border-radius: 8px;
            overflow: hidden;
            background: #D0CD9F;
            isolation: isolate;
            transform: translateY(0);
           box-shadow: 0 7px 17px rgba(28, 31, 38, 0.20);
            transition:
                transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s ease;
        }

        .custom-blog-card:hover .custom-blog-image {
            transform: translateY(-2px);
            box-shadow: 0 12px 28px rgba(28, 31, 38, 0.24);
        }

        .custom-blog-image::after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 3;
            border-radius: 8px;
            background:
                linear-gradient(
                    180deg,
                    rgba(28, 31, 38, 0.03) 0%,
                    rgba(28, 31, 38, 0.14) 100%
                );
            box-shadow:
                inset 0 0 0 1px rgba(255, 255, 255, 0.08),
                inset 0 -24px 38px rgba(0, 0, 0, 0.10);
            pointer-events: none;
            opacity: 0;
            transition:
                opacity 0.28s ease,
                box-shadow 0.28s ease,
                background 0.28s ease;
        }

        .custom-blog-card:hover .custom-blog-image::after {
            opacity: 1;
            background:
                linear-gradient(
                    180deg,
                    rgba(28, 31, 38, 0.06) 0%,
                    rgba(28, 31, 38, 0.27) 100%
                );
            box-shadow:
                inset 0 0 0 1px rgba(255, 205, 87, 0.18),
                inset 0 -32px 46px rgba(0, 0, 0, 0.18);
        }

        .custom-blog-image-link {
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 10px;
            overflow: hidden;
            text-decoration: none !important;
        }

        .custom-blog-image-bg {
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 10px;
            background-size: cover;
            background-position: center;
            transform: scale(1);
            filter: brightness(1) contrast(1) saturate(1);
            transition:
                transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.34s ease;
            will-change: transform, filter;
        }

        .custom-blog-card:hover .custom-blog-image-bg {
            transform: scale(1.025);
            filter: brightness(0.82) contrast(1.04) saturate(0.98);
        }

        .custom-blog-no-image {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            border-radius: 10px;
            background: linear-gradient(135deg, #EEF0F4 0%, #DDE1EA 100%);
            color: rgba(28, 31, 38, 0.46);
            font-family: "Montserrat", sans-serif;
            font-size: 14px;
            font-weight: 800;
            transition:
                transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.34s ease;
        }

        .custom-blog-card:hover .custom-blog-no-image {
            transform: scale(1.025);
            filter: brightness(0.92);
        }

        /* ===== БЕЙДЖИ КАТЕГОРИЙ ===== */

.custom-blog-tags {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    z-index: 6;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    max-width: calc(100% - 24px);
}

.custom-blog-tags a,
.custom-blog-tags a:visited,
.custom-blog-tags a:focus,
.custom-blog-tags a:active {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 11px;
    border-radius: 999px;
    background: transparent !important;
    color: #232630;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none !important;
    text-transform: none;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: 0 2px 8px rgba(28, 31, 38, 0.14);
    outline: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition:
        color 0.34s ease,
        box-shadow 0.34s ease,
        text-shadow 0.34s ease;
}

.custom-blog-tags a::before,
.custom-blog-tags a::after {
    content: "";
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
    transition:
        opacity 0.38s ease,
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-blog-tags a::before {
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, #FFD966 0%, #edac40 50%, #FFE48B 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    opacity: 1;
}

.custom-blog-tags a::after {
    inset: -1px;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0)),
        #232630;
    opacity: 0;
}

.custom-blog-tags a:hover,
.custom-blog-tags a:focus-visible {
    color: #e8bd58;
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.18),
        0 0 8px rgba(28, 31, 38, 0.20);
    text-shadow: 0 0 8px rgba(232, 189, 88, 0.12);
}

.custom-blog-tags a:hover::before,
.custom-blog-tags a:focus-visible::before {
    opacity: 0;
    animation-play-state: paused;
}

.custom-blog-tags a:hover::after,
.custom-blog-tags a:focus-visible::after {
    opacity: 1;
}

/* Стабилизация изображения под бейджем при наведении именно на тег.
   Нужна, чтобы hover карточки не давал визуальную "наводку" под плашкой. */
.custom-blog-card:has(.custom-blog-tags a:hover) .custom-blog-image,
.custom-blog-card:has(.custom-blog-tags a:focus-visible) .custom-blog-image {
    transform: translateY(0);
    box-shadow: 0 7px 17px rgba(28, 31, 38, 0.20);
}

.custom-blog-card:has(.custom-blog-tags a:hover) .custom-blog-image-bg,
.custom-blog-card:has(.custom-blog-tags a:focus-visible) .custom-blog-image-bg {
    transform: scale(1.006);
    filter: brightness(0.90) contrast(1.02) saturate(0.98);
}

.custom-blog-card:has(.custom-blog-tags a:hover) .custom-blog-image::after,
.custom-blog-card:has(.custom-blog-tags a:focus-visible) .custom-blog-image::after {
    opacity: 0.58;
    background:
        linear-gradient(
            180deg,
            rgba(28, 31, 38, 0.035) 0%,
            rgba(28, 31, 38, 0.18) 100%
        );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.045),
        inset 0 -24px 38px rgba(0, 0, 0, 0.12);
}

/* Анимация смещения градиента */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


        /* ===== КОНТЕНТ КАРТОЧКИ ===== */

        .custom-blog-content {
            display: flex;
            flex-direction: column;
            flex: 1;
            padding: 22px 0 0;
            background: transparent;
            text-align: left;
            align-items: flex-start;
        }

        .custom-blog-card-title {
            width: 100%;
            margin: 0 0 12px;
            padding: 0;
            text-align: left;
            font-family: "Montserrat", sans-serif;
            font-size: 18px;
            line-height: 1.22;
            font-weight: 800;
            letter-spacing: normal;
        }

        .custom-blog-card-title a,
        .custom-blog-card-title a:visited,
        .custom-blog-card-title a:focus,
        .custom-blog-card-title a:active {
            color: #1C1F26;
            text-decoration: none !important;
            border: 0 !important;
            border-bottom: 0 !important;
            box-shadow: none !important;
            transition: color 0.2s ease;
        }

        .custom-blog-card-title a:hover {
            color: #393836;
        }

        .custom-blog-card-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            width: 100%;
            margin: 0 0 14px;
        }

        .custom-blog-card-meta time,
        .custom-blog-card-meta .reading-time {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 23px;
            padding: 6px 9px;
            border: 1px solid rgb(28 31 38 / 20%);
            border-radius: 999px;
            background: rgb(249 245 245 / 31%);
            color: #464a55;
            font-family: "Montserrat", sans-serif;
            font-size: 11px;
            line-height: 1;
            font-weight: 600;
            white-space: nowrap;
        }

        .custom-blog-card-meta svg {
            display: block;
            width: 13px;
            height: 13px;
            flex: 0 0 auto;
        }

        .custom-blog-card-meta time svg {
            color: #0d5cd7;
        }

        .custom-blog-card-meta .reading-time svg {
            color: #d99a00;
        }

        .custom-blog-excerpt {
            width: 100%;
            margin: 0;
            padding: 0;
            text-align: left;
            color: #272323;
            font-family: "Montserrat", sans-serif;
            font-size: 15px;
            line-height: 1.55;
            font-weight: 420;
        }

        .custom-blog-card-bottom {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
            margin-top: auto;
            padding-top: 15px;
            border-top: 1px solid rgba(28, 31, 38, 0.10);
            color: #1C1F26;
            font-family: "Montserrat", sans-serif;
            font-size: 12px;
            line-height: 1;
            font-weight: 900;
        }

        .custom-blog-card-bottom span {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: rgba(28, 31, 38, 0.78);
            font-size: 12px;
            line-height: 1;
            font-weight: 900;
        }

        .custom-blog-card-bottom i {
            font-style: normal;
            color: #8a651c;
            transform: translateX(0);
            transition: transform 0.2s ease;
        }

        .custom-blog-card:hover .custom-blog-card-bottom i,
        .custom-blog-card:focus-visible .custom-blog-card-bottom i {
            transform: translateX(4px);
        }

        .custom-blog-card-bottom b {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            width: 30px;
            height: 30px;
            border: 1px solid rgba(28, 31, 38, 0.16);
            border-radius: 999px;
            color: rgba(28, 31, 38, 0.48);
            font-size: 10px;
            line-height: 1;
            font-weight: 900;
            letter-spacing: -0.05em;
            background: rgba(255, 255, 255, 0.12);
        }

        /* ===== ПАГИНАЦИЯ ===== */

        .custom-blog-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 0;
            padding: 30px 24px;
            background: #59533e;
            border-top: 1px solid #c9c587;
        }

        .custom-blog-pagination a.page-numbers:hover,
        .custom-blog-pagination .page-numbers.current {
            background: #e1b759;
            color: #1C1F26;
            text-decoration: none !important;
            transform: translateY(-1px);
        }

        .custom-blog-pagination .page-numbers {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 42px;
            height: 42px;
            margin: 0 3px;
            padding: 0 13px;
            border-radius: 999px;
            background: #DEDBB2;
            color: #1C1F26;
            text-decoration: none !important;
            border: 0 !important;
            border-bottom: 0 !important;
            box-shadow: none !important;
            font-family: "Montserrat", sans-serif;
            font-size: 14px;
            font-weight: 800;
            transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
        }

        .custom-blog-empty {
            padding: 36px 24px;
            background: #DEDBB2;
            color: #1C1F26;
            text-align: center;
            font-family: "Montserrat", sans-serif;
            font-size: 17px;
            font-weight: 800;
        }

        /* ===== АДАПТИВ ===== */

        @media (max-width: 1180px) {
            .custom-blog-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .custom-blog-image {
                height: 200px;
            }
        }



        /* ===== TABLET: 1024px — фильтры в одну строку ===== */
        @media (min-width: 901px) and (max-width: 1180px) {
            .custom-blog-filters {
                width: fit-content;
                max-width: calc(100% - 24px);
                padding: 16px 18px;
            }

            .custom-blog-filter-form {
                flex-wrap: nowrap;
                gap: 10px;
            }

            .custom-blog-search-wrap {
                flex: 1 1 280px;
                min-width: 220px;
                max-width: 300px;
            }

            .custom-blog-category-filter {
                flex: 1 1 250px;
                min-width: 220px;
                max-width: 290px;
            }

            .custom-blog-filter-button,
            .custom-blog-reset {
                flex: 0 0 auto;
                width: auto;
                max-width: none;
                white-space: nowrap;
            }
        }

        @media (max-width: 900px) {
            .custom-blog-filters {
                width: 100%;
                max-width: 95%;
            }

            .custom-blog-filter-form {
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                justify-content: center;
                gap: 12px 10px;
            }

            .custom-blog-search-wrap,
            .custom-blog-category-filter {
                width: calc(50% - 5px);
                max-width: none;
                min-width: 0;
                flex: 1 1 calc(50% - 5px);
            }

            .custom-blog-filter-button,
            .custom-blog-reset {
                width: auto;
                max-width: none;
                flex: 0 0 auto;
                margin: 2px 0;
                text-align: center;
            }

            .custom-blog-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 640px) {
            .custom-blog-section {
                padding: 58px 16px 72px;
            }

            .custom-blog-wrap {
                padding: 0;
            }

            .custom-blog-filters-anchor {
                display: block;
                position: static;
                top: auto;
                height: 0;
                margin: 0;
                padding: 0;
                overflow: hidden;
                visibility: hidden;
                pointer-events: none;
                scroll-margin-top: 24px;
            }

            .custom-blog-filters {
                border-radius: 28px;
                padding: 16px;
                margin-bottom: 0;
            }

            .custom-blog-search-wrap,
            .custom-blog-category-filter {
                width: 100%;
                max-width: none;
                min-width: 0;
                flex: 1 1 100%;
            }

            /* Мобильные карточки — отдельными блоками с воздухом между ними */
            .custom-blog-panel {
                padding: 0;
                background: transparent;
                border: 0;
                border-radius: 0;
                box-shadow: none;
                overflow: visible;
            }

            .custom-blog-inner {
                background: transparent;
            }

            .custom-blog-grid {
                grid-template-columns: 1fr;
                gap: 24px;
                background: transparent;
            }

            .custom-blog-card {
                padding: 16px;
                border: 1px solid #c9c587;
                border-radius: 15px;
                overflow: hidden;
                background: #DEDBB2;
            }

            .custom-blog-pagination {
                margin-top: 24px;
                border: 1px solid rgba(255, 205, 87, 0.15);
                overflow: hidden;
            }

            .custom-blog-image {
                height: 220px;
            }

            .custom-blog-card-title {
                font-size: 18px;
                font-weight: 800;
            }

            .custom-blog-card-meta {
                gap: 6px;
            }

            .custom-blog-card-meta time,
            .custom-blog-card-meta .reading-time {
                padding: 6px 7px;
                font-size: 9.5px;
            }

            .custom-blog-card-meta svg {
                width: 12px;
                height: 12px;
            }

            .custom-blog-content {
                padding-top: 20px;
            }
        }
