/*
 * Core block fallback layer.
 *
 * Some production stacks remove WordPress global styles and block-library CSS.
 * Keep the core blocks used by this theme visually stable without depending on
 * those optional frontend assets.
 */

.header__brand .brand__img,
.site-footer .brand__img {
    width: 100%;
    min-width: 8em;
    max-width: 8em;
}

.wp-block-navigation__container {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    gap: 20px;
}

.wp-block-navigation__container > .wp-block-navigation-item {
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-navigation__container > .wp-block-navigation-item::before {
    display: none;
}

h3.wp-block-heading {
    font-family: var(--new-theme-font-heading);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.has-aposta-green-color {
    color: var(--new-theme-color-green) !important;
}

.has-rating-yellow-color {
    color: var(--new-theme-color-peach, #d8a94b) !important;
}

.has-bonus-orange-color {
    color: var(--new-theme-color-orange) !important;
}

.has-ink-color {
    color: var(--new-theme-color-ink) !important;
}

.has-soft-gray-color {
    color: var(--new-theme-color-soft-gray) !important;
}

.has-white-color {
    color: var(--new-theme-color-white) !important;
}

.has-aposta-green-background-color {
    background-color: var(--new-theme-color-green) !important;
}

.has-rating-yellow-background-color {
    background-color: var(--new-theme-color-peach, #d8a94b) !important;
}

.has-bonus-orange-background-color {
    background-color: var(--new-theme-color-orange) !important;
}

.has-ink-background-color {
    background-color: var(--new-theme-color-ink-surface, #0d0a06) !important;
}

.has-soft-gray-background-color {
    background-color: var(--new-theme-color-soft-gray) !important;
}

.has-white-background-color {
    background-color: var(--new-theme-color-white) !important;
}

/* New palette additions for sky-blue redesign */
.has-bg-base-color { color: var(--new-theme-color-bg-base, #141009) !important; }
.has-bg-base-background-color { background-color: var(--new-theme-color-bg-base, #141009) !important; }
.has-text-muted-color { color: var(--new-theme-color-text-muted, #c9b78d) !important; }
.has-text-muted-background-color { background-color: var(--new-theme-color-text-muted, #c9b78d) !important; }
.has-text-soft-color { color: var(--new-theme-color-text-soft, #9c8a63) !important; }
.has-sky-light-color { color: var(--new-theme-color-sky-light, #e2b552) !important; }
.has-sky-light-background-color { background-color: var(--new-theme-color-sky-light, #e2b552) !important; }
.has-peach-text-color { color: var(--new-theme-color-peach-text, #241706) !important; }
.has-bg-deep-color { color: var(--new-theme-color-bg-deep, #0d0a06) !important; }
.has-bg-deep-background-color { background-color: var(--new-theme-color-bg-deep, #0d0a06) !important; }

.has-small-font-size {
    font-size: 13px !important;
}

.has-body-font-size {
    font-size: 16px !important;
}

.has-lead-font-size {
    font-size: 20px !important;
}

.has-heading-3-font-size {
    font-size: 17px !important;
}

.has-heading-2-font-size {
    font-size: 24px !important;
}

.has-heading-1-font-size {
    font-size: 40px !important;
}

.wp-block-columns {
    align-items: normal;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    gap: 32px;
}

.wp-block-column {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.is-layout-flex {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.is-layout-grid {
    display: grid;
    gap: 16px;
}

.wp-block-columns > .wp-block-column > .wp-block-group {
    padding: 15px !important;
}

.wp-block-group {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

@media only screen and (max-width: 768px) {
    .wp-block-group.container {
        margin-top: 50px;
    }
}

.wp-block-buttons > .wp-block-button > .wp-block-button__link {
    width: 100%;
    text-align: center;
}

.wp-block-buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wp-block-button {
    display: inline-block;
}

.wp-block-button__link {
    align-items: center;
    background: var(--new-theme-color-peach, #d8a94b);
    border: 0;
    border-radius: 9999px;
    color: var(--new-theme-color-peach-text, #241706);
    display: inline-flex;
    font-family: var(--new-theme-font-heading);
    font-weight: 700;
    justify-content: center;
    min-height: 44px;
    padding: 12px 28px;
    text-decoration: none;
    transition: background .2s;
}

.wp-block-button__link:hover {
    background: var(--new-theme-color-peach-hover, #e8bd68);
    color: var(--new-theme-color-peach-text, #241706);
}

.wp-block-group > .wp-block-image {
    background: #d8a94b;
    padding: 10px;
    border-radius: 99px;
    display: flex;
    justify-content: center;
}

.wp-block-image,
.wp-block-table,
.wp-block-quote,
.wp-block-code,
.wp-block-preformatted {
    box-sizing: border-box;
}

.wp-block-image {
    margin: 0;
}

.wp-block-columns > .wp-block-column > .wp-block-group .wp-block-image img {
    height: 60px !important;
    object-fit: contain;
}

.wp-block-image img {
    height: auto;
    max-width: 100%;
    border-radius: 24px;
}

.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.wp-block-gallery > .wp-block-image {
    flex: 1 1 calc(33.333% - 11px);
    margin: 0;
    min-width: 220px;
}

.wp-block-gallery > .wp-block-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.wp-block-cover {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 430px;
    overflow: hidden;
    position: relative;
}

.wp-block-cover__background,
.wp-block-cover__image-background {
    inset: 0;
    position: absolute;
}

.wp-block-cover__image-background {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.wp-block-cover__inner-container {
    color: var(--new-theme-color-white);
    position: relative;
    width: 100%;
    z-index: 1;
}

.wp-block-media-text {
    align-items: center;
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr 1fr;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
    grid-column: 2;
    grid-row: 1;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
    grid-column: 1;
    grid-row: 1;
}

.wp-block-media-text__media img {
    height: auto;
    width: 100%;
}

.wp-block-image figcaption,
.wp-block-table figcaption {
    color: #9c8a63;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 8px;
}

.wp-block-table {
    overflow-x: auto;
}

.wp-block-table table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 24px;
    overflow: hidden;
    min-width: 640px;
    width: 100%;
}

.wp-block-table th,
.wp-block-table td {
    border: 1px solid var(--new-theme-color-border, rgba(200, 165, 90, 0.30));
    padding: 14px 16px;
    vertical-align: top;
}

.wp-block-table th {
    background: var(--new-theme-color-bg-deep, #0d0a06);
    color: var(--new-theme-color-ink, #f2e6c9);
    font-family: var(--new-theme-font-heading);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.wp-block-table:not(.is-style-stripes) tbody tr:nth-child(even) td {
    background: var(--new-theme-color-bg-elevated, #2a2015);
}

.wp-block-details {
    border-bottom: 1px solid #8a7a56;
    padding: 16px 0;
}

.wp-block-details summary {
    cursor: pointer;
    font-family: var(--new-theme-font-heading);
    font-size: 18px;
    font-weight: 700;
}

.wp-block-details[open] summary {
    color: var(--new-theme-color-sky, #c8962f);
    margin-bottom: 12px;
}

.wp-block-quote {
    border-left: 4px solid var(--new-theme-color-sky, #c8962f);
    margin-block: 32px;
    padding: 8px 0 8px 24px;
}

.wp-block-quote p {
    font-size: 20px;
    font-style: italic;
}

.wp-block-separator {
    border: 0;
    border-top: 1px solid rgba(200, 165, 90, 0.25);
    margin-block: 32px;
}

/* Core content can be inserted directly into page-main or a template root. */
:where(.page__main, .wp-block-post-content, .wp-site-blocks)
    > :where(
        .wp-block-heading,
        p,
        ul,
        ol,
        .wp-block-list,
        .wp-block-image,
        .wp-block-gallery,
        .wp-block-table,
        .wp-block-quote,
        .wp-block-details,
        .wp-block-buttons,
        .wp-block-columns,
        .wp-block-group,
        .wp-block-cover,
        .wp-block-media-text,
        .wp-block-code,
        .wp-block-preformatted,
        .wp-block-separator
    ):not(.alignfull) {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--new-theme-content-width);
    width: 100%;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > .wp-block-heading {
    font-family: var(--new-theme-font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > h1.wp-block-heading {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.03;
    margin-bottom: 24px;
    margin-top: 64px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > h2.wp-block-heading {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    margin-bottom: 24px;
    margin-top: 64px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > h3.wp-block-heading {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 16px;
    margin-top: 40px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > p,
:where(.page__main, .wp-block-post-content, .wp-site-blocks) > :where(ul, ol, .wp-block-list) {
    font-size: 17px;
    line-height: 1.65;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > p {
    margin-bottom: 18px;
    margin-top: 0;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > :where(ul, ol, .wp-block-list) {
    margin-bottom: 24px;
    margin-top: 0;
    padding-left: 39px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > :where(ul, ol, .wp-block-list) li + li {
    margin-top: 8px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > :where(ul, ol, .wp-block-list) li::marker {
    color: var(--new-theme-color-sky, #c8962f);
    font-weight: 700;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks)
    > :where(.wp-block-table, .wp-block-image, .wp-block-gallery, .wp-block-quote, .wp-block-details, .wp-block-buttons, .wp-block-columns, .wp-block-group, .wp-block-cover, .wp-block-media-text) {
    margin-bottom: 32px;
    margin-top: 102px;
}

.nt-content-section__container {
    gap: 20px;
}

.nt-content-section__container > * {
    margin: 0;
}

.nt-content-section__container > h2,
.nt-content-section__container > h3,
.nt-content-section__container > ul {
    margin: 0 !important;
}

.nt-content-section__container > :where(.wp-block-columns, .wp-block-buttons),
.page-hero__content > :where(.wp-block-columns, .wp-block-buttons) {
    width: 100%;
}

/* Consistent editorial rhythm inside Section and Hero. */
:where(.nt-content-section__container, .page-hero__content) > :where(.wp-block-heading, p, ul, ol, .wp-block-list) {
    margin-top: 0;
}

:where(.nt-content-section__container, .page-hero__content) > h1.wp-block-heading {
    font-family: var(--new-theme-font-heading);
    font-size: clamp(36px, 5.7vw, 68px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.03;
    margin-bottom: 24px;
}

:where(.nt-content-section__container, .page-hero__content) > h2.wp-block-heading {
    font-family: var(--new-theme-font-heading);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.08;
    margin-bottom: 28px;
}

:where(.nt-content-section__container, .page-hero__content) > h3.wp-block-heading {
    font-family: var(--new-theme-font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(p, ul, ol, .wp-block-list) {
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 18px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(ul, ol, .wp-block-list) {
    padding-left: 24px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(.wp-block-heading, p, ul, ol, .wp-block-list):last-child {
    margin-bottom: 0;
}

:where(.nt-content-section__container, .page-hero__content) > :where(p, ul, ol, .wp-block-list, .wp-block-table, .wp-block-image, .wp-block-buttons, .wp-block-columns) + h2.wp-block-heading {
    margin-top: 56px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(p, ul, ol, .wp-block-list, .wp-block-table, .wp-block-image, .wp-block-buttons, .wp-block-columns) + h3.wp-block-heading {
    margin-top: 38px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(ul, ol, .wp-block-list) + p {
    margin-top: 24px;
}

:where(.nt-content-section__container, .page-hero__content) > p + :where(ul, ol, .wp-block-list) {
    margin-top: 8px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(ul, ol, .wp-block-list) li {
    padding-left: 4px;
}

:where(.nt-content-section__container, .page-hero__content) > :where(ul, ol, .wp-block-list) li + li {
    margin-top: 12px;
}

/* The same rhythm for core blocks inserted directly into Page Main. */
:where(.page__main, .wp-block-post-content, .wp-site-blocks) > .wp-block-heading + :where(p, ul, ol, .wp-block-list) {
    margin-top: 0;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > :where(ul, ol, .wp-block-list) + p {
    margin-top: 24px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > p + :where(ul, ol, .wp-block-list) {
    margin-top: 8px;
}

:where(.page__main, .wp-block-post-content, .wp-site-blocks) > :where(ul, ol, .wp-block-list) li + li {
    margin-top: 12px;
}

/* Reset legacy and WP-core overrides on standard list blocks.
   legacy-reference.css applies ul:not(9 classes...) li::before {content:'\2022'}
   with specificity (0,9,3); wp-block-list is not excluded, so !important is required. */
ul.wp-block-list {
    list-style-type: disc;
    padding: 0 0 0 20px;
}

ol.wp-block-list {
    list-style-type: decimal;
    padding: 0 0 0 50px;
}

.wp-block-list li {
    list-style-type: inherit;
}

.wp-block-list li::before {
    content: none !important;
}

/* Site header compatibility layer. */
.header {
    background: linear-gradient(180deg, var(--new-theme-color-ink-surface, #0d0a06) 0%, #0d0a06 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(13, 10, 6, 0.12);
}

.header > .container > .row {
    align-items: center;
    flex-wrap: nowrap;
    min-height: 100%;
}

.header__brand {
    align-items: center;
    flex: 0 0 auto;
}

.header__brand .brand__img,
.header__brand .brand__img--light {
    height: auto;
    max-height: 32px;
    max-width: 82px;
    min-width: 82px;
    object-fit: contain;
    width: 82px;
}

.header__nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.header__nav .navbar-toggler {
    background: transparent;
    border: 0;
    flex: 0 0 24px;
    margin: 0;
    padding: 0;
}

.header__nav #primaryNavBar {
    min-width: 0;
}

.header__nav #primaryNavBar .sidebar-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header .sidebar-nav__list,
.header .dropdown-menu,
.header .nav-menu__submenu {
    list-style: none;
}

.page__overlay {
    background: rgba(13, 10, 6, 0.76);
}

@media (max-width: 1208.98px) {
    .header {
        padding-bottom: 18px;
        padding-top: 18px;
    }

    .header.header--initial.header--with-disclaimer {
        top: 40px;
    }

    .header.header--dark .sidebar-nav.active {
        top: 68px;
    }
}

/* core/list: "Числа" block style variation */
ul.wp-block-list.is-style-numbered,
ol.wp-block-list.is-style-numbered {
    list-style-type: decimal;
}

@media (max-width: 781px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-wrap: wrap;
    }

    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: 100% !important;
    }

    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:has(> .wp-block-image) {
        order: -1;
    }

    .wp-block-media-text {
        grid-template-columns: 1fr;
    }

    .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media,
    .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
        grid-column: 1;
        grid-row: auto;
    }

    .has-heading-1-font-size {
        font-size: 40px !important;
    }

    :where(.nt-content-section__container, .page-hero__content) > h1.wp-block-heading {
        font-size: 38px;
        margin-bottom: 18px;
    }

    :where(.nt-content-section__container, .page-hero__content) > h2.wp-block-heading {
        font-size: 30px;
        margin-bottom: 20px;
    }

    :where(.nt-content-section__container, .page-hero__content) > h3.wp-block-heading {
        font-size: 22px;
        margin-bottom: 12px;
    }

    :where(.nt-content-section__container, .page-hero__content) > :where(p, ul, ol, .wp-block-list) {
        font-size: 16px;
        line-height: 1.6;
    }

    :where(.nt-content-section__container, .page-hero__content) > :where(ul, ol, .wp-block-list) li + li {
        margin-top: 10px;
    }

    :where(.page__main, .wp-block-post-content, .wp-site-blocks) > h1.wp-block-heading,
    :where(.page__main, .wp-block-post-content, .wp-site-blocks) > h2.wp-block-heading {
        margin-top: 44px;
    }
}
