/* ── Hide theme's ind-hero on blog listing (we replace it) ── */
body.blog .ind-hero,
body.home .ind-hero {
    display: none !important;
}
/* ── Hide infinite scroll sentinel and load more ─────────── */
#blog-sentinel,
.ind-load-more,
.load-more-btn,
[class*="load-more"] {
    display: none !important;
}
/* ── Custom blog header ────────────────────────────────────── */
.sh-blog-header {
    text-align: center;
    padding: 48px 20px 0;
    background: #fff;
}
.sh-blog-header h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.2;
}
.sh-blog-header .sh-subtitle {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
}
/* ── Filter + Search bar ─────────────────────────────────── */
.sh-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px auto 32px;
    max-width: 900px;
    padding: 0 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.sh-cat-select-wrap {
    position: relative;
    flex: 0 0 auto;
}
.sh-cat-select-wrap::after {
    content: "\25be";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 12px;
}
.sh-cat-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 40px 9px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .18s;
    min-width: 200px;
}
.sh-cat-select:hover,
.sh-cat-select:focus {
    border-color: #2563eb;
}
.sh-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
}
.sh-search-wrap input {
    width: 100%;
    padding: 9px 16px 9px 40px;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    outline: none;
    transition: border-color .18s;
    box-sizing: border-box;
}
.sh-search-wrap input:focus {
    border-color: #2563eb;
}
.sh-search-wrap svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 16px;
    height: 16px;
}
/* ── Обёртка для нескольких badges ─────────────────────── */
.sh-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: calc(2 * (22px + 4px));
    overflow: hidden;
    align-items: flex-start;
    width: 100%;
}

/* ── Category badge ─────────────────────────────────────── */
.sh-cat-badge {
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    color: #fff !important;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    margin: 0 !important;
}
.sh-cat-badge:hover { opacity: .85; }
/* FSM categories */
.cat-field-service-software { background: #2563eb !important; }
.cat-industries { background: #7c3aed !important; }
.cat-operations-best-practices { background: #059669 !important; }
.cat-case-studies { background: #d97706 !important; }
.cat-product-updates { background: #0891b2 !important; }
/* Legacy fallback */
.cat-scheduling { background: #2563eb !important; }
.cat-workforce-management { background: #7c3aed !important; }
.cat-hr-management { background: #059669 !important; }
.cat-call-center { background: #d97706 !important; }
.cat-time-tracking { background: #0891b2 !important; }
.cat-leadership { background: #dc2626 !important; }
.cat-top-tools { background: #ea580c !important; }

/* ── Несколько badges рядом, через flex gap ────────────── */
.ind-card__body .sh-badges-wrap { margin-bottom: 0; }

/* ── Card link, flex column so body can stretch ────────── */
.ind-card__link {
    display: flex !important;
    flex-direction: column !important;
}

/* ── Card body, flex column, stretches to full height ──── */
.ind-card__body {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 0 !important;
    padding: 16px !important;
    box-sizing: border-box;
    width: 100% !important;
    flex: 1 !important;
}
.ind-card__cat {
    display: block;
}
/* ── Card title: div вместо h3 ─────────────────────────── */
.ind-card__title,
div.ind-card__title,
.ind-card__body h2,
.ind-card__body h3 {
    text-align: left !important;
    margin: 0 0 12px 0 !important;
    align-self: flex-start;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: block !important;
    flex: 1 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: #111827 !important;
    font-family: inherit !important;
}

/* ── Hide "Read article" button ─────────────────────────── */
.ind-card__btn,
.ind-card__link .ind-btn,
.ind-card__link a[class*="btn"],
.ind-card__link .read-more,
.ind-card__link button {
    display: none !important;
}

/* ── Top row: date left, read time right ────────────────── */
.sh-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
    font-size: 12px;
    color: #9ca3af;
}
.sh-meta-date { }
.sh-meta-time {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Hide read-time on blog cards (per user request, 2026-05-07), keep only on article hero */
.ind-card .sh-meta-time,
.sh-arch-card .sh-meta-time { display: none !important; }
.ind-card .sh-card-top,
.sh-arch-card .sh-card-top { justify-content: flex-start; }

/* ── Author row ─────────────────────────────────────────── */
.sh-card-author {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    width: 100%;
}

/* ── Убрать старые классы если остались ────────────────── */
.sh-card-date { display: none !important; }
.sh-card-meta { display: none !important; }

/* ── Badges wrap, прибита к низу, left-aligned ────────── */
.sh-badges-wrap {
    align-self: flex-start;
    margin: 0 !important;
}

/* ── Pagination ─────────────────────────────────────────── */
.sh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    padding: 0 16px;
    flex-wrap: wrap;
}
.sh-pagination a,
.sh-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #374151;
    border: 1px solid #e5e7eb;
    background: white;
    transition: all 0.15s;
    padding: 0 8px;
    cursor: pointer;
}
.sh-pagination a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.sh-pagination .current {
    background: #369fff;
    color: white !important;
    border-color: #369fff;
}
.sh-pagination .prev-btn,
.sh-pagination .next-btn {
    padding: 0 14px;
}
.sh-pagination .dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #9ca3af;
}

/* ── Архивный грид (категории/поиск) ────────────────────── */
.sh-arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}
@media (max-width: 900px) { .sh-arch-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sh-arch-grid { grid-template-columns: 1fr; } }

/* ── Карточка архива ────────────────────────────────────── */
.sh-arch-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
}
.sh-arch-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.sh-arch-card .ind-card__img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ── Header архивной страницы ───────────────────────────── */
.sh-arch-header {
    padding: 32px 0 16px;
    text-align: center;
}
.sh-no-results {
    padding: 80px 20px;
    text-align: center;
}
.sh-arch-header .sh-back-btn {
    display: inline-block;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.15s;
}
.sh-arch-header .sh-back-btn:hover { color: #374151; }
.sh-arch-header .sh-cat-h1 {
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.2;
}
.sh-arch-header .sh-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 auto 20px;
    max-width: 600px;
    line-height: 1.6;
}
.sh-search-input {
    padding: 9px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    outline: none;
    transition: border-color .18s;
    min-width: 240px;
}
.sh-search-input:focus { border-color: #2563eb; }
.sh-author-header { padding: 32px 0 16px; text-align: center; }
.sh-author-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); margin: 0 auto 16px; display: block; }

@media (max-width: 600px) {
    .sh-controls { flex-direction: column; align-items: stretch; }
    .sh-cat-select-wrap, .sh-search-wrap { width: 100%; max-width: 100%; }
    .sh-controls { padding: 0 16px; }
    .sh-cat-select, .sh-search-wrap input, .sh-search-input { width: 100%; min-width: 0; box-sizing: border-box; }
}