/* ============================================================
   Purehearts Widgets – blog-grid-search.css
   
   The card HTML IS .news-block-one so the theme's own CSS
   handles all hover effects automatically. This file only
   adds the search bar, load more button, placeholder image,
   no-results message, fade-in animation, and loading state.
   ============================================================ */

/* ── Wrapper ────────────────────────────────────────────────── */
.phw-bgs-wrap {
    width: 100%;
}

/* ── Search bar ─────────────────────────────────────────────── */
.phw-bgs-search-wrap {
    position: relative;
    width: 100%;
    margin: 0 0 40px 0;
}

.phw-bgs-search-input {
    width: 100%;
    height: 50px;
    padding: 0 50px 0 22px;
    border: 1.5px solid #B6B6B6;
    border-radius: 30px;
    background: #fff;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    color: #5f5e5e;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.phw-bgs-search-input::placeholder {
    color: #b7b1af;
}

.phw-bgs-search-input:focus {
    border-color: #2F499E;
    box-shadow: 0 0 0 3px rgba(47, 73, 158, 0.12);
}

.phw-bgs-search-input::-webkit-search-cancel-button,
.phw-bgs-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
}

.phw-bgs-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #b7b1af;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.phw-bgs-search-icon svg {
    width: 20px;
    height: 20px;
}

/* ── Grid loading state ─────────────────────────────────────── */
.phw-bgs-grid {
    transition: opacity 0.2s ease;
}

.phw-bgs-grid.phw-bgs-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ── Space below each card (theme uses margin-bottom on .inner-box) */
.phw-bgs-card-col {
    margin-bottom: 40px;
}

/* ── Placeholder when no featured image ────────────────────── */
.phw-bgs-no-thumb {
    width: 100%;
    /* Match the theme image size ratio (370×500) */
    padding-bottom: 135%;
    background-color: #eae8e6;
    border-radius: 15px;
    display: block;
}

/* ── No results ─────────────────────────────────────────────── */
.phw-bgs-no-results {
    width: 100%;
    padding: 50px 20px;
    text-align: center;
    font-size: 18px;
    font-family: 'Nunito Sans', sans-serif;
    color: #5f5e5e;
}

/* ── Load More button — matches theme .theme-btn style ─────── */
.phw-bgs-loadmore-wrap {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.phw-bgs-loadmore-btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    line-height: 25px;
    font-weight: 700;
    background-color: #2F499E;
    color: #ffffff !important;
    text-align: center;
    text-transform: uppercase;
    border: 2px solid #2F499E;
    border-radius: 30px;
    padding: 12.5px 40px;
    cursor: pointer;
    transition: all 500ms ease;
    z-index: 1;
}

.phw-bgs-loadmore-btn:hover {
    background-color: #020C2E;
    border-color: #020C2E;
    color: #ffffff !important;
}

.phw-bgs-loadmore-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.phw-bgs-loadmore-btn.phw-bgs-hidden {
    display: none;
}

/* ── Fade-in for newly loaded cards ────────────────────────── */
@keyframes phw-bgs-fadein {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.phw-bgs-card-col.phw-bgs-new {
    animation: phw-bgs-fadein 0.35s ease forwards;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .phw-bgs-loadmore-btn,
    .phw-bgs-grid {
        transition: none !important;
    }
    .phw-bgs-card-col.phw-bgs-new {
        animation: none !important;
    }
}

