/* ========================================
   style_news_lab.css — Новости лаборатории (синяя гамма)
   ======================================== */

body {
    background-color: #f6f6f6;
}

/* Шапка раздела новостей */
.news-header-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    text-align: left;
}

.news-page-title {
    font-family: "Inter-Bold", sans-serif;
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 15px;
    color: #161551;
    position: relative;
    display: inline-block;
}

.news-page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1a1982, #4a49d9);
    border-radius: 2px;
}

.news-page-subtitle {
    font-family: "Inter-Regular", sans-serif;
    font-size: 18px;
    max-width: 600px;
    margin: 20px 0 0;
    color: #666;
}

/* Контейнер новостей */
.news-container {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* Сообщение "нет новостей" */
.no-news {
    text-align: center;
    font-size: 18px;
    color: #999;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e7e8f3;
    border-radius: 20px;
}

.no-news i {
    font-size: 48px;
    color: #1a1982;
    margin-bottom: 20px;
    display: block;
}

.no-news p {
    margin: 0;
}

/* Карточка новости */
.news-item {
    background: #ffffff;
    border: 1px solid #e7e8f3;
    border-radius: 20px;
    margin-bottom: 40px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(26, 25, 130, 0.12);
}

.news-image-link {
    display: block;
    overflow: hidden;
    background: #f0f0fa;
}

.news-item-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
    background: #fff;
}

.news-item:hover .news-item-image {
    transform: scale(1.02);
}

.news-item-image-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e7e8f3 0%, #d0d1e8 100%);
    color: #1a1982;
    font-size: 64px;
}

.news-item-content {
    padding: 30px;
}

.news-item-header {
    margin-bottom: 15px;
}

.news-date {
    font-family: "Inter-Regular", sans-serif;
    font-size: 13px;
    color: #1a1982;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 12px;
    background: #e7e8f3;
    border-radius: 20px;
}

/* Название новости */
.news-title {
    font-family: "Inter-Bold", sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.3;
    text-align: left;
    color: #161551;
}

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

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

/* Описание */
.news-excerpt {
    font-family: "Inter-Regular", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 20px;
    text-align: left;
    color: #555;
}

/* Кнопка "Читать далее" */
.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Inter-Medium", sans-serif;
    font-size: 15px;
    color: #1a1982;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid #1a1982;
    transition: all 0.3s;
}

.btn-read-more:hover {
    color: #4a49d9;
    border-bottom-color: #4a49d9;
    gap: 12px;
}

/* ========================================
   Страница конкретной новости (news_view.php)
   ======================================== */

/* Контейнер новости */
.news-detail-container {
    max-width: 900px;
    margin: 140px auto 80px;
    padding: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(26, 25, 130, 0.1);
    border: 1px solid #e7e8f3;
}

/* Шапка новости */
.news-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e7e8f3;
    text-align: left;
}

/* Заголовок страницы новости */
.news-detail-title {
    font-family: "Inter-Bold", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #161551;
    margin: 0 0 15px;
    line-height: 1.3;
    text-align: left;
}

/* Мета-информация */
.news-detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.news-detail-date {
    font-family: "Inter-Medium", sans-serif;
    font-size: 14px;
    color: #1a1982;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e7e8f3;
    padding: 6px 14px;
    border-radius: 30px;
}

/* Главное изображение */
.news-main-image-wrapper {
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    text-align: center;
}

.news-main-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
}

/* Содержание новости */
.news-detail-content {
    font-family: "Inter-Regular", sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin: 30px 0;
    white-space: pre-wrap;
    text-align: left;
}

.news-detail-content h1,
.news-detail-content h2,
.news-detail-content h3 {
    color: #161551;
    margin: 1.5em 0 0.5em;
}

.news-detail-content p {
    margin-bottom: 1.2em;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

/* Галерея */
.news-gallery {
    margin: 40px 0;
    padding-top: 30px;
    border-top: 2px solid #e7e8f3;
}

.gallery-title {
    font-family: "Inter-Bold", sans-serif;
    font-size: 24px;
    color: #161551;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.gallery-title i {
    color: #1a1982;
    font-size: 28px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Изображения в галерее */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0fa;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 25, 130, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 32px;
}

/* Кнопка назад */
.news-detail-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e7e8f3;
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: #f0f0fa;
    color: #1a1982;
    text-decoration: none;
    border-radius: 30px;
    font-family: "Inter-Medium", sans-serif;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #e0e1f0;
    color: #4a49d9;
    transform: translateX(-3px);
}

.btn-back i {
    font-size: 14px;
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(26, 25, 130, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 56px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.lightbox-close:hover {
    color: #1a1982;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */
@media (max-width: 768px) {
    .news-header-section {
        padding: 100px 20px 40px;
    }
    
    .news-page-title {
        font-size: 28px;
    }
    
    .news-page-subtitle {
        font-size: 16px;
    }
    
    .news-container {
        padding: 0 15px;
    }
    
    .news-item-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 20px;
    }
    
    .news-excerpt {
        font-size: 14px;
    }
    
    .news-detail-container {
        margin: 100px 20px 60px;
        padding: 25px;
    }
    
    .news-detail-title {
        font-size: 26px;
    }
    
    .news-detail-content {
        font-size: 15px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .news-page-title {
        font-size: 24px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    .news-excerpt {
        font-size: 13px;
    }
    
    .news-detail-title {
        font-size: 22px;
    }
    
    .news-detail-container {
        padding: 20px;
    }
    
    .news-detail-content {
        font-size: 14px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .btn-back {
        padding: 10px 20px;
        font-size: 13px;
    }
}