/*
 * freebet.ru — единый стиль: токены, шрифт, типографика, каркас, базовые компоненты.
 * Подключается после bootstrap.purged.css и style.css (header.php) и переопределяет старые классы css_*.
 * Цвета разделов меню — fb_menu_model() в functions.php; меню — .fbm, листинг новостей — .fbn (style.css).
 */

/* ---------- Шрифт: Inter, вариативный 400–700, свой хостинг ---------- */
@font-face {
    font-family: 'Inter';
    src: url('../font/Inter-cyrillic.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */
:root {
    --fb-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --fb-bg: #E9EEF3;
    --fb-surface: #FFFFFF;
    --fb-surface-2: #F4F6F9;
    --fb-surface-hover: #EEF2F6;
    --fb-border: #E3E8EF;

    --fb-text: #0F172A;
    --fb-text-2: #334155;
    --fb-muted: #64748B;

    --fb-brand: #243B6F;
    --fb-brand-hover: #1A2C55;
    --fb-link: #1D4ED8;
    --fb-cta: #16A34A;
    --fb-cta-hover: #15803D;

    --fb-r-lg: 16px;
    --fb-r-md: 12px;
    --fb-r-sm: 8px;

    --fb-gap: 24px;
    --fb-pad: 20px;

    --bs-body-font-family: var(--fb-font);
    --bs-body-color: #0F172A;
    --bs-body-bg: #E9EEF3;
    --bs-border-radius: 12px;
}

/* ---------- База ---------- */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--fb-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--fb-text);
    background: var(--fb-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1200px) {
    body {
        font-family: var(--fb-font);
        font-size: 15px;
    }
}

a {
    color: var(--fb-link);
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}

::selection {
    background: #CFE0FF;
}

/* ---------- Типографика ---------- */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    color: var(--fb-text);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1,
h1.h4,
h1.h5 {
    font-size: clamp(22px, 1.1rem + 0.9vw, 28px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.h4,
h2.h4 {
    font-size: 20px;
}

.h5,
h2.h5,
h3.h5 {
    font-size: 17px;
}

.small,
small {
    font-size: 13px;
}

.text-muted {
    color: var(--fb-muted) !important;
}

/* описание рубрики / страницы */
.css_text_small {
    font-size: 14px;
    line-height: 1.6;
    color: var(--fb-text-2);
}

/* текст статьи и описаний */
.css_fs {
    line-height: 1.65;
    color: var(--fb-text-2);
}

.css_fs h1,
.css_fs h2,
.css_fs h3,
.css_fs h4,
.css_fs h5,
.css_fs h6 {
    color: var(--fb-text);
    font-weight: 700;
    margin: 1.4em 0 .5em;
}

.css_fs h2 {
    font-size: 20px;
}

.css_fs h3 {
    font-size: 17px;
}

.css_fs h4,
.css_fs h5,
.css_fs h6 {
    font-size: 15px;
}

.css_fs > :first-child {
    margin-top: 0;
}

.css_fs p {
    margin: 0 0 .9em;
}

.css_fs a:not(.btn):not([class*="css_bg"]) {
    color: var(--fb-link);
    text-decoration: underline;
    text-decoration-color: rgba(29, 78, 216, .35);
    text-underline-offset: 2px;
}

.css_fs a:not(.btn):not([class*="css_bg"]):hover {
    text-decoration-color: currentColor;
}

.css_fs ul,
.css_fs ol {
    padding-left: 1.3em;
    margin: 0 0 1em;
}

.css_fs li {
    margin: .3em 0;
}

.css_fs li::marker {
    color: var(--fb-muted);
}

.css_fs blockquote {
    margin: 1em 0;
    padding: 12px 16px;
    border-left: 3px solid var(--fb-brand);
    background: var(--fb-surface-2);
    border-radius: 0 var(--fb-r-md) var(--fb-r-md) 0;
}

.css_fs table {
    width: 100%;
    font-size: 14px;
}

.css_fs .table > :not(caption) > * > * {
    padding: 8px 10px;
}

.css_fs img {
    border-radius: var(--fb-r-md);
}

/* ---------- Старые классы оформления → токены ---------- */
.css_bg_1 {
    background: var(--fb-bg);
}

.css_bg_2 {
    background: var(--fb-surface-2);
}

.css_border_radius {
    border-radius: var(--fb-r-lg);
}

/* тёмные кнопки («Показать ещё» и т.п.) → фирменный тёмно-синий */
.css_bg_3,
.btn.css_bg_3 {
    background: var(--fb-brand);
    color: #fff;
    border: 0;
}

.css_bg_3:hover,
.btn.css_bg_3:hover {
    background: var(--fb-brand-hover);
    color: #fff;
}

/* синие CTA → единый зелёный CTA (деньги, действие) */
.css_bg_4 {
    background: var(--fb-cta);
}

.css_bg_4:hover,
.css_prognozy:hover .css_bg_4 {
    background: var(--fb-cta-hover);
    color: #fff !important;
}

/* ---------- Кнопки ---------- */
.btn {
    border-radius: var(--fb-r-md);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0;
    transition: background-color .15s, color .15s, box-shadow .15s, transform .1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 2px solid var(--fb-link);
    outline-offset: 2px;
    box-shadow: none;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    gap: 4px 0 !important;
    font-size: 13px;
    line-height: 1.4;
}

.breadcrumbs > li {
    display: flex;
    align-items: center;
}

.breadcrumbs > li + li::before {
    content: "";
    width: 5px;
    height: 5px;
    margin: 0 10px 0 8px;
    border-right: 1.5px solid #A3AFBF;
    border-bottom: 1.5px solid #A3AFBF;
    transform: rotate(-45deg);
}

.breadcrumbs li.breadcrumbs__item:first-child {
    background: none;
    padding-left: 0;
}

.breadcrumbs__link {
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--fb-muted);
    text-decoration: none;
}

.breadcrumbs__link:hover {
    color: var(--fb-text);
    box-shadow: none;
}

.breadcrumbs__current span {
    padding: 0;
    background: none;
    color: var(--fb-text);
}

/* ---------- Каркас ---------- */
.container.css_bg_1 {
    max-width: 1440px;
    padding-left: 0;
    padding-right: 0;
}

/* мобильные и планшеты: одна колонка с ровными полями */
@media (max-width: 1199.98px) {
    .container.css_bg_1 > .row {
        gap: 20px !important;
        padding: 12px 12px 96px !important;
        margin: 0;
    }

    .container.css_bg_1 > .row > :not(footer) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* планшет: контент + правая колонка */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container.css_bg_1 > .row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: start;
    }

    .container.css_bg_1 > .row > * {
        width: auto;
        max-width: none;
        margin: 0 !important;
    }

    .container.css_bg_1 > .row > header,
    .container.css_bg_1 > .row > footer {
        grid-column: 1 / -1;
    }

    .container.css_bg_1 > .row:not(:has(> .col-xl-3)) {
        grid-template-columns: minmax(0, 1fr);
    }

    .container.css_bg_1 > .row > .col-xl-3 {
        padding-top: 0 !important;
    }
}

/* десктоп: меню | контент | правая колонка */
@media (min-width: 1200px) {
    .container.css_bg_1 > .row {
        display: grid;
        grid-template-columns: 236px minmax(0, 1fr) 300px;
        gap: var(--fb-gap) !important;
        padding: var(--fb-gap) !important;
        margin: 0;
        align-items: start;
    }

    .container.css_bg_1 > .row:not(:has(> .col-xl-3)) {
        grid-template-columns: 236px minmax(0, 1fr);
    }

    .container.css_bg_1 > .row > * {
        width: auto;
        max-width: none;
        flex: none;
        margin: 0 !important;
    }

    .container.css_bg_1 > .row > :not(footer) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .container.css_bg_1 > .row > footer {
        grid-column: 1 / -1;
    }

    /* меню прилипает и прокручивается само, если не влезает по высоте */
    .container.css_bg_1 > .row > header {
        position: sticky;
        top: calc(16px + var(--wp-admin--admin-bar--height, 0px));
        max-height: calc(100vh - 32px - var(--wp-admin--admin-bar--height, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        align-self: start;
    }

    .container.css_bg_1 > .row > .col-xl-3 {
        padding-top: 0 !important;
    }
}

/* ---------- Подвал ---------- */
.container.css_bg_1 footer.css_bg_2 {
    background: var(--fb-surface);
    color: var(--fb-text-2);
    font-size: 14px;
}

footer a {
    color: var(--fb-text-2);
}

footer a:hover {
    color: var(--fb-text);
}

/* листинг новостей: длинная плашка рубрики не должна распирать строку */
.fbn__body {
    grid-template-columns: minmax(0, 1fr);
}

/* ---------- Заголовок блока (fb_block_head() в functions.php) ---------- */
.fb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin: 0 0 12px;
    padding: 0;
}

.row > .fb-head,
.d-grid > .fb-head {
    margin-bottom: 0;
}

.fb-head__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--fb-text);
}

.fb-head__more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 12px;
    border-radius: var(--fb-r-sm);
    color: var(--fb-link);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.fb-head__more::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
}

.fb-head__more:hover {
    background: var(--fb-surface);
    color: var(--fb-brand);
}

@media (max-width: 575.98px) {
    .fb-head__title {
        font-size: 18px;
    }
}

/* ---------- Правая колонка: карточки без серой подложки ---------- */
.col-xl-3 > .row > .css_bg_2.css_border_radius {
    background: transparent;
    padding: 0 !important;
}

.col-xl-3 > .row > .css_bg_2.css_border_radius > ul {
    gap: 12px !important;
}

.col-xl-3 > .row > .css_bg_2.css_border_radius > ul > li {
    padding: 0 !important;
}

/* карточка прогноза (standart_item_matchi_dnya.php) */
.css_prognozy > .card {
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-r-lg) !important;
    background: var(--fb-surface);
    overflow: hidden;
}

.css_prognozy > .card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, .08);
}

.css_prognozy .card-body {
    padding: 14px 16px;
    gap: 6px !important;
}

.css_prognozy .card-body .fw-bold {
    font-size: 14px;
    font-weight: 600 !important;
    line-height: 1.4;
    color: var(--fb-text);
}

.css_prognozy .card-body .text-uppercase.text-muted {
    text-transform: none !important;
    font-size: 12px;
}

.css_prognozy .card-footer {
    background: var(--fb-surface-2);
    border-top: 1px solid var(--fb-border);
}

.css_prognozy > .card > a.css_bg_4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 !important;
}

.css_prognozy > .card > a.css_bg_4 svg {
    width: 18px;
    height: 18px;
}

/* ---------- Строки офферов/рейтинга (главная, архивы фрибетов, бонусов, промокодов) ---------- */
.row.gap-4 > .css_bg_2.p-3.css_border_radius:has(> ul > li.row.col-12.mx-auto.css_border_radius) {
    background: transparent;
    padding: 0 !important;
}

ul.d-grid > li.row.col-12.mx-auto.css_border_radius {
    min-height: 56px;
    align-items: center;
    border-radius: var(--fb-r-md) !important;
    overflow: hidden;
}

ul.d-grid > li.row.col-12.mx-auto.css_border_radius > a.css_w_88 {
    width: 132px !important;
    flex: 0 0 132px;
    padding-right: 16px;
}

ul.d-grid > li.row.col-12.mx-auto.css_border_radius img.css_w_88 {
    width: auto !important;
    max-width: 104px;
    max-height: 26px;
}

ul.d-grid > li.row.col-12.mx-auto.css_border_radius .css_title_overflow_1 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

ul.d-grid > li.row.col-12.mx-auto.css_border_radius > a.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 9px 9px 9px auto;
    padding: 6px 14px;
    line-height: 1.2;
    font-size: 13px;
    background: var(--fb-cta) !important;
    border-radius: var(--fb-r-sm) !important;
}

ul.d-grid > li.row.col-12.mx-auto.css_border_radius > a.btn:hover {
    background: var(--fb-cta-hover) !important;
}

/* ---------- Чипы-фильтры (бренды, метки, вкладки разделов бренда) ---------- */
.no_active_single {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    font-weight: 600;
    font-size: 13px;
}

.no_active_single:hover {
    border-color: #C9D2DE;
    box-shadow: none;
}

.no_active_single a {
    color: var(--fb-text);
}

.active_single {
    background: var(--fb-brand);
    border: 1px solid var(--fb-brand);
}

.active_single a,
.active_single span {
    color: #fff;
}

/* ---------- Перенесено из шаблонов (index.php, footer.php) ---------- */
/* рейтинг на главной: до «Показать ещё» видно 7 строк */
.bookmakers-list.is-collapsed ul > li:nth-child(n+8) {
    display: none;
}

/* рекламный баннер в правой колонке */
#adfox_178170783136777686 img {
    height: 600px !important;
    object-fit: contain;
}
