/* news-modal.css — стили для сетки и модального окна новостей */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin: 40px 0 60px 0;
}
.news-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(12, 62, 33, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid rgba(12, 62, 33, 0.08);
}
.news-card:hover {
    box-shadow: 0 20px 40px rgba(12, 62, 33, 0.08);
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.2);
}
.news-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f4f6f1;
    transition: transform 0.5s ease;
}
.news-card:hover .news-card-img img {
    transform: scale(1.05);
}
.news-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.news-card-category {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.news-card-title {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-headings);
    color: var(--primary-color);
    margin-bottom: 4px;
    line-height: 1.4;
}
.news-card-desc {
    font-size: 15px;
    color: #556257;
    margin-bottom: 10px;
    flex: 1;
    line-height: 1.6;
}
.news-more {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    align-self: flex-start;
}
.news-more:hover {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.news-modal-overlay {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(40, 50, 50, 0.38);
    transition: opacity 0.2s;
    opacity: 0;
}
.news-modal-overlay.active {
    display: block;
    opacity: 1;
}
.news-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    top: 0; right: 0; bottom: 0;
    left: 0;
    justify-content: flex-end;
    align-items: stretch;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 0;
}
.news-modal.active {
    display: flex;
    opacity: 1;
}
.news-modal-gallery-wrap {
    background: #f4f6f1;
    min-width: 44vw;
    max-width: 54vw;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}
.news-modal-gallery {
    width: 100%;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-modal-gallery img {
    width: 98%;
    height: 64vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(33,108,61,0.07);
    background: #fff;
}
.news-modal-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(33,108,61,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 28px;
    cursor: pointer;
    z-index: 2;
    opacity: 0.85;
    transition: background 0.18s;
}
#news-modal-gallery-prev { left: 18px; }
#news-modal-gallery-next { right: 18px; }
.news-modal-gallery-nav:hover {
    background: #388e3c;
}
.news-modal-content {
    background: #fff;
    min-width: 340px;
    max-width: 600px;
    width: 100%;
    padding: 38px 38px 38px 38px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 2px 16px rgba(33,108,61,0.07);
    overflow-y: auto;
    max-height: 100vh;
}
.news-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 32px;
    color: #888;
    cursor: pointer;
    opacity: 0.7;
    transition: color 0.18s, opacity 0.18s;
}
.news-modal-close:hover {
    color: #216c3d;
    opacity: 1;
}
.news-modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #216c3d;
    margin-bottom: 10px;
}
.news-modal-date {
    font-size: 15px;
    color: #888;
    margin-bottom: 18px;
}
.news-modal-text {
    font-size: 17px;
    color: #222;
    white-space: pre-line;
}
@media (max-width: 900px) {
    .news-modal-gallery-wrap { min-width: 180px; max-width: 220px; }
    .news-modal-content { min-width: 0; max-width: 100vw; padding: 18px 12px 18px 12px; }
}
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-modal { flex-direction: column; }
    .news-modal-gallery-wrap { min-width: 100vw; max-width: 100vw; min-height: 180px; }
    .news-modal-content { min-width: 0; max-width: 100vw; padding: 18px 8px 18px 8px; }
}
