/**
 * SearchWP results — mirrors theme templates/search.html card layout.
 * Scoped with body.nbio-swp-results-skin (see NBio search results helper plugin).
 */

body.nbio-swp-results-skin .swp-search-results {
    box-sizing: border-box;
    max-width: var(--wp--style--global--wide-size, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding: 80px 1.5rem;
}

/* SearchWP uses .swp-grid for “Columns” layout and .swp-flex for “List” — skin both to match block search grid. */
body.nbio-swp-results-skin .swp-search-results.swp-grid,
body.nbio-swp-results-skin .swp-search-results.swp-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: flex-start;
    align-items: stretch;
}

body.nbio-swp-results-skin .swp-result-item {
    box-sizing: border-box;
    flex: 0 0 calc(25% - 1.25rem);
    min-width: 220px;
    max-width: 100%;
    padding: 0;
    background: transparent;
    /* Match theme .has-shadow-dark (style.css) */
    /* box-shadow: 0 6px 30px 7px #2125471a; */
    border-radius: 0;
    overflow: hidden;
    transition:
        box-shadow 0.5s,
        transform 0.5s;
    display: block;
    border: 0;
}

body.nbio-swp-results-skin .swp-result-item:hover {
    box-shadow: 1px 4px 20px -2px #0003;
    transform: translateY(-8px);
}

@media (max-width: 1024px) {
    body.nbio-swp-results-skin .swp-result-item {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 600px) {
    body.nbio-swp-results-skin .swp-result-item {
        flex: 1 1 100%;
    }
}

.swp-grid.swp-rp--img-m .swp-result-item--img {
    width: 100% !important;
}

body.nbio-swp-results-skin .swp-result-item--img-container {
    margin: 0;
    padding: 0;
    background: #1a1a1a;
}

body.nbio-swp-results-skin .swp-result-item--img {
    padding: 0;
}

body.nbio-swp-results-skin .swp-result-item--img img,
body.nbio-swp-results-skin .swp-result-item--img .swp-gf-image {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

body.nbio-swp-results-skin .swp-result-item--info-container {
    margin: 0;
    /* Match templates/search.html inner group: 40px padding, dark-gray preset */
    padding: 40px;
    background-color: var(--wp--preset--color--dark-gray, #111);
    color: #fff;
}

/* SearchWP uses h2.entry-title; core search.html uses h3 — similar size/weight */
body.nbio-swp-results-skin .swp-result-item .entry-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 600;
    line-height: 1.4;
}

body.nbio-swp-results-skin .swp-result-item .entry-title a {
    color: inherit;
    text-decoration: none;
}

body.nbio-swp-results-skin .swp-result-item .entry-title a:hover,
body.nbio-swp-results-skin .swp-result-item .entry-title a:focus {
    text-decoration: underline;
}

/* People (GF): name in title link only; position lives in .swp-result-item--desc */
body.nbio-swp-results-skin .swp-result-item.post-type-gravityforms-entry .swp-gf-name {
    display: inline;
}

body.nbio-swp-results-skin .swp-result-item.post-type-gravityforms-entry .swp-gf-position-excerpt {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0.92;
}

body.nbio-swp-results-skin .swp-result-item .swp-result-item--desc {
    color: rgba(255, 255, 255, 0.88);
}

body.nbio-swp-results-skin .swp-result-item--button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 0;
    font-weight: 600;
    text-decoration: none;
    color: var(--wp--preset--color--custom-spirit-gold);
    background: transparent;
    border: none;
    box-shadow: none;
}

.swp-grid .swp-result-item--img {
    margin-bottom: 0 !important;
}

body.nbio-swp-results-skin .swp-result-item--button:hover,
body.nbio-swp-results-skin .swp-result-item--button:focus {
    text-decoration: underline;
}

.swp-search-results + .navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}
