/* ==========================================================
   KOHA 25.05.12 | BUSCADOR PRINCIPAL DESTACADO
   Fondo claro | Azul institucional | Diseño responsive
   AnahiAramayo 13102026
   ========================================================== */

#opac-main-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 36px 34px;
    margin: 36px auto 30px;

    background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%);
    border: 1px solid #cbdcf3;
    border-top: 5px solid #155eab;
    border-radius: 0;

    box-shadow:
        0 12px 30px rgba(21, 94, 171, 0.12),
        0 3px 8px rgba(21, 45, 75, 0.05);
}

/* Fila del formulario */
#opac-main-search #searchform {
    width: 100%;
    margin: 0;
}

#opac-main-search #searchform .row {
    align-items: stretch;
    row-gap: 12px;
}

#opac-main-search #searchform .row > [class*="col"] {
    min-width: 0;
}

/* Selector de búsqueda */
#opac-main-search #masthead_search {
    width: 100%;
    min-height: 64px;
    padding: 14px 38px 14px 17px;

    color: #17365d;
    background-color: #ffffff;
    border: 2px solid #c5d5e9;
    border-radius: 0;

    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(25, 55, 90, 0.04);

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

/* Campo de búsqueda */
#opac-main-search #translControl1 {
    display: block;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    padding: 15px 20px;

    color: #172b4d;
    background-color: #ffffff;
    border: 2px solid #c5d5e9;
    border-radius: 0;

    font-size: 18px;
    line-height: 1.4;
    box-shadow: 0 3px 8px rgba(25, 55, 90, 0.04);

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

#opac-main-search #translControl1::placeholder {
    color: #64748b;
    opacity: 1;
}

/* Resaltar los campos activos */
#opac-main-search #masthead_search:focus,
#opac-main-search #translControl1:focus {
    background-color: #ffffff;
    border-color: #1674ce;
    outline: none;
    box-shadow: 0 0 0 4px rgba(22, 116, 206, 0.15);
}

/* Botón principal */
#opac-main-search #searchsubmit {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 68px;
    min-height: 64px;
    padding: 14px 24px;

    color: #ffffff;
    background: linear-gradient(135deg, #1976d2, #084b96);
    border: 1px solid #084b96;
    border-radius: 0;

    box-shadow: 0 5px 12px rgba(8, 75, 150, 0.24);

    transition: background 0.2s ease, box-shadow 0.2s ease,
                transform 0.2s ease;
}

#opac-main-search #searchsubmit i {
    color: #ffffff;
    font-size: 22px;
}

/* Hover del botón */
#opac-main-search #searchsubmit:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #125eaf, #06396f);
    border-color: #06396f;
    box-shadow: 0 7px 16px rgba(8, 75, 150, 0.30);
}

/* Foco accesible por teclado */
#opac-main-search #searchsubmit:focus-visible {
    outline: 3px solid #7dbbff;
    outline-offset: 3px;
}

/* Pulsación */
#opac-main-search #searchsubmit:active {
    transform: translateY(1px);
}

/* TABLET */
@media (max-width: 767.98px) {
    #opac-main-search {
        margin-top: 26px;
        padding: 24px 20px;
    }

    #opac-main-search #masthead_search,
    #opac-main-search #translControl1,
    #opac-main-search #searchsubmit {
        min-height: 56px;
    }
}

/* MÓVILES */
@media (max-width: 575.98px) {
    #opac-main-search {
        margin-top: 20px;
        margin-bottom: 22px;
        padding: 16px;
    }

    #opac-main-search #searchform .row {
        row-gap: 10px;
    }

    #opac-main-search #masthead_search,
    #opac-main-search #translControl1 {
        min-height: 52px;
        font-size: 16px;
    }

    #opac-main-search #searchsubmit {
        width: 100%;
        min-height: 52px;
    }
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    #opac-main-search #masthead_search,
    #opac-main-search #translControl1,
    #opac-main-search #searchsubmit {
        transition: none;
    }
}

/* ==========================================================
   KOHA 25.05.12 | ACCESOS COMPLEMENTARIOS AL BUSCADOR
   Búsqueda avanzada | Autoridades | Etiquetas | Bibliotecas
   AnahiAramayo 13102026
   ========================================================== */

/* Contenedor de la fila */
#moresearches {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0;

    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 32px;
    padding: 0;

    list-style: none;
    background: #f4f8fd;
    border: 1px solid #d5e2f1;
    border-top: 3px solid #155eab;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(21, 94, 171, 0.07);
}

/* Cada opción */
#moresearches .nav-item {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: 0;

    border-right: 1px solid #d5e2f1;
}

/* Evitar divisor después del último enlace */
#moresearches .nav-item:last-child {
    border-right: 0;
}

/* Enlaces */
#moresearches .nav-item a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 12px 20px;

    color: #174a7e;
    background: transparent;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;

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

/* Hover */
#moresearches .nav-item a:hover {
    color: #084b96;
    background: #e2efff;
    text-decoration: none;
}

/* Foco por teclado */
#moresearches .nav-item a:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #1674ce;
    outline-offset: -3px;
}

/* TABLET */
@media (max-width: 767.98px) {
    #moresearches .nav-item {
        flex: 1 1 50%;
        border-bottom: 1px solid #d5e2f1;
    }

    #moresearches .nav-item:nth-child(2n) {
        border-right: 0;
    }

    #moresearches .nav-item a {
        min-height: 46px;
        padding: 12px;
    }

    #moresearches .nav-item:nth-last-child(-n+2) {
        border-bottom: 0;
    }
}

/* MÓVILES */
@media (max-width: 480px) {
    #moresearches {
        display: flex;
        flex-direction: column;
        margin-bottom: 24px;
    }

    #moresearches .nav-item,
    #moresearches .nav-item:nth-child(2n) {
        flex: 1 1 auto;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #d5e2f1;
    }

    #moresearches .nav-item:last-child {
        border-bottom: 0;
    }

    #moresearches .nav-item a {
        justify-content: flex-start;
        min-height: 46px;
        padding: 12px 16px;
        text-align: left;
    }
}

/* Respetar preferencias de movimiento */
@media (prefers-reduced-motion: reduce) {
    #moresearches .nav-item a {
        transition: none;
    }
}
