/* CSS стили для отображения новостей
 * Версия: 1.1.3
 * Дата обновления: 25.05.2025
 */

:root {
    --ticker-background-color: #dee3e7; /* Общая переменная для фона бегущей строки и дат новостей */
    --primary-text-color: #000000; /* Цвет текста */
    --accent-color: #b71c1c; /* Цвет свежей новости */
    --border-color: #999999; /* Цвет рамок */
}

/* Стили бегущей строки */
.ticker-wrapper.has-js {
    padding: 0px 20px;
    height: 32px;
    display: block;
    border-radius: 6px;
    background-color: var(--ticker-background-color);
    font-size: 0.75em;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); 
    border: 1px solid rgba(0, 0, 0, 0.1); 
    position: relative;
    margin-top: 10px; /* Отступ от блока Последние новости */
}

.ticker {
    width: 100%;
    height: 25px;
    display: block;
    position: relative;
    overflow: hidden;
    background-color: var(--ticker-background-color);
}

.ticker-title {
    padding-top: 7px;
    color: #990000;
    font-weight: bold;
    background-color: var(--ticker-background-color); 
    text-transform: uppercase;
    font-size: 15px;
    position: absolute; 
    left: 100px; /* Отступ слева, чтобы разместить после кнопок управления */
    z-index: 2; 
}

.ticker-content {
    margin: 7px;
    padding-top: 0px;
    position: absolute;
    left: 240px !important; /* Сдвигаем начало бегущей строки правее заголовка */
    color: #1F527B;
    font-weight: 600;
    background-color: var(--ticker-background-color);
    overflow: hidden;
    white-space: nowrap;
    font-size: 15px;
}
 
.ticker-content:focus {
    outline: none;
}

.ticker-content a {
    text-decoration: none;
    color: #1F527B;
}

.ticker-content a:hover {
    text-decoration: underline;
    color: #0D3059;
}

.ticker-swipe {
    padding-top: 9px;
    position: absolute;
    top: 0px;
    background-color: var(--ticker-background-color);
    display: block;
    width: 100%;
    height: 23px;
}

.ticker-swipe span {
    margin-left: 2px;
    background-color: var(--ticker-background-color);
    border-bottom: 1px solid #1F527B;
    height: 12px;
    width: 7px;
    display: block;
}

.ticker-controls {
    padding: 10px 1px 0px 0px;
    margin: -10px;
}

/* Стили для всех кнопок */
.ticker-controls li {
    cursor: pointer;
    height: 24px;
    width: 24px;
    display: inline-block;
    margin: 0 3px;
    background: #ffffff;
    border: 2px solid #1F527B;
    border-radius: 50%;
    position: relative;
    text-indent: -9999px;
    transition: all 0.3s ease;
}

.ticker-controls li:hover {
    background: #1F527B;
    border-color: #1F527B;
}

.ticker-controls li:hover::after,
.ticker-controls li:hover::before {
    filter: brightness(10); /* Белые иконки при наведении */
}

/* Кнопка Предыдущий (стрелка влево) */
.ticker-controls li.jnt-prev:after {
    content: "";
    position: absolute;
    top: 8px;
    left: 7px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-right: 8px solid #333;
    border-bottom: 4px solid transparent;
}

/* Кнопка Следующий (стрелка вправо) */
.ticker-controls li.jnt-next:after {
    content: "";
    position: absolute;
    top: 8px;
    left: 9px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-left: 8px solid #333;
    border-bottom: 4px solid transparent;
}

/* Кнопка Пауза */
.ticker-controls li.jnt-play-pause:after {
    content: "";
    position: absolute;
    top: 7px;
    left: 6px;
    width: 4px;
    height: 10px;
    background: #333;
    border-radius: 1px;
}
.ticker-controls li.jnt-play-pause:before {
    content: "";
    position: absolute;
    top: 7px;
    left: 13px;
    width: 4px;
    height: 10px;
    background: #333;
    border-radius: 1px;
}

/* Кнопка Play (треугольник) */
.ticker-controls li.jnt-play-pause.paused:before {
    display: none;
}
.ticker-controls li.jnt-play-pause.paused:after {
    left: 9px;
    top: 7px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-left: 8px solid #333;
    border-bottom: 5px solid transparent;
    background: transparent;
}
.js-hidden {
    display: none;
}
.no-js-news {
    padding: 10px 0px 0px 45px;
    color: #F8F0DB;
}
.left .ticker-swipe {
    left: 80px;
}

.left .ticker-controls, .left .ticker-content, .left .ticker-title, .left .ticker {
    float: left;
}

.left .ticker-controls {
    /* Переопределяем позицию для режима left */
    position: absolute;
    left: 15px; /* Согласовано с основным стилем ticker-controls */
    top: 2px; /* Согласовано с основным стилем ticker-controls */
    float: none; /* Отменяем float для элемента управления */
}

.right .ticker-swipe {
    right: 80px;
}
.right .ticker-controls, .right .ticker-content, .right .ticker-title, .right .ticker {
    float: right;
}
.right .ticker-controls {
    padding-right: 6px;
}

/* ---------------------------------- *
     Стили новостных блоков
 * ---------------------------------- */

#latest_news {
    margin-bottom: 0px;
    margin-left: 0; /* Убираем отступы справа, чтобы блоки были ближе к левому краю */
}

#latest_news table {
    border-collapse: collapse;
    width: 100%;
}

#latest_news h3 {
    padding: 0 0 6px 0;
    color: #000000; /* Цвет заголовков */
    font-size: 18px; 
    font-weight: 500;
}

#latest_news td {
    vertical-align: top;
}

.news_date {
    float: right;
    padding: 3px 12px;
    white-space: nowrap;
    color: #333333;
    background-color: var(--ticker-background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    width: 50px; /* Фиксированная ширина ячеек дат */
    text-align: center; 
}

/* Подсветка даты для свежих новостей */
.news_date.new {
    background: #d64545;
    color: #ffffff;
    border: 1px solid #000000;
}

/* Подсветка даты для рекламных новостей */
.news_date.promo {
    background: #d64545;
    color: #ffffff;
    border: 1px solid #000000;
}

.news_title {
    padding: 3px 8px; /* Отступ между блоками (включая заголовки) */
    margin-bottom: 4px;
    background: transparent;
    border-top: 1px solid var(--border-color);
    font-size: 15px;
}

@media screen and (max-width: 1920px) {
.news_title {
    font-size: 14px;
    }
} 

#latest_news a {
    text-decoration: none;
    color: var(--primary-text-color);
    transition: color 0.2s ease;
}

#latest_news a:hover {
    color: var(--accent-color);
}

/* Подсветка свежих новостей */
#latest_news .new a {
    color: var(--accent-color);
    font-weight: 600;
}

/* Стили для новостей */
.news-wrapper {
    margin-bottom: 20px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-wrapper:hover {
    transform: translateY(-3px);
}

.news-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-text-color);
}

.news-content {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4b5e7a;
}

/* Новости в сети */
#web_news {
    display: none;
    margin: 12px 0;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.news-main-container-table {
    width: 100%;
    border-collapse: collapse;
    margin-left: 0; 
}

.news-main-container-table > tbody > tr > td {
    padding: 0;
    vertical-align: top;
}

.news-main-container-table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Выравнивание по левому краю */
}

.news-main-container-table > tbody > tr > td {
    flex: 0 1 auto; 
    margin-right: 12px; /* Отступ между блоками */
}

#latest_news.news-block-left {
    flex: 0 1 auto;
    margin-right: 12px; 
    width: auto;
    max-width: none;
}

#latest_news.news-block-right {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    position: relative;
    overflow: hidden;
}

.news-main-container-table::after {
    content: "";
    display: table;
    clear: both;
}

#latest_news > table {
    width: 100%;
}

#latest_news > table > tbody > tr > td {
    padding: 0;
}

.news-items-table {
    width: 100%;
}

.news-items-table td {
    padding: 0;
}

/* Специфические стили для новых новостей в блоках */
.news-block-right .news_date.new {
    background: #4682b4;
}

#latest_news.news-block-right .new a {
    color: #2e4b7a;
}
