/* ============================================
   ПЛАГИН «РАНЕЕ ВЫ ЧИТАЛИ И СЕЙЧАС ЧИТАЮТ» v2.2
   Стиль карточек как на NEWS161.RU
   ============================================ */

:root {
    --vps-terracotta: #C84B31;
    --vps-orange: #E85D26;
    --vps-orange-bright: #F26522;
    --vps-graphite: #1A1A1A;
    --vps-graphite-light: #333333;
    --vps-bg-light: #F7F5F2;
    --vps-bg-white: #FFFFFF;
    --vps-border: #E8E4DF;
    --vps-text-primary: #1A1A1A;
    --vps-text-secondary: #6B6560;
    --vps-text-muted: #99938D;
    --vps-shadow: 0 2px 12px rgba(26, 26, 26, 0.07);
    --vps-shadow-hover: 0 8px 28px rgba(26, 26, 26, 0.12);
    --vps-radius: 8px;
    --vps-radius-sm: 4px;
    --vps-font-serif: Georgia, 'Times New Roman', Times, serif;
    --vps-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --vps-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== БЛОК ===== */
.vps-block {
    margin: 24px 0;
    padding: 0;
    background: transparent;
}

.vps-block-title {
    font-family: var(--vps-font-serif);
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
    margin: 0 0 20px 0;
    color: var(--vps-graphite);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.vps-block-title svg {
    flex-shrink: 0;
    color: var(--vps-graphite);
    width: 24px;
    height: 24px;
}

.vps-block-title span {
    display: inline;
}

.vps-block-sidebar .vps-block-title {
    font-size: 18px;
    margin-bottom: 16px;
}

.vps-block-sidebar .vps-block-title svg {
    width: 20px;
    height: 20px;
}

/* ===== СЛАЙДЕР ===== */
.vps-slider-outer {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.vps-slider {
    width: 100%;
    padding-bottom: 44px;
}

.vps-slide {
    height: auto;
}

/* ===== КАРТОЧКА ЗАПИСИ — стиль как на сайте ===== */
.vps-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--vps-radius);
    overflow: hidden;
    background: var(--vps-bg-white);
    box-shadow: var(--vps-shadow);
    transition: transform var(--vps-transition), box-shadow var(--vps-transition);
}

.vps-card-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--vps-shadow-hover);
}

/* Картинка на всю ширину карточки */
.vps-card-image-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--vps-bg-light);
    position: relative;
}

.vps-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.vps-card-link:hover .vps-card-img {
    transform: scale(1.04);
}

/* Контент под картинкой */
.vps-card-content {
    padding: 16px;
}

/* Бейджи категорий — оранжевые как на сайте */
.vps-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.vps-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--vps-orange);
    color: #fff;
    font-family: var(--vps-font-sans);
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    line-height: 1.4;
    transition: background var(--vps-transition);
}

.vps-tag:hover {
    background: var(--vps-terracotta);
}

/* Заголовок — чёрный курсив как на сайте */
.vps-card-title {
    font-family: var(--vps-font-serif);
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.35;
    margin: 0 0 12px 0;
    color: var(--vps-graphite);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--vps-transition);
}

.vps-card-link:hover .vps-card-title {
    color: var(--vps-terracotta);
}

/* Мета — серый цвет как на сайте */
.vps-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--vps-border);
}

.vps-meta-author,
.vps-meta-date {
    font-family: var(--vps-font-sans);
    font-size: 13px;
    color: var(--vps-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.vps-meta-author svg,
.vps-meta-date svg {
    width: 14px;
    height: 14px;
    color: var(--vps-text-muted);
    flex-shrink: 0;
}

/* ===== НАВИГАЦИЯ ===== */
.vps-slider-nav {
    width: 40px;
    height: 40px;
    background: var(--vps-terracotta);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--vps-transition), transform var(--vps-transition), box-shadow var(--vps-transition);
    box-shadow: 0 2px 8px rgba(200, 75, 49, 0.3);
    z-index: 10;
    padding: 0;
}

.vps-slider-nav:hover {
    background: var(--vps-orange-bright);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(200, 75, 49, 0.4);
}

.vps-slider-nav svg {
    width: 18px;
    height: 18px;
}

.vps-nav-prev {
    left: 8px;
}

.vps-nav-next {
    right: 8px;
}

/* ===== ПАГИНАЦИЯ ===== */
.vps-slider-pagination {
    bottom: 4px !important;
}

.vps-slider-pagination .swiper-pagination-bullet {
    background: var(--vps-border);
    opacity: 1;
    width: 10px;
    height: 10px;
    transition: background var(--vps-transition), transform var(--vps-transition);
}

.vps-slider-pagination .swiper-pagination-bullet-active {
    background: var(--vps-terracotta);
    transform: scale(1.2);
}

/* ===== САЙДБАР ===== */
.vps-block-sidebar {
    padding: 18px;
    background: var(--vps-bg-white);
    border-radius: var(--vps-radius);
    box-shadow: var(--vps-shadow);
    border: 1px solid var(--vps-border);
}

.vps-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vps-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: var(--vps-radius-sm);
    transition: background var(--vps-transition);
}

.vps-sidebar-item:hover {
    background: var(--vps-bg-light);
}

.vps-sidebar-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--vps-radius-sm);
    flex-shrink: 0;
    background: var(--vps-bg-light);
}

.vps-sidebar-title {
    font-family: var(--vps-font-serif);
    font-size: 14px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.35;
    color: var(--vps-graphite);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--vps-transition);
}

.vps-sidebar-item:hover .vps-sidebar-title {
    color: var(--vps-terracotta);
}

/* ===== НЕТ ЗАПИСЕЙ ===== */
.vps-no-posts {
    font-family: var(--vps-font-sans);
    font-size: 14px;
    color: var(--vps-text-muted);
    text-align: center;
    padding: 24px;
}

/* ===== FALLBACK GRID ===== */
.vps-fallback-grid .swiper {
    display: block !important;
    padding-bottom: 0 !important;
}

.vps-fallback-grid .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.vps-fallback-grid .swiper-slide {
    width: 100% !important;
    margin-right: 0 !important;
}

.vps-fallback-grid .vps-slider-pagination,
.vps-fallback-grid .vps-slider-nav {
    display: none !important;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .vps-card-image-wrap {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .vps-block {
        margin: 16px 0;
    }
    .vps-block-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    .vps-card-image-wrap {
        height: 170px;
    }
    .vps-card-title {
        font-size: 15px;
    }
    .vps-card-content {
        padding: 14px;
    }
    .vps-slider-nav {
        width: 34px;
        height: 34px;
    }
    .vps-slider-nav svg {
        width: 16px;
        height: 16px;
    }

    .vps-fallback-grid .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .vps-block {
        margin: 12px 0;
    }
    .vps-block-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
    .vps-block-title svg {
        width: 20px;
        height: 20px;
    }
    .vps-card-image-wrap {
        height: 160px;
    }
    .vps-card-content {
        padding: 12px;
    }
    .vps-card-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .vps-card-meta {
        gap: 10px;
    }
    .vps-meta-author,
    .vps-meta-date {
        font-size: 12px;
    }
    .vps-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
    .vps-sidebar-thumb {
        width: 52px;
        height: 52px;
    }
    .vps-sidebar-title {
        font-size: 13px;
    }
    .vps-sidebar-item {
        padding: 8px;
        gap: 10px;
    }

    .vps-fallback-grid .swiper-wrapper {
        grid-template-columns: 1fr;
    }
}