/* Search Bar - Nav Component */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    /* Absolutely positioned so it overlays to the left — doesn't push siblings */
    position: absolute;
    right: calc(100% + var(--space-xs));
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    color: var(--color-text-light);
    font-size: var(--text-sm);
    font-family: inherit;
    padding: var(--space-xs) var(--space-md);
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    transition: width 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-wrapper.active .search-input {
    width: 190px;
    opacity: 1;
    pointer-events: auto;
}

/* Solid nav — use a lightly tinted bg so text is legible on the primary-colour header */
.nav-solid .search-input {
    background: rgba(0, 0, 0, 0.10);
    color: var(--color-text-dark);
}

.nav-solid .search-input::placeholder {
    color: var(--color-muted);
}

/* Search results grid — fixed card size regardless of result count */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 250px);
    gap: var(--space-xl);
    justify-content: start;
    max-width: 860px;
}