/**
 * news-single.css — стили шорткода [news_single]
 * Версия: 1.0.0
 */

/* -------------------------------------------------------
   Обёртка
------------------------------------------------------- */
.ns-wrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 40px;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

/* -------------------------------------------------------
   Хлебные крошки
------------------------------------------------------- */
.ns-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #999;
}

.ns-breadcrumb-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.ns-breadcrumb-link:hover {
    color: #333;
    text-decoration: underline;
}

.ns-breadcrumb-sep {
    color: #bbb;
    font-size: 15px;
    line-height: 1;
}

.ns-breadcrumb-current {
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* -------------------------------------------------------
   Заголовок
------------------------------------------------------- */
.ns-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 0 16px;
}

/* -------------------------------------------------------
   Мета (дата · филиал)
------------------------------------------------------- */
.ns-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.ns-meta-date {
    color: #888;
}

.ns-meta-sep {
    color: #ccc;
}

.ns-meta-filial {
    color: #555;
    font-weight: 500;
}

/* -------------------------------------------------------
   Основной блок: изображение + контент (float)
------------------------------------------------------- */
.ns-body {
    margin-bottom: 32px;
}

/* Превью — float left, ~1/3 ширины */
.ns-featured-wrap {
    float: left;
    width: 33%;
    margin: 4px 28px 16px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.ns-featured-link {
    display: block;
    text-decoration: none;
    position: relative;
}

/* Жёстко кропаем по соотношению 4:3 — вертикальные фото обрезаются */
.ns-featured-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ns-featured-link:hover .ns-featured-img {
    transform: scale(1.03);
}

.ns-content {
    /* Текст обтекает float */
}

.ns-content p:first-child {
    margin-top: 0;
}

.ns-clearfix {
    clear: both;
}

/* -------------------------------------------------------
   Галерея
------------------------------------------------------- */
.ns-section {
    margin-top: 40px;
}

.ns-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ns-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 1;
    background: #f0f0f0;
}

.ns-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.ns-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.ns-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ns-gallery-icon {
    color: #fff;
    line-height: 0;
}

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

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

/* -------------------------------------------------------
   Видео
------------------------------------------------------- */
.ns-video-link {
    display: block;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
}

.ns-video-thumb {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.ns-video-poster {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.ns-video-link:hover .ns-video-poster {
    opacity: 0.8;
}

.ns-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ns-video-play-btn {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    padding-left: 4px;
    transition: transform 0.25s ease, background 0.25s ease;
}

.ns-video-link:hover .ns-video-play-btn {
    transform: scale(1.1);
    background: #fff;
}

/* -------------------------------------------------------
   Адаптивность
------------------------------------------------------- */
@media (max-width: 768px) {
    .ns-title {
        font-size: 22px;
    }

    /* Фото превью — на мобилке полная ширина, не float */
    .ns-featured-wrap {
        float: none;
        width: 100%;
        margin: 0 0 20px;
    }

    .ns-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ns-title {
        font-size: 19px;
    }

    .ns-breadcrumb-current {
        max-width: 180px;
    }

    .ns-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ns-video-play-btn {
        width: 56px;
        height: 56px;
    }

    .ns-video-play-btn svg {
        width: 28px;
        height: 28px;
    }
}
