/* =========================================================
   PREMIUM SEARCH ENGINE
========================================================= */

.ace-search-wrapper{

    position:relative;

    max-width:1180px;

    margin:0 auto 22px;

    padding:14px;

    border-radius:38px;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.92),
            rgba(255,255,255,0.72)
        );

    backdrop-filter:blur(24px);

    border:
        2px solid rgba(71,85,105,0.20);

    box-shadow:
        0 34px 100px rgba(15,23,42,0.10);

    overflow:visible;
}

/* =========================================================
   SHIMMER
========================================================= */

.ace-search-wrapper::before{

    content:'';

    position:absolute;

    inset:0;

    border-radius:38px;

    background:
        linear-gradient(
            120deg,
            rgba(255,255,255,0.14),
            transparent,
            rgba(255,255,255,0.10)
        );

    animation:
        aceShimmer 8s linear infinite;

    pointer-events:none;
}

@keyframes aceShimmer{

    0%{
        transform:translateX(-100%);
    }

    100%{
        transform:translateX(100%);
    }
}

/* =========================================================
   HERO BADGE
========================================================= */

.ace-hero-badge{

    width:fit-content;

    margin:0 auto 28px;

    display:flex;

    align-items:center;

    justify-content:center;

    text-align:center;
}

/* =========================================================
   HERO TITLE
========================================================= */

.ace-search-hero h1{

    position:relative;

    z-index:3;

    max-width:920px;

    margin:0 auto 24px;

    text-align:center;

    font-size:clamp(46px,5vw,76px);

    line-height:1;

    letter-spacing:-3px;

    font-weight:900;

    color:#0f172a;
}

/* =========================================================
   HERO SUBTEXT
========================================================= */

.ace-search-hero p{

    max-width:980px;

    margin:0 auto 28px;

    text-align:center;

    font-size:24px;

    line-height:1.6;

    font-weight:500;

    color:#475569;
}

/* =========================================================
   SEARCH ICON
========================================================= */

.ace-search-icon{

    position:absolute;

    left:34px;

    top:50%;

    transform:translateY(-50%);

    z-index:30;

    font-size:34px;

    font-weight:700;

    color:#475569;

    pointer-events:none;
}

/* =========================================================
   INPUT
========================================================= */

#ace-live-search{

    width:100%;

    height:92px;

    padding:0 180px 0 88px;

    border:
        2px solid rgba(51,65,85,0.28);

    outline:none;

    border-radius:26px;

    background:
        rgba(255,255,255,0.94);

    font-size:24px;

    font-weight:700;

    letter-spacing:-0.4px;

    color:#0f172a;

    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.7);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

#ace-live-search:hover{

    border-color:
        rgba(37,99,235,0.34);
}

#ace-live-search:focus{

    transform:scale(1.003);

    border-color:
        rgba(37,99,235,0.55);

    box-shadow:
        0 0 0 5px rgba(37,99,235,0.08);
}

#ace-live-search::placeholder{

    color:#94a3b8;

    font-weight:600;
}

/* =========================================================
   SEARCH BUTTON
========================================================= */

.ace-search-button{

    position:absolute;

    right:24px;

    top:50%;

    transform:translateY(-50%);

    height:60px;

    padding:0 28px;

    border:none;

    border-radius:18px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #4f46e5
        );

    color:#ffffff;

    font-size:17px;

    font-weight:800;

    cursor:pointer;

    z-index:40;

    box-shadow:
        0 20px 50px rgba(37,99,235,0.28);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.ace-search-button:hover{

    transform:
        translateY(-50%)
        scale(1.03);

    box-shadow:
        0 28px 60px rgba(37,99,235,0.32);
}

/* =========================================================
   SEARCH HELPER
========================================================= */

.ace-search-helper{

    width:100%;

    max-width:900px;

    margin:0 auto 22px;

    text-align:center;

    font-size:16px;

    line-height:1.7;

    font-weight:500;

    color:#64748b;
}

/* =========================================================
   TRENDING SEARCHES
========================================================= */

.ace-search-suggestions{

    width:100%;

    max-width:1100px;

    margin:0 auto;

    display:flex;

    align-items:center;

    justify-content:center;

    flex-wrap:wrap;

    gap:12px;

    text-align:center;
}

.ace-search-suggestions span{

    display:flex;

    align-items:center;

    justify-content:center;

    width:100%;

    text-align:center;

    font-size:12px;

    font-weight:800;

    text-transform:uppercase;

    letter-spacing:1px;

    color:#64748b;
}

.ace-search-suggestions a{

    display:flex;

    align-items:center;

    justify-content:center;

    padding:10px 16px;

    border-radius:999px;

    background:
        rgba(255,255,255,0.84);

    border:
        1px solid rgba(203,213,225,0.8);

    text-decoration:none;

    font-size:14px;

    font-weight:700;

    color:#0f172a;

    transition:
        transform .22s ease,
        box-shadow .22s ease;
}

.ace-search-suggestions a:hover{

    transform:translateY(-2px);

    box-shadow:
        0 12px 30px rgba(15,23,42,0.08);
}

/* =========================================================
   SEARCH RESULTS
========================================================= */

#ace-search-results{

    display:none !important;

    position:absolute;

    top:104px;

    left:50%;

    transform:translateX(-50%);

    width:calc(100% - 28px);

    max-width:1140px;

    padding:18px;

    border-radius:28px;

    background:
        rgba(255,255,255,0.97);

    backdrop-filter:blur(24px);

    border:
        1px solid rgba(255,255,255,0.8);

    box-shadow:
        0 34px 90px rgba(15,23,42,0.12);

    z-index:999;

    overflow:hidden;
}

#ace-search-results.active,
#ace-search-results.has-results{

    display:block !important;
}

/* =========================================================
   MOBILE PORTRAIT
========================================================= */

@media(max-width:768px){

    .ace-search-wrapper{

        padding:10px;

        border-radius:24px;
    }

    .ace-hero-badge{

        margin:0 auto 22px;
    }

    .ace-search-hero h1{

        margin:0 auto 18px;

        font-size:clamp(34px,9vw,52px);

        line-height:1;

        letter-spacing:-2px;
    }

    .ace-search-hero p{

        max-width:100%;

        margin:0 auto 20px;

        padding:0 10px;

        text-align:center;

        font-size:18px;

        line-height:1.6;
    }

    .ace-search-icon{

        left:20px;

        font-size:24px;
    }

    #ace-live-search{

        height:66px;

        padding:0 92px 0 54px;

        border-radius:18px;

        font-size:15px;
    }

    .ace-search-button{

        right:12px;

        height:42px;

        padding:0 16px;

        border-radius:12px;

        font-size:12px;
    }

    .ace-search-helper{

        max-width:100%;

        padding:0 10px;

        margin:0 auto 18px;

        font-size:13px;

        line-height:1.6;
    }

    .ace-search-suggestions{

        justify-content:center;

        gap:8px;

        padding:0 6px;
    }

    .ace-search-suggestions span{

        font-size:11px;
    }

    .ace-search-suggestions a{

        padding:8px 12px;

        font-size:11px;
    }

    #ace-search-results{

        top:76px;

        width:calc(100% - 10px);

        padding:12px;

        border-radius:20px;
    }
}

/* =========================================================
   MOBILE LANDSCAPE + TABLET
========================================================= */

@media(min-width:769px) and (max-width:1180px){

    .ace-search-wrapper{

        padding:14px;
    }

    #ace-live-search{

        height:82px;

        font-size:20px;

        padding:0 160px 0 76px;
    }

    .ace-search-icon{

        font-size:28px;

        left:28px;
    }

    .ace-search-button{

        height:54px;

        font-size:15px;
    }

    .ace-search-hero p{

        font-size:20px;
    }
}