/* Контейнер для всех виджетов */
.widgets-container {
    display: grid;
    /* Автоматически создаем колонки не менее 300px шириной */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Карточка отдельного виджета (секции) */
.widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: #1f2937;
    border-bottom: 2px solid #3b82f6; /* Синяя линия под заголовком */
    padding-bottom: 10px;
}

/* Внутренний список статей в виджете */
.widget-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Отдельная статья в виджете */
.widget-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Обёртка для картинки */
.widget-image-link {
    flex-shrink: 0; /* Чтобы картинка не сжималась */
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6; /* Заглушка, пока грузится фото */
}

/* Сама картинка */
.widget-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Идеально обрезает фото без искажения пропорций */
    transition: transform 0.3s ease;
}

.widget-image-link:hover .widget-image {
    transform: scale(1.1); /* Легкий зум при наведении */
}

/* Текстовый блок статьи */
.widget-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.widget-content h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.widget-content h4 a {
    text-decoration: none;
    color: #111827;
    transition: color 0.2s ease;
}

.widget-content h4 a:hover {
    color: #3b82f6; /* Меняем цвет ссылки при наведении */
}

.widget-content .meta {
    font-size: 0.8rem;
    color: #6b7280;
}