﻿/* ==========================================================
   JOBSENSIA
   PORTADA MINIMALISTA
   ========================================================== */

.jobsensia-home {
    position: relative;
    height: calc(100vh - 78px);
    min-height: 500px;
    background: #ffffff;
    box-sizing: border-box;
}


/* ==========================================================
   MARCA
   ========================================================== */

.jobsensia-brand {
    position: absolute;

    top: 24px;
    left: 32px;

    display: block;

    width: 220px;

    text-decoration: none;
}

.jobsensia-brand img {
    display: block;

    width: 100%;
    height: auto;

    border: 0;
}


/* ==========================================================
   BUSCADOR
   ========================================================== */

.jobsensia-search-area {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: min(60%, 500px);
}


/* ==========================================================
   FORMULARIO
   ========================================================== */

.jobsensia-search {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 58px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);

    overflow: visible;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.jobsensia-search:focus-within {
    border-color: #94a3b8;

    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.08);
}


/* ==========================================================
   CAMPOS
   ========================================================== */

.jobsensia-field {
    flex: 1;
    min-width: 0;
}

.jobsensia-field input {
    display: block;

    width: 100%;
    height: 58px;

    padding: 0 18px;

    box-sizing: border-box;

    border: 0;
    outline: 0;

    background: transparent;

    color: #111827;

    font: inherit;
    font-size: 16px;
}

.jobsensia-field input::placeholder {
    color: #64748b;
    opacity: 1;
}


/* ==========================================================
   SEGUNDO CAMPO
   ========================================================== */

.jobsensia-location {
    max-width: 300px;
    border-left: 1px solid #e5e7eb;
}


/* ==========================================================
   BOTÃ“N
   ========================================================== */

.jobsensia-search-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    border: 0;
    background: transparent;

    color: #334155;

    font-size: 20px;
    cursor: pointer;

    transition:
        background-color .18s ease,
        color .18s ease;
}

.jobsensia-search-button:hover {
    background: #f8fafc;
    color: #111827;
}

.jobsensia-search-button:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: -4px;
}


/* ==========================================================
   DESTELLO MULTICOLOR
   ========================================================== */

.jobsensia-search-spark {
    display: inline-block;

    background: linear-gradient(
        135deg,
        #ff3b30,
        #ff9500,
        #ffd60a,
        #34c759,
        #00c7be,
        #007aff,
        #af52de,
        #ff2d55
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    font-size: 23px;
    line-height: 1;

    transition:
        transform .18s ease,
        filter .18s ease;
}

.jobsensia-search-button:hover .jobsensia-search-spark {
    transform: scale(1.12);
    filter: brightness(1.08);
}


/* ==========================================================
   MÃ“VIL
   ========================================================== */

@media (max-width: 700px) {

    .jobsensia-brand {
    top: 18px;
    left: 20px;

    width: 175px;
    }

    .jobsensia-search-area {
        width: calc(100% - 32px);
    }

    .jobsensia-search {
        display: flex;
        flex-wrap: wrap;

        min-height: 0;
        overflow: visible;
    }

    .jobsensia-field {
        width: 100%;
        flex: 1 0 100%;
    }

    .jobsensia-location {
        max-width: none;

        border-left: 0;
        border-top: 1px solid #e5e7eb;
    }

    .jobsensia-search-button {
        width: 100%;
        height: 48px;

        flex: 1 0 100%;

        border-top: 1px solid #e5e7eb;
    }

    .jobsensia-field input {
        height: 54px;
    }
}


/* ==========================================================
   PORTADA JOBSENSIA
   OCULTAR HEADER Y FOOTER HEREDADOS
   ========================================================== */

body:has(.jobsensia-home) footer {
    display: none !important;
}

/* ==========================================================
   HISTORIAL DE ÃšLTIMAS BÃšSQUEDAS
   ========================================================== */

.jobsensia-history-wrapper {
    position: relative;
}

.search-history {
    display: block;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;

    background: #ffffff;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

.search-history-item {
    display: block;
    width: 100%;
    padding: 11px 14px;

    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;

    text-align: left;
    font-size: 14px;
    color: #374151;

    cursor: pointer;
}

.search-history-item:last-child {
    border-bottom: 0;
}

.search-history-item:hover {
    background: #f7f8fa;
}


/* AJUSTE TEMPORAL: posición del buscador de la portada */
.jobsensia-search-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}










/* ==========================================================
   CORRECCIÓN FINAL DE ALTURA - PORTADA JOBSENSIA
   ========================================================== */

body:has(.jobsensia-home) {
    overflow: hidden;
}

body:has(.jobsensia-home) main {
    flex: 0 0 auto;
    min-height: 0;
    height: calc(100vh - 78px);
    overflow: hidden;
}

body:has(.jobsensia-home) .jobsensia-home {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Fondo limpio exclusivo de la portada */
body:has(.jobsensia-home) {
    background: #ffffff;
}


/* ==========================================================
   AJUSTE VISUAL FINAL - POSICIÓN DEL BUSCADOR
   Subir 100px respecto al centro vertical
   ========================================================== */

.jobsensia-search-area {
    transform: translate(-50%, calc(-50% - 100px));
}

/* ==========================================================
   BUSCADOR POR VOZ
   ========================================================== */

.buscador-superior {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boton-voz {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;

    cursor: pointer;
    padding: 0;

    flex-shrink: 0;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.boton-voz:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.boton-voz img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Estado de escucha */

.boton-voz.escuchando {
    animation: pulso-voz 1s infinite;
}

@keyframes pulso-voz {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }

}

            
/* ==========================================================
   MICROFONO - PORTADA
   ========================================================== */

.jobsensia-search {
    padding-right: 12px !important;
    box-sizing: border-box !important;
}

.jobsensia-search-button {
    flex: 0 0 52px !important;
    width: 52px !important;
}

.jobsensia-search .voice-search-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 46px !important;

    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;

    margin-left: 6px !important;
    margin-right: 0 !important;

    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;

    cursor: pointer !important;
}

.jobsensia-search .voice-search-button img {
    display: block !important;

    width: 24px !important;
    height: 24px !important;

    object-fit: contain !important;
}


/* ==========================================================
   ESTRELLA BUSCAR - AUMENTO VISUAL
   ========================================================== */

.jobsensia-search-spark {
    transform: scale(1.7);
}

.jobsensia-search-button:hover .jobsensia-search-spark {
    transform: scale(1.9);
}


/* Mensaje solicitud localidad modalidad remoto/hibrido */
.jobsensia-message {
    margin: 18px auto;
    padding: 14px 22px;
    max-width: 650px;
    text-align: center;
    border-radius: 12px;
    background: #f4f7ff;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}


/* ==========================================================
   LOADER JOBSENSIA - UNIVERSO DE BUSQUEDA
   ========================================================== */

.jobsensia-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.97);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .35s ease,
        visibility .35s ease;
}

.jobsensia-loader.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}


/* UNIVERSO */

.jobsensia-loader-universe {
    position: relative;

    width: 330px;
    height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.jobsensia-loader-spain {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;

    z-index: 1;
    pointer-events: none;
}


/* RED DE BUSQUEDA SOBRE ESPAÑA */

.jobsensia-loader-search-network {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 2;
    overflow: visible;
    pointer-events: none;
}

.search-route {
    fill: none;
    stroke-width: 1.25;
    stroke-linecap: round;

    stroke-dasharray: 7 93;
    stroke-dashoffset: 100;

    opacity: 0;

    animation: jobsensia-search-route 6.4s ease-in-out infinite;
}

.search-point {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;

    animation: jobsensia-search-point 6.4s ease-in-out infinite;
}

.route-red,    .point-red    { stroke: #ff3b30; fill: #ff3b30; animation-delay: 0s; }
.route-orange, .point-orange { stroke: #ff9500; fill: #ff9500; animation-delay: -.8s; }
.route-yellow, .point-yellow { stroke: #ffd60a; fill: #ffd60a; animation-delay: -1.6s; }
.route-green,  .point-green  { stroke: #34c759; fill: #34c759; animation-delay: -2.4s; }
.route-teal,   .point-teal   { stroke: #00c7be; fill: #00c7be; animation-delay: -3.2s; }
.route-blue,   .point-blue   { stroke: #007aff; fill: #007aff; animation-delay: -4s; }
.route-purple, .point-purple { stroke: #af52de; fill: #af52de; animation-delay: -4.8s; }
.route-pink,   .point-pink   { stroke: #ff2d55; fill: #ff2d55; animation-delay: -5.6s; }

@keyframes jobsensia-search-route {
    0%, 8% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    11% {
        stroke-dashoffset: 100;
        opacity: .85;
    }

    19% {
        stroke-dashoffset: 7;
        opacity: .85;
    }

    22% {
        stroke-dashoffset: 0;
        opacity: 0;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes jobsensia-search-point {
    0%, 7% {
        opacity: 0;
        transform: scale(.4);
    }

    12% {
        opacity: 1;
        transform: scale(1.35);
    }

    18% {
        opacity: .8;
        transform: scale(1);
    }

    22% {
        opacity: 0;
        transform: scale(.6);
    }

    100% {
        opacity: 0;
        transform: scale(.4);
    }
}

/* ESTRELLA CENTRAL */

.jobsensia-loader-star {
    position: relative;
    z-index: 5;

    display: inline-block;

    font-size: 58px;
    line-height: 1;

    background: linear-gradient(
        135deg,
        #ff3b30,
        #ff9500,
        #ffd60a,
        #34c759,
        #00c7be,
        #007aff,
        #af52de,
        #ff2d55
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    animation: jobsensia-star-pulse 2.2s ease-in-out infinite;

    filter: drop-shadow(0 5px 16px rgba(15, 23, 42, .12));
}


/* ORBITAS */

.jobsensia-loader-orbit {
    position: absolute;

    top: 50%;
    left: 50%;

    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 50%;

    transform: translate(-50%, -50%);
}

.jobsensia-loader-orbit::after {
    content: "";

    position: absolute;

    width: 7px;
    height: 7px;

    top: -4px;
    left: 50%;

    border-radius: 50%;

    background: #007aff;

    box-shadow: 0 0 12px rgba(0, 122, 255, .35);
}

.jobsensia-loader-orbit.orbit-1 {
    width: 105px;
    height: 105px;

    animation: jobsensia-orbit 4.5s linear infinite;
}

.jobsensia-loader-orbit.orbit-1::after {
    background: #ff9500;
}

.jobsensia-loader-orbit.orbit-2 {
    width: 165px;
    height: 165px;

    animation: jobsensia-orbit 7s linear infinite reverse;
}

.jobsensia-loader-orbit.orbit-2::after {
    background: #34c759;
}

.jobsensia-loader-orbit.orbit-3 {
    width: 225px;
    height: 225px;

    animation: jobsensia-orbit 9s linear infinite;
}

.jobsensia-loader-orbit.orbit-3::after {
    background: #af52de;
}


/* PARTICULAS */

.jobsensia-loader-particle {
    position: absolute;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    opacity: .45;

    animation: jobsensia-particle 2.8s ease-in-out infinite;
}

.jobsensia-loader-particle.particle-1 {
    top: 27px;
    left: 75px;
    background: #ff3b30;
}

.jobsensia-loader-particle.particle-2 {
    top: 61px;
    right: 32px;
    background: #ffd60a;
    animation-delay: -.6s;
}

.jobsensia-loader-particle.particle-3 {
    bottom: 45px;
    right: 51px;
    background: #00c7be;
    animation-delay: -1.1s;
}

.jobsensia-loader-particle.particle-4 {
    bottom: 25px;
    left: 88px;
    background: #007aff;
    animation-delay: -1.6s;
}

.jobsensia-loader-particle.particle-5 {
    top: 102px;
    left: 19px;
    background: #af52de;
    animation-delay: -2.1s;
}

.jobsensia-loader-particle.particle-6 {
    top: 37px;
    right: 91px;
    background: #ff2d55;
    animation-delay: -2.5s;
}


/* TEXTO */

.jobsensia-loader-content {
    margin-top: 4px;

    text-align: center;

    min-height: 72px;
}

.jobsensia-loader-query {
    margin-bottom: 9px;

    font-size: 18px;
    font-weight: 600;

    color: #111827;

    letter-spacing: -.01em;
}

.jobsensia-loader-message {
    font-size: 14px;
    font-weight: 400;

    color: #64748b;

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.jobsensia-loader-message.is-changing {
    opacity: 0;
    transform: translateY(4px);
}


/* ANIMACIONES */

@keyframes jobsensia-star-pulse {

    0%,
    100% {
        transform: scale(.92) rotate(0deg);
        filter: drop-shadow(0 5px 16px rgba(15, 23, 42, .10));
    }

    50% {
        transform: scale(1.10) rotate(8deg);
        filter: drop-shadow(0 8px 22px rgba(0, 122, 255, .18));
    }
}

@keyframes jobsensia-orbit {

    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes jobsensia-particle {

    0%,
    100% {
        transform: scale(.65);
        opacity: .18;
    }

    50% {
        transform: scale(1.7);
        opacity: .8;
    }
}


/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {

    .jobsensia-loader-star,
    .jobsensia-loader-orbit,
    .jobsensia-loader-particle {
        animation-duration: 8s;
    }
}


/* MOVIL */

@media (max-width: 600px) {

    .jobsensia-loader-universe {
        width: 220px;
        height: 220px;
        transform: scale(.88);
    }

    .jobsensia-loader-query {
        font-size: 16px;
    }
}









