/* MIC-213/214: above-the-fold homepage. Blocking on home only; full styles.css stays deferred.
   Desktop col-lg-6 + d-lg-* must live here — otherwise editor-picks stack then jump (CLS ~2).
   Sites often inject header HTML without d-lg-none on #menu-mobile — hide .offcanvas by class. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --White-light: #ffffff;
    --Surface-light: #f8f7f7;
    --Line: #e9e9e9;
    --On-surface: #161616;
}

body {
    margin: 0;
}

/* Search / mobile nav are in-flow until deferred bootstrap.css (CLS ~1 on fast TTFB). */
.offcanvas {
    position: fixed;
    display: none;
}

#wrapper {
    background-color: var(--White-light);
    overflow-x: clip;
}

.tf-container {
    max-width: 1830px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0 !important;
    margin-right: -15px !important;
    margin-left: -15px !important;
}

.row > * {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100%;
    max-width: 100%;
}

/* Bootstrap display utils before deferred bootstrap.css (same idea as taxonomy-critical). */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

@media (max-width: 991.98px) {
    .d-lg-flex,
    .d-lg-block,
    .d-lg-inline-flex {
        display: none !important;
    }

    .col-lg-6 {
        width: 100%;
        max-width: 100%;
    }

    .section-editor-pick .wrap {
        gap: 40px;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }

    .d-lg-flex {
        display: flex !important;
    }

    .d-lg-block {
        display: block !important;
    }

    .d-lg-inline-flex {
        display: inline-flex !important;
    }

    .col-lg-6 {
        flex: 0 0 auto;
        width: 50%;
        max-width: 50%;
    }

    .section-editor-pick .wrap {
        gap: 0;
    }

    .header-menu.style-default {
        min-height: 64px;
    }
}

.bg-surface-color {
    background-color: var(--Surface-light);
}

.topbar {
    padding-top: 35px;
    padding-bottom: 35px;
}

.site-logo {
    max-width: 193px;
}

.site-logo img,
.main-logo {
    width: 100%;
    height: auto;
    display: block;
}

.tf-spacing-1 {
    padding-top: 50px;
    padding-bottom: 50px;
}

@media (min-width: 768px) {
    .tf-spacing-1 {
        padding-top: 80px;
        padding-bottom: 80px;
    }
}

.feature-post-item {
    position: relative;
}

.feature-post-item .img-style {
    position: relative;
    border-radius: 12px;
}

.hover-image-translate .img-style {
    overflow: hidden;
}

.feature-post-item .img-style > img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    display: block;
}

.feature-post-item.style-list {
    display: flex;
    align-items: center;
    gap: 18px;
}

.feature-post-item.style-list .img-style {
    flex: 0 0 25%;
    margin-bottom: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.feature-post-item.style-list .img-style > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-editor-pick .feature-post-item.item-grid > .content > h2.title {
    font-size: 29px;
    line-height: 38px;
}

.section-editor-pick .feature-post-item.item-grid > .content > h2.title.line-clamp-2 {
    min-height: 76px;
}

.section-editor-pick h3.title {
    font-size: 22px;
    line-height: 29px;
}

.section-editor-pick h3.title.line-clamp-2 {
    min-height: 58px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* MIC-213: отложить layout/paint секций ниже fold */
.section-our-best,
.section-latest-news {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}
