/* Página de resultados y sugerencias de portada. No modifica la escena. */
.buscador-page {padding-bottom:5rem;}
.buscador-form {display:grid;gap:.7rem;margin:2rem 0;max-width:900px;}
.buscador-form label {font-weight:600;}
.buscador-form__fila {display:flex;gap:.8rem;}
.buscador-form input {flex:1;min-width:0;padding:.9rem 1rem;border-radius:.8rem;border:1px solid #4c8872;background:#0b2f29;color:#fff;font:inherit;}
.buscador-form button {padding:.8rem 1.5rem;border:0;border-radius:.8rem;background:#8ce6b0;color:#092b22;font-weight:700;cursor:pointer;}
.buscador-estado {margin:1.5rem 0 2rem;}
.buscador-grupo {margin:2.5rem 0;}
.buscador-grupo__cabecera {display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem;}
.buscador-grupo__cabecera h2 {margin:0;}
.buscador-grupo__cabecera small {font-size:.7em;opacity:.65;}
.buscador-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;}
.buscador-tarjeta {display:flex;flex-direction:column;gap:.8rem;min-width:0;padding:1.4rem;border:1px solid rgba(152,222,190,.22);border-radius:1rem;background:#0c352c;color:#f2fff8;text-decoration:none;transition:border-color .15s,transform .15s;}
.buscador-tarjeta:hover,.buscador-tarjeta:focus-visible {border-color:#91e3b1;transform:translateY(-2px);}
.buscador-tarjeta h3 {font-size:1.1rem;margin:0;color:inherit;}
.buscador-tarjeta p {margin:0;line-height:1.55;opacity:.82;overflow-wrap:anywhere;}
.buscador-tarjeta span {margin-top:auto;font-size:.88rem;color:#a4e9bd;}
.home-search {position:relative;}
.home-search-results {position:absolute;z-index:50;top:calc(100% + 8px);left:0;right:0;max-height:min(380px,50vh);overflow-y:auto;background:#082b24;border:1px solid #477b65;border-radius:1rem;box-shadow:0 15px 40px rgba(0,0,0,.45);text-align:left;}
.home-search-results[hidden] {display:none!important;}
.home-search-results a {display:flex;flex-direction:column;gap:.1rem;padding:.65rem 1rem;color:#f2fff8;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.1);}
.home-search-results a:hover,.home-search-results a:focus-visible {background:#175342;outline:2px solid #9ceab9;outline-offset:-2px;}
.home-search-results a small {color:#9be0b7;font-size:.72rem;}
.home-search-results a span {font-size:.92rem;}
.home-search-results .home-search-results__all {color:#9be9b8;font-weight:700;}
@media(max-width:800px){.buscador-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:550px){.buscador-grid{grid-template-columns:1fr;}.buscador-form__fila{flex-direction:column;}}

/* Portada: el panel se coloca como hijo de .home-orbit, no de la esfera. */
.home-orbit > .home-search-results {
    position: absolute;
    z-index: 40;
    right: auto;
    bottom: auto;
    max-width: calc(100% - 16px);
}

/* Solo se desplazan el símbolo y el formulario; el círculo permanece fijo. */
.home-core.home-core--searching > h1,
.home-core.home-core--searching > .home-suggestions {
    display: none;
}
.home-core.home-core--searching > .home-core__symbol,
.home-core.home-core--searching > .home-search {
    transform: translateY(-55px);
}

@media (max-width: 600px) {
    .home-core.home-core--searching > .home-core__symbol,
    .home-core.home-core--searching > .home-search {
        transform: translateY(-20px);
    }
}

/* Ajustes del buscador activo */

.home-core:has(.home-search:focus-within) .home-core__symbol,
.home-core:has(.home-search:focus-within) .home-search {
    translate: 0 -80px;
}

/* Panel de resultados */

.home-search-results {
    max-height: min(360px, calc(100dvh - 220px));
    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color: #477b65 #082b24;
}

/* Barra de desplazamiento en Chrome y Edge */

.home-search-results::-webkit-scrollbar {
    width: 7px;
}

.home-search-results::-webkit-scrollbar-track {
    background: #082b24;
    border-radius: 10px;
}

.home-search-results::-webkit-scrollbar-thumb {
    background: #477b65;
    border-radius: 10px;
}

/* Ajustes para móviles */

@media (max-width: 600px) {
    .home-core:has(.home-search:focus-within) .home-core__symbol,
    .home-core:has(.home-search:focus-within) .home-search {
        translate: 0 -45px;
    }

    .home-search-results {
        max-height: min(320px, 45dvh);
    }
}