/* CONTENIDO: portada del buscador web. Se carga solo en front-page.php. */
/* =========================================================
   Estructura
   ========================================================= */

.buscador-fgull-main {
    padding: 50px 0 80px;
}

.buscador-fgull {
    max-width: 1000px;
    margin: 0 auto;
}

.buscador-fgull-header {
    margin-bottom: 30px;
}

.buscador-fgull-header h1 {
    margin-bottom: 10px;
}


/* =========================================================
   Formulario principal de búsqueda
   ========================================================= */

.buscador-fgull-form {
    display: flex;
    width: 100%;
    max-width: 900px;
    margin: 32px 0 38px;
    gap: 0;
}

.buscador-fgull-form input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 58px;
    padding: 0 20px;

    font-size: 18px;
    line-height: 1.4;

    background: #fff;
    border: 2px solid #5c068c;
    border-right: 0;
    border-radius: 6px 0 0 6px;

    outline: none;
    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.buscador-fgull-form input[type="search"]:focus {
    border-color: #5c068c;
    box-shadow: 0 0 0 3px rgba(92, 6, 140, 0.12);
}

.buscador-fgull-form input[type="search"]::placeholder {
    color: #777;
    opacity: 1;
}

.buscador-fgull-form button {
    height: 58px;
    padding: 0 32px;

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

    color: #fff;
    background: #5c068c;
    border: 2px solid #5c068c;
    border-radius: 0 6px 6px 0;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.buscador-fgull-form button:hover,
.buscador-fgull-form button:focus {
    background: #3f0461;
    border-color: #3f0461;
}


/* =========================================================
   Resultados
   ========================================================= */

.buscador-fgull-results {
    margin-top: 30px;
}

.buscador-fgull-placeholder {
    margin-top: 20px;
    padding: 20px 0;
}


/* =========================================================
   Google Programmable Search
   ========================================================= */

#fgull-google-results {
    margin-top: 20px;
}

/*
 * Ocultamos el formulario propio de Google.
 * La búsqueda se realiza desde el formulario FGULL.
 */
#fgull-google-results form.gsc-search-box {
    display: none !important;
}

/* Contenedor principal */
#fgull-google-results .gsc-control-cse {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* Resultados */
#fgull-google-results .gsc-webResult.gsc-result {
    padding: 18px 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    background: transparent !important;
}

/* Títulos */
#fgull-google-results .gs-title,
#fgull-google-results .gs-title * {
    text-decoration: none !important;
}

/* Eliminar fondos al pasar por resultados */
#fgull-google-results .gsc-webResult.gsc-result:hover {
    background: transparent !important;
}

/* =========================================================
   Buscador FGULL - Responsive
   ========================================================= */

@media (max-width: 768px) {

    .buscador-fgull-main {
        padding: 35px 0 50px;
    }

    .buscador-fgull {
        width: 100%;
    }

    .buscador-fgull-header {
        margin-bottom: 25px;
    }

    .buscador-fgull-header h1 {
        font-size: 36px;
        line-height: 1.15;
        margin-bottom: 18px;
    }

    .buscador-fgull-header p {
        font-size: 17px;
        line-height: 1.6;
    }

    /* Formulario */

    .buscador-fgull-form {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: none;
        gap: 10px;
        margin: 28px 0 40px;
    }

    .buscador-fgull-form input[type="search"] {
        display: block;
        flex: none;
        width: 100%;
        min-width: 0;
        height: 60px;
        padding: 0 18px;

        font-size: 18px;
        font-weight: 500;
        line-height: normal;

        color: #333;
        background: #faf7fc;

        border: 2px solid #5c068c;
        border-radius: 7px;

        box-sizing: border-box;
    }

    .buscador-fgull-form input[type="search"]::placeholder {
        color: #666;
        opacity: 1;
    }

    .buscador-fgull-form input[type="search"]:focus {
        background: #fff;
        border-color: #5c068c;
        box-shadow: 0 0 0 3px rgba(92, 6, 140, 0.12);
        outline: none;
    }

    .buscador-fgull-form button {
        display: block;
        flex: none;
        width: 100%;
        height: 60px;
        padding: 0 20px;

        font-size: 17px;
        font-weight: 600;
        line-height: 1;

        border-radius: 7px;

        box-sizing: border-box;
    }

    /* Resultados */

    .buscador-fgull-results {
        margin-top: 0;
    }

    .buscador-fgull-results h2 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 25px;
    }

    /* Google */

    #fgull-google-results {
        width: 100%;
        margin-top: 0;
    }

    #fgull-google-results .gsc-control-cse {
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }
}