/* ============================================================
   yeti-news.css — Архивы постов (Bono theme) — Йети
   wp-content/themes/bono_child/css/yeti-news.css
   ============================================================ */

/* ── Заголовок страницы ─────────────────────────────────────── */
.category .page-header .page-title,
.tag .page-header .page-title,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .page-header .page-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    letter-spacing: -.3px !important;
    padding-bottom: .875rem !important;
    border-bottom: 1.5px solid #85ad37 !important;
    margin-bottom: 1rem !important;
}

/* ── Убрать padding: 35px от Bono ───────────────────────────── */
.archive:not(.tax-product_cat):not(.post-type-archive-product) .post-cards,
.category .post-cards,
.tag .post-cards,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .post-cards--vertical,
.category .post-cards--vertical,
.tag .post-cards--vertical {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Сетка: 4 колонки ───────────────────────────────────────── */
.category .post-cards--vertical,
.tag .post-cards--vertical,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .post-cards--vertical {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
}

/* Убрать пустые разделители Bono */
.category .post-cards--vertical > .page-separator,
.tag .post-cards--vertical > .page-separator,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .post-cards--vertical > .page-separator {
    display: none !important;
}

/* ── Карточка поста ──────────────────────────────────────────── */
.category .post-card--vertical,
.tag .post-card--vertical,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .post-card--vertical {
    background: #fff !important;
    border: 1px solid #e8e8e6 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: border-color .18s !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
}

.category .post-card--vertical:hover,
.tag .post-card--vertical:hover,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .post-card--vertical:hover {
    border-color: #85ad37 !important;
    box-shadow: none !important;
}

/* ── Картинка ────────────────────────────────────────────────── */
/* Bono кладёт thumbnail последним — поднимаем через order */
.archive:not(.tax-product_cat) .post-card--vertical .post-card__thumbnail,
.category .post-card--vertical .post-card__thumbnail,
.tag .post-card--vertical .post-card__thumbnail {
    order: -3 !important;
    display: block !important;
    width: 100% !important;
    flex: 0 0 200px !important;  /* фиксированная высота 200px */
    height: 200px !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 !important;        /* убрать Bono margin: 0 -30px 1em */
    background-color: #f0f4e8 !important;
}

.archive:not(.tax-product_cat) .post-card--vertical .post-card__thumbnail-image,
.category .post-card--vertical .post-card__thumbnail-image,
.tag .post-card--vertical .post-card__thumbnail-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: transform .3s !important;
}

.archive:not(.tax-product_cat) .post-card--vertical:hover .post-card__thumbnail-image,
.category .post-card--vertical:hover .post-card__thumbnail-image {
    transform: scale(1.03) !important;
}

/* Bono media query тоже перебиваем */
@media (min-width: 992px) {
    .archive:not(.tax-product_cat) .post-card--vertical .post-card__thumbnail,
    .category .post-card--vertical .post-card__thumbnail,
    .tag .post-card--vertical .post-card__thumbnail {
        margin: 0 !important;
        flex: 0 0 200px !important;
        height: 200px !important;
    }
}

/* ── Заголовок ───────────────────────────────────────────────── */
.archive:not(.tax-product_cat) .post-card--vertical .post-card__title,
.category .post-card--vertical .post-card__title,
.tag .post-card--vertical .post-card__title {
    order: -2 !important;
    padding: 11px 13px 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    flex: 1 0 auto !important;
}

.archive:not(.tax-product_cat) .post-card--vertical .post-card__title a,
.category .post-card--vertical .post-card__title a,
.tag .post-card--vertical .post-card__title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: color .15s !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.archive:not(.tax-product_cat) .post-card--vertical:hover .post-card__title a,
.category .post-card--vertical:hover .post-card__title a {
    color: #85ad37 !important;
}

/* ── Описание ────────────────────────────────────────────────── */
.archive:not(.tax-product_cat) .post-card--vertical .post-card__description,
.category .post-card--vertical .post-card__description,
.tag .post-card--vertical .post-card__description {
    order: -1 !important;
    padding: 0 13px !important;
    font-size: 12px !important;
    color: #777 !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

/* ── Мета (дата, просмотры, категория) ───────────────────────── */
.archive:not(.tax-product_cat) .post-card--vertical .post-card__meta,
.category .post-card--vertical .post-card__meta,
.tag .post-card--vertical .post-card__meta {
    order: 0 !important;
    padding: 6px 13px 11px !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    margin-top: auto !important;
    flex: 0 0 auto !important;
}

.archive:not(.tax-product_cat) .post-card--vertical .post-card__date,
.category .post-card--vertical .post-card__date {
    font-size: 11px !important;
    color: #bbb !important;
}

.archive:not(.tax-product_cat) .post-card--vertical .post-card__date:before,
.category .post-card--vertical .post-card__date:before {
    color: #85ad37 !important;
}

.archive:not(.tax-product_cat) .post-card--vertical .post-card__category,
.category .post-card--vertical .post-card__category,
.tag .post-card--vertical .post-card__category {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .8px !important;
    text-transform: uppercase !important;
    color: #85ad37 !important;
}

.archive:not(.tax-product_cat) .post-card--vertical .post-card__category a,
.category .post-card--vertical .post-card__category a {
    color: #85ad37 !important;
    text-decoration: none !important;
}

/* ── Отступ от сайдбара ──────────────────────────────────────── */
.archive:not(.tax-product_cat):not(.post-type-archive-product) #primary,
.category #primary,
.tag #primary {
    padding-right: 24px !important;
    padding-left: 0 !important;
}

/* ── Пагинация ───────────────────────────────────────────────── */
.category .pagination .nav-links,
.tag .pagination .nav-links,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .pagination .nav-links {
    display: flex !important;
    gap: 6px !important;
    justify-content: center !important;
    margin-top: 2rem !important;
    flex-wrap: wrap !important;
}

.category .pagination .page-numbers,
.tag .pagination .page-numbers,
.archive:not(.tax-product_cat):not(.post-type-archive-product) .pagination .page-numbers {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    border: 1px solid #e0e0de !important;
    font-size: 13px !important;
    color: #555 !important;
    text-decoration: none !important;
    transition: border-color .15s, color .15s !important;
    background: #fff !important;
}

.archive:not(.tax-product_cat) .pagination .nav-links .page-numbers:not(.dots):not(.current):before,
.category .pagination .nav-links .page-numbers:not(.dots):not(.current):before {
    display: none !important;
    background: none !important;
}

.archive:not(.tax-product_cat) .pagination .page-numbers:hover,
.category .pagination .page-numbers:hover {
    border-color: #85ad37 !important;
    color: #85ad37 !important;
}

.archive:not(.tax-product_cat) .pagination .page-numbers.current,
.category .pagination .page-numbers.current {
    background: #85ad37 !important;
    border-color: #85ad37 !important;
    color: #fff !important;
}

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .category .post-cards--vertical,
    .tag .post-cards--vertical,
    .archive:not(.tax-product_cat):not(.post-type-archive-product) .post-cards--vertical {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 680px) {
    .category .post-cards--vertical,
    .tag .post-cards--vertical,
    .archive:not(.tax-product_cat):not(.post-type-archive-product) .post-cards--vertical {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}


/* ============================================================
   САЙДБАР — стиль в духе новостного блока, миниатюрный
   ============================================================ */

/* ── Заголовок виджета ───────────────────────────────────────── */
.category #secondary .widget-title,
.tag #secondary .widget-title,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .widget-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    letter-spacing: -.2px !important;
    padding-bottom: .6rem !important;
    margin-bottom: 1rem !important;
    border-bottom: 1.5px solid #85ad37 !important;
}

/* ── Список постов в виджете ─────────────────────────────────── */
.category #secondary .post-box,
.tag #secondary .post-box,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0ee !important;
    text-decoration: none !important;
    color: inherit !important;
}

.category #secondary .post-box:last-child,
.tag #secondary .post-box:last-child,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box:last-child {
    border-bottom: none !important;
}

/* ── Миниатюра ───────────────────────────────────────────────── */
.category #secondary .post-box__thumbnail,
.tag #secondary .post-box__thumbnail,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__thumbnail {
    flex: 0 0 64px !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #f0f4e8 !important;
}

.category #secondary .post-box__thumbnail img,
.tag #secondary .post-box__thumbnail img,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 6px !important;
}

/* ── Контент виджет-поста ────────────────────────────────────── */
.category #secondary .post-box__content,
.tag #secondary .post-box__content,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

/* ── Заголовок поста в виджете ───────────────────────────────── */
.category #secondary .post-box__title,
.tag #secondary .post-box__title,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.category #secondary .post-box__title a,
.tag #secondary .post-box__title a,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: color .15s !important;
}

.category #secondary .post-box:hover .post-box__title a,
.tag #secondary .post-box:hover .post-box__title a,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box:hover .post-box__title a {
    color: #85ad37 !important;
}

/* ── Дата в виджете ──────────────────────────────────────────── */
.category #secondary .post-box__date,
.tag #secondary .post-box__date,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__date {
    font-size: 10px !important;
    color: #bbb !important;
}

/* ── Описание в виджете ──────────────────────────────────────── */
.category #secondary .post-box__description,
.tag #secondary .post-box__description,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box__description {
    font-size: 11px !important;
    color: #888 !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 !important;
}

/* ── Ссылка «Читать далее» ───────────────────────────────────── */
.category #secondary .post-box .more-link,
.tag #secondary .post-box .more-link,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .post-box .more-link {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #85ad37 !important;
    text-decoration: none !important;
    letter-spacing: .5px !important;
}

/* ── Обёртка виджета ─────────────────────────────────────────── */
.category #secondary .widget,
.tag #secondary .widget,
.archive:not(.tax-product_cat):not(.post-type-archive-product) #secondary .widget {
    margin-bottom: 2rem !important;
    padding-bottom: 1rem !important;
}


/* ============================================================
   САЙДБАР — wp-block-latest-posts (точные классы из DevTools)
   ============================================================ */

/* ── Заголовок секции сайдбара ───────────────────────────────── */
#secondary .wp-block-heading,
#secondary h3.wp-block-heading {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    padding-bottom: .6rem !important;
    margin-bottom: .75rem !important;
    border-bottom: 1.5px solid #85ad37 !important;
}

/* ── Список постов ───────────────────────────────────────────── */
#secondary .wp-block-latest-posts__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

/* ── Один пост ───────────────────────────────────────────────── */
#secondary .wp-block-latest-posts__list > li {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0ee !important;
}

#secondary .wp-block-latest-posts__list > li:last-child {
    border-bottom: none !important;
}

/* ── Картинка ────────────────────────────────────────────────── */
#secondary .wp-block-latest-posts__featured-image {
    flex: 0 0 70px !important;
    width: 70px !important;
    height: 70px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

#secondary .wp-block-latest-posts__featured-image img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 6px !important;
    max-width: none !important;
}

/* ── Правая часть (заголовок + дата + описание) ──────────────── */
#secondary .wp-block-latest-posts__list > li > a.wp-block-latest-posts__post-title,
#secondary .wp-block-latest-posts__list > li > time,
#secondary .wp-block-latest-posts__list > li > div.wp-block-latest-posts__post-excerpt,
#secondary .wp-block-latest-posts__list > li > a.wp-block-latest-posts__read-more {
    display: block !important;
}

/* ── Заголовок поста ─────────────────────────────────────────── */
#secondary .wp-block-latest-posts__post-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #85ad37 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color .15s !important;
    margin-bottom: 3px !important;
}

#secondary .wp-block-latest-posts__post-title:hover {
    color: #5a8c1a !important;
    text-decoration: none !important;
}

/* ── Дата ────────────────────────────────────────────────────── */
#secondary .wp-block-latest-posts__post-date {
    font-size: 10px !important;
    color: #bbb !important;
    margin-bottom: 4px !important;
    display: block !important;
}

/* ── Описание ────────────────────────────────────────────────── */
#secondary .wp-block-latest-posts__post-excerpt {
    font-size: 11px !important;
    color: #777 !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* ── Ссылка «Читать далее» ───────────────────────────────────── */
#secondary .wp-block-latest-posts__read-more {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #85ad37 !important;
    text-decoration: none !important;
    letter-spacing: .4px !important;
    margin-top: 3px !important;
    display: inline-block !important;
}

#secondary .wp-block-latest-posts__read-more:hover {
    color: #5a8c1a !important;
}

/* ── Когда картинки нет — контент занимает всю ширину ───────── */
#secondary .wp-block-latest-posts__list > li:not(:has(.wp-block-latest-posts__featured-image)) {
    flex-direction: column !important;
}


/* ── Исправление: картинка + текст в одну строку ─────────────── */

/* li — flex строка */
#secondary .wp-block-latest-posts__list > li {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    align-items: flex-start !important;
}

/* Картинка — фиксированная, не сжимается */
#secondary .wp-block-latest-posts__featured-image {
    flex: 0 0 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
}

/* Все текстовые элементы после картинки — в одну колонку */
#secondary .wp-block-latest-posts__post-title,
#secondary .wp-block-latest-posts__post-date,
#secondary .wp-block-latest-posts__post-excerpt,
#secondary .wp-block-latest-posts__read-more {
    min-width: 0 !important;
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    flex-shrink: 1 !important;
}

/* Заголовок — не переносить по буквам */
#secondary .wp-block-latest-posts__post-title {
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-line-clamp: 3 !important;
}


/* ── Grid-подход: картинка в первой колонке, весь текст во второй ── */
#secondary .wp-block-latest-posts__list > li {
    display: grid !important;
    grid-template-columns: 70px 1fr !important;
    grid-template-rows: auto !important;
    gap: 0 10px !important;
    align-items: start !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
}

/* Картинка — первая колонка, все строки */
#secondary .wp-block-latest-posts__featured-image {
    grid-column: 1 !important;
    grid-row: 1 / span 4 !important;
}

/* Весь текст — вторая колонка */
#secondary .wp-block-latest-posts__post-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    word-break: normal !important;
    -webkit-line-clamp: 3 !important;
}

#secondary .wp-block-latest-posts__post-date {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

#secondary .wp-block-latest-posts__post-excerpt {
    grid-column: 2 !important;
    grid-row: 3 !important;
}

#secondary .wp-block-latest-posts__read-more {
    grid-column: 2 !important;
    grid-row: 4 !important;
}


/* ============================================================
   САЙДБАР на страницах одиночных постов (single-post)
   ============================================================ */

.single #secondary .wp-block-heading,
.single-post #secondary .wp-block-heading {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    padding-bottom: .6rem !important;
    margin-bottom: .75rem !important;
    border-bottom: 1.5px solid #85ad37 !important;
}

.single #secondary .wp-block-latest-posts__list,
.single-post #secondary .wp-block-latest-posts__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single #secondary .wp-block-latest-posts__list > li,
.single-post #secondary .wp-block-latest-posts__list > li {
    display: grid !important;
    grid-template-columns: 70px 1fr !important;
    gap: 0 10px !important;
    align-items: start !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0ee !important;
}

.single #secondary .wp-block-latest-posts__list > li:last-child,
.single-post #secondary .wp-block-latest-posts__list > li:last-child {
    border-bottom: none !important;
}

.single #secondary .wp-block-latest-posts__featured-image,
.single-post #secondary .wp-block-latest-posts__featured-image {
    grid-column: 1 !important;
    grid-row: 1 / span 4 !important;
    width: 70px !important;
    height: 70px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.single #secondary .wp-block-latest-posts__featured-image img,
.single-post #secondary .wp-block-latest-posts__featured-image img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 6px !important;
    max-width: none !important;
}

.single #secondary .wp-block-latest-posts__post-title,
.single-post #secondary .wp-block-latest-posts__post-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #85ad37 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: normal !important;
    margin-bottom: 3px !important;
}

.single #secondary .wp-block-latest-posts__post-title:hover,
.single-post #secondary .wp-block-latest-posts__post-title:hover {
    color: #5a8c1a !important;
}

.single #secondary .wp-block-latest-posts__post-date,
.single-post #secondary .wp-block-latest-posts__post-date {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 10px !important;
    color: #bbb !important;
    display: block !important;
}

.single #secondary .wp-block-latest-posts__post-excerpt,
.single-post #secondary .wp-block-latest-posts__post-excerpt {
    grid-column: 2 !important;
    grid-row: 3 !important;
    font-size: 11px !important;
    color: #777 !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.single #secondary .wp-block-latest-posts__read-more,
.single-post #secondary .wp-block-latest-posts__read-more {
    grid-column: 2 !important;
    grid-row: 4 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #85ad37 !important;
    text-decoration: none !important;
    margin-top: 3px !important;
    display: inline-block !important;
}

.single #secondary .widget,
.single-post #secondary .widget {
    margin-bottom: 2rem !important;
}
