/**
 * Теплоэнергия: Быстрые новости — стили опубликованной новости, фотогалереи, видео и ленты [teplo_news_feed].
 */

.tqn-article {
    font-family: 'Montserrat', system-ui, sans-serif;
    color: #1F2937;
    line-height: 1.7;
}

.tqn-article-meta {
    margin-bottom: 16px;
}

.tqn-badge-news {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    background: #22B822;
    border-radius: 20px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: inset 0 3px 1px rgba(0, 0, 0, 0.25);
    line-height: 1.3;
}

.tqn-article-body {
    font-size: 16px;
    color: #1F2937;
}

.tqn-article-body p {
    margin: 0 0 16px 0;
}

.tqn-article-body h3 {
    margin: 24px 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.tqn-article-body ul,
.tqn-article-body ol {
    margin: 0 0 18px 0;
    padding-left: 22px;
}

.tqn-article-body a {
    color: #2B52B8;
    text-decoration: underline;
}

/* Фотогалерея внутри новости */
.tqn-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 28px 0;
}

.tqn-gallery-item {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: #F3F4F6;
    aspect-ratio: 4 / 3;
    border: 1px solid #E5E7EB;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tqn-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.14);
}

.tqn-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Видео */
.tqn-videos {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 28px 0;
}

.tqn-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 18px;
    overflow: hidden;
    background: #0F172A;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.tqn-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.tqn-video-wrap.tqn-video-file {
    padding-bottom: 0;
}

.tqn-video-wrap.tqn-video-file video {
    display: block;
    width: 100%;
    max-height: 540px;
    background: #000;
}

/* Lightbox для просмотра фото */
.tqn-lightbox {
    position: fixed;
    inset: 0;
    z-index: 250000;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tqn-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.tqn-lightbox-close {
    position: fixed;
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

/* Шорткод [teplo_news_feed] — дизайн 1:1 с главной */
.tqn-feed-wrap {
    font-family: 'Montserrat', system-ui, sans-serif;
    width: 100%;
}

.tqn-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.tqn-feed-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
}

.tqn-feed-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #000;
    text-decoration: none;
}

.tqn-feed-all:hover {
    color: #22B822;
}

.tqn-feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tqn-feed-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #EDEDED;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.tqn-feed-link {
    display: flex;
    align-items: stretch;
    gap: 20px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
}

.tqn-feed-thumb {
    width: 160px;
    height: 160px;
    min-width: 160px;
    border-radius: 26px;
    overflow: hidden;
    background: #F3F4F6;
}

.tqn-feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tqn-feed-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tqn-feed-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tqn-feed-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9CA3AF;
}

.tqn-feed-card-title {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 600;
    color: #1F2937;
    line-height: 1.4;
}

.tqn-feed-card:hover .tqn-feed-card-title {
    color: #22B822;
}

.tqn-feed-excerpt {
    margin: 0;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

.tqn-feed-empty {
    text-align: center;
    padding: 32px;
    background: #F9FAFB;
    border-radius: 16px;
    color: #6B7280;
}

@media (max-width: 767px) {
    .tqn-feed-link {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .tqn-feed-thumb {
        width: 100%;
        height: 190px;
        min-width: 0;
    }
    .tqn-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
