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

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

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

.tqp-badge-news {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    background: #EA580C;
    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;
}

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

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

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

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

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

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

.tqp-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;
}

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

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

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

.tqp-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);
}

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

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

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

/* Lightbox для просмотра фото */
.tqp-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;
}

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

.tqp-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 с главной */
.tqp-feed-wrap {
    font-family: 'Montserrat', system-ui, sans-serif;
    width: 100%;
}

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

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

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

.tqp-feed-all:hover {
    color: #EA580C;
}

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

.tqp-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;
}

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

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

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

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

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

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

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

.tqp-feed-card:hover .tqp-feed-card-title {
    color: #EA580C;
}

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

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

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

.tqp-badge-promo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 999px;
    background: #FFF7ED;
    border: 1px solid #FDBA74;
    color: #C2410C;
    font-size: 12.5px;
    font-weight: 700;
}
.tqp-article-dates {
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
}

.tqp-admin-stub-note {
    margin: 18px auto 0;
    max-width: 620px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #FFFBEB;
    border: 1px dashed #F59E0B;
    color: #92400E;
    font-size: 13px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.tqp-admin-stub-note button {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid #F59E0B;
    background: #FFFFFF;
    color: #92400E;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.tqp-admin-stub-note button:hover {
    background: #F59E0B;
    color: #FFFFFF;
}


/* Убираем дублирующий внешний заголовок страницы «Акции» на странице с [promotions] (v1.1.1) */
body.tqp-promo-page .site-main h1:not(.tqp-promo-main-title),
body.tqp-promo-page .page-title,
body.tqp-promo-page .entry-title {
    display: none !important;
}

.promo-header h1.tqp-promo-main-title {
    font-size: 28px;
    font-weight: 800;
    color: #1F2937;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.25;
}
