/* ==========================================================================
   BongaBonga 2026 — base.css
   Variables, typography, layout primitives, utilities.
   ========================================================================== */

:root {
    /* Colors */
    --bb-bg: #F7FAFC;
    --bb-panel: #FFFFFF;
    --bb-accent: #FFC107;
    --bb-accent-dark: #FFA000;
    --bb-accent-soft: #FFF8E1;
    --bb-text: #1A202C;
    --bb-text-secondary: #4A5568;
    --bb-text-muted: #718096;
    --bb-border: #E2E8F0;
    --bb-border-strong: #CBD5E0;
    --bb-success: #38A169;
    --bb-danger: #E53E3E;
    --bb-info: #3182CE;
    --bb-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --bb-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --bb-shadow-lg: 0 16px 40px rgba(26,32,44,0.10), 0 6px 12px rgba(26,32,44,0.06);

    /* Typography */
    --bb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;

    /* Sizing */
    --bb-radius-sm: 8px;
    --bb-radius: 16px;
    --bb-radius-lg: 24px;
    --bb-mobile-bar-height: 64px;

    /* Easing */
    --bb-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --bb-ease-out: cubic-bezier(0, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--bb-font);
    color: var(--bb-text);
    background-color: var(--bb-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile bar offset — чтобы фикс панель снизу не перекрывала контент.
   Mobile bar активен только на ≤640px (телефоны). На планшетах 641px+ — десктопная навигация. */
@media (max-width: 640px) {
    body {
        padding-bottom: var(--bb-mobile-bar-height);
    }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--bb-text);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); margin-top: 2em; }
h3 { font-size: clamp(18px, 2.2vw, 24px); margin-top: 1.5em; }
h4 { font-size: clamp(16px, 1.8vw, 20px); }

/* Default link styles — мягкие, без подчёркивания. Подчёркивание только в контенте */

a {
    color: var(--bb-text);
    text-decoration: none;
    transition: color 0.18s var(--bb-ease);
}

a:hover,
a:focus-visible {
    color: var(--bb-accent-dark);
}

/* Inside content — links подчёркнуты для SEO/UX (это контентные ссылки) */
.entry-content a:not(.bb26-btn):not(.bb26-related__card):not(.hero__cta):not(.bb26-card__link):not([class*="wp-block-button"]):not([class*="bb26-"]):not(.apply-button) {
    background-image: linear-gradient(180deg, transparent 0%, transparent calc(100% - 1px), var(--bb-text-muted) calc(100% - 1px), var(--bb-text-muted) 100%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: left bottom;
    color: var(--bb-text);
    transition: background-image 0.18s var(--bb-ease), color 0.18s var(--bb-ease);
}

.entry-content a:not(.bb26-btn):not(.bb26-related__card):not(.hero__cta):not(.bb26-card__link):not([class*="wp-block-button"]):not([class*="bb26-"]):not(.apply-button):hover {
    background-image: linear-gradient(180deg, transparent 0%, transparent calc(100% - 2px), var(--bb-accent) calc(100% - 2px), var(--bb-accent) 100%);
    color: var(--bb-text);
}

img, picture, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.grid-container,
.bb26-container {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 600px) {
    .grid-container,
    .bb26-container {
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-width: 480px) {
    .grid-container,
    .bb26-container {
        padding-left: 6px;
        padding-right: 6px;
    }
}

/* Skip link for a11y */
.bb26-skip {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--bb-text);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
}
.bb26-skip:focus {
    top: 0;
}

/* Buttons */

.bb26-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s var(--bb-ease), background-color 0.15s var(--bb-ease), box-shadow 0.15s var(--bb-ease);
}

.bb26-btn:hover {
    transform: translateY(-1px);
}

.bb26-btn:active {
    transform: translateY(0);
}

.bb26-btn--primary {
    background: var(--bb-accent);
    color: var(--bb-text);
    box-shadow: var(--bb-shadow-sm);
}

.bb26-btn--primary:hover {
    background: var(--bb-accent-dark);
    box-shadow: var(--bb-shadow);
    color: var(--bb-text);
}

.bb26-btn--ghost {
    background: var(--bb-panel);
    color: var(--bb-text);
    border-color: var(--bb-border);
}

.bb26-btn--ghost:hover {
    background: var(--bb-bg);
    border-color: var(--bb-border-strong);
}

.bb26-btn--text {
    background: transparent;
    color: var(--bb-text-secondary);
    padding: 8px 12px;
}

/* Simple page header (info pages) */

.simple-page-header {
    background: linear-gradient(135deg, var(--bb-accent-soft) 0%, var(--bb-bg) 100%);
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--bb-border);
}

.simple-page-header h1 {
    margin: 0;
}

/* Breadcrumbs */

.breadcrumb-nav-bar {
    background: var(--bb-bg);
    padding: 14px 0;
    border-bottom: 1px solid var(--bb-border);
    font-size: 14px;
    color: var(--bb-text-secondary);
}

.site-breadcrumbs a {
    text-decoration: none;
    color: var(--bb-text-secondary);
}
.site-breadcrumbs a:hover {
    color: var(--bb-text);
    text-decoration: underline;
    text-decoration-color: var(--bb-accent);
}

/* GP featured image hooks disabled (см. functions.php). Рендерим картинку
   ВНУТРИ article как .bb26-page__inline-img справа от текста (float). */

.bb26-page__inline-img {
    float: right;
    width: 420px;
    max-width: 50%;
    margin: 0 0 18px 32px;
    border-radius: var(--bb-radius);
    overflow: hidden;
    box-shadow: var(--bb-shadow);
    background: var(--bb-bg);
    /* без forced aspect-ratio — сохраняем натуральные пропорции картинки */
}

.bb26-page__inline-img img,
.bb26-page__inline-thumb {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.4s var(--bb-ease);
}

.bb26-page__inline-img:hover img {
    transform: scale(1.04);
}

@media (max-width: 600px) {
    .bb26-page__inline-img {
        float: none;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 16px;
    }
}

/* Page layout: 2-column (article + sticky sidebar) на десктопе */

.bb26-page-layout {
    margin: 32px 0;
}

.bb26-page-layout--with-sidebar {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    align-items: start;
}

.bb26-page-layout--with-sidebar {
    gap: 24px; /* было 32px — сократил расстояние между статьёй и сайдбаром */
}

@media (min-width: 1024px) {
    .bb26-page-layout--with-sidebar {
        grid-template-columns: minmax(0, 1fr) 300px; /* sidebar 320 → 300 */
        gap: 28px;
    }
}

.bb26-page-sidebar {
    position: relative;
}

@media (min-width: 1024px) {
    .bb26-page-sidebar {
        position: sticky;
        top: 96px; /* sticky header offset */
    }
}

.bb26-page-sidebar .bb26-sidebar-calc {
    margin: 0;
    float: none !important;
    width: 100% !important;
}

@media (max-width: 1023px) {
    .bb26-page-sidebar {
        order: 99;
        margin-top: 8px;
    }
}

/* Page article */

/* GP override см. inc/enqueue.php — bb26_inline_late_overrides() инжектит
   inline-style в конец <head>, чтобы переопределить customizer-стили GP. */

.bb26-page,
.bb26-post {
    background: var(--bb-panel);
    border-radius: var(--bb-radius);
    padding: 22px 24px; /* было 24x28 */
    margin: 0;
    box-shadow: var(--bb-shadow-sm);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.bb26-page-layout,
.bb26-page-layout--with-sidebar,
.bb26-page-layout--full {
    max-width: 100%;
    min-width: 0;
}

.bb26-page-sidebar {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

@media (min-width: 1280px) {
    .bb26-page,
    .bb26-post {
        padding: 26px 32px; /* было 28x36 */
    }
}

.bb26-page-layout--full .bb26-page {
    margin: 0;
}

@media (max-width: 600px) {
    .bb26-page,
    .bb26-post {
        padding: 14px 12px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .bb26-page,
    .bb26-post {
        padding: 12px 8px;
        border-radius: 8px;
    }
}

/* На очень узких phones (<360px) панель совсем без боковых рамок —
   контент идёт практически от края, экономим каждый пиксель. */
@media (max-width: 360px) {
    .bb26-page,
    .bb26-post {
        padding: 10px 4px;
        border-radius: 6px;
        margin-left: -4px;
        margin-right: -4px;
    }
}

/* Smooth scrolling on touch devices */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    html {
        /* момент-скролл лучше на мобильных */
        scroll-behavior: auto;
    }
    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
}

.bb26-page .entry-content,
.bb26-post .entry-content {
    max-width: 760px;
    font-size: 17px;
    line-height: 1.7;
}

/* Intro section: thumbnail + опционально intro text (на категорийных страницах) */

.bb26-page__intro {
    margin: 0 0 32px;
    position: relative;
}

/* Solo (только картинка) — баннером во всю ширину контента */
.bb26-page__intro--solo {
    margin-bottom: 36px;
}

.bb26-page__intro--solo .bb26-page__intro-img {
    aspect-ratio: 21 / 9;
    max-height: 360px;
}

/* С текстом — двухколоночный на ≥768px, картинка слева */
.bb26-page__intro--with-text {
    display: grid;
    gap: 24px;
    align-items: center;
}

@media (min-width: 768px) {
    .bb26-page__intro--with-text {
        grid-template-columns: minmax(280px, 1fr) 1.2fr;
        gap: 36px;
    }
}

.bb26-page__intro-img {
    position: relative;
    margin: 0;
    border-radius: var(--bb-radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--bb-accent-soft) 0%, var(--bb-bg) 100%);
    box-shadow: var(--bb-shadow);
    transition: transform 0.3s var(--bb-ease), box-shadow 0.3s var(--bb-ease);
    aspect-ratio: 4 / 3;
}

.bb26-page__intro-img::after {
    /* Soft gradient overlay smoothly transitions to body content */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.06) 100%);
    border-radius: var(--bb-radius);
}

.bb26-page__intro-img:hover {
    transform: translateY(-3px);
    box-shadow: var(--bb-shadow-lg);
}

.bb26-page__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb26-page__intro-text {
    font-size: 17px;
    line-height: 1.65;
    color: var(--bb-text-secondary);
}

.bb26-page__intro-text p:first-child {
    margin-top: 0;
    font-size: 19px;
    color: var(--bb-text);
    font-weight: 500;
}

/* Smooth visual transition from intro to content */
.bb26-page__intro + .entry-content {
    position: relative;
    padding-top: 8px;
}

/* Inline images in article content — beautiful styling */

.bb26-page .entry-content img,
.bb26-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bb-radius);
    box-shadow: var(--bb-shadow-sm);
    margin: 1.5em 0;
    transition: transform 0.3s var(--bb-ease), box-shadow 0.3s var(--bb-ease);
}

.bb26-page .entry-content img:hover,
.bb26-post .entry-content img:hover {
    transform: translateY(-2px);
    box-shadow: var(--bb-shadow);
}

/* Image alignment classes (Gutenberg) */

.bb26-page .entry-content .alignleft,
.bb26-post .entry-content .alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
    max-width: 50%;
}

.bb26-page .entry-content .alignright,
.bb26-post .entry-content .alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
    max-width: 50%;
}

.bb26-page .entry-content .aligncenter,
.bb26-post .entry-content .aligncenter {
    display: block;
    margin: 1.5em auto;
}

.bb26-page .entry-content .alignwide,
.bb26-post .entry-content .alignwide {
    margin-left: -40px;
    margin-right: -40px;
    max-width: calc(100% + 80px);
}

@media (max-width: 768px) {
    .bb26-page .entry-content .alignleft,
    .bb26-page .entry-content .alignright,
    .bb26-post .entry-content .alignleft,
    .bb26-post .entry-content .alignright {
        float: none;
        max-width: 100%;
        margin: 1.5em 0;
    }
    .bb26-page .entry-content .alignwide,
    .bb26-post .entry-content .alignwide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}

/* Figure with caption */

.bb26-page .entry-content figure,
.bb26-post .entry-content figure {
    margin: 1.5em 0;
}

.bb26-page .entry-content figure img,
.bb26-post .entry-content figure img {
    margin: 0;
}

.bb26-page .entry-content figcaption,
.bb26-post .entry-content figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--bb-text-muted);
    text-align: center;
    font-style: italic;
    line-height: 1.5;
}

/* Gallery */

.bb26-page .entry-content .wp-block-gallery,
.bb26-post .entry-content .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 1.5em 0;
}

.bb26-page .entry-content .wp-block-gallery img,
.bb26-post .entry-content .wp-block-gallery img {
    margin: 0;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Pull-quote / blockquote */

.bb26-page .entry-content blockquote,
.bb26-post .entry-content blockquote {
    margin: 1.5em 0;
    padding: 18px 24px;
    border-left: 4px solid var(--bb-accent);
    background: var(--bb-accent-soft);
    border-radius: 0 var(--bb-radius-sm) var(--bb-radius-sm) 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--bb-text);
}

.bb26-page .entry-content blockquote p:last-child,
.bb26-post .entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */

.bb26-page .entry-content code,
.bb26-post .entry-content code {
    background: var(--bb-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--bb-accent-dark);
}

/* Lists with custom bullets */

.bb26-page .entry-content ul,
.bb26-post .entry-content ul {
    list-style: none;
    padding-left: 0;
}

.bb26-page .entry-content ul li,
.bb26-post .entry-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
}

.bb26-page .entry-content ul li::before,
.bb26-post .entry-content ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--bb-accent);
    border-radius: 50%;
}

/* Numbered lists */

.bb26-page .entry-content ol,
.bb26-post .entry-content ol {
    counter-reset: list;
    list-style: none;
    padding-left: 0;
}

.bb26-page .entry-content ol > li,
.bb26-post .entry-content ol > li {
    position: relative;
    padding-left: 36px;
    margin-bottom: 12px;
    counter-increment: list;
}

.bb26-page .entry-content ol > li::before,
.bb26-post .entry-content ol > li::before {
    content: counter(list);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    background: var(--bb-accent);
    color: var(--bb-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.bb26-page .entry-content p,
.bb26-post .entry-content p {
    margin: 0 0 1.1em;
}

.bb26-page .entry-content ul,
.bb26-post .entry-content ul,
.bb26-page .entry-content ol,
.bb26-post .entry-content ol {
    margin: 0 0 1.2em 1.4em;
}

.bb26-page .entry-content table,
.bb26-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 15px;
}

.bb26-page .entry-content th,
.bb26-page .entry-content td,
.bb26-post .entry-content th,
.bb26-post .entry-content td {
    padding: 12px;
    border-bottom: 1px solid var(--bb-border);
    text-align: left;
}

.bb26-page .entry-content th,
.bb26-post .entry-content th {
    background: var(--bb-bg);
    font-weight: 600;
}

/* Post hero (заголовок + meta) */

.bb26-post-layout {
    margin: 32px 0;
}

.bb26-post__hero {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--bb-border);
}

.bb26-post__cat {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bb-accent-soft);
    color: var(--bb-accent-dark);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none !important;
    background-image: none !important;
    margin-bottom: 14px;
    transition: background 0.18s var(--bb-ease);
}

.bb26-post__cat:hover {
    background: var(--bb-accent);
    color: var(--bb-text);
}

.bb26-post__title {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.15;
}

.bb26-post__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    align-items: center;
}

.bb26-post__meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bb26-post__meta-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bb-accent) 0%, var(--bb-accent-dark) 100%);
    color: var(--bb-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.35);
    flex-shrink: 0;
}

.bb26-post__meta-author-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    font-size: 14px;
}

.bb26-post__meta-author-text span[itemprop="name"] {
    font-weight: 700;
    color: var(--bb-text);
}

.bb26-post__meta-author-text small {
    font-size: 12px;
    color: var(--bb-text-muted);
}

.bb26-post__meta-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--bb-text-secondary);
    font-size: 13px;
}

.bb26-post__meta-dates > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bb26-post__meta-icon {
    font-size: 14px;
    line-height: 1;
}

.bb26-post__meta-updated {
    color: var(--bb-success);
    font-weight: 500;
}

.bb26-post__featured {
    margin: 0 0 24px;
    border-radius: var(--bb-radius);
    overflow: hidden;
    box-shadow: var(--bb-shadow);
    aspect-ratio: 16 / 9;
}

.bb26-post__featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Related pages */

.bb26-related {
    margin: 48px 0 32px;
}

.bb26-related__title {
    margin: 0 0 20px;
}

.bb26-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.bb26-related__card {
    display: block;
    background: var(--bb-panel);
    border-radius: var(--bb-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--bb-text);
    box-shadow: var(--bb-shadow-sm);
    transition: transform 0.15s var(--bb-ease), box-shadow 0.15s var(--bb-ease);
}

.bb26-related__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bb-shadow);
    color: var(--bb-text);
}

.bb26-related__img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bb-bg);
}

.bb26-related__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bb26-related__name {
    padding: 14px 16px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Archive grid */

.bb26-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.bb26-card {
    background: var(--bb-panel);
    border-radius: var(--bb-radius);
    overflow: hidden;
    box-shadow: var(--bb-shadow-sm);
    transition: transform 0.15s var(--bb-ease), box-shadow 0.15s var(--bb-ease);
}

.bb26-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bb-shadow);
}

.bb26-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.bb26-card__img {
    aspect-ratio: 16 / 10;
    background: var(--bb-bg);
    overflow: hidden;
}

.bb26-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bb26-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bb-accent) 0%, var(--bb-accent-dark) 100%);
    color: var(--bb-text);
    font-size: 36px;
    font-weight: 800;
}

.bb26-card__body {
    padding: 18px;
}

.bb26-card__title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

.bb26-card__meta {
    color: var(--bb-text-muted);
    font-size: 13px;
    margin: 0 0 8px;
}

.bb26-card__excerpt {
    margin: 0;
    font-size: 14px;
    color: var(--bb-text-secondary);
    line-height: 1.5;
}

/* Meist page — disclaimer + partner card */

.bb26-meist-disclaimer {
    margin: 24px 0 40px;
}

.bb26-meist-disclaimer__inner {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bb-accent-soft) 0%, #FFFDF5 100%);
    border: 1px solid var(--bb-accent);
    border-radius: var(--bb-radius);
    box-shadow: var(--bb-shadow);
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .bb26-meist-disclaimer__inner {
        padding: 16px 18px;
        gap: 12px;
    }
}

.bb26-meist-disclaimer__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.bb26-meist-disclaimer__body {
    flex: 1;
    min-width: 0;
}

.bb26-meist-disclaimer__title {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.3;
    color: var(--bb-text);
}

.bb26-meist-disclaimer__body p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--bb-text-secondary);
}

.bb26-meist-disclaimer__body p:last-child {
    margin-bottom: 0;
}

/* Partner card */

.bb26-partner-card {
    position: relative;
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 22px 24px 22px 28px;
    background: var(--bb-panel);
    border: 2px solid var(--bb-border);
    border-radius: var(--bb-radius);
    text-decoration: none !important;
    color: var(--bb-text);
    box-shadow: var(--bb-shadow);
    transition: transform 0.18s var(--bb-ease), border-color 0.18s var(--bb-ease), box-shadow 0.18s var(--bb-ease);
    background-image: none !important;
}

.bb26-partner-card:hover {
    transform: translateY(-2px);
    border-color: var(--bb-accent);
    box-shadow: var(--bb-shadow-lg);
    color: var(--bb-text);
}

@media (max-width: 720px) {
    .bb26-partner-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
        padding: 20px 18px;
    }
}

.bb26-partner-card__logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bb26-partner-card__logo-mark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bb-accent) 0%, var(--bb-accent-dark) 100%);
    color: var(--bb-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow: 0 6px 20px rgba(255,160,0,0.4);
    line-height: 1;
}

.bb26-partner-card__logo-mark span {
    font-size: 18px;
    margin-left: 2px;
    margin-top: 8px;
    align-self: flex-end;
}

.bb26-partner-card__logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--bb-text);
    letter-spacing: -0.01em;
}

.bb26-partner-card__logo-text strong {
    color: var(--bb-accent-dark);
}

.bb26-partner-card__body {
    line-height: 1.5;
}

.bb26-partner-card__lead {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.bb26-partner-card__features {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.bb26-partner-card__features li {
    position: relative;
    padding-left: 22px !important;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--bb-text);
}

.bb26-partner-card__features li::before {
    content: "✓" !important;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--bb-success);
    font-weight: 800;
    background: none !important;
    width: auto !important;
    height: auto !important;
}

@media (max-width: 720px) {
    .bb26-partner-card__features li {
        text-align: left;
        max-width: 240px;
        margin-left: auto;
        margin-right: auto;
    }
}

.bb26-partner-card__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 22px;
    background: var(--bb-accent);
    color: var(--bb-text);
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s var(--bb-ease);
    white-space: nowrap;
}

.bb26-partner-card:hover .bb26-partner-card__cta {
    background: var(--bb-accent-dark);
}

.bb26-partner-card__cta-text {
    font-weight: 700;
}

.bb26-partner-card__cta-arrow {
    font-size: 18px;
    transition: transform 0.2s var(--bb-ease);
}

.bb26-partner-card:hover .bb26-partner-card__cta-arrow {
    transform: translateX(4px);
}

.bb26-partner-card__ad-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(26,32,44,0.08);
    color: var(--bb-text-muted);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Meist contact section */

.bb26-meist-contact {
    margin: 32px 0 16px;
    padding: 20px 24px;
    background: var(--bb-bg);
    border-radius: var(--bb-radius);
    text-align: center;
}

.bb26-meist-contact h3 {
    margin: 0 0 8px;
}

.bb26-meist-contact p {
    margin: 0;
    color: var(--bb-text-secondary);
}

/* 404 */

.bb26-404 {
    padding: 60px 0 80px;
}

.bb26-404__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.bb26-404__code {
    font-size: 88px;
    font-weight: 800;
    color: var(--bb-accent);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.05em;
}

.bb26-404__title {
    margin: 0 0 12px;
}

.bb26-404__desc {
    color: var(--bb-text-secondary);
    margin: 0 0 32px;
    font-size: 17px;
}

.bb26-404__search {
    margin: 0 auto 40px;
    max-width: 480px;
}

.bb26-404__pop-title {
    margin-bottom: 16px;
}

.bb26-404__pop-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.bb26-404__pop-list a {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bb-panel);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: var(--bb-shadow-sm);
    transition: transform 0.12s var(--bb-ease);
}

.bb26-404__pop-list a:hover {
    transform: translateY(-2px);
    color: var(--bb-text);
}

/* Site footer */

/* Pre-footer CTA — dark wide section с заголовком + quick-links */

.pre-footer-cta,
.pre-footer-search {
    background: #161a22;
    color: #fff;
    padding: clamp(40px, 5vw, 70px) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pre-footer-cta > .grid-container,
.pre-footer-search > .grid-container {
    max-width: 1180px;
}

.pre-footer-calc-wrap {
    max-width: 1100px;
    margin: 0 auto clamp(30px, 4vw, 50px);
}

/* Калькулятор .bb26-calc на тёмном фоне pre-footer-cta —
   прозрачный фон + light-text overrides под классы [krediidi_kalkulaator]. */

.pre-footer-cta .pre-footer-calc-wrap {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto clamp(30px, 4vw, 50px);
}

.pre-footer-cta .bb26-calc {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow: none !important;
    color: #fff !important;
}

.pre-footer-cta .bb26-calc__title {
    color: #fff !important;
}

.pre-footer-cta .bb26-calc__group label,
.pre-footer-cta .bb26-calc__group-label,
.pre-footer-cta .bb26-calc__group > label {
    color: rgba(255,255,255,0.85) !important;
}

/* Табы во всю ширину строки */
.pre-footer-cta .bb26-calc__radios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

/* На мобильном — 2x2 сетка вместо 4 в ряд (иначе 4*140 = 560px overflow) */
@media (max-width: 600px) {
    .pre-footer-cta .bb26-calc__radios {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .pre-footer-cta .bb26-calc__radio span {
        padding: 10px 8px;
        font-size: 13px;
    }
}

.pre-footer-cta .bb26-calc__radio {
    width: 100%;
}

.pre-footer-cta .bb26-calc__radio span {
    display: block;
    text-align: center;
    padding: 14px 16px;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s var(--bb-ease), color 0.15s var(--bb-ease);
}

.pre-footer-cta .bb26-calc__radio input:checked + span {
    background: var(--bb-accent) !important;
    color: var(--bb-text) !important;
    border-color: var(--bb-accent) !important;
}

/* Bubble (значение слайдера) — фиксированный pill справа на одной строке с label */
.pre-footer-cta .bb26-calc__group {
    position: relative;
}

.pre-footer-cta .bb26-calc__bubble {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    background: rgba(0,0,0,0.45) !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 700;
}

.pre-footer-cta .bb26-calc__bubble::after { display: none !important; }

/* Slider area без отступа сверху для bubble (он теперь в шапке группы) */
.pre-footer-cta .bb26-calc__slider-wrap {
    padding-top: 12px !important;
}

/* Скрываем min/max метки и иконки `?` — лишний шум на тёмном */
.pre-footer-cta .bb26-calc__slider-range,
.pre-footer-cta .bb26-calc__tip {
    display: none !important;
}

.pre-footer-cta .bb26-calc input[type="range"] {
    background: rgba(255,255,255,0.10);
}

/* Result — без рамки, без фона; просто крупный текст с жёлтыми bold-цифрами */
.pre-footer-cta .bb26-calc__results,
.pre-footer-cta .bb26-calc__result,
.pre-footer-cta .bb26-calc__summary,
.pre-footer-cta .bb26-calc-pro__saved {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 12px 0 !important;
    margin: 24px 0 8px !important;
    color: rgba(255,255,255,0.92) !important;
    font-size: clamp(15px, 1.5vw, 18px) !important;
    line-height: 1.65 !important;
    text-align: center;
}

.pre-footer-cta .bb26-calc__results strong,
.pre-footer-cta .bb26-calc__result strong,
.pre-footer-cta .bb26-calc__summary strong {
    color: var(--bb-accent) !important;
    font-weight: 800 !important;
    font-size: 1.05em;
}

.pre-footer-cta .bb26-calc__results em {
    color: rgba(255,255,255,0.5) !important;
    font-style: normal;
    font-size: 0.95em;
}

.pre-footer-cta .bb26-calc__disclaimer {
    color: rgba(255,255,255,0.45) !important;
    background: transparent !important;
    border: 0 !important;
    font-size: 12px !important;
    text-align: center;
    margin-top: 16px !important;
}

.pre-footer-cta h2,
.pre-footer-search h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(22px, 3vw, 30px);
}

.pre-footer-cta p,
.pre-footer-search p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 24px;
    font-size: 16px;
    line-height: 1.55;
}

/* Search form pill-style */

.pre-footer-search .search-form {
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px;
    transition: border-color 0.2s var(--bb-ease), box-shadow 0.2s var(--bb-ease);
}

.pre-footer-search .search-form:focus-within {
    border-color: var(--bb-accent);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18);
}

.pre-footer-search .search-field {
    flex: 1;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px 0 0 999px;
    font: inherit;
    font-size: 15px;
    background: transparent;
    color: #fff;
    -webkit-appearance: none;
}

.pre-footer-search .search-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.pre-footer-search .search-field:focus {
    outline: none;
}

.pre-footer-search .search-submit {
    padding: 12px 26px;
    background: linear-gradient(45deg, var(--bb-accent), var(--bb-accent-dark));
    color: var(--bb-text);
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s var(--bb-ease), box-shadow 0.15s var(--bb-ease);
    -webkit-appearance: none;
}

.pre-footer-search .search-submit:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(255, 193, 7, 0.35);
}

/* Quick links row под поиском */

.pre-footer-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.pre-footer-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: #fff !important;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.18s var(--bb-ease);
    background-image: none !important;
}

.pre-footer-quick-link:hover {
    background: var(--bb-accent);
    border-color: var(--bb-accent);
    color: var(--bb-text) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.25);
}

.pre-footer-quick-link span[aria-hidden="true"] {
    font-size: 16px;
    line-height: 1;
}

/* Calculator inside pre-footer — wide + dark theme override (можно оставить
   на случай, если в content-стрнаицах кто-то использует [krediidi_kalkulaator]) */

.pre-footer-search .bb26-calc {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.92);
}

.pre-footer-search .bb26-calc__title {
    color: #fff;
}

.pre-footer-search .bb26-calc__group label,
.pre-footer-search .bb26-calc__group-label {
    color: rgba(255, 255, 255, 0.85);
}

.pre-footer-search .bb26-calc__bubble {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.pre-footer-search .bb26-calc__bubble::after {
    border-top-color: rgba(255, 255, 255, 0.18);
}

.pre-footer-search .bb26-calc__slider-range {
    color: rgba(255, 255, 255, 0.5);
}

.pre-footer-search .bb26-calc__radio span {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.pre-footer-search .bb26-calc__radio input:checked + span {
    background: var(--bb-accent);
    border-color: var(--bb-accent);
    color: var(--bb-text);
}

.pre-footer-search .bb26-calc__radio:hover span {
    border-color: var(--bb-accent-dark);
}

.pre-footer-search input[type="range"] {
    background: rgba(255, 255, 255, 0.14);
}

.pre-footer-search input[type="range"]::-webkit-slider-thumb {
    border: 3px solid #161a22;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.35);
}

.pre-footer-search input[type="range"]::-moz-range-thumb {
    border: 3px solid #161a22;
}

.pre-footer-search .bb26-calc__results {
    background: rgba(255, 193, 7, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

.pre-footer-search .bb26-calc__results strong {
    color: #fff;
}

.pre-footer-search .bb26-calc__disclaimer,
.pre-footer-search .bb26-calc__tip {
    color: rgba(255, 255, 255, 0.5);
}

.pre-footer-search .bb26-calc__tip {
    background: rgba(255, 193, 7, 0.4);
    color: #fff;
}

.site-footer {
    background: var(--bb-text);
    color: rgba(255,255,255,0.85);
    padding: 56px 0 32px;
}

.site-footer a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    text-decoration-color: var(--bb-accent);
}

.site-footer a:hover {
    color: var(--bb-accent);
    text-decoration: underline;
}

.footer-widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-widget-title {
    color: #fff;
    font-size: 16px;
    margin: 0 0 14px;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin: 0 0 8px;
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
}

.important-notice {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    line-height: 1.5;
}

.footer-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 24px 0;
    padding: 24px 0 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 130px;
}

.footer-feature__icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
}

.footer-feature p {
    font-size: 13px;
    margin: 0;
    line-height: 1.3;
}

.footer-features__note {
    width: 100%;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin-top: 8px;
}

.footer-copy {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin: 16px 0 0;
}

/* Search form (default) */

.search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--bb-border);
    border-radius: 8px;
    font: inherit;
}

.search-form input[type="submit"],
.search-form button {
    padding: 10px 20px;
    background: var(--bb-accent);
    color: var(--bb-text);
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Inputs / range — global polish */

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bb-border);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--bb-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.12s var(--bb-ease);
}

input[type="range"]::-webkit-slider-thumb:hover,
input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--bb-accent);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Print */

@media print {
    .bb26-mobile-bar,
    #bb26-toc-root,
    #bb26-cookie-banner,
    .hero,
    .pre-footer-search,
    .site-footer,
    .breadcrumb-nav-bar,
    .bb26-related,
    nav {
        display: none !important;
    }
    body {
        padding-bottom: 0 !important;
        background: #fff !important;
    }
    .bb26-page,
    .bb26-post {
        box-shadow: none !important;
        padding: 0 !important;
    }
}

/* === Contact page — adaptive layout === */
.contact-grid {
    gap: 24px !important;
}
@media (max-width: 768px) {
    .contact-grid {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    .contact-info,
    .contact-form-container {
        margin-bottom: 24px;
    }
    .contact-form {
        width: 100%;
    }
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        width: 100% !important;
        box-sizing: border-box;
        padding: 12px;
        font-size: 15px;
        border: 1.5px solid var(--bb-border);
        border-radius: 8px;
    }
    .contact-form button[type="submit"],
    .contact-form input[type="submit"] {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        font-weight: 700;
        background: var(--bb-accent);
        color: var(--bb-text);
        border: 0;
        border-radius: 999px;
        cursor: pointer;
        margin-top: 8px;
    }
}
