/* ══════════════════════════════════════════════════════════════════
   PREMIUM INLINE SEARCH BAR
   Beyond Thinking Design System
   ══════════════════════════════════════════════════════════════════ */

.header-search-container {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.search-bar-wrap {
    position: relative;
    width: 180px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-bar-wrap:focus-within {
    width: 240px;
    background: rgba(255, 255, 255, 0.12);
    border-color: #dbac6b;
    box-shadow: 0 0 20px rgba(219, 172, 107, 0.2);
}

.search-bar-wrap .search-icon {
    color: #dbac6b;
    /* Gold icon always looks premium */
    font-size: 1rem;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.search-bar-wrap:focus-within .search-icon {
    transform: scale(1.1);
}

#main-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    padding: 0;
}

#main-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.clear-search {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    padding: 5px;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.clear-search:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Mobile adjustments for search */
@media (max-width: 992px) {
    .header-search-container {
        margin-right: 0;
        display: flex;
    }

    .search-bar-wrap {
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        padding: 0;
        justify-content: center;
        cursor: pointer;
    }

    .search-bar-wrap .search-icon {
        font-size: 1.25rem;
        margin-right: 0;
        color: var(--text-color);
        transition: color 0.3s ease;
    }

    .search-bar-wrap:hover .search-icon {
        color: var(--accent-color);
    }

    #main-search-input {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 200px;
        background: #111;
        padding: 10px;
        border: 1px solid var(--accent-color);
        border-radius: 8px;
        z-index: 100;
    }

    /* When search is expanded on mobile */
    .header-search-container.mobile-expanded #main-search-input {
        display: block;
    }

    .header-search-container.mobile-expanded .search-bar-wrap {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .header-search-container {
        display: flex;
    }
}

/* ══════════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY (Used in script.js for results)
   ══════════════════════════════════════════════════════════════════ */

#global-search-section {
    position: fixed;
    top: 90px;
    /* Aligned with desktop header height */
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    background: #fff;
    z-index: 900;
    overflow-y: auto;
    display: none;
    padding: 40px 5%;
}

@media (max-width: 992px) {
    #global-search-section {
        top: 65px;
        /* Aligned with mobile header height */
        height: calc(100vh - 65px);
        padding: 20px 5%;
    }
}

body.search-active {
    overflow: hidden;
    /* Prevent background scroll when search is active */
}

body.search-active #global-search-section {
    display: block;
}

body.search-active main>*:not(#global-search-section) {
    display: none;
}

.search-results-container h1 {
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 30px;
}

/* Reuse existing patterns for search page if needed... */