/* Сетка карточек новостей */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.news-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.news-card-img {
    width: 100%;
    height: 192px;
    object-fit: cover;
}
.news-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-card-date {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.news-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.3;
}
.news-card-desc {
    font-size: 14px;
    color: #475569;
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Модальное окно */
.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.news-modal {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    width: 900px;
    max-width: 98vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.news-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 32px;
    color: #888;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.news-modal-close:hover {
    color: #047857; /* emerald-700 */
}
.news-modal-content {
    display: flex;
    flex: 1;
    min-height: 400px;
}
.news-modal-gallery {
    width: 380px;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
    position: relative;
}
.news-modal-gallery-img {
    width: 320px;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}
.news-modal-gallery-controls {
    display: flex;
    gap: 12px;
}
.news-modal-gallery-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    color: #047857; /* emerald-700 */
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
}
.news-modal-gallery-btn:hover {
    background: #047857; /* emerald-700 */
    color: #fff;
}
.news-modal-details {
    flex: 1;
    padding: 38px 32px;
    overflow-y: auto;
}
.news-modal-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}
.news-modal-date {
    font-size: 14px;
    color: #888;
    margin-bottom: 18px;
}
.news-modal-desc {
    font-size: 17px;
    color: #222;
    line-height: 1.6;
}
@media (max-width: 1000px) {
    .news-modal {
        width: 99vw;
        min-width: 0;
    }
    .news-modal-content {
        flex-direction: column;
    }
    .news-modal-gallery {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        padding: 24px 0 0 0;
    }
    .news-modal-details {
        padding: 24px 18px;
    }
}
