:root,
[data-scheme=light],
[data-bs-theme=light] {

    /* Базовые цвета */
    --bs-blue: #0d6efd;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #F5821F;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #00A0A7;
    --bs-cyan: #0dcaf0;
    --bs-black: #000;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #1E2A36;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #1E2A36;
    --bs-gray-900: #12181F;

    /* Семантические */
    --bs-primary: #00A0A7;
    --bs-secondary: #1E2A36;
    --bs-success: #198754;
    --bs-info: #00A0A7;
    --bs-warning: #F5821F;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #12181F;

    /* RGB */
    --bs-primary-rgb: 0, 160, 167;
    --bs-secondary-rgb: 30, 42, 54;
    --bs-success-rgb: 25, 135, 84;
    --bs-info-rgb: 0, 160, 167;
    --bs-warning-rgb: 245, 130, 31;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark-rgb: 18, 24, 31;

    /* Emphasis текста */
    --bs-primary-text-emphasis: #004F53;
    --bs-secondary-text-emphasis: #0D151C;
    --bs-success-text-emphasis: #0a3622;
    --bs-info-text-emphasis: #004F53;
    --bs-warning-text-emphasis: #7A3C04;
    --bs-danger-text-emphasis: #58151c;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #1E2A36;

    /* Фоны subtle */
    --bs-primary-bg-subtle: #CCECEE;
    --bs-secondary-bg-subtle: #D2D7DD;
    --bs-success-bg-subtle: #d1e7dd;
    --bs-info-bg-subtle: #CCECEE;
    --bs-warning-bg-subtle: #FDE6D2;
    --bs-danger-bg-subtle: #f8d7da;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #ced4da;

    /* Границы subtle */
    --bs-primary-border-subtle: #99D9DD;
    --bs-secondary-border-subtle: #A5AFBA;
    --bs-success-border-subtle: #a3cfbb;
    --bs-info-border-subtle: #99D9DD;
    --bs-warning-border-subtle: #FBCD9F;
    --bs-danger-border-subtle: #f1aeb5;
    --bs-light-border-subtle: #e9ecef;
    --bs-dark-border-subtle: #adb5bd;

    /* Шрифты (КРИТИЧНО!) */
    --bs-body-font-size: 16px;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-font-sans-serif: 'Avenir Next Cyr', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-body-font-family: 'Avenir Next Cyr', var(--bs-font-sans-serif);

    /* Тело */
    --bs-body-color: #12181F;
    --bs-body-color-rgb: 18, 24, 31;
    --bs-body-bg: #F4F9FA;
    --bs-body-bg-rgb: 244, 249, 250;


    /* Emphasis */
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(18, 24, 31, 0.75);
    --bs-secondary-color-rgb: 18, 24, 31;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-box: #fff;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(18, 24, 31, 0.5);
    --bs-tertiary-color-rgb: 18, 24, 31;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;

    /* Заголовки */
    --bs-heading-color: #0D151C;

    /* Ссылки */
    --bs-link-color: #00A0A7;
    --bs-link-color-rgb: 0, 160, 167;
    --bs-link-decoration: underline;
    --bs-link-hover-color: #00787D;
    --bs-link-hover-color-rgb: 0, 120, 125;

    /* Код и подсветка */
    --bs-code-color: #d63384;
    --bs-highlight-color: #12181F;
    --bs-highlight-bg: #FDE6D2;

    /* Границы */
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
    --bs-border-radius: 10px;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.5rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-xxl: 2rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;

    /* Тени */
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);

    /* Фокус */
    --bs-focus-ring-width: 0.25rem;
    --bs-focus-ring-opacity: 0.25;
    --bs-focus-ring-color: rgba(0, 160, 167, 0.25);

    /* Формы */
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545;

    /* Кастомные */
    --cs-color-box-shadow-rgb: 0, 160, 167;
    --cs-layout-background: var(--bs-white, #fff);
    --cs-thumbnail-border-radius: 20px;
}


/* ---------- ТЁМНАЯ ТЕМА ---------- */
[data-scheme=dark],
[data-bs-theme=dark] {

    color-scheme: dark;

    --bs-body-color: #dee2e6;
    --bs-body-color-rgb: 222, 226, 230;
    --bs-body-bg: #12181F;
    --bs-body-bg-rgb: 18, 24, 31;

    --bs-emphasis-color: #fff;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-secondary-color: rgba(222, 226, 230, 0.75);
    --bs-secondary-color-rgb: 222, 226, 230;
    --bs-secondary-bg: #1E2A36;
    --bs-secondary-bg-rgb: 30, 42, 54;
    --bs-secondary-bg-box: #1E2A36;
    --bs-tertiary-color: rgba(222, 226, 230, 0.5);
    --bs-tertiary-color-rgb: 222, 226, 230;
    --bs-tertiary-bg: #1a1f26;
    --bs-tertiary-bg-rgb: 26, 31, 38;

    --bs-primary-text-emphasis: #66D1D6;
    --bs-secondary-text-emphasis: #8A95A3;
    --bs-success-text-emphasis: #75b798;
    --bs-info-text-emphasis: #66D1D6;
    --bs-warning-text-emphasis: #FFB366;
    --bs-danger-text-emphasis: #ea868f;
    --bs-light-text-emphasis: #f8f9fa;
    --bs-dark-text-emphasis: #dee2e6;

    --bs-primary-bg-subtle: #002D30;
    --bs-secondary-bg-subtle: #0D1117;
    --bs-success-bg-subtle: #051b11;
    --bs-info-bg-subtle: #002D30;
    --bs-warning-bg-subtle: #3D1F04;
    --bs-danger-bg-subtle: #2c0b0e;
    --bs-light-bg-subtle: #1E2A36;
    --bs-dark-bg-subtle: #0D1117;

    --bs-primary-border-subtle: #005F63;
    --bs-secondary-border-subtle: #3D4854;
    --bs-success-border-subtle: #0f5132;
    --bs-info-border-subtle: #005F63;
    --bs-warning-border-subtle: #7A3C04;
    --bs-danger-border-subtle: #842029;
    --bs-light-border-subtle: #2D3844;
    --bs-dark-border-subtle: #1E2A36;

    --bs-heading-color: #ffffff;

    --bs-link-color: #00A0A7;
    --bs-link-color-rgb: 0, 160, 167;
    --bs-link-hover-color: #00C4CC;
    --bs-link-hover-color-rgb: 0, 196, 204;

    --bs-code-color: #e685b5;
    --bs-highlight-color: #dee2e6;
    --bs-highlight-bg: #3D1F04;

    --bs-border-color: #2D3844;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.1);

    --bs-form-valid-color: #75b798;
    --bs-form-valid-border-color: #75b798;
    --bs-form-invalid-color: #ea868f;
    --bs-form-invalid-border-color: #ea868f;

    --cs-layout-background: #12181F;
}


/* ---------- БАЗОВЫЙ СБРОС ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: "Avenir Next Cyr" !important;
    font-size: var(--bs-body-font-size);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    color: var(--bs-body-color);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, #F4F9FA 0%, #FFFFFF 100%);
    background-attachment: fixed;
}

[data-scheme=dark] body,
[data-bs-theme=dark] body {
    background: #12181F;
    background-attachment: fixed;
}

.nl-header {
    padding: 0.75rem 0;
}

.nl-header[data-scheme="light"] { background: linear-gradient(135deg, #F4F9FA 0%, #FFFFFF 100%); color: #000; }

.nl-header__inner { display: flex; align-items: center; width: 100%; }

.nl-logo svg { height: 32px; width: auto; display: block; }
.nl-logo .nl-logo-dark { display: none; }

.nl-header[data-scheme="dark"] { background: #12181F; color: #fff; }

[data-scheme="dark"] .nl-logo .nl-logo-default { display: none; }
[data-scheme="light"] .nl-logo .nl-logo-default { color: #000; }
[data-scheme="dark"] .nl-logo .nl-logo-dark { display: block; color: #fff; }

.nl-header__nav-inner {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.75rem;
}

.nl-header__nav-inner a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nl-header__nav-inner a:hover { color: var(--bs-primary); }

.nl-header .dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
}

.nl-header .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.nl-header .dropdown-item:hover { background: #F4F7F9; color: var(--bs-primary); }

.dropdown-submenu { position: relative; }

.dropdown-submenu .dropdown-menu {
    top: -0.5rem;
    left: 100%;
    margin-left: 0.25rem;
}

.dropdown-toggle::after { margin-left: 0.4em; vertical-align: middle; }

/* Переключатель темы */
.nl-header__scheme-toggle {
    display: inline-flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 40px;
    padding: 4px;
    cursor: pointer;
    border: 1px solid #e2e6ea;
}

.nl-header__scheme-cs-icon-box {
    padding: 6px 10px;
    border-radius: 40px;
    font-size: 1rem;
    line-height: 1;
    color: #000;
}

.nl-header__scheme-cs-icon-box.active-scheme {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    color: var(--bs-primary);
}

.nl-header__search-toggle,
.nl-header__offcanvas-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    position: relative;
    height: 100%;
    border-radius: 50%;
    cursor: pointer;
}

.nl-header__search-toggle .bi-search {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 24px;
    height: 24px;
}

@media (min-width: 992px) {
    .nl-header__search-toggle { justify-content: center; }
}

[data-scheme="dark"] .nl-header__search-toggle { color: #fff; }

[data-scheme=dark] .nl-header__scheme-toggle,
[data-bs-theme=dark] .nl-header__scheme-toggle {
    background: #1E2A36;
    border-color: #2D3844;
}

[data-scheme=dark] .nl-header__scheme-cs-icon-box,
[data-bs-theme=dark] .nl-header__scheme-cs-icon-box {
    color: #dee2e6;
}

[data-scheme=dark] .nl-header__scheme-cs-icon-box.active-scheme,
[data-bs-theme=dark] .nl-header__scheme-cs-icon-box.active-scheme {
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 160, 167, 0.3);
}


/* ============================================================
   КНОПКА «НОВЫЕ ЛЮДИ»
   ============================================================ */

.nl-button {
    background: var(--bs-primary);
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.nl-button:hover {
    background: #F5821F;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(245, 130, 31, 0.4);
}

.nl-button:active { background: #d96e14; }

/* Варианты */
.nl-button-outline {
    background: transparent;
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
}

.nl-button-outline:hover {
    background: var(--bs-primary);
    color: #ffffff;
    border-color: var(--bs-primary);
    box-shadow: 0 4px 14px rgba(0, 160, 167, 0.3);
}

.nl-button-orange { background: #F5821F; }

.nl-button-orange:hover {
    background: #e07014;
    box-shadow: 0 4px 14px rgba(245, 130, 31, 0.5);
}

[data-scheme=dark] .nl-button { background: var(--bs-primary); }
[data-scheme=dark] .nl-button:hover { background: #F5821F; }


/* ============================================================
   МОБИЛЬНОЕ МЕНЮ
   ============================================================ */

.nl-offcanvas-full {
    width: 100vw !important;
    max-width: 100vw;
    height: 100vh;
    border-right: none;
}

.nl-offcanvas-full .offcanvas-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nl-offcanvas-full .offcanvas-body { padding: 1.5rem; }

.nl-mobile-nav { list-style: none; padding: 0; margin: 0; }
.nl-mobile-nav li { margin-bottom: 0.75rem; }

.nl-mobile-nav > li > a {
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #12181F;
    display: block;
    padding: 0.5rem 0;
}

.nl-mobile-nav .sub-menu {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    display: none;
}

.nl-mobile-nav .sub-menu.open { display: block; }

.nl-mobile-nav .sub-menu a {
    font-size: 1rem;
    font-weight: 500;
    color: #1E2A36;
    text-decoration: none;
    display: block;
    padding: 0.4rem 0;
}

.nl-mobile-nav .has-submenu > a::after {
    content: '+';
    float: right;
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 300;
}

.nl-mobile-nav .has-submenu.open > a::after { content: '−'; }

.nl-search-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.97);
    z-index: 1080;
    display: none;
    padding: 2rem;
    overflow-y: auto;
}


/* ============================================================
   КАРТОЧКИ И ЗАПИСИ
   ============================================================ */
.card {
    border-radius: 20px;
    background-color: #fff;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, .05);
    border: 1px solid rgba(0, 160, 167, 0.15);
}
.card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    position: relative;
    padding: 30px;
    max-width: 100%;
    z-index: 1;
    align-items: flex-start;
}

.widget .card .card-body {
    padding: 20px;
    justify-content: center;
}

.widget .nl-overlay-post-meta {
    position: absolute;
    top: -15px;
    right: 20px;
}

.widget .badge {
    border-radius: 6px;
}

.card-image {
    z-index: 2;
}

.nl-entry__thumbnail img,
.card-image img {
    border-radius: 20px;
}

.nl-entry__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.single .nl-entry__title {
    -webkit-line-clamp: 10;
}

.nl-entry__title a {
    color: var(--bs-heading-color);
    text-decoration: none;
}

.nl-entry__title a:hover {
    color: var(--bs-link-hover-color);
}

/* Список записей */
.nl-entry.nl-entry__list {
    border-bottom: 1px solid rgba(0, 160, 167, 0.15);
}

.nl-entry.nl-entry__list:last-child {
    border: none;
}

.nl-meta-reading-time {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, .05);
    font-weight: 500;
}

.nl-meta-category span {
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 160, 167, 0.08);
    color: var(--bs-primary);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, .05);
    font-weight: 500;
    height: 32px;
    display: flex;
    align-items: center;
}

.nl-meta-category ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem !important;
    flex-wrap: wrap;
}

.nl-rubric-btn {
    border: none;
    border-radius: 8px;
    background: var(--bs-secondary-bg-box);
    color: var(--bs-body-color);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, .05);
    font-weight: 500;
}

.nl-rubric-btn:hover {
    background-color: rgba(0, 160, 167, 0.15) !important;
    color: var(--bs-primary);
}

.nl-rubric-btn.active {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}


/* ============================================================
   БРЕНДОВЫЕ УТИЛИТАРНЫЕ КЛАССЫ
   ============================================================ */

.bg-nl-teal {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.bg-nl-orange {
    background-color: #F5821F !important;
    color: #fff !important;
}

/* В списке — полупрозрачный */
.nl-entry__list .bg-nl-orange, .hero-podcasts-section .nl-meta-category .bg-nl-orange {
    background-color: rgba(245, 130, 31, 0.08) !important;
    color: #F5821F !important;
}

.text-nl-teal  { color: var(--bs-primary) !important; }
.text-nl-orange { color: #F5821F !important; }
.text-nl-dark   { color: #12181F !important; }


/* ============================================================
   ТЁМНАЯ ТЕМА (переопределения)
   ============================================================ */

[data-scheme="dark"] .nl-header__nav-inner a:hover { color: var(--bs-primary); }

[data-scheme="dark"] .nl-meta-category span {
    background: rgba(0, 160, 167, 0.15);
    color: var(--bs-primary);
}

[data-scheme="dark"] .nl-entry.nl-entry__list {
    border-bottom-color: rgba(0, 160, 167, 0.2);
}

[data-scheme="dark"] .card .card-body {
    background-color: #1E2A36;
    border-color: rgba(0, 160, 167, 0.12);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}


/* ============================================================
   СКРОЛЛБАР
   ============================================================ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F4F9FA; }
::-webkit-scrollbar-thumb { background: var(--bs-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #00787D; }

[data-scheme=dark]::-webkit-scrollbar-track,
[data-bs-theme=dark]::-webkit-scrollbar-track { background: #12181F; }

[data-scheme=dark]::-webkit-scrollbar-thumb,
[data-bs-theme=dark]::-webkit-scrollbar-thumb { background: #1E2A36; }

[data-scheme=dark]::-webkit-scrollbar-thumb:hover,
[data-bs-theme=dark]::-webkit-scrollbar-thumb:hover { background: #2D3844; }


/* ============================================================
   ВЫДЕЛЕНИЕ И ФОКУС
   ============================================================ */

:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

::selection {
    background: rgba(0, 160, 167, 0.2);
    color: #12181F;
}

[data-scheme=dark] ::selection,
[data-bs-theme=dark] ::selection {
    background: rgba(0, 160, 167, 0.3);
    color: #ffffff;
}

.nl-entry__thumbnail {
    z-index: 2;
}

.nl-entry__thumbnail .nl-overlay-link {
    z-index: 3;
}

nav.breadcrumbs {
    font-size: 14px;
}
nav.breadcrumbs a {
    text-decoration: none;
}

.nl-share__link.nl-share__copy-link {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, .05);
    background: rgba(0, 160, 167, 0.08);
}
.video-oembed-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-oembed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.nl-overlay-post-meta {
    max-height: 32px;
}

@media (max-width: 991px) {
    .nl-entry__title {
        -webkit-line-clamp: inherit;
    }
    .col-lg-5 .nl-entry__title {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .nl-meta-category ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nl-meta-category ul::-webkit-scrollbar {
        display: none;
    }

    .nl-meta-category ul li {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .nl-categories-list__wrapper {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nl-categories-list__wrapper::-webkit-scrollbar {
        display: none;
    }

    .nl-categories-list__wrapper .btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

.nl-footer {
    background: linear-gradient(135deg, #F4F9FA 0%, #FFFFFF 100%);
}