/* ================================
   HERO SEARCH
================================ */

#hero-search{
    position: relative;
    z-index: 50;

    /* Match .ss-section full-bleed width */
    margin: 0 calc(var(--page-gutter, 24px) * -1) 24px;
    width: calc(100% + (var(--page-gutter, 24px) * 2));

    /* Under navbar */
    padding: calc(4px) 22px 22px;

    display: flex;
    justify-content: center;
}

.hero-inner{
    position: relative;
    width: 100%;
    max-width: none;

    padding: 38px 34px;
    border-radius: 22px;

    background: #1a243a;

    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

/* Optional: subtle "glass sheen" on top of the solid backing */
.hero-inner::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius: inherit;
    pointer-events:none;

    /* reduce the "milky" overlay, keep a gentle gradient sheen */
    background: linear-gradient(
            180deg,
            rgba(255,255,255,0.06) 0%,
            rgba(255,255,255,0.02) 30%,
            rgba(255,255,255,0.00) 100%
    );

    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.hero-inner > *{
    position: relative;
    z-index: 1;
}

/* Title: fix clipped descenders (Y) by loosening line-height */
.hero-title{
    font-size: clamp(44px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.12;            /* was 1.05 -> clips descenders */
    padding-bottom: 0.06em;       /* extra safety for glyphs */
    margin: 0 0 14px;

    text-align: center;
    letter-spacing: -0.02em;

    font-family:
            "Inter",
            "Segoe UI",
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            sans-serif;
}

.hero-title-light{
    color: #ffffff;
    font-weight: 800;
}

.hero-title-accent{
    color: #7c9cff;
    font-weight: 900;
    text-shadow: 0 0 14px rgba(124,156,255,0.35);
}

.hero-sub{
    color: rgba(255,255,255,0.75);
    margin-bottom: 36px;
    font-size: 18px;
    text-align: center;
}

/* ================================
   SEARCH BAR
================================ */

.hero-search-box{
    position: relative;
    display: flex;
    gap: 12px;

    width: 70%;
    margin: 0 auto;

    background: rgba(255,255,255,0.08);
    padding: 12px;
    border-radius: 14px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: visible;
}

@media (max-width: 768px){
    .hero-search-box{ width: 100%; }
}

.hero-search-box input{
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: #fff;
    font-size: 16px;
}

.hero-search-box button{
    width: 48px;
    border-radius: 10px;
    border: 0;
    background: #6f7cff;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* Dropdown */
.search-dropdown{
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 10px);

    border-radius: 14px;
    background: #0b1224;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 50px rgba(0,0,0,0.65);

    max-height: 320px;
    overflow: auto;
    padding: 10px;

    display: none;
    z-index: 9999;
}

.search-dropdown.active{ display: block; }

.search-dropdown .result-group{ margin: 8px 0 12px; }

.search-dropdown .result-group h4{
    margin: 8px 6px 6px;
    font-size: 12px;
    letter-spacing: .3px;
    color: rgba(255,255,255,0.62);
    text-transform: uppercase;
}

.search-dropdown .result-item{
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 10px;
    margin: 6px 0;
    border-radius: 10px;

    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);

    cursor: pointer;
    user-select: none;
}

.search-dropdown .result-item:hover{
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.10);
}

.search-dropdown .result-item .meta{
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.search-dropdown .no-results{
    padding: 10px;
    color: rgba(255,255,255,0.65);
}

/* ================================
   SEARCH BAR (stacking + readability fixes)
================================ */

.hero-search-box{
    position: relative;
    z-index: 80; /* ensures dropdown can sit above tags */
}

/* dropdown already has z-index, but keep it explicit */
.hero-search-box .search-dropdown{
    z-index: 9999;
}

/* make tags explicitly lower layer */
.tag-list{
    position: relative;
    z-index: 10;
}

/* input text + placeholder readability */
.hero-search-box input{
    color: rgba(255,255,255,0.95);
}

.hero-search-box input::placeholder{
    color: rgba(255,255,255,0.70);
}

/* optional: improve hero title/sub contrast a bit */
.hero-title{
    text-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.hero-sub{
    color: rgba(255,255,255,0.82);
}

/* ================================
   SEARCH RESULTS – TEXT CONTRAST
================================ */

.search-results{
    color: rgba(255,255,255,0.95);
}

.search-results .server-name{
    color: #ffffff;
    font-weight: 600;
}

.search-results .server-meta{
    color: rgba(255,255,255,0.70);
}

.search-results .server-desc{
    color: rgba(255,255,255,0.80);
}

/* right-side small text (votes / tags / misc) */
.search-results .server-extra{
    color: rgba(255,255,255,0.65);
}

/* Ensure result text is readable */
.search-dropdown .result-main{
    color: rgba(255,255,255,0.95);
    font-weight: 600;
}

.hero-search-box input::placeholder{
    color: rgba(255,255,255,0.70);
}


.search-dropdown .result-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search-dropdown .result-main{
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown .result-right{
    color: rgba(255,255,255,0.70);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.search-dropdown .result-empty-row{
    padding: 10px 12px;
    color: rgba(255,255,255,0.60);
    font-style: italic;
}

/* Section titles (TAGS / SERVERS) */
.search-dropdown .result-title{
    display: inline-block;
    margin: 8px 0 6px;
    padding: 4px 10px;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
}

/* Result rows – slightly muted */
.search-dropdown .result-main{
    color: rgba(255,255,255,0.82); /* was ~0.95 */
    font-weight: 500;
}

/* Right-side votes even softer */
.search-dropdown .result-right{
    color: rgba(255,255,255,0.55);
}

/* Vote badge (search dropdown) */
.search-dropdown .vote-badge{
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 999px;

    background: rgba(46, 204, 113, 0.15); /* soft green */
    color: #2ecc71;

    font-size: 0.8rem;
    font-weight: 600;

    white-space: nowrap;
}

.search-dropdown .vote-icon{
    font-size: 0.7rem;
    line-height: 1;
}

.search-dropdown .vote-count{
    font-variant-numeric: tabular-nums;
}

.sc-card .sc-vote{
    display: inline-flex;
    align-items: center;
    gap: 9px; /* scaled */

    padding: 7px 14px; /* scaled up */
    border-radius: 999px;

    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(120,255,160,0.35);

    font-size: 16px; /* scaled up */
    font-weight: 700;
    color: #9affc6;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.sc-card .sc-vote__arrow{
    font-size: 15px; /* scaled */
    line-height: 1;
    color: #6dffb3;
}

.sc-card .sc-vote__count{
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.sc-card .sc-vote:hover{
    border-color: rgba(120,255,160,0.6);
    filter: brightness(1.06);
}

/* =========================================
   SEARCH RESULTS: Tag list under search bar
   (matches existing dark UI + home tag pills)
========================================= */

.search-tag-list{
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.search-tag{
    padding: 7px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.search-tag:hover{
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.16);
}

.search-tag-empty{
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    padding: 6px 0;
}
