/* ============================================
   Главная страница RU VESTI
   ============================================ */

body {
    background: #ffffff;
    color: #0f1011;
}

/* ---------- Общие секции ---------- */

.section {
    margin-bottom: 42px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    border-bottom: 3px solid #0f1011;
}

.section-heading h2 {
    display: inline-block;
    background: #0f1011;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 16px;
    text-transform: uppercase;
}

.empty-text {
    padding: 30px 0;
    color: #777777;
}


/* ---------- HERO ---------- */
/* ---------- HERO ---------- */

.home-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin: 24px 0 34px;
}

.hero-main {
    min-height: 470px;
}

.hero-main__image,
.hero-small__image {
    position: relative;
    display: block;
    height: 100%;
    min-height: inherit;
    overflow: hidden;
    background: #111111;
}

.hero-main__image img,
.hero-small__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.hero-main__image:hover img,
.hero-small__image:hover img {
    transform: scale(1.04);
}

/* ВАЖНО: popular-card__overlay оставляем тут, иначе пропадут надписи в "Самое популярное" */
.hero-main__overlay,
.hero-small__overlay,
.popular-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.32) 42%,
        rgba(0,0,0,0.82) 100%
    );
    color: #ffffff;
}

.hero-main__overlay {
    padding: 28px;
}

.hero-main__category,
.popular-card__category {
    align-self: flex-start;
    background: #cc0000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 10px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Категория в маленьких карточках — сверху слева */
.hero-small__category {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    background: #cc0000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
    margin: 0;
    text-transform: uppercase;
    z-index: 2;
}

.hero-main__title {
    max-width: 760px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.05;
    margin: 0 0 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.hero-main__meta {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}

.hero-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-small {
    min-height: 229px;
}

.hero-small__overlay {
    padding: 16px;
}

.hero-small__title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Категория в карточках "Самое популярное" — левый верхний угол */
.popular-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    background: #cc0000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
    margin: 0;
    text-transform: uppercase;
    z-index: 2;
}
/* ---------- Популярное ---------- */

.popular-section {
    margin-bottom: 38px;
}

.popular-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.popular-card {
    min-height: 250px;
    background: #111111;
}

.popular-card__image {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: #111111;
}

.popular-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.popular-card__image:hover img {
    transform: scale(1.04);
}

.popular-card__overlay {
    padding: 16px;
}

.popular-card__title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}


/* ---------- Основная раскладка ---------- */

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.content {
    min-width: 0;
}


/* ---------- Лента новостей ---------- */

.news-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 18px;
}

.news-card {
    padding-bottom: 18px;
}

.news-card__image {
    position: relative;
    display: block;
    height: 190px;
    overflow: hidden;
    background: #f2f2f2;
    margin-bottom: 12px;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.news-card__image:hover img {
    transform: scale(1.04);
}

.news-card__body {
    display: block;
}

.news-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.news-card__category {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-block;
    background: #cc0000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
    margin: 0;
    text-transform: uppercase;
    z-index: 2;
}

.news-card__date {
    color: #777777;
}

.news-card__title {
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.18;
    margin: 0 0 8px;
}

.news-card__title a {
    color: #0f1011;
}

.news-card__title a:hover {
    color: #cc0000;
}

.news-card__excerpt {
    color: #555555;
    font-size: 15px;
    line-height: 1.45;
    margin: 0;
}


/* ---------- Sidebar ---------- */
/* ---------- Sidebar / Боковые блоки ---------- */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-block {
    background: #ffffff;
    border: 1px solid #ece8e2;
    border-top: 4px solid #0f1011;
    border-radius: 8px;
    padding: 18px 20px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.sidebar-block__title {
    position: relative;
    display: inline-block;
    background: #0f1011;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    padding: 10px 14px;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.sidebar-block__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 42px;
    height: 3px;
    background: #cc0000;
}

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-category {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    color: #0f1011;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    padding: 12px 0 12px 16px;
    border-bottom: 1px solid #ece8e2;
    transition: color .2s ease, padding-left .2s ease;
}

.sidebar-category::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    background: #cc0000;
    border-radius: 50%;
    transform: translateY(-50%);
}

.sidebar-category:hover,
.sidebar-category.active {
    color: #cc0000;
    padding-left: 22px;
}

.sidebar-category:last-child {
    border-bottom: none;
}

/* Блок "Лента" в сайдбаре */
.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-short {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ece8e2;
}

.news-short:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-short__image {
    display: block;
    width: 92px;
    height: 68px;
    overflow: hidden;
    background: #f2f2f2;
    border-radius: 4px;
}

.news-short__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-short__date {
    color: #777777;
    font-size: 12px;
    margin-bottom: 5px;
}

.news-short__title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.news-short__title a {
    color: #0f1011;
}

.news-short__title a:hover {
    color: #cc0000;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1180px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .hero-side {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-small {
        min-height: 210px;
    }

    .popular-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-feed {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 720px) {
    .home-hero {
        margin-top: 14px;
        gap: 10px;
    }

    .hero-main {
        min-height: 320px;
    }

    .hero-main__overlay {
        padding: 18px;
    }

    .hero-main__category {
        font-size: 10px;
        padding: 5px 8px;
        margin-bottom: 8px;
    }

    .hero-main__title {
        font-size: 24px;
        line-height: 1.08;
        margin-bottom: 8px;
    }

    .hero-main__meta {
        font-size: 12px;
    }

    .hero-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hero-small {
        min-height: 170px;
    }

    .hero-small__overlay {
        padding: 10px;
    }

    .hero-small__category {
        top: 8px;
        left: 8px;
        font-size: 9px;
        padding: 5px 7px;
    }

    .hero-small__title {
        font-size: 12px;
        line-height: 1.12;
    }
}


/* ============================================
   Страница статьи — стиль под GorodN
   ============================================ */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 38px;
    align-items: start;
    margin: 32px 0 60px;
}

.article-main {
    min-width: 0;
}

.article-header {
    margin-bottom: 24px;
}

.article-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #888888;
    font-size: 13px;
    margin-bottom: 18px;
}

.article-breadcrumbs a {
    color: #777777;
}

.article-breadcrumbs a:hover {
    color: #cc0000;
}

.article-topline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.article-category-label {
    display: inline-block;
    background: #cc0000;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 11px;
    text-transform: uppercase;
}

.article-date-top {
    color: #777777;
    font-size: 13px;
}

.article__title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 900;
    line-height: 1.08;
    color: #0f1011;
    margin: 0 0 20px;
}

.article__summury {
    position: relative;
    font-size: 20px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.5;
    color: #222222;
    margin: 0 0 22px;
    padding: 0 0 0 54px;
    border: 0;
}

.article__summury::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 34px;
    height: 4px;
    background: #cc0000;
}

.article-image {
    margin: 0 0 18px;
    background: #f2f2f2;
}

.article-image img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

.article__mediainfo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ece8e2;
    border-top: 1px solid #ece8e2;
    padding: 10px 0;
    margin-bottom: 24px;
}

.article__author {
    color: #555555;
    font-size: 13px;
    font-weight: 700;
}

.article__info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.article__date,
.article__views {
    color: #777777;
    font-size: 13px;
}

.article__txt {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.72;
    color: #202020;
    margin-bottom: 36px;
}

.article__txt p {
    font-size: 18px;
    line-height: 1.72;
    margin: 0 0 20px;
}

.article__txt a {
    color: #cc0000;
    text-decoration: underline;
}

.article__txt strong,
.article__txt b {
    font-weight: 800;
}

.article__txt blockquote {
    border-top: 2px solid #ece8e2;
    border-bottom: 2px solid #ece8e2;
    font-size: 18px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.5;
    margin: 28px 0;
    padding: 24px 34px;
}

.article-related {
    margin-top: 44px;
}

.article-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 18px;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }

    .article__title {
        font-size: 34px;
    }
}

@media (max-width: 720px) {
    .article-layout {
        margin-top: 22px;
    }

    .article__title {
        font-size: 28px;
    }

    .article__summury {
        font-size: 17px;
        padding-left: 0;
    }

    .article__summury::before {
        display: none;
    }

    .article__mediainfo {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .article__info {
        width: 100%;
        justify-content: space-between;
    }

    .article__txt,
    .article__txt p {
        font-size: 16px;
        line-height: 1.65;
    }

    .article-related-grid {
        grid-template-columns: 1fr;
    }
}


/* ---------- Страница категории ---------- */

.category-page {
    margin: 28px 0 60px;
}

.category-header {
    margin-bottom: 28px;
}

.category-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #888888;
    font-size: 13px;
    margin-bottom: 12px;
}

.category-breadcrumbs a {
    color: #777777;
}

.category-breadcrumbs a:hover {
    color: #cc0000;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 900;
    line-height: 1.1;
    color: #0f1011;
    margin: 0;
}

.sidebar-category.active {
    color: #cc0000;
}

/* ---------- Пагинация ---------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
    padding-top: 10px;
}

.pagination__pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination__page,
.pagination__btn,
.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #0f1011;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.pagination__page:hover,
.pagination__btn:hover {
    border-color: #cc0000;
    color: #cc0000;
}

.pagination__page--active {
    background: #cc0000;
    border-color: #cc0000;
    color: #ffffff;
}

.pagination__btn--disabled {
    opacity: 0.45;
    cursor: default;
}

.pagination__btn--disabled:hover {
    border-color: #dddddd;
    color: #0f1011;
}

.pagination__dots {
    border-color: transparent;
    background: transparent;
    min-width: auto;
    padding: 0 4px;
    color: #777777;
}

@media (max-width: 720px) {
    .pagination {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .pagination__btn {
        width: 100%;
    }
}

.header-inline-search {
    display: flex;
    align-items: center;
    height: 38px;
    border: 2px solid #cc0000;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
}

.header-inline-search input {
    width: 220px;
    height: 100%;
    padding: 0 12px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #111111;
    background: #ffffff;
}

.header-inline-search input::placeholder {
    color: #777777;
}

.header-inline-search button {
    height: 100%;
    padding: 0 16px;
    border: none;
    background: #cc0000;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.header-inline-search button:hover {
    background: #a80000;
}

/* Категория обычной карточки — левый нижний угол */
.news-card__category {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    background: #cc0000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
    margin: 0;
    text-transform: uppercase;
    z-index: 2;
}

/* Дата обычной карточки — правый нижний угол */
.news-card__date-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    background: #0f1011;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
    margin: 0;
    z-index: 2;
}

/* Глобальная защита от горизонтального скролла */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}


/* ---------- Мобильная лента новостей ---------- */

@media (max-width: 720px) {
    .main-layout {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .news-feed {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 28px !important;
        width: 100%;
        max-width: 100%;
    }

    .news-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .news-card__image {
        height: 220px;
        width: 100%;
    }

    .news-card__title {
        font-size: 22px;
        line-height: 1.15;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .news-card__excerpt {
        font-size: 15px;
        line-height: 1.5;
    }
}

/* ---------- 404 page ---------- */

.not-found-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 620px;
    padding: 80px 0;
    background: #ffffff;
}

.not-found-card {
    position: relative;
    width: 100%;
    max-width: 720px;
    padding: 64px 48px;
    text-align: center;
    background:
        radial-gradient(circle at 8% 10%, rgba(204, 0, 0, 0.08), transparent 34%),
        radial-gradient(circle at 92% 88%, rgba(204, 0, 0, 0.075), transparent 32%),
        radial-gradient(circle at 50% 0%, rgba(15, 16, 17, 0.035), transparent 38%),
        #ffffff;
    border: 1px solid #ece8e2;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.09);
    overflow: hidden;
}

/* Верхнюю красную шапочку убрали полностью */
.not-found-card::before {
    display: none;
}

/* Декоративный круг теперь только внутри карточки */
.not-found-card::after {
    content: "";
    position: absolute;
    right: -64px;
    bottom: -64px;
    width: 180px;
    height: 180px;
    border: 26px solid rgba(204, 0, 0, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

.not-found-card__mark,
.not-found-card__line,
.not-found-card__title,
.not-found-card__text,
.not-found-card__button {
    position: relative;
    z-index: 2;
}

.not-found-card__mark {
    font-family: var(--font-heading);
    font-size: 118px;
    font-weight: 900;
    line-height: 0.9;
    color: #0f1011;
    letter-spacing: -0.08em;
    margin-bottom: 20px;
}

.not-found-card__line {
    width: 74px;
    height: 5px;
    margin: 0 auto 26px;
    background: #cc0000;
    border-radius: 99px;
}

.not-found-card__title {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 900;
    line-height: 1.1;
    color: #0f1011;
    margin: 0 0 16px;
}

.not-found-card__text {
    max-width: 470px;
    margin: 0 auto 32px;
    color: #555555;
    font-size: 17px;
    line-height: 1.55;
}

.not-found-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    background: #cc0000;
    color: #ffffff;
    border: 2px solid #cc0000;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.not-found-card__button:hover {
    background: #a80000;
    border-color: #a80000;
    color: #ffffff;
}

@media (max-width: 720px) {
    .not-found-page {
        min-height: 520px;
        padding: 42px 0;
        background: #ffffff;
    }

    .not-found-card {
        padding: 48px 22px;
        border-radius: 14px;
        background:
            radial-gradient(circle at 8% 10%, rgba(204, 0, 0, 0.08), transparent 36%),
            radial-gradient(circle at 92% 90%, rgba(204, 0, 0, 0.07), transparent 34%),
            #ffffff;
    }

    .not-found-card::after {
        right: -72px;
        bottom: -72px;
        width: 160px;
        height: 160px;
        border-width: 22px;
    }

    .not-found-card__mark {
        font-size: 86px;
    }

    .not-found-card__title {
        font-size: 28px;
    }

    .not-found-card__text {
        font-size: 15px;
    }

    .not-found-card__button {
        width: 100%;
        max-width: 280px;
    }
}

.news-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Описание — максимум 5 строк */
.news-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ---------- Мобилка: "Самое популярное" как маленькие hero-карточки ---------- */

@media (max-width: 720px) {
    .popular-card__title {
        font-family: var(--font-heading);
        font-size: 12px;
        font-weight: 800;
        line-height: 1.12;
        color: #ffffff;
        margin: 0;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    }

    .popular-card__category {
        top: 8px;
        left: 8px;
        font-size: 9px;
        padding: 5px 7px;
    }

    .popular-card__overlay {
        padding: 10px;
    }

    .popular-card,
    .popular-card__image {
        min-height: 170px;
        height: 170px;
    }
}