/* =========================================
   Стили для страницы просмотра новости
   ========================================= */

/* Карточка статьи */
.news-article-card {
    background: #fff !important;
    border-radius: 12px !important;
    border-top: 4px solid #0056b3 !important;
    padding: 2rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 1.5rem;
}

.news-article-title {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: #003f88 !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
}

.news-article-meta {
    display: flex;
    gap: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.news-article-meta i {
    color: #0056b3;
    margin-right: 4px;
}

.news-article-image {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.news-article-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.news-article-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

.news-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* =========================================
   САЙДБАР "ІНШІ НОВИНИ"
   ========================================= */
.news-sidebar {
    background: #fff !important;
    border-radius: 12px !important;
    border-top: 4px solid #0056b3 !important;
    padding: 1.5rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    position: sticky;
    top: 120px;
}

.news-sidebar-title {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #003f88 !important;
    margin-bottom: 1.2rem !important;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e9f5ff;
}

/* Мини-новости в сайдбаре */
.sidebar-news-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f5;
    text-decoration: none !important;
    transition: 0.2s;
}
.sidebar-news-item:last-of-type {
    border-bottom: none;
}
.sidebar-news-item:hover {
    background-color: #f8faff;
    padding-left: 5px;
    border-radius: 6px;
}

.sidebar-news-img {
    flex-shrink: 0;
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f3f5;
}
.sidebar-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-news-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-news-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* =========================================
   КНОПКА "ВСІ НОВИНИ" (СВЕТЛАЯ, НЕ ЯДОВИТАЯ)
   ========================================= */
.btn-all-news {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 1.5rem !important;
    padding: 12px 16px !important;
    background-color: #f1f5f9 !important; /* Светло-серый фон */
    color: #1b7bf2 !important; /* Синий текст */
    border-radius: 10px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

.btn-all-news:hover {
    background-color: #1b7bf2 !important; /* Заливается синим */
    color: #ffffff !important;
    border-color: #1b7bf2 !important;
    box-shadow: 0 4px 12px rgba(27, 123, 242, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* ==========================================================================
   КНОПКА СКАЧИВАНИЯ (Завантажити)
   ========================================================================== */
.news-article-content a[href*="download"],
.news-article-content a[href*="getdoc"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background-color: #1b7bf2 !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    margin: 15px 0 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(27, 123, 242, 0.3) !important;
    transition: all 0.3s ease !important;
    line-height: 1.2 !important;
    width: fit-content !important;
}

.news-article-content a[href*="download"]:hover,
.news-article-content a[href*="getdoc"]:hover {
    background-color: #1259b8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(27, 123, 242, 0.4) !important;
    color: #ffffff !important;
}

/* Автоматически добавляем иконку, если её нет в HTML */
.news-article-content a[href*="download"]::before,
.news-article-content a[href*="getdoc"]::before {
    content: "\F30A";
    font-family: "bootstrap-icons" !important;
    font-weight: normal !important;
    font-size: 1.1rem !important;
    margin-right: 6px !important;
}

/* Галерея вложений */
.news-attachments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #dee2e6;
}

.news-attachments video,
.news-attachments img {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.news-attachments video:hover,
.news-attachments img:hover {
    transform: scale(1.02);
}