.ui-icon--search { --icon: url('../assets/icons/search.svg'); }

.home-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: start;
    gap: 36px;
    margin-bottom: 50px;
}

.home-head h1 {
    margin-bottom: 0;
}

.site-search {
    position: relative;
    width: 100%;
    max-width: 360px;
    justify-self: end;
    z-index: 45;
}

.site-search__field {
    min-height: 48px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 14px;
    border: 1px solid rgba(108, 188, 226, .62);
    border-radius: 12px;
    background: rgba(8, 35, 69, .82);
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.site-search__field:focus-within {
    border-color: #8bc8df;
    background: rgba(12, 43, 78, .96);
    box-shadow: 0 0 0 3px rgba(122, 205, 229, .08);
}

.site-search__icon {
    width: 20px;
    height: 20px;
    color: #7acde5;
}

.site-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #e1e6ef;
    font: inherit;
    font-size: 16px;
}

.site-search input::placeholder {
    color: #9cacbf;
    opacity: 1;
}

.site-search input::-webkit-search-cancel-button {
    display: none;
}

.site-search__clear {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #a9bbcf;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.site-search__clear:hover {
    background: rgba(116, 173, 207, .12);
    color: #e0e8f2;
}

.site-search__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(520px, calc(100vw - 32px));
    max-height: min(430px, 62vh);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(108, 188, 226, .55);
    border-radius: 12px;
    background: #0b2748;
    box-shadow: 0 18px 48px rgba(1, 10, 28, .42);
}

.site-search__result {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 12px 12px;
    border: 0;
    border-bottom: 1px solid rgba(141, 171, 207, .14);
    border-radius: 7px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.site-search__result:last-child {
    border-bottom: 0;
}

.site-search__result:hover,
.site-search__result:focus-visible {
    background: rgba(43, 77, 111, .72);
}

.site-search__result-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.site-search__result-copy strong {
    color: #e5e8ef;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}

.site-search__result-copy span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #b9c7d9;
    font-size: 16px;
    line-height: 1.4;
}

.site-search__result-meta {
    padding-top: 2px;
    color: #82c7df;
    font-size: 15px;
    line-height: 1.35;
    white-space: nowrap;
}

.site-search__empty {
    padding: 14px 12px;
    color: #b9c7d9;
    font-size: 16px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .home-head {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
        gap: 26px;
    }
}

@media (max-width: 820px) {
    .home-head {
        grid-template-columns: 1fr;
        gap: 22px;
        margin-bottom: 32px;
    }

    .site-search {
        justify-self: start;
        max-width: 520px;
    }

    .site-search__panel {
        left: 0;
        right: auto;
        width: min(520px, calc(100vw - 32px));
    }
}
