/**
 * NewsFeeder Public Styles
 * Version: 1.0.0
 */

/* ====== Общие стили ====== */

.newsfeeder-container {
    max-width: 1200px;
    margin: 0 auto;
}

.newsfeeder-item {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.newsfeeder-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.newsfeeder-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    line-height: 1.4;
}

.newsfeeder-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.newsfeeder-title a:hover {
    color: #2271b1;
}

.newsfeeder-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.newsfeeder-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.newsfeeder-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.newsfeeder-summary {
    color: #444;
    line-height: 1.6;
}

.newsfeeder-empty {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 1px;
    grid-column: 1 / -1;
}

.newsfeeder-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ====== Шаблон: Список (Default) ====== */
.newsfeeder-template-default .newsfeeder-item {
    margin-bottom: 30px;
    padding: 20px;
}

.newsfeeder-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.newsfeeder-template-default .newsfeeder-thumbnail {
    flex: 0 0 120px;
}

.newsfeeder-template-default .newsfeeder-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.newsfeeder-template-default .newsfeeder-item:hover .newsfeeder-thumbnail img {
    transform: scale(1.05);
}

.newsfeeder-template-default .newsfeeder-content {
    flex: 1;
    min-width: 250px;
}

.newsfeeder-template-default .newsfeeder-summary {
    margin-bottom: 10px;
}

.newsfeeder-template-default .newsfeeder-categories {
    font-style: italic;
}

/* ====== Шаблон: Сетка (Grid) ====== */
.newsfeeder-template-grid,
.newsfeeder-grid-3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 20px 0;
}

.newsfeeder-grid-item,
.newsfeeder-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 1px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.newsfeeder-grid-item:hover,
.newsfeeder-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.newsfeeder-grid-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.newsfeeder-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.newsfeeder-grid-item:hover .newsfeeder-grid-image img,
.newsfeeder-card:hover .newsfeeder-grid-image img {
    transform: scale(1.05);
}

.newsfeeder-grid-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.newsfeeder-grid-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.4;
}

.newsfeeder-grid-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.newsfeeder-grid-summary {
    margin-bottom: 15px;
    flex: 1;
}

.newsfeeder-grid-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.newsfeeder-category-tag {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75em;
    color: #666;
}

/* Изображение по умолчанию */
.newsfeeder-grid-image img[src*="default-image.jpg"] {
    object-fit: contain;
    background: #f5f5f5;
}

/* ====== Адаптивность ====== */
@media (max-width: 768px) {
    .newsfeeder-template-grid,
    .newsfeeder-grid-3cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .newsfeeder-row {
        flex-direction: column;
    }
    
    .newsfeeder-template-default .newsfeeder-thumbnail {
        flex: 0 0 auto;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .newsfeeder-grid-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .newsfeeder-template-grid,
    .newsfeeder-grid-3cols {
        grid-template-columns: 1fr;
    }
    
    .newsfeeder-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .newsfeeder-template-default .newsfeeder-item {
        padding: 15px;
    }
}

/* ====== Утилиты ====== */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.text-center {
    text-align: center;
}

.newsfeeder-credits {
    color: #999;
    font-size: 0.8em;
}

.newsfeeder-credits a {
    color: #666;
    text-decoration: none;
}

.newsfeeder-credits a:hover {
    color: #2271b1;
}


.newsfeeder-featured-template-grid {
    max-width: 1200px;
    margin: 0 auto;
}

/* Главная статья */
.newsfeeder-featured-template-article {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newsfeeder-featured-template-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.featured-template-wrapper {
    display: flex;
    flex-direction: column;
}

.featured-template-image {
    width: 100%;
    max-height: 650px;
    overflow: hidden;
}

.featured-template-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.newsfeeder-featured-template-article:hover .featured-template-image img {
    transform: scale(1.02);
}

.featured-template-content {
    padding: 30px;
}

.featured-template-title {
    margin: 0 0 15px 0;
    font-size: 2em;
    line-height: 1.3;
}

.featured-template-title a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 700;
}

.featured-template-title a:hover {
    color: #2271b1;
}

.featured-template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.95em;
    color: #666;
}

.featured-template-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.featured-template-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.featured-template-summary {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.featured-template-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.featured-template-categories .category-tag {
    background: #f0f7ff;
    color: #2271b1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Сетка 2 колонки */
.newsfeeder-grid-template-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.newsfeeder-grid-template-2cols .newsfeeder-grid-template-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.newsfeeder-grid-template-2cols .newsfeeder-grid-template-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.newsfeeder-grid-template-2cols .grid-template-item-image {
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.newsfeeder-grid-template-2cols .grid-template-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.newsfeeder-grid-template-2cols .newsfeeder-grid-template-item:hover .grid-template-item-image img {
    transform: scale(1.05);
}

.newsfeeder-grid-template-2cols .grid-template-item-content {
    padding: 20px;
    flex: 1;
}

.newsfeeder-grid-template-2cols .grid-template-item-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    line-height: 1.4;
}

.newsfeeder-grid-template-2cols .grid-template-item-title a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
}

.newsfeeder-grid-template-2cols .grid-template-item-title a:hover {
    color: #2271b1;
}

.newsfeeder-grid-template-2cols .grid-template-item-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.newsfeeder-grid-template-2cols .grid-template-item-summary {
    color: #444;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Адаптивность */
@media (max-width: 768px) {
    .newsfeeder-grid-template-2cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-template-title {
        font-size: 1.5em;
    }
    
    .featured-template-content {
        padding: 20px;
    }
    
    .featured-template-summary {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .newsfeeder-featured-template-article {
        margin-bottom: 30px;
    }
    
    .featured-template-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsfeeder-grid-template-2cols .grid-template-item-image {
        height: 180px;
    }
}
