:root {
    /* rgb(37, 34, 27) */
    --color-root: #25221b;
    /* rgb(138, 135, 132) */
    --color-page-background: #8a8784;
    /* светло-серый текст на фоне сайта (надпись «Следующая новость») */
    --color-gray-light: #d8d5d1;
    --color-main: var(--color-root);
    --color-border: var(--color-root);
}

body {
    background-color: var(--color-page-background);
}

/* Header & menu */
.header {
    background: var(--color-root);
    border-bottom-color: var(--color-root);
}

.header .c-top-menu,
.c-top-menu__fix,
.header > .container {
    background: var(--color-root);
}

.header .c-top-menu .top-menu,
.header .c-top-menu .top-menu a,
.header .main-menu,
.header .main-menu a,
.header ul.top_menu a,
.header ul.main_menu a {
    color: #fff;
}

.header .c-top-menu .top-menu a:hover,
.header ul.top_menu a:hover,
.header ul.main_menu a:hover,
.header .main-menu a:hover,
.header .user-menu a:hover {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.header hr.hr-line-top-menu {
    background: #fff;
}

.header .c-top-menu i.user {
    background-image: url("/assets/core/theme_kazanonline24/img/icons/user.svg");
}

.header .c-top-menu img.search,
.header .c-top-menu i.user {
    width: 24px;
    height: 24px;
}

.header .c-top-menu img.logo {
    height: 40px;
    width: auto;
}

.header .c-top-menu .icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .c-top-menu .icons > *:not(:last-child) {
    margin-right: 0;
}

.header .c-top-menu .icons > a {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.header .c-top-menu .icons .user-menu {
    align-items: center;
}

.header .user-menu .user-menu_dropdown a,
.header .user-menu ul a {
    color: var(--color-root);
}

.header .user-menu .user-menu_dropdown a:hover,
.header .user-menu ul a:hover {
    color: var(--color-root);
    opacity: 0.7;
}

.header ul.main_menu li:not(:last-child) {
    margin-right: 20px;
}

/* Верхний виджет: валюта, погода, пробки */
.top-info-widget {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin-right: 12px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

.top-info-widget__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-info-widget__value,
.top-info-widget__label {
    color: #fff;
}

.top-info-widget__trend {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.top-info-widget__trend--up {
    border-bottom: 7px solid #28a745;
}

.top-info-widget__trend--down {
    border-top: 7px solid #dc3545;
}

.top-info-widget__icon--weather {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18h10a4 4 0 0 0 0-8 6 6 0 0 0-11-2A4 4 0 0 0 7 18z'/%3E%3C/svg%3E");
}

.top-info-widget__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}

.main-menu__info {
    margin-left: auto;
}

@media (max-width: 1024px) {
    .main-menu {
        flex-direction: column;
        align-items: stretch;
    }

    /* отступы только от .header (20px), без дубля у .container */
    .header .c-top-menu .container {
        padding-left: 0;
        padding-right: 0;
    }

    .header .c-top-menu .top-menu {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 0;
        gap: 12px;
    }

    .header .top-menu > li:not(:nth-child(1)) {
        padding-top: 0;
    }

    .header .top-menu > li:first-child {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 68px);
    }

    .header .top-menu > li:first-child a {
        display: flex;
        align-items: center;
        max-width: 100%;
    }

    .header .top-menu > li:nth-child(2) {
        width: auto !important;
        margin-left: 0 !important;
        flex: 0 0 auto;
    }

    .header .top-menu__main {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: auto;
    }

    .header .top-menu__main-menu {
        display: none;
    }

    .header .icons {
        flex-shrink: 0;
    }

    .header .c-top-menu img.logo {
        display: block;
        height: 32px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        object-position: left center;
    }

    .header .c-top-menu img.search,
    .header .c-top-menu i.user {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 764px) {
    .main-menu__info {
        margin-left: 0;
        margin-top: 10px;
        display: flex;
        justify-content: flex-end;
    }
}

@media (max-width: 320px) {
    .header .c-top-menu .top-menu {
        gap: 10px;
    }

    .header .top-menu > li:first-child {
        max-width: calc(100% - 64px);
    }
}

/* Section titles and sidebar headings */
.cdr-name,
h2.right-sidebar {
    color: var(--color-root);
}

.cdr-name {
    border-bottom-color: var(--color-page-background);
}

/* Rubricators */
.sections-name {
    align-items: center;
}

.sections-name,
.sections-name a {
    color: var(--color-page-background);
}

.news-date,
.news-info .news-date,
.news-info-news .news-date,
.second-news-date {
    color: var(--color-page-background);
}

.sections-i {
    width: 5px;
    height: 1em;
    min-width: 5px;
    min-height: 1em;
    border-radius: 0;
    margin-right: 8px;
}

.sections-i:after {
    content: none;
    display: none;
}

/* Rubric dividers */
.other-news {
    border-bottom-color: var(--color-page-background);
}

h1,
h2,
h3,
h1.title,
h2.tv_news,
h2.other-news-name,
.main-h3,
.news-item a h3 {
    color: var(--color-root);
}

/* Article text */
.news-text,
.news-text p,
.news-text div,
.news-text li,
.news-text h2,
.news-text h3,
.news-text h4 {
    color: var(--color-root);
}

/* Author */
.author-job-title {
    color: var(--color-root);
}

.news-author,
.news-author a,
.author-name,
.author-name-link {
    color: var(--color-page-background);
}

.author-name-link:hover {
    color: var(--color-page-background);
    opacity: 0.75;
}

/* Photo captions */
.photo-source,
.photo-source p,
.photo-source-ai-label {
    color: var(--color-page-background);
}

/* Footer */
footer {
    border-top-color: var(--color-root);
}

footer .container > *:not(:last-child) {
    border-bottom-color: var(--color-root);
}

footer h3,
footer ul li,
footer a,
.footer-row1,
.footer-row2,
.footer-row3,
.footer-row4,
.footer-copyright p {
    color: var(--color-root);
}

/* Pagination */
.pagination li.active {
    background: var(--color-root);
    color: #fff;
}

.pagination li:hover {
    color: var(--color-root);
}

/* Next news — кнопка внизу статьи */
.next-news-link {
    background: var(--color-root);
    color: #fff;
}

/* Надпись между новостями при подгрузке */
.next-news-row {
    position: relative;
    background: var(--color-page-background);
}

.next-news-row:after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    border-top: var(--size-border, 2px) solid var(--color-gray-light);
    z-index: 0;
}

.next-news-row span {
    position: relative;
    z-index: 1;
    background: var(--color-page-background);
    color: var(--color-gray-light);
    padding: 0 var(--indent-main, 20px);
}

@media (max-width: 764px) {
    .next-news-row span {
        background: var(--color-page-background);
    }
}

[data-ads].loaded.loading:before,
[data-ads]:not(.loaded):before {
    background: var(--color-page-background);
}
