/* style.css - только для home.html */

/* ========== БАННЕР ========== */
.top-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.top-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== ЗАГОЛОВКИ ========== */
#korp-life {
    font-weight: 200;
    font-size: 1.3rem;
    margin-top: 4rem;
    margin-left: 1rem;
    margin-bottom: 1rem;
    color:rgb(85, 85, 85);
}

/* ========== КНОПКА ДОБАВЛЕНИЯ НОВОСТИ ========== */
.add-news-btn {
    display: inline-block;
    margin: 1rem 0 2rem 1rem;
    padding: 10px 24px;
    background: #2c2c2c;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.add-news-btn:hover {
    background: #1a1a1a;
    color: white;
}

/* ========== СЕТКА НОВОСТЕЙ ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 4rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

/* ========== КАРТОЧКА НОВОСТИ ========== */
.news-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Изображение */
.news-card__image {
    height: 220px;
    overflow: hidden;
    background: #f5f5f0;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card__image img {
    transform: scale(1.03);
}

.news-card__no-image {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #aaa;
    font-size: 0.85rem;
}

.news-card__no-image svg {
    width: 48px;
    height: 48px;
}

/* Контент */
.news-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card__title {
    margin: 0 0 0.75rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-card__title a {
    text-decoration: none;
    color: #2c2c2c;
    transition: color 0.2s;
}

.news-card__title a:hover {
    color: #7c5237;
}

/* Мета-информация */
.news-card__meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #8a8a8a;
    flex-wrap: wrap;
}

.news-card__date,
.news-card__author {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card__date svg,
.news-card__author svg {
    width: 14px;
    height: 14px;
}

/* Текст */
.news-card__desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #5a5a5a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__desc.expanded {
    display: block;
    -webkit-line-clamp: unset;
}

/* Кнопка "Ещё" */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #7c5237;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.75rem 0 0 0;
    margin-top: 1rem;
    transition: color 0.2s;
    width: fit-content;
}

.read-more-btn:hover {
    color: #2c2c2c;
}

/* ========== ФУТЕР ========== */
.footer {
    border-top: 1px solid #eeeeee;
    margin: 0 3rem;
    padding: 2rem 0;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 800px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card__image {
        height: 200px;
    }

    .nav-list {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-right: 0;
    }

    .nav-btn {
        margin-left: 0;
        font-size: 1rem;
    }

    .header h1 {
        font-size: 1.8rem;
        margin-left: 0;
        text-align: center;
    }

    body {
        padding: 1rem;
    }

    .footer {
        margin: 0 1rem;
    }
}