@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── wrapper ── */
.sth-bd-wrapper {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px 0 40px;
    box-sizing: border-box;
}
.sth-bd-wrapper *,
.sth-bd-wrapper *::before,
.sth-bd-wrapper *::after { box-sizing: border-box; }

.sth-bd-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: #0d3276;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

/* ── search bar — full container width ── */
.sth-bd-search-wrap {
    width: 100%;
    margin: 0 0 28px;
}

.sth-bd-search-inner {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: 52px !important;
    padding: 0 12px 0 20px !important;
    gap: 10px;
    background: #fff !important;
    border: 1.5px solid #dfe6f3 !important;
    border-radius: 10px !important;
    outline: none !important;
    box-shadow: 0 2px 12px rgba(13,50,118,0.06) !important;
    transition: border-color .2s, box-shadow .2s;
}
.sth-bd-search-inner:focus-within {
    border-color: #0d3276 !important;
    box-shadow: 0 0 0 3px rgba(13,50,118,0.08), 0 2px 12px rgba(13,50,118,0.08) !important;
}

.sth-bd-search-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #9aa9cc;
    pointer-events: none;
    display: block !important;
    transition: color .2s;
}
.sth-bd-search-inner:focus-within .sth-bd-search-icon { color: #0d3276; }

/* full reset for input — theme can't override */
.sth-bd-wrapper .sth-bd-search-inner input[type="text"].sth-bd-search,
.sth-bd-wrapper .sth-bd-search-inner input[type="text"].sth-bd-search:focus,
.sth-bd-wrapper .sth-bd-search-inner input[type="text"].sth-bd-search:hover {
    display: block !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: #0f0f1a !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: normal !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
.sth-bd-wrapper .sth-bd-search-inner input[type="text"].sth-bd-search::placeholder {
    color: #a7b4d3 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

/* clear button full reset */
.sth-bd-wrapper .sth-bd-search-inner button.sth-bd-search-clear {
    display: none;
    flex-shrink: 0;
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #eef2fb !important;
    color: #0d3276 !important;
    border: none !important;
    border-radius: 50% !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 11px !important;
    font-family: 'Poppins', sans-serif !important;
    line-height: 1 !important;
    text-decoration: none !important;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.sth-bd-wrapper .sth-bd-search-inner button.sth-bd-search-clear:hover,
.sth-bd-wrapper .sth-bd-search-inner button.sth-bd-search-clear:focus {
    background: #0d3276 !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ── CSS Grid: 6 desktop / 4 tablet / 2 mobile ── */
.sth-bd-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px !important;
    width: 100%;
}

/* Card — left-aligned text, subtle radius */
.sth-bd-wrapper .sth-bd-grid a.sth-bd-card,
.sth-bd-wrapper .sth-bd-grid a.sth-bd-card:link,
.sth-bd-wrapper .sth-bd-grid a.sth-bd-card:visited {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 14px 18px !important;
    background: #fff !important;
    border: 1.5px solid #e5eaf6 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    color: #1a1a2e !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    cursor: pointer;
    min-height: 52px;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 1px 6px rgba(13,50,118,0.05) !important;
}

.sth-bd-wrapper .sth-bd-grid a.sth-bd-card:hover,
.sth-bd-wrapper .sth-bd-grid a.sth-bd-card:focus {
    background: #0d3276 !important;
    border-color: #0d3276 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,50,118,0.2) !important;
    text-decoration: none !important;
    outline: none !important;
}

.sth-bd-wrapper .sth-bd-grid a.sth-bd-card.sth-hidden {
    display: none !important;
}

/* ── no results ── */
.sth-bd-no-results {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500;
    color: #a0aec0;
    text-align: left;
    padding: 32px 0 8px;
    margin: 0;
    grid-column: 1 / -1;
}

/* ── tablet: 4 columns ── */
@media (max-width: 1024px) {
    .sth-bd-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ── mobile: 2 columns ── */
@media (max-width: 640px) {
    .sth-bd-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .sth-bd-search-inner {
        height: 48px !important;
        padding-left: 16px !important;
    }
    .sth-bd-wrapper .sth-bd-search-inner input[type="text"].sth-bd-search {
        font-size: 14px !important;
    }

    .sth-bd-wrapper .sth-bd-grid a.sth-bd-card,
    .sth-bd-wrapper .sth-bd-grid a.sth-bd-card:link,
    .sth-bd-wrapper .sth-bd-grid a.sth-bd-card:visited {
        font-size: 12.5px !important;
        padding: 12px 14px !important;
        min-height: 48px;
    }
}
