/* Empleo Solidario — Identidad visual del header 1.1.3
 * Todas las reglas están limitadas al header institucional.
 */
.esp-site-header.esp-header-has-video-background {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #17212b;
    border-bottom-color: rgba(255, 255, 255, .16);
}

.esp-site-header .esp-header-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-position: center 48%;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

.esp-site-header .esp-header-background-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
    opacity: 0;
    transition: opacity .3s ease;
}

.esp-site-header .esp-header-background.is-video-ready .esp-header-background-video {
    opacity: 1;
}

.esp-site-header.esp-header-has-video-background::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(8, 17, 25, .58), rgba(8, 17, 25, .42) 50%, rgba(8, 17, 25, .58));
}

.esp-site-header.esp-header-has-video-background .esp-header-main,
.esp-site-header.esp-header-has-video-background .esp-topnav {
    position: relative;
    z-index: 2;
    background: transparent !important;
}

.esp-site-header.esp-header-has-video-background .esp-header-main {
    min-height: 148px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.esp-site-header .esp-header-identity-lockup {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-width: 0;
}

.esp-site-header .esp-header-identity-lockup .esp-brand {
    min-width: 0;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .78);
}

.esp-site-header .esp-header-identity-lockup .esp-brand-name {
    color: #fff;
    font-size: clamp(22px, 2.4vw, 34px);
    line-height: 1.08;
    font-weight: 800;
    white-space: normal;
}

.esp-site-header .esp-header-identity-lockup .esp-brand-flag,
.esp-site-header .esp-header-identity-lockup .esp-brand-video {
    display: none !important;
}

.esp-site-header .esp-header-center-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 106px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    transition: transform .18s ease;
}

.esp-site-header .esp-header-center-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .58));
}

.esp-site-header .esp-header-center-logo:hover {
    transform: translateY(-1px) scale(1.02);
}

.esp-site-header .esp-header-center-logo:focus-visible {
    outline: 3px solid #ffd34d;
    outline-offset: 3px;
}

.esp-site-header.esp-header-has-video-background .esp-auth-actions {
    grid-column: 3;
    justify-self: end;
    position: relative;
    z-index: 2;
    min-width: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    grid-template-columns: none;
}

.esp-site-header.esp-header-has-video-background .esp-auth-link {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0;
    min-height: 34px;
    padding: 7px 13px;
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
}

.esp-site-header.esp-header-has-video-background .esp-auth-login {
    background: rgba(255, 255, 255, .92);
    border-color: rgba(255, 255, 255, .92);
}

.esp-site-header.esp-header-has-video-background .esp-topnav {
    border-top: 1px solid rgba(255, 255, 255, .18);
    border-bottom: 0;
    box-shadow: none;
}

.esp-site-header.esp-header-has-video-background .esp-topnav a {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .75);
    background: rgba(8, 17, 25, .18);
    border-radius: 8px;
}

.esp-site-header.esp-header-has-video-background .esp-topnav a:hover,
.esp-site-header.esp-header-has-video-background .esp-topnav a:focus-visible {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

@media (max-width: 700px) {
    .esp-site-header.esp-header-has-video-background .esp-header-main {
        min-height: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .esp-site-header .esp-header-identity-lockup {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .esp-site-header .esp-header-identity-lockup .esp-brand-name {
        font-size: clamp(18px, 5vw, 23px);
        text-align: left;
    }

    .esp-site-header .esp-header-center-logo {
        width: 62px;
        height: 66px;
        padding: 0;
        border-radius: 0;
    }

    .esp-site-header.esp-header-has-video-background .esp-auth-actions {
        grid-column: 1;
        grid-row: 2;
        width: auto;
        min-width: 0;
        justify-self: center;
        grid-template-columns: none;
    }

    .esp-site-header.esp-header-has-video-background .esp-auth-link {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .esp-site-header .esp-header-center-logo {
        transition: none;
    }
}
