/* ==========================================================================
   HOMEPAGE HERO WITH NEWS SIDEBAR - Новая разметка главной страницы
   Слева: главный пост (картинка + мета + заголовок). Справа: блок «НОВОСТИ» (4 шт).
   ========================================================================== */

/* ============================================
   1. Hero + News Section Grid (десктоп: две колонки)
   ============================================ */

.hero-news-section {
    padding: 40px 0 0px;
}

.hero-news-section__grid {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 50px;
    align-items: start;
}

/* Десктоп: надпись «НОВОСТИ» вровень с левой границей колонки (граница с картинкой героя) */
@media (min-width: 769px) {
    .news-sidebar {
        padding-left: 0;
    }
}

/* Баннер после главного поста: только на планшете и мобилке, на главной (тот же код, что в шапке) */
.hero-news-section__banner-after-hero {
    display: none;
}

.hero-news-section__banner-after-hero .container {
    padding: 0;
}

.hero-news-section__banner-after-hero .banner-full-width {
    margin: 20px 0 20px 0;
}

/* ============================================
   2. Hero Feature (левая колонка)
   ============================================ */

.hero-feature {
    display: flex;
    flex-direction: column;
}

.hero-feature__image-link {
    display: block;
    text-decoration: none;
}

.hero-feature__image {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
}

.hero-feature__image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-feature__image-link:hover .hero-feature__image img {
    transform: scale(1.02);
}

.hero-feature__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.hero-feature__video iframe {
    width: 100%;
    height: 100%;
}

/* Реклама badge */
.hero-feature__image .advertising-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    text-transform: uppercase;
    z-index: 2;
}

/* Meta: категории + автор (светло-серый, как на макете) */
.hero-feature__meta {
    margin-top: 20px;
}

.hero-feature__hashtag {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-family: 'Steinbeck', sans-serif;
    font-size: 14px;
    line-height: 1.2;
    color: #6D6D6D;
}

/* Спецпроект в герое: компактнее блок рубрики и автора (как .main-article--special у карточек) */
.hero-feature--special .hero-feature__hashtag a {
    margin-bottom: -1px;
}

.hero-feature__categories {
    color: #6D6D6D;
}

.hero-feature__categories a {
    color: #6D6D6D;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 16px;
    margin-bottom: -3px;
}

.hero-feature__categories a:hover {
    color: #000;
    text-decoration: none;
}

.hero-feature__author-wrapper {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

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

.hero-feature__author {
    color: #6D6D6D;
    text-decoration: none;
    font-family: 'Steinbeck', sans-serif;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: -3px;
    transition: color 0.2s ease;
}

.hero-feature__author:hover {
    color: #000;
    text-decoration: none;
}

/* Заголовок фичера */
.hero-feature__title {
    margin: 20px 0 0;
    font-family: 'Panama', serif;
    font-weight: 700;
    font-style: normal;
    font-size: 48px;
    padding-left: 0;
    line-height: 54px;
    letter-spacing: 0;
    color: #000;
}

.hero-feature__title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-feature__title a:hover {
    color: #333;
}

/* ============================================
   3. News Sidebar (правая колонка)
   ============================================ */

.news-sidebar {
    display: flex;
    flex-direction: column;
}

/* Заголовок блока новостей — SVG «Новости» */
.news-sidebar__title {
    margin: 0 0 20px;
    padding: 0 0 20px;
    border-bottom: 0.5px solid #000;
}

.news-sidebar__title-logo {
    height: auto;
    max-width: 100%;
}

/* Десктоп и планшет: компактный логотип «Новости», высота 51px, не на всю ширину, прижат к левому краю */
@media (min-width: 769px) {
    .news-sidebar__title {
        width: auto;
        text-align: left;
    }
    .news-sidebar__title-logo--desktop {
        display: block;
        height: 51px;
        width: auto;
        max-width: none;
    }
}
.news-sidebar__title-logo--desktop {
    display: block;
}
.news-sidebar__title-logo--tablet-mobile {
    display: none;
}

/* Планшет: тот же заголовок «Новости», что и на десктопе. Другой SVG только на мобилке (768px и ниже). */
@media (max-width: 768px) {
    .news-sidebar__title-logo--desktop {
        display: none !important;
    }
    .news-sidebar__title-logo--tablet-mobile {
        display: block;
        width: 100%;
    }
}

.news-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Каждая новость с тонким разделителем снизу (десктоп: отступы 20px) */
.news-sidebar__item {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 0.5px solid #000;
}

.news-sidebar__item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Заголовок новости (десктоп: Panama 22px, отступы 20px) */
.news-sidebar__item-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    font-family: 'Panama', serif;
}

.news-sidebar__item-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-sidebar__item-title a:hover {
    color: #333;
}

/* Обёртка «Подписаться» + слайдер авторов: порядок меняется на десктопе и планшете/мобилке */
.home-subscribe-author-wrap {
    display: flex;
    flex-direction: column;
}

/* Десктоп: подписаться выше слайдера */
@media (min-width: 1151px) {
    .home-subscribe-author-wrap .social-subscribe-section {
        order: 1;
    }

    .home-subscribe-author-wrap .author-columns-section {
        order: 2;
    }
}

/* Планшет и мобилка: слайдер выше подписаться */
@media (max-width: 1150px) {
    .home-subscribe-author-wrap .social-subscribe-section {
        order: 2;
    }

    .home-subscribe-author-wrap .author-columns-section {
        order: 1;
        padding: 0;
    }
}

/* ============================================
   4. Author Columns Section
   ============================================ */

.author-columns-section {
    padding: 50px 0 60px;
}

/* Слайдер колонок авторов (Splide) */
.author-columns-slider.splide {
    position: relative;
}

.author-columns-slider .splide__track {
    overflow: hidden;
}

.author-columns-slider .splide__list {
    display: flex;
    align-items: stretch;
}

.author-columns-slider .splide__slide {
    height: auto;
}

/* Навигация скрыта, если слайдов 2 или меньше */
.author-columns-slider--no-nav .splide__arrows {
    display: none;
}

/* На десктопе драйвер закреплён по центру видимой области — при скролле остаётся между двумя видимыми слайдами */
@media (min-width: 769px) {
    .author-columns-slider--has-center-divider.author-columns-slider {
        position: relative;
    }

    .author-columns-slider--has-center-divider.author-columns-slider::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 1px;
        height: 50px;
        background: #d0d0d0;
        pointer-events: none;
        z-index: 2;
    }
}

/* Буллеты (пагинация): внизу слайдов, 4×4 px, показываем на планшете и мобилке */
.author-columns-slider .splide__pagination {
    display: none;
    margin-top: 10px;
    gap: 8px;
    justify-content: center;
    position: relative;
    bottom: auto;
}

.author-columns-slider .splide__pagination__page {
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.author-columns-slider .splide__pagination__page.is-active {
    background: #000;
    opacity: 1;
}

.author-columns-slider .splide__pagination__page:hover {
    opacity: 1;
}

.author-columns-slider .splide__arrow {
    background: transparent;
    border: 1px solid #000;
    color: #000;
    width: 44px;
    height: 44px;
    border-radius: 0;
    opacity: 1;
}

.author-columns-slider .splide__arrow:hover {
    background: #000;
    color: #fff;
}

.author-columns-slider .splide__arrow svg {
    fill: currentColor;
}

.author-column {
    display: flex;
    transition: transform 0.25s ease;
}

.author-column__inner {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* Аватар автора на десктопе — 157×157, круглое фото */
.author-column__avatar {
    flex-shrink: 0;
    width: 157px;
    height: 157px;
    overflow: hidden;
    border-radius: 50%;
}

.author-column__avatar a {
    display: block;
    height: 100%;
}

/* Круг с первой буквой имени, если у автора нет фото */
.author-column__avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 157px;
    min-height: 157px;
    background-color: #000;
    color: #fff;
    font-family: 'Rainer', sans-serif;
    font-size: 48px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.author-column:hover .author-column__avatar-fallback {
    transform: scale(1.05);
}

.author-column__avatar-img,
.author-column__avatar img {
    width: 157px;
    height: 157px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* При наведении на блок автора — лёгкий scale фото (тень убрана) */
.author-column:hover .author-column__avatar img {
    transform: scale(1.05);
}

/* Контент колонки: без разделителя справа от картинки */
.author-column__content {
    flex: 1;
    min-width: 0;
    padding-left: 24px;
    border-left: none;
    margin-left: 0;
    padding-top: 27px;
}

.author-column__author-info {
    display: flex;
    align-items: center;
    margin-bottom: 13px;
    font-size: 14px;
}

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

.author-column__author-name {
    color: #6D6D6D;
    text-decoration: none;
    font-family: 'Steinbeck', sans-serif;
    font-size: 14px;
    line-height: 1;
    margin-bottom: -3px;
    transition: color 0.2s ease;
}

.author-column__author-name:hover {
    color: #000;
    text-decoration: none;
}

/* Заголовок колонки */
.author-column__title {
    margin: 0;
    font-family: 'CoFo Robert', serif;
    font-weight: 500;
    font-style: normal;
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #000;
}

.author-column__title a {
    color: #000;
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.author-column__title a:hover {
    color: #333;
}

/* ============================================
   5. Responsive Styles
   ============================================ */

/* Планшет и мобилка */
@media (max-width: 1150px) {
    .hero-news-section__banner-after-hero {
        display: block;
        margin: 0;
        grid-column: 1 / -1;
        order: 1;
    }

    /* Планшет: аватар 140×140 */
    .author-column__avatar,
    .author-column__avatar-img,
    .author-column__avatar img {
        width: 140px;
        height: 140px;
    }

    /* Планшет и мобилка: буллеты внизу слайдов */
    .author-columns-slider .splide__pagination {
        display: flex;
    }
}

/* Планшет (769px–1150px): верхний блок как на десктопе — герой слева, новости справа. Стек только на мобилке (768px и ниже). */

@media (max-width: 768px) {
    /* Мобилка: герой и новости в один столбец (на планшете оставляем как на десктопе) */
    .hero-news-section__grid {
        grid-template-columns: 1fr;
        gap: 0px;
    }

    .hero-feature__image {
        aspect-ratio: 330 / 410;
        max-height: 500px;
    }

    .hero-feature__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-feature__image:has(.youtube-embed),
    .hero-feature__image:has(.vk-video-embed) {
        aspect-ratio: 16 / 9;
        max-height: none;
    }

    .hero-news-section__banner-after-hero {
        order: 1;
    }

    .hero-feature {
        order: 0;
    }

    .news-sidebar {
        order: 2;
        border-top: none;
        padding-top: 0px;
    }

    .news-sidebar__title {
        width: 100%;
    }

    .news-sidebar__title-logo {
        width: 100%;
    }

    .news-sidebar__list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .news-sidebar__item {
        border-bottom: none;
        padding-bottom: 0;
    }

    .hero-news-section {
        padding: 0px 0 10px;
    }

    .news-sidebar__title {
        width: 100%;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .news-sidebar__title .news-sidebar__title-logo--tablet-mobile,
    .news-sidebar__title img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .home-subscribe-author-wrap .subscribe {
        margin-top: 20px;
    }

    /* Герой на мобилке: 16:9 (без max-height — ширина устройства варьируется) */
    .hero-feature__image {
        aspect-ratio: 16 / 9;
    }

    .hero-feature__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-feature__image:has(.youtube-embed),
    .hero-feature__image:has(.vk-video-embed) {
        aspect-ratio: 16 / 9;
        max-height: none;
    }

    .hero-feature__title {
        font-size: 38px;
        line-height: 1.2;
    }

    /* Мобилка: блок новостей на всю ширину */
    .news-sidebar__list {
        grid-template-columns: 1fr;
        gap: 0px;
    }

    /* Мобилка: заголовок — Panama 22px, line-height 28px, отступы 25px */
    .news-sidebar__item-title {
        font-family: 'Panama', serif;
        font-size: 22px;
        line-height: 28px;
        font-weight: 600;
    }

    .news-sidebar__item {
        padding-bottom: 25px;
        margin-bottom: 25px;
        border-bottom: 1px solid #e0e0e0;
    }

    .news-sidebar__item:last-child {
        padding-bottom: 25px;
        margin-bottom: 5px;
        border-bottom: 1px solid #ABABAB;
    }

    .home-subscribe-author-wrap .author-columns-section {
        padding: 10px 0 0px;
    }

    .author-column__inner {
        gap: 15px;
    }

    .author-column__content {
        padding-left: 0;
        padding-top: 0;
    }

    .author-column__avatar,
    .author-column__avatar-img,
    .author-column__avatar img {
        width: 123px;
        height: 123px;
    }

}

@media (max-width: 480px) {
    .hero-feature__title {
        font-size: 28px;
        line-height: 1.2;
    }

    .hero-feature__hashtag {
        font-size: 13px;
    }

    .news-sidebar__item-title {
        font-family: 'Panama', serif;
        font-size: 22px;
        line-height: 28px;
        font-weight: 600;
    }

    .author-column__avatar,
    .author-column__avatar-img,
    .author-column__avatar img {
        width: 123px;
        height: 123px;
    }

    .news-sidebar__title {
        width: 100%;
    }

    .news-sidebar__title-logo {
        width: 100%;
    }

}

@media (max-width: 380px) {
    .news-sidebar__title {
        width: 100%;
    }
}

@media (max-width: 350px) {
    .news-sidebar__title {
        width: 100%;
    }
}