/* =====================================================================
   Blog listing — modern layout chrome
   Pairs with blog-cards.css (the .fob-card design) to give the blog index,
   category, tag and search pages a clean modern look.
   ===================================================================== */

.tp-blog-grid-area {
    padding-top: 50px;
    padding-bottom: 90px;
}

/* ── Top bar: results count + grid/list toggle ── */
.tp-blog-grid-top {
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 32px !important;
    border-bottom: 1px solid #ececec;
}
.tp-blog-grid-result p {
    margin: 0;
    font-size: 14px;
    color: #8a8f96;
}
.tp-blog-grid-tab .nav-tabs {
    border: 0;
    gap: 8px;
}
.tp-blog-grid-tab .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ececec;
    border-radius: 10px;
    color: #8a8f96;
    background: #fff;
    transition: all 0.2s ease;
}
.tp-blog-grid-tab .nav-link.active,
.tp-blog-grid-tab .nav-link:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* ── Grid columns (sidebar-aware) ── */
.tp-blog-grid-item-wrapper .fob-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}
.tp-blog-grid-item-wrapper .fob-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Pagination ── */
.tp-blog-pagination .pagination,
.tp-blog-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 40px 0 0;
}
.tp-blog-pagination .page-item .page-link,
.tp-blog-pagination a,
.tp-blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #ececec;
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tp-blog-pagination .page-item.active .page-link,
.tp-blog-pagination .active a,
.tp-blog-pagination .active span {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}
.tp-blog-pagination .page-link:hover {
    border-color: #1a1a1a;
}

/* ── Empty state ── */
.tp-error-content {
    padding: 60px 0;
}
.tp-error-content .tp-error-btn {
    display: inline-flex;
    margin-top: 14px;
    padding: 12px 28px;
    border-radius: 10px;
    background: #1a1a1a;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* =====================================================================
   Sidebar — modern (matches the contact page). Forced with body + !important
   because theme.css targets these via `main .tp-sidebar-*` (higher
   specificity) and `max-width:none!important` on the thumb.
   ===================================================================== */
/* Kill the grey panel that style.integration.css puts on the wrapper
   (.tp-sidebar-ml--24 { background:#eaeaea; padding:20px; ... }). */
body .tp-sidebar-wrapper,
body .tp-sidebar-wrapper.tp-sidebar-ml--24,
body .tp-sidebar-ml--24 {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-left: 0 !important;
}
body .tp-sidebar-widget {
    margin-bottom: 28px !important;
}

/* Search field — white pill with icon button */
body .tp-sidebar-search-input {
    position: relative !important;
}
body .tp-sidebar-search-input input {
    width: 100% !important;
    height: 58px !important;
    background: #fff !important;
    border: 1px solid #e7e7e9 !important;
    border-radius: 50px !important;
    padding: 0 62px 0 24px !important;
    font-size: 15px !important;
    color: #2a2a2a !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
}
body .tp-sidebar-search-input input::placeholder {
    color: #a4a9b0 !important;
}
body .tp-sidebar-search-input input:focus {
    outline: none !important;
    border-color: #1a1a1a !important;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.06) !important;
}
/* Filled dark circular search button (modern accent) */
body .tp-sidebar-search-input button {
    position: absolute !important;
    right: 7px !important;
    inset-inline-end: 7px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #1a1a1a !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.12s ease !important;
}
body .tp-sidebar-search-input button:hover {
    background: #000 !important;
    color: #fff !important;
}
body .tp-sidebar-search-input button:active {
    transform: translateY(-50%) scale(0.94) !important;
}
body .tp-sidebar-search-input button svg {
    width: 17px !important;
    height: 17px !important;
}

/* Widget heading */
body .tp-sidebar-widget-title,
body main .tp-sidebar-widget-title {
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin: 0 0 18px !important;
}

/* Latest Posts — white rounded card with divided rows */
body .tp-sidebar-blog-item-wrapper {
    background: #fff !important;
    border: 1px solid #ededef !important;
    border-radius: 20px !important;
    padding: 10px 16px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
}
body .tp-sidebar-blog-item {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 14px 12px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f1f1f3 !important;
    border-radius: 14px !important;
    transition: background 0.2s ease !important;
}
body .tp-sidebar-blog-item:hover {
    background: #f7f7f8 !important;
}
body .tp-sidebar-blog-item:last-child {
    border-bottom: 0 !important;
}
body .tp-sidebar-blog-thumb {
    flex: 0 0 84px !important;
}
body .tp-sidebar-blog-thumb a {
    display: block !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}
body .tp-sidebar-blog-thumb img {
    width: 84px !important;
    max-width: 84px !important;
    height: 72px !important;
    margin: 0 !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s ease !important;
}
body .tp-sidebar-blog-item:hover .tp-sidebar-blog-thumb img {
    transform: scale(1.06) !important;
}
body .tp-sidebar-blog-content {
    min-width: 0 !important;
}
body .tp-sidebar-blog-meta span {
    font-size: 13px !important;
    color: #8a8f96 !important;
}
body .tp-sidebar-blog-title,
body main .tp-sidebar-blog-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 4px 0 0 !important;
}
body .tp-sidebar-blog-title a,
body main .tp-sidebar-blog-title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}
body .tp-sidebar-blog-title a:hover,
body main .tp-sidebar-blog-title a:hover {
    color: #555 !important;
}

/* Popular Tags (.tagcloud) — full visible rounded card (theme only sets a
   border-top, so the rounded box barely shows). */
body .tp-sidebar-widget-content.tagcloud,
body .tagcloud {
    background: #fff !important;
    border: 1px solid #ededef !important;
    border-top: 1px solid #ededef !important;
    border-radius: 20px !important;
    padding: 22px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}
body .tagcloud a {
    margin: 0 !important;
    padding: 9px 18px !important;
    border: 1px solid #e7e7e9 !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}
body .tagcloud a:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #fff !important;
}

/* ── Single post — featured image ── */
.tp-postbox-details-thumb {
    border-radius: 18px;
    overflow: hidden;
    line-height: 0;
}
.tp-postbox-details-thumb img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
    border-radius: 18px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .tp-blog-grid-item-wrapper .fob-grid--2,
    .tp-blog-grid-item-wrapper .fob-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .tp-blog-grid-item-wrapper .fob-grid--2,
    .tp-blog-grid-item-wrapper .fob-grid--3 {
        grid-template-columns: 1fr;
    }
    .tp-blog-grid-area {
        padding-bottom: 60px;
    }
}
