.shortnews-container {
    position: relative;
    z-index: 10;
    column-count: 3; /* Три колонки */
    column-gap: 20px; /* Расстояние между колонками */
    padding: 0 120px;
    margin-top: -160px;
}

/* Блоки новостей */
.shortnews {
    background: #181818;
    border-radius: 12px;
    padding: 15px;
    color: #ffffff;
    margin-bottom: 20px; /* Отступ между блоками внутри колонок */
    box-sizing: border-box;
    display: inline-block; /* Чтобы блоки занимали высоту содержимого */
    width: 100%; /* Автоматическая ширина для колонок */
}


.shortnews-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.author-nickname {
    font-size: 14px;
    font-weight: bold;
    color: #3498db;
}

.news-date {
    font-size: 12px;
    color: #888;
    margin-top: 2px; /* Отступ между ником и датой */
}


.shortnews-media img {
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.shortnews-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #333;
    margin-top: 10px;
}

.footer-left {
    display: flex;
    gap: 15px;
}

.footer-left button {
    background: none;
    border: none;
    color: #fff;
    display: flex;
    cursor: pointer;
    font-size: 16px;
    background-color: #333;
    border-radius: 18px;
    padding: 0px 10px;
    align-items: center;
    transition: background-color 0.3s ease;
}

/* Активное состояние лайка */
.footer-left button.liked {
    background-color: #4c2122; /* Красный фон для отмеченной кнопки */
    color: #fff;
}


.footer-left .reaction-icon-1,
.footer-left .comment-icon,
.footer-left {
    width: 16px;
    height: 30px;
    margin-right: 5px;
}

.share-icon {
    width: 16px;
    height: 30px;
}

.footer-right {
    display: flex;
    align-items: center;
    color: #aaa;
    font-size: 12px;
}

.footer-right .view-icon {
    width: 16px;
    height: 15px;
    margin-right: 5px;
}

.views-count {
    font-size: 15px;
}

/* Контейнер для текста и кнопки */
.shortnews-content-container {
    position: relative;
}

.shortnews-content {
    display: flex;
    gap: 10px;
    flex-direction: column;
    max-height: 125px; 
    padding-bottom: 4px;
    overflow: hidden;
    position: relative;
}

/* Стиль для кнопки "Подробнее..." */
.read-more-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-align: left;
    display: none; /* По умолчанию скрыта */
    margin-top: 5px;
}

/* Стиль для параграфа */
.shortnews-content p {
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}


ul.media_news_img_pls.xfieldimagegallery {
    padding-inline-start: 0px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(127px, 1fr));
    gap: 3px;
}

.image-grid img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    margin: 0px 0px;
    margin-bottom: -64px;
}

/* Основной контейнер галереи */
.shortnews-media-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: height 0.3s ease; /* Плавное изменение высоты контейнера */
}

.shortnews-media-gallery img {
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

/* Контейнер для галереи */
.gallery-container {
    position: relative;
    width: 100%;
}

/* Список галереи и элементы li */
.media_news_img_gallery {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    transition: transform 0.5s ease-in-out;
}

.media_news_img_gallery li {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Изображения галереи */
.media_news_img_gallery li img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

/* Общие стили для навигационных кнопок */
.gallery-nav {
    position: absolute;
    top: 50%;
    width: 26px;
    height: 26px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Показываем правую кнопку при наведении */
.gallery-container:hover .gallery-nav.next {
    opacity: 1;
    pointer-events: auto;
}

/* Позиционирование кнопок */
.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

/* Эффект наведения */
.gallery-nav:hover {
    background-color: rgba(0, 0, 0, 0.9);
}
/* Класс для анимации сердцебиения */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    20% {
        transform: scale(1.2);
    }
    40% {
        transform: scale(1);
    }
    60% {
        transform: scale(1.2);
    }
    80% {
        transform: scale(1);
    }
}

.like-icon.heartbeat {
    animation: heartbeat 0.6s ease-in-out;
}
