/* ==========================================================================
   SHARED COMPONENTS - Общие компоненты
   Используются в разных частях сайта (header, footer и т.д.)
   ========================================================================== */

/* ==========================================================================
   VISUALLY HIDDEN - Скрытый визуально контент для screen readers
   ========================================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   NOWRAP - Запрет переноса текста (замена устаревшего <nobr>)
   ========================================================================== */
.nowrap {
    white-space: nowrap;
}

/* ==========================================================================
   BRANDING PHOTO - Фон брендирования
   Используется на всех страницах как фоновый блок на всю ширину экрана
   Размер: 1920x1080px максимум
   ========================================================================== */
.branding_photo {
    width: 100%;
    max-width: 1920px;
    height: 100%;
    min-height: 1080px;
    max-height: 1080px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
    overflow: hidden;
    background-color: transparent;
    margin: 0 auto;
    /* Центрирование с белыми полями по бокам на экранах шире 1920px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ссылки и интерактивные элементы внутри .branding_photo должны быть кликабельными */
.branding_photo a,
.branding_photo button,
.branding_photo [onclick],
.branding_photo [role="button"],
.branding_photo iframe,
.branding_photo>div>a,
.branding_photo>a,
.branding_photo *[href] {
    pointer-events: auto;
    /* Включаем клики для ссылок и интерактивных элементов */
    position: relative;
    background-size: cover;
    z-index: 1;
    /* Интерактивные элементы выше фона (z-index: 0), чтобы быть кликабельными */
}

/* Стили для изображений и контента внутри .branding_photo */
.branding_photo img,
.branding_photo>*,
.branding_photo>div {
    width: 100%;
    max-width: 1920px;
    height: 100%;
    min-height: 1080px;
    max-height: 1080px;
    object-fit: contain;
    /* Изображение не обрезается, помещается целиком с сохранением пропорций */
    aspect-ratio: 1920 / 1080;
    /* Соотношение сторон 16:9 (1920x1080) */
}

/* Переопределяем inline styles с position: fixed для всех элементов внутри .branding_photo */
.branding_photo *,
.branding_photo>*,
.branding_photo>div,
.branding_photo>div>*,
.branding_photo [style*="position: fixed"],
.branding_photo [style*="position:fixed"],
.branding_photo [style*="position:  fixed"] {
    position: relative !important;
    /* Переопределяем position: fixed из inline styles */
    top: auto !important;
    background-size: cover !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* Для iframe и других встроенных элементов */
.branding_photo iframe,
.branding_photo video {
    width: 100%;
    height: 100%;
    aspect-ratio: 1920 / 1080;
    /* Соотношение сторон 16:9 */
}

/* На экранах шире 1920px - фиксированная ширина 1920px с белыми полями по бокам */
@media (min-width: 1921px) {
    .branding_photo {
        width: 100%;
        max-width: 1920px;
        height: 1080px;
        max-height: 1080px;
    }
}

@media (max-width: 768px) {
    .branding_photo {
        height: 100%;
        min-height: 1080px;
        max-height: 1080px;
    }
}

/* Desktop/Mobile версии брендирования */
.branding_photo--desktop {
    display: block;
}

.branding_photo--mobile {
    display: none;
}

@media (max-width: 768px) {
    .branding_photo--desktop {
        display: none;
    }
    
    .branding_photo--mobile {
        display: block;
    }
}

/* ==========================================================================
   BOTTOM BANNER - Нижний баннер
   ========================================================================== */

.banner-bottom {
    margin: 40px 0;
}

.banner-bottom__desktop {
    display: block;
}

.banner-bottom__mobile {
    display: none;
}

@media (max-width: 768px) {
    .banner-bottom__desktop {
        display: none;
    }
    
    .banner-bottom__mobile {
        display: block;
    }
}

/* ==========================================================================
   RECOMMEND WIDGET - Рекомендательный виджет
   ========================================================================== */

.banner-recommend {
    margin: 40px 0;
}

.banner-recommend__widget {
    width: 100%;
}

/* ==========================================================================
   SOCIAL ICONS - Социальные иконки (используются в footer, header и др.)
   ========================================================================== */

.social-icons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.social-icons__item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-icons__link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    font-size: 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: 1px solid #fff;
    border-left: none;
}

.social-icons__item:first-child .social-icons__link {
    border-left: 1px solid #fff;
}

.social-icons__link svg {
    width: 24px;
    height: 24px;
}

.social-icons__link svg path {
    fill: #fff;
    transition: fill 0.2s ease;
}

.social-icons__link:hover,
.social-icons__link:focus {
    background-color: #fff;
    color: #000;
}

.social-icons__link:hover svg path,
.social-icons__link:focus svg path {
    fill: #000;
}

/* Модификатор - сетка */
.social-icons--grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

/* Модификаторы для разного количества колонок */
.social-icons--grid-1 {
    grid-template-columns: 1fr;
}

.social-icons--grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.social-icons--grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.social-icons--grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.social-icons--grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.social-icons--grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Модификатор для светлой темы */
.social-icons--light .social-icons__link {
    border-color: #000;
    color: #000;
    background: transparent;
}

.social-icons--light .social-icons__link svg path {
    fill: #000;
}

.social-icons--light .social-icons__link:hover {
    background-color: #000;
    color: #fff;
}

.social-icons--light .social-icons__link:hover svg path {
    fill: #fff;
}

/* Компактный размер */
.social-icons--small .social-icons__link {
    height: 40px;
    font-size: 16px;
}

.social-icons--small .social-icons__link svg {
    width: 18px;
    height: 18px;
}

/* Большой размер */
.social-icons--large .social-icons__link {
    height: 80px;
    font-size: 24px;
}

.social-icons--large .social-icons__link svg {
    width: 32px;
    height: 32px;
}

/* ==========================================================================
   BUTTONS - Кнопки
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: 'Steinbeck', Georgia, serif;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.8;
}

.btn--primary {
    background: #000;
    color: #fff;
}

.btn--secondary {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.btn--accent {
    background: #E30611;
    color: #fff;
}

.btn--large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn--small {
    padding: 8px 16px;
    font-size: 14px;
}

/* ==========================================================================
   FORMS - Элементы форм
   ========================================================================== */

.form-input {
    font-family: 'Steinbeck', Georgia, serif;
    font-size: 16px;
    padding: 12px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 0;
    background: #fff;
    color: #000;
    width: 100%;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #000;
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Темная версия инпута */
.form-input--dark {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.form-input--dark:focus {
    border-color: #fff;
}

.form-input--dark::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   SECTION - Секции страницы
   ========================================================================== */

.section {
    padding: 60px 0;
}

.section--dark {
    background: #000;
    color: #fff;
}

.section--light {
    background: #fff;
    color: #000;
}

.section--gray {
    background: #F5F5F5;
    color: #000;
}

@media (max-width: 768px) {
    .section {
        padding: 40px 0;
    }
}

/* ==========================================================================
   UTILITIES - Утилиты
   ========================================================================== */

/* Скрытие на разных устройствах */
.hide-mobile {
    @media (max-width: 768px) {
        display: none !important;
    }
}

.hide-tablet {
    @media (max-width: 1150px) {
        display: none !important;
    }
}

.hide-desktop {
    @media (min-width: 1025px) {
        display: none !important;
    }
}

/* Текстовые утилиты */
.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

.text-nowrap {
    white-space: nowrap;
}

/* ==========================================================================
   POST COMPONENTS - Компоненты постов
   ========================================================================== */

/* Основные стили для статей */
.main-article {
    display: block;
    position: relative;
    z-index: 1;
    /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}

.article-tile .main-article,
.banner-section .main-article {
    display: block;
    padding-top: 0;
}

.main-article__hashtag:hover,
.main-article__author:hover {
    color: #000;
}

.main-article__theme {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 30px;
    justify-content: flex-start;
}


.main-article__author-wrapper {
    display: flex;
    align-items: center;
}

.main-article__author-wrapper a {
    display: flex;
    line-height: 16px;
    margin-bottom: -3px;
    margin-right: 0;
}

.main-article__hashtag a {
    display: flex;
    line-height: 16px;
    margin-bottom: -3px;
}

.main-article__hashtag {
    display: flex;
    font-family: 'Steinbeck', sans-serif;
    font-size: 14px;
    gap: 10px;
    line-height: 20px;
    color: #6D6D6D;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
  
}

.divider {
    display: block;
    width: 4px;
    min-width: 4px;
    max-width: 4px;
    flex: 0 0 4px;
    height: 18px;
    background: #000;
    margin-right: 10px;
}

.main-article__author {
    display: inline-block;
    font-family: 'Steinbeck', sans-serif;
    font-size: 14px;
    line-height: 1.2;
    color: #6D6D6D;
    flex-shrink: 0;
}

/* Спецпроекты (Спецпроект / Редакция Moskvichmag): компактнее блок рубрики и автора */
.main-article--special .main-article__hashtag  a {
    margin-bottom: -1px;
}

.main-article__title {
    display: block;
    font-family: 'Panama';
    font-size: 48px;
    line-height: 54px;
    color: #000;
    font-weight: 700;
    padding-top: 20px;
}


/* Изображения */
.main-article__image {
    display: block;
    width: 100%;
    height: auto;
}

.main-article__image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Ссылки */
.main-article a {
    display: block;
    text-decoration: none;
}

/* Ссылки внутри заголовков должны наследовать max-width от заголовка */
.main-article__title a {
    display: inline-block;
    /* Изменено с block на inline-block, чтобы наследовать ширину от текста */
    max-width: 100%;
    /* Не больше ширины заголовка */
}

.main-article a:hover {
    text-decoration: none;
}


/* Hover эффекты для ссылок в хештегах и авторах на всех страницах */
.main-article__hashtag a:hover,
.main-article__author a:hover,
.main-article__author-wrapper a:hover {
    color: #000000;
}

/* Hover эффекты для картинок на всех страницах */
.main-article__image {
    overflow: hidden;
    position: relative;
}

.main-article__image img {
    transition: transform 0.3s ease;
    transform-origin: center;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-article:hover .main-article__image img {
    transform: scale(1.05);
}

/* Большая статья (первая на главной) - XL */
.main-article__big {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}

.main-article__big .main-article__image {
    width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: 577px;
}

.main-article__big .main-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-article__big .main-article__title {
    font-family: 'Panama', sans-serif;
    font-weight: 700;
    font-style: normal;
    padding-left: 0;
    text-transform: none;
    font-size: 48px;
    line-height: 54px;
    max-width: 810px;
    padding-top: 15px;
}

.main-article__big .main-article__title::before {
    display: none;
}

/* Видео в большом посте - на всю ширину контейнера */
.main-article__big .main-article__image .youtube-embed,
.main-article__big .main-article__image .vk-video-embed {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 0;
}

.main-article__big .main-article__image .youtube-embed__iframe,
.main-article__big .main-article__image .youtube-embed iframe,
.main-article__big .main-article__image .vk-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Видео во всех карточках (large, medium, small): всегда 16:9 */
.main-article__image:has(.youtube-embed),
.main-article__image:has(.vk-video-embed) {
    aspect-ratio: 16 / 9;
}

.main-article__large .main-article__image .youtube-embed,
.main-article__large .main-article__image .vk-video-embed,
.main-article__medium .main-article__image .youtube-embed,
.main-article__medium .main-article__image .vk-video-embed,
.main-article__small .main-article__image .youtube-embed,
.main-article__small .main-article__image .vk-video-embed {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.main-article__large .main-article__image .youtube-embed iframe,
.main-article__large .main-article__image .vk-video-embed iframe,
.main-article__medium .main-article__image .youtube-embed iframe,
.main-article__medium .main-article__image .vk-video-embed iframe,
.main-article__small .main-article__image .youtube-embed iframe,
.main-article__small .main-article__image .vk-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Большие статьи в сетке - L */
.main-article__large {
    display: flex;
    flex-direction: column;
    max-width: 715px;
    position: relative;
    z-index: 1;
    /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}

.main-article__large .main-article__image {
    width: 100%;
    aspect-ratio: 715 / 375;
    max-height: 375px;
    overflow: hidden;
}

.main-article__large .main-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Средняя статья (вторая на главной) - M */
.main-article__medium {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 330px;
    position: relative;
    z-index: 1;
    /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}



.main-article__medium .main-article__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-article__medium .main-article__video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.main-article__medium .main-article__video-overlay iframe,
.main-article__medium .main-article__video-overlay video {
    width: 100%;
    height: 100%;
}

.main-article__medium .main-article__title {
    font-family: 'Panama', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 28px;
    line-height: 34px;
}

/* Маленькие статьи (сетка) - M */
.main-article__small {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 330px;
    position: relative;
    z-index: 1;
    /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}

.main-article__small .main-article__image {
    width: 100%;
    aspect-ratio: 330 / 410;
    overflow: hidden;
}

.main-article__small .main-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-article__small .main-article__title {
    font-family: 'Panama', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 28px;
    line-height: 34px;
}

/* Сетка статей */
.article-tile {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 60px;
    column-gap: 30px;
    position: relative;
    z-index: 1;
    /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}

.article-tile .main-article {
    display: block;
    flex-basis: 30%;
    padding-top: 0;
}

/* Планшет: те же пропорции картинок, что на десктопе (aspect-ratio не переопределяем). Только ширина/типографика */
@media (max-width: 1150px) {
    .main-article__large {
        max-width: 100%;
    }

    .main-article__medium {
        max-width: 100%;
    }

    .main-article__big .main-article__title {
        font-size: 38px;
        line-height: 44px;
    }

    .main-article__title {
        font-size: 28px;
        line-height: 34px;
    }

    .article-tile .main-article {
        flex-basis: 45%;
    }

    .main-article__small {
        max-width: 100%;
    }
}

/* Мобилка: переопределяем пропорции картинок (горизонтальная 16:9, вертикальная 330/410) */
@media (max-width: 768px) {
    .article-tile .main-article {
        flex-basis: 100%;
    }

    /* Контейнеры large/medium/small на всю ширину */
    .main-article__large,
    .main-article__medium,
    .main-article__small {
        max-width: 100%;
    }

    /* Карточки постов: убираем padding-top на мобилке (главная, архивы и т.д.) */
    .main-article__title,
    .main-article__big .main-article__title {
        padding-top: 0;
    }

    .main-article__big .main-article__title {
        font-size: 28px;
        line-height: 34px;
    }

    /* Все карточки (big, large, medium, small): горизонтальная — 16:9, вертикальная — 330/410 */
    .main-article__big .main-article__image,
    .main-article__large .main-article__image,
    .main-article__medium .main-article__image,
    .main-article__small .main-article__image,
    .main-article--full-width-video .main-article__image {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .main-article__image--vertical {
        aspect-ratio: 330 / 410;
    }

    .main-article__image:has(.youtube-embed),
    .main-article__image:has(.vk-video-embed),
    .tag-video .main-article__image {
        aspect-ratio: 16 / 9;
        height: auto;
        max-height: none;
    }

    .main-article__big .main-article__image img,
    .main-article--full-width-video .main-article__image img {
        height: 100%;
        object-fit: cover;
    }

}

/* На узких экранах (~360px) вертикальная картинка — 310/430 */
@media (max-width: 360px) {
    .main-article__image--vertical {
        aspect-ratio: 310 / 430;
    }
}

/* ========================================
   BANNER FULL WIDTH
   ======================================== */

.banner-full-width {
    padding: 25px 0 15px;
    margin: 30px 0 0px;
}

.banner--header-bottom.banner-header--mobile.banner {
    display: none;
    /* min-height вместо aspect-ratio — в Safari на мобилке контент не наезжает; overflow: hidden для стабильного блока */
    min-height: 350px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    overflow: hidden;
}

/* Desktop версия баннера на всю ширину - показываем */
.banner-middle-flat.banner-middle-flat--desktop.banner {
    display: block;
    /* Desktop banner aspect-ratio (1100x300) — резервируем место до загрузки */
    aspect-ratio: 1100 / 300;
    max-height: 100%;
    width: 100%;
}

@media (max-width: 768px) {
    .banner-middle-flat.banner-middle-flat--desktop.banner {
        display: none;
    }

    .banner--header-bottom.banner-header--mobile.banner {
        display: flex;
        min-height: 350px;
        max-width: 100%;
        align-items: center;
        justify-content: center
    }

    /* Первый баннер в мобилке: после первого абзаца в статье и после главного поста на главной */
    .article__header-banner--inline .banner--header-bottom.banner-header--mobile.banner,
    .hero-news-section__banner-after-hero .banner--header-bottom.banner-header--mobile.banner {
        min-height: 350px;
        overflow: hidden;
    }

    .article__content .banner--header-bottom.banner-header--mobile.banner img {
        margin: 0px auto;
    }

    .banner-full-width {
        padding: 15px 0;
        margin: 20px 0 30px 0;
    }

}

/* ========================================
   404 ERROR PAGE
   ======================================== */

/* Отступ от шапки до 404 */
.error-404-section {
    background-color: #f5f5f5;
    padding: 50px 0 0 0;
    text-align: center;
}

.error-404-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Стили для номера 404 */
.error-404-title {
    font-family: 'Rainer_v0.2', 'Rainer', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 250px;
    letter-spacing: 5px;
    text-align: center;
    color: #000000;
    margin: 0;
    padding-left: 0;
    line-height: 0.8;
}

.error-404-title::before {
    display: none;
}

/* Расстояние от 404 до текста 50px */
.error-404-subtitle {
    font-family: 'Panama', serif;
    font-weight: 400;
    font-style: normal;
    font-size: 64px;
    letter-spacing: 0px;
    text-align: center;
    color: #000000;
    margin: 50px 0 0 0;
    line-height: 1.2;
}

/* От текста до социальных сетей 50px */
.error-404-social {
    padding: 0px 0 30px 0;
}

/* Адаптивность для 404 */
@media (max-width: 768px) {
    .error-404-section {
        padding: 50px 0 0 0;
        min-height: 40vh;
    }

    .error-404-title {
        font-size: 150px;
        letter-spacing: 3px;
    }

    .error-404-subtitle {
        font-size: 48px;
        margin: 30px 0 0 0;
    }

    section.posts-section.posts-section--404 .main-article__medium {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }

    section.posts-section.posts-section--404 .main-article__medium .main-article__theme {
        display: none;
    }

    section.posts-section.posts-section--404 .main-article__medium .main-article__image {
        height: 155px;
        width: 122px;
    }


    section.posts-section.posts-section--404 .main-article__medium .main-article__title {
        padding-top: 0;
        font-size: 20px;
    }

    section.posts-section.posts-section--404 .posts-section__medium-row {
        margin-bottom: 20px;
    }

    section.posts-section.posts-section--404 .posts-section__medium-row.posts-section__medium-row--three {
        margin-top: 20px;
        margin-bottom: 0;
    }

}

@media (max-width: 480px) {
    .error-404-section {
        padding: 5px 0 0 0;
        min-height: 30vh;
    }

    .error-404-title {
        font-size: 150px;
        letter-spacing: 2px;
    }

    .error-404-subtitle {
        font-size: 48px;
        margin: 35px 0 0 0;
    }

    section.posts-section.posts-section--404 {
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 10px;
    }
}

/* ==========================================================================
   ADVERTISING BADGE - Плашка "Реклама"
   Отображается на рекламных/продвигаемых материалах
   ========================================================================== */
.advertising-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #000;
    color: #fff;
    padding: 6px 12px;
    font-family: 'Steinbeck', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    display: inline-block;
    white-space: nowrap;
}

/* Плашка на изображениях постов */
.main-article__image {
    position: relative;
}

.main-article__image .advertising-badge {
    top: 12px;
    right: 12px;
}

/* Плашка в статьях - в блоке мета-информации */
.article__meta-block .advertising-badge {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
    top: auto;
    right: auto;
}

/* Плашка на изображениях в статьях */
.article__hero .advertising-badge,
.article__intro--left .advertising-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    margin-bottom: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .advertising-badge {
        font-size: 11px;
        padding: 5px 10px;
        top: 8px;
        right: 8px;
    }

    .main-article__image .advertising-badge {
        top: 8px;
        right: 8px;
    }
    
    .main-article__hashtag {
        padding-bottom: 20px;
    }
 }

/* Десктоп и планшет: у medium карточки портретная пропорция; на мобилке — из медиазапроса (16:9 / 330:410) */
@media (min-width: 769px) {
    .main-article__medium .main-article__image {
        position: relative;
        width: 100%;
        aspect-ratio: 330 / 410;
        overflow: hidden;
    }
}

/* Планшет: у medium-карточки все изображения 16:9 */
@media (min-width: 769px) and (max-width: 1150px) {
    .main-article__medium .main-article__image {
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   PAGE FOOTER - Подвал с кнопками редактирования (Desktop/Mobile)
   Используется на страницах и в подгружаемых блоках бесконечной ленты
   ========================================================================== */
.page__footer {
    max-width: 1140px;
    margin: 0px auto 0;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    background: #f5f5f5;
    font-size: 14px;
    color: #666;
}