 /*
Theme Name: Gorn Дочерняя тема
Theme URI:   http://www.goodwinpress.ru/tema-gorn
Author: Goodwin
Description:  Новая адаптивная тема для WP от Гудвина. Шаблон для бизнеса, каталог товаров, дистрибуция.
Template:  gorn
 */

/* * * * * * * * * * *  Размещайте ваши стили только под этой строчкой, ниже  * * * * * * * * * *  */ 
/* ============================
   ГЛАВНАЯ СТРАНИЦА С НОВОСТЯМИ
   ============================ */

.news-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

/* Фильтр категорий */
.news-filter {
    margin-bottom: 40px;
    text-align: center;
}

.news-filter h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.filter-btn:hover {
    background-color: #e8e8e8;
    color: #333;
}

.filter-btn.active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* Сетка новостей */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Миниатюра */
.news-thumbnail {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.news-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: #fff;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Содержимое карточки */
.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 18px;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #e74c3c;
}

/* Метаинформация */
.news-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

.news-date,
.news-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-date i,
.news-author i {
    color: #e74c3c;
}

/* Анонс */
.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.news-excerpt p {
    margin: 0;
}

/* Ссылка "Читать полностью" */
.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.news-link:hover {
    color: #2c3e50;
    gap: 12px;
}

.news-link i {
    transition: transform 0.3s ease;
}

.news-link:hover i {
    transform: translateX(3px);
}

/* Пагинация */
.news-pagination {
    text-align: center;
    margin-top: 30px;
}

.news-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.news-pagination a,
.news-pagination span {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.news-pagination a:hover {
    background-color: #e74c3c;
    color: #fff;
}

.news-pagination .page-numbers.current {
    background-color: #2c3e50;
    color: #fff;
}

/* ============================
   АДАПТИВНОСТЬ
   ============================ */

/* Планшеты (до 991px) */
@media (max-width: 991px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-thumbnail {
        height: 200px;
    }

    .news-content {
        padding: 15px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .news-filter h2 {
        font-size: 20px;
    }
}

/* Малые мобильные (до 480px) */
@media (max-width: 480px) {
    .news-container {
        margin: 20px auto;
    }

    .news-thumbnail {
        height: 180px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-meta {
        flex-direction: column;
        gap: 8px;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
        text-align: center;
    }
}