/* Стили ссылки "Назад" перенесены в общий класс .page-back-link (base.css). */

/* ===== Общая раскладка страницы ===== */

.news-page-wrap {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 40px 114px 80px;
}

.news-gallery-col {
    width: 40%;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    align-self: flex-start;
}

.news-details-col {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    color: #193D50;
    font-size: 18px;
}

.news-block-label {
    font-style: italic;
    font-weight: 200;
    color: #193D50;
    font-size: 18px;
    margin-bottom: 10px;
}

.news-block-text {
    color: #193D50;
    font-size: 18px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.news-vk-link {
    color: #193D50;
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
}

.news-vk-link:hover {
    text-decoration: underline;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-tag {
    background-color: #f0f4f7;
    color: #193D50;
    font-size: 13.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
}

/* ===== Галерея изображений ===== */

.news-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-main-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.news-main-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}

.news-zoom-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    background-color: rgba(25, 61, 80, 0);
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    pointer-events: none;
}

.news-main-image-wrap:hover .news-zoom-hint {
    opacity: 1;
    background-color: rgba(25, 61, 80, 0.28);
}

.news-image-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background-color: rgba(25, 61, 80, 0.75);
    color: white;
    font-size: 12.5px;
    padding: 4px 11px;
    border-radius: 50px;
    z-index: 2;
}

.news-thumbnail-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.news-thumbnail {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
}

.news-thumbnail:hover {
    opacity: 0.85;
}

.news-thumbnail.active {
    opacity: 1;
    border-color: #193D50;
}

/* Стрелки навигации (и на превью, и в модалке) */

.news-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background-color: rgba(25, 61, 80, 0.55);
    color: white;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.85;
    transition: background-color 0.2s, opacity 0.2s;
    z-index: 2;
}

.news-nav-arrow:hover {
    background-color: rgba(25, 61, 80, 0.85);
    opacity: 1;
}

.news-nav-prev {
    left: 10px;
}

.news-nav-next {
    right: 10px;
}

.news-modal-nav {
    width: 52px;
    height: 52px;
    font-size: 26px;
    background-color: rgba(255, 255, 255, 0.12);
}

.news-modal-nav:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

.news-modal-prev {
    left: 24px;
}

.news-modal-next {
    right: 24px;
}

/* ===== Модальное окно просмотра фото ===== */

.news-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.news-modal.show {
    opacity: 1;
    visibility: visible;
}

.news-modal-content {
    display: block;
    max-width: 90%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    cursor: default;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.94);
    transition: transform 0.25s ease;
}

.news-modal.show .news-modal-content {
    transform: scale(1);
}

.news-modal-close {
    position: fixed;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 38px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.news-modal-close:hover {
    color: #ccc;
}

.news-modal-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.14);
    padding: 6px 16px;
    border-radius: 50px;
    z-index: 1001;
}

/* ===== Адаптив ===== */

@media (max-width: 900px) {
    .news-page-wrap {
        flex-direction: column;
    }

    .news-gallery-col,
    .news-details-col {
        width: 100%;
        position: static;
    }
}

/* ===== Дата + "Редактировать новость" — раньше сидели на одной строке
   впритык друг к другу (кнопка наезжала на дату). Теперь отдельный ряд
   ниже заголовка: дата слева, кнопка редактирования справа/снизу. ===== */
.news-header-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
}

.news-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.news-edit-btn:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 480px) {
    .news-header-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
