/* Apple-style search bar */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sticky-search-wrapper {
    position: sticky;
    top: 60px;
    /* Adjust this value to be just below your navbar height */
    z-index: 1020;
    /* Below navbar (1030) but above other content */
    width: 100%;
    /* padding: 10px 0; */
    transition: all 0.3s ease;
}

.sticky-search-wrapper.scrolled {
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(5px);
    padding: 15px 0;
    /* margin-top: 15px; */
}

/* Adjust search bar appearance when scrolled */
.sticky-search-wrapper.scrolled .search-bar {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.search-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    padding: 4px 0;
}

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

.search-clear {
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

.search-clear:hover {
    color: rgba(255, 255, 255, 0.9);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-result-item {
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}