/* =============================================
   1. ОСНОВНЫЕ КОНТЕЙНЕРЫ И ОБЁРТКИ
   ============================================= */
.mnf-news-wrapper {
    max-height: 100%;
    margin: 0 auto;
    width: 100%;
}

.mnf-news-feed {
    padding-right: 10px;
    margin: 20px 0;
}

/* Состояние загрузки */
.mnf-news-wrapper.loading {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

/* =============================================
   2. ЗАГОЛОВОК СТРАНИЦЫ И ПОИСК
   ============================================= */
.mnf-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.mnf-page-title {
    font-size: 30px;
    margin: 0;
    font-weight: 600;
    color: #42ace0;
}

/* Форма поиска (шорткод Relevanssi) */
.mnf-search-form {
    flex-shrink: 0;
}

.mnf-search-form form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.mnf-search-form input[type="search"],
.mnf-search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #3D3D3D;
    border-radius: 4px;
    background: #2C2C2C;
    color: #FFFFFF;
    font-size: 14px;
    width: 200px;
}

.mnf-search-form input[type="search"]:focus,
.mnf-search-form input[type="text"]:focus {
    outline: none;
    border-color: #1E90FF;
}

/* Кнопка поиска – иконка лупы (скрываем текст) */
.mnf-search-form button,
.mnf-search-form input[type="submit"] {
    background: #2C2C2C;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;        /* чтобы лупа была видна */
    line-height: 1;
    color: white;
    transition: background 0.3s;
    width: auto;            /* убираем фиксированную ширину */
}

.mnf-search-form button:hover,
.mnf-search-form input[type="submit"]:hover {
    background: #42ACE0;
}

/* =============================================
   3. ЛЕНТА НОВОСТЕЙ (СКРОЛЛ И ЭЛЕМЕНТЫ)
   ============================================= */
/* Скролл */
.mnf-news-feed::-webkit-scrollbar {
    width: 8px;
}
.mnf-news-feed::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.mnf-news-feed::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
.mnf-news-feed::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Элемент новости */
.mnf-news-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.mnf-news-thumb {
    flex-shrink: 0;
    width: 150px;
}

.mnf-news-thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    transition: transform 0.2s, opacity 0.2s;
}

.mnf-news-thumb img:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.mnf-news-content-wrapper {
    flex: 1;
}

.mnf-news-item h3 {
    margin: 0 0 5px;
    color: #42ace0;
}

.mnf-news-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
}

.mnf-news-meta span {
    margin-right: 15px;
}

.mnf-news-content {
    margin: 0;
}

/* =============================================
   4. ВИДЖЕТ НОВОСТНОЙ ЛЕНТЫ
   ============================================= */
.mnf-widget-list {
    list-style: none;
    padding-left: 0;
}

.mnf-widget-list li {
    margin-bottom: 8px;
    color: #42ace0;
}

.mnf-widget-date,
.mnf-widget-source {
    font-size: 0.8em;
    color: #888;
}

/* =============================================
   5. ПАГИНАЦИЯ (В СТИЛЕ БИБЛИОТЕКИ)
   ============================================= */
.mnf-pagination {
    margin-top: 30px;
    text-align: center;
}

.mnf-pagination .pagination-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.mnf-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: transparent;
    color: #FFFFFF;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.mnf-pagination .page-numbers.current {
    background: #2C2C2C;
    color: #FFFFFF;
    font-weight: bold;
    border-color: #2C2C2C;
}

.mnf-pagination .prev,
.mnf-pagination .next {
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    background: transparent;
    white-space: nowrap;
}

.mnf-pagination .dots {
    padding: 5px;
    color: #FFFFFF;
    opacity: 0.7;
    background: transparent;
    border: none;
}

.mnf-pagination a.page-numbers:not(.current):hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
}

.mnf-pagination .prev:hover,
.mnf-pagination .next:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Лупа при наведении на миниатюру – без круга */
.mnf-news-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.mnf-news-thumb::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 32px;
    color: white;
    text-shadow: 0 0 4px rgba(0,0,0,0.5);
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
    z-index: 2;
}
.mnf-news-thumb:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.mnf-news-thumb:hover img {
    filter: brightness(0.85);
    transform: scale(1.02);
    transition: all 0.25s;
}

/* =============================================
   6. АДАПТИВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================= */
@media (max-width: 600px) {
    .mnf-news-item {
        flex-direction: column;
    }
    .mnf-news-thumb {
        width: 100%;
        max-width: 150px;
        margin-bottom: 10px;
    }
}