em, i, cite, dfn, address, blockquote,
[style*="italic"] {
    font-style: normal !important;
}

.g-grid,
.loop-wrap.is-grid {
    gap: 1vw;
}

.header-wrap {
    min-height: 52px;
    margin-top: 1vw;

}

.header-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.header-nav .header-dropdown-toggle {
    font-size: 100%;
    line-height: inherit;
}

/* Один переключатель языка — рядом с меню, без «дырки» от flex-grow первого ul */
@media (min-width: 1025px) {
    .header-content {
        min-width: 0;
    }

    .header-nav {
        flex: 1 1 auto;
        gap: clamp(0.55rem, 1.1vw, 1.1rem);
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
    }

    .header-nav > ul:first-of-type {
        flex: 0 1 auto;
        flex-grow: 0;
        min-width: 0;
    }

    .header-nav > ul:last-of-type {
        flex: 0 0 auto;
    }

    .header-nav li:not(:first-of-type):not(.header-dropdown li) {
        margin-left: clamp(0.7rem, 1vw, 1rem);
    }

    .header-nav > .header-nav-lang--compact {
        flex: 0 0 auto;
    }

    .header-login.is-signup a,
    .header-login.is-account a {
        margin-left: clamp(0.7rem, 1vw, 1rem);
        padding-right: clamp(1rem, 1.3vw, 1.25rem);
        padding-left: clamp(1rem, 1.3vw, 1.25rem);
    }
}

@media (min-width: 1025px) and (max-width: 1500px) {
    .header-nav a,
    .header-dropdown-toggle {
        font-size: clamp(0.9rem, 1.35vw, 1.05rem);
    }

    .header-nav > .header-nav-lang--compact {
        margin-left: clamp(0.45rem, 0.8vw, 0.75rem);
    }

    .header-login.is-signup a,
    .header-login.is-account a {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

/* Дополнительный зазор от основного меню до переключателя языка (поверх gap у .header-nav) */
.header-nav > .header-nav-lang--compact {
    margin-left: clamp(0.65rem, 1.35vw, 1.15rem);
}

.header-nav > .header-nav-lang--compact a {
    display: inline-block;
    white-space: nowrap;
}

/* Десктоп: только компактный переключатель; мобильный стек скрыт */
@media (min-width: 1025px) {
    .header-nav-lang--stack {
        display: none !important;
    }
}

/* Мобильное меню: полноценные ссылки «English version» / «Russian version»
   показываются ТОЛЬКО внутри раскрытого гамбургера. В свернутом состоянии
   навбара их быть не должно (ul внутри .header-nav скрыт правилом темы,
   но .header-nav-lang--stack — это <div>, поэтому требует явного скрытия). */
@media (max-width: 1024px) {
    .header-nav-lang--compact {
        display: none !important;
    }

    .header-nav-lang--stack {
        display: none;
    }

    .header-toggle:checked ~ nav::before {
        background-color: var(--brand-sand);
    }

    .header-toggle:checked ~ nav .header-nav-lang--stack {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.45rem;
        width: 100%;
        margin: 1rem 0 0.85rem;
        padding-top: 0.85rem;
        border-top: 1px solid color-mix(in srgb, var(--color-font-two) 22%, transparent);
    }

    .header-toggle:checked ~ nav,
    .header-toggle:checked ~ nav a,
    .header-toggle:checked ~ nav .header-dropdown-toggle,
    .header-toggle:checked ~ nav .header-dropdown-toggle:focus,
    .header-toggle:checked ~ nav .header-dropdown-toggle:focus-visible,
    .header-toggle:checked ~ nav .header-dropdown-toggle:active {
        color: var(--color-font-black);
    }

    .header-nav-lang--stack a {
        display: block;
        /* Под мобильным меню ссылка должна выглядеть как обычный пункт nav */
        font-size: 2rem;
        line-height: 1.4;
        padding: 0 0 .5vh;
        font-weight: 600;
        text-align: right;
        text-decoration: none;
        color: var(--color-font-black);
    }

    .header-nav-lang--stack a:hover {
        opacity: 0.82;
    }
}

.header-dropdown-toggle:hover {
    color: inherit;
    opacity: 0.82;
}

.header-dropdown-toggle:focus,
.header-dropdown-toggle:focus-visible,
.header-dropdown-toggle:active,
.header-dropdown.is-active .header-dropdown-toggle {
    color: inherit;
}

.header-dropdown-label {
    display: inline-block;
    line-height: 1;
}

.header-dropdown-caret {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: -0.15rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.header-dropdown.is-active .header-dropdown-caret {
    transform: rotate(225deg);
    margin-top: 0.1rem;
}

.header-dropdown > ul {
    width: max-content;
    min-width: max-content;
    max-width: min(32rem, calc(100vw - 2rem));
    text-align: left;
}

.header-dropdown > ul li {
    margin-left: 0 !important;
}

.header-dropdown > ul a {
    display: block;
    white-space: nowrap;
}

@media (max-width:1024px) {
    .header-nav>ul>li>a,
    .header-dropdown {
        display: block;
    }

    .header-nav>ul>li {
        width: 100%;
        margin: 0;
        text-align: right;
    }

    .header-dropdown .header-dropdown-label,
    .header-dropdown .header-dropdown-caret {
        display: inline-block;
    }

    .header-nav>ul>li>a,
    .header-dropdown-toggle {
        width: 100%;
        justify-content: flex-end;
        padding: 0.45rem 0;
        font-size: 2rem;
        line-height: 1.2;
        font-weight: 600;
        letter-spacing: 0.01em;
        color: var(--color-font-black);
        text-align: right;
    }

    .header-dropdown-toggle {
        gap: 0.45rem;
    }

    .header-dropdown-toggle:focus,
    .header-dropdown-toggle:focus-visible,
    .header-dropdown-toggle:active,
    .header-dropdown.is-active .header-dropdown-toggle {
        color: var(--color-font-black);
    }

    .header-dropdown > ul {
        position: static;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0.15rem 0 0.9rem;
        padding: 0 0.85rem 0 0;
        text-align: right;
        background: transparent;
        border-radius: 0;
        animation: none;
    }

    .header-dropdown > ul li + li {
        margin-top: 0.18rem;
    }

    .header-dropdown > ul a {
        font-size: 1.15rem;
        line-height: 1.28;
        opacity: 0.8;
        white-space: normal;
        color: var(--color-font-black);
        text-align: right;
    }

    .header-dropdown > ul a:hover,
    .header-dropdown > ul a:focus-visible {
        opacity: 1;
    }
}

.aleksandr-jurievich-nevskii {
    font-family: var(--font-family-one);
    margin-top: 0px;
    margin-bottom: 0px;
    font-weight: 780;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.jurievich {
    font-weight: 560;
}

.hero-site-description {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-mono-regular);
    letter-spacing: var(--letter-spacing-mono);
    opacity: 0.5;
    padding-right: 24%;
}

/* На мобильной версии hero-описание должно занимать всю ширину колонки. */
@media (max-width: 1024px) {
    .hero-site-description {
        padding-right: 0;
    }
}

/* Возвращаем dat-u/тег в featured-section и свежих материалах на мобильной
   версии (базовая тема прячет .item-meta через screen.css:1902). */
@media (max-width: 768px) {
    .loop-wrap:not(.is-feed) .item-meta {
        display: block;
    }
}

/* Возвращаем excerpt первого поста в featured и feed-grid на узких экранах
   (базовая тема прячет <p> через screen.css:1931-1934). */
@media (max-width: 480px) {
    .loop-wrap.is-feed.is-grid .item:first-of-type p,
    .loop-wrap.is-featured .item:first-of-type p {
        display: block;
    }
}

.item {
    padding-bottom: 2vw;
}


.hero-section .g-content h1.g-font-m {
    font-family: var(--font-family-general);
    font-weight: var(--font-weight-general-regular);
    opacity: 0.5;
}

.post-template .hero-section .g-content h1.g-font-xl {
    font-family: var(--font-family-one);
    font-style: normal;
    line-height: 100%;
    font-weight: var(--font-weight-one-bold);
}

.featured-label.g-label.g-grid small.g-font-s,
.item-meta.g-meta.g-font-xxs,
.g-content .item-meta.g-meta.g-font-xxxxs,
.hero-meta.g-label.g-font-xs,
.footer-description.g-font-s {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-mono-regular);
    font-style: normal;
    letter-spacing: var(--letter-spacing-mono);
}

.page-tags .archive-section p.g-font-m,
.post-section .hero-excerpt.g-font-m {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-mono-regular);
    letter-spacing: var(--letter-spacing-mono);
    opacity: 0.8;
}

.hero-tags.g-font-xs {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-mono-regular);
    letter-spacing: var(--letter-spacing-mono);
}

.hero-tags.g-font-xs > span:first-of-type {
    color: color-mix(in srgb, var(--color-font-one) 52%, transparent);
}

.post-content p em {
    font-family: inherit;
}

.post-content h3 {
    font-family: var(--font-family-one) !important;
    font-weight: var(--font-weight-one-bold) !important;
}

.item-meta.g-meta.g-font-xxs,
.g-content .item-meta.g-meta.g-font-xxxxs {
    color: color-mix(in srgb, var(--color-font-one) 52%, transparent);
}

.hero-meta.g-label.g-font-xs {
    color: color-mix(in srgb, var(--color-font-one) 52%, transparent);
}

.footer-description.g-font-s {
}

.g-content h2.g-font-l,
.g-content h2.g-font-xl {
    font-family: var(--font-family-one);
    line-height: 1.1;
    font-weight: 780;
}

.g-content h2.g-font-m,
.g-content h2.g-font-s {
    font-family: var(--font-family-one);
    line-height: 1.1;
    font-weight: 680;
}

h2.g-font-xxxs {
    font-weight: 700 !important;
    margin-top: 0px;
    margin-bottom: 0px;
}

.g-content p {
    font-weight: var(--font-weight-post-content-regular);
    margin: 0.5vw 0 0;
}

.item .g-content > p {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-mono-regular);
    font-style: normal;
    letter-spacing: var(--letter-spacing-mono);
    line-height: 1.4;
}

.tag-template .g-content p.g-font-m {
    font-family: var(--font-family-general);
    font-weight: var(--font-weight-general-regular);
    margin: 2vw 0 0;
    opacity: 0.8;
}

.footer-item h3 {
    font-family: var(--font-family-one);
    font-weight: 620;
    font-style: normal;
    line-height: 1.1;
}

.loop-wrap.is-featured .item.no-image:nth-child(1),
.loop-wrap.is-featured .item:nth-child(2) {
    margin-top: 0vh;
}

.loop-wrap.is-featured.is-comfort .item:nth-child(3),
.loop-wrap.is-featured.is-compact .item:nth-child(3) {
    margin-top: 0vh;
}

.item-img,
.g-meta {
    margin-bottom: 4px;
}

/* .hero-section:not(.is-custom) > div {
    grid-column: span 8;
}

.hero-image {
    grid-column: span 7;
} */

.loop-wrap .item .g-meta {
    margin-top: 8px;
}

.loop-wrap .item .g-meta b,
span.my-role {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-mono-bold);
    letter-spacing: var(--letter-spacing-mono);
    font-style: normal;
    font-size: 16px;
}

.hero-meta>span.my-role:not(:first-child)::before {
    content: '';
    display: none;
}

.about-featured {
    line-height: 1;
}

.g-content h2.g-font-xl {
    font-size: var(--font-size-l);
}

/* Tag accent colors (RU + EN пути; на /en/ ссылки с префиксом /en/...) */
.suffix-tag[href="/dubai/"],
.suffix-tag[href="/en/dubai/"] { color: #FF6B35; }

.suffix-tag[href="/estate/"],
.suffix-tag[href="/en/estate/"] { color: #00D4FF; }

.suffix-tag[href="/design/"],
.suffix-tag[href="/en/design/"] { color: #C8FF00; }

.suffix-tag[href="/family/live/"],
.suffix-tag[href="/en/family/live/"] { color: #E8C96A; }

.suffix-tag[href="/threshold/"],
.suffix-tag[href="/threshold/signals/"],
.suffix-tag[href="/en/threshold/"],
.suffix-tag[href="/en/threshold/signals/"] { color: #9B5FFF; }

.suffix-tag[href="/vlesu/stories/"],
.suffix-tag[href="/en/vlesu/stories/"] { color: #FF3366; }
