/* =========================================================
   URP - CABECERA PERSONALIZADA
   ========================================================= */

#branding {
    background: #fff;
}

#header-content {
    min-height: 0;
    padding: 0;
    background: #fff;
}


/* ---------- Cabecera principal ---------- */

.urp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    min-height: 104px;
    padding: 16px 34px;

    box-sizing: border-box;
    background: #fff;
}


/* ---------- Identidad ---------- */

.urp-header__brand {
    flex: 1 1 auto;
    min-width: 0;
}

.urp-header__brand-link {
    display: inline-flex;
    align-items: center;

    max-width: 100%;
    color: var(--urp-text);
    text-decoration: none;
}

.urp-header__brand-link:hover,
.urp-header__brand-link:focus {
    color: var(--urp-blue);
    text-decoration: none;
}


/* ---------- Logotipo ---------- */

.urp-header__logo {
    display: block;
    min-width: 0;
}

.urp-header__logo .custom-logo-link {
    display: block;
    max-width: 100%;
    line-height: 0;
}

.urp-header__logo .custom-logo {
    display: block;

    width: auto;
    max-width: min(700px, 100%);
    height: auto;
    max-height: 82px;

    object-fit: contain;
    object-position: left center;
}


/* Se usa solamente si no hay logo configurado */

.urp-header__fallback-name {
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}


/* ---------- Buscador ---------- */

.urp-header__tools {
    flex: 0 0 210px;
}

.urp-header__tools .searchform,
.urp-header__tools .search-form {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
}

.urp-header__tools label {
    display: block;
    width: 100%;
    margin: 0;
}

.urp-header__tools input[type="text"],
.urp-header__tools input[type="search"],
.urp-header__tools .search-field {
    display: block;

    width: 100%;
    height: 42px;
    margin: 0;
    padding: 8px 42px 8px 14px;

    box-sizing: border-box;

    color: var(--urp-text);
    background: #fff;

    border: 1px solid #cbd5df;
    border-radius: 6px;

    font-family: inherit;
    font-size: 0.92rem;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.urp-header__tools input[type="text"]:focus,
.urp-header__tools input[type="search"]:focus,
.urp-header__tools .search-field:focus {
    border-color: var(--urp-blue-light);
    box-shadow: 0 0 0 3px rgba(47, 114, 181, 0.13);
    outline: none;
}


/*
 * Catch Box usa un botón con icono dentro del formulario.
 */

.urp-header__tools input[type="submit"],
.urp-header__tools .search-submit {
    position: absolute;
    top: 0;
    right: 0;

    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;

    border: 0;
    background-color: transparent;
    box-shadow: none;
}


/* ---------- Menú ---------- */

.menu-access-wrap {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#access {
    box-shadow: none;
}

#access ul.menu > li > a {
    padding-top: 13px;
    padding-bottom: 13px;
}


/* ---------- Tablet ---------- */

@media screen and (max-width: 1000px) {
    .urp-header {
        min-height: 92px;
        padding: 14px 22px;
    }

    .urp-header__logo .custom-logo {
        max-width: min(580px, 100%);
        max-height: 70px;
    }

    .urp-header__tools {
        flex-basis: 180px;
    }
}


/* ---------- Móvil ---------- */

@media screen and (max-width: 700px) {
    .urp-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;

        min-height: 0;
        padding: 15px 16px;
    }

    .urp-header__brand-link {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .urp-header__logo .custom-logo {
        max-width: 100%;
        max-height: 64px;
        object-position: center;
    }

    .urp-header__tools {
        flex: 0 0 auto;
        width: 100%;
    }
}


/* ---------- Móvil estrecho ---------- */

@media screen and (max-width: 420px) {
    .urp-header__logo .custom-logo {
        max-height: 54px;
    }
}