/* ============================================================
   ASBAE Portal — Footer global (titularidad y créditos)
   Prefijo .site-footer-… (.site-footer ya lo usa el layout antiguo)
   ============================================================ */

.site-footer-global {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .35rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    padding: .85rem 1.5rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #8E8E93;
    background: #FFFFFF;
    border-top: 1px solid #E5E5EA;
}
.site-footer-global a {
    color: #1A5CA8;
    font-weight: 600;
    text-decoration: none;
}
.site-footer-global a:hover,
.site-footer-global a:focus-visible { text-decoration: underline; }

/* ---- Enlaces legales (bloque central) ---- */
.site-footer-global__legal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .2rem .5rem;
}
.site-footer-global__legal a { font-weight: 500; }
.site-footer-global__sep { opacity: .6; }

/* Variante app: tres columnas con el bloque legal centrado de verdad */
@media (min-width: 1100px) {
    .site-footer-global--app {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
    }
    .site-footer-global--app .site-footer-global__credit { justify-self: end; text-align: right; }
}
/* Entre 768 y 1099 px (contenido estrecho junto al sidebar): bloques centrados en línea */
@media (min-width: 768px) and (max-width: 1099.98px) {
    .site-footer-global--app { justify-content: center; text-align: center; }
}

/* ---- Páginas privadas: sticky footer dentro del área de contenido ---- */
.site-footer-host {
    display: flex;
    flex-direction: column;
}
.site-footer-host > .app-content-inner { flex: 1 0 auto; }
.site-footer-host > .site-footer-global { flex-shrink: 0; }

/* ---- Páginas sueltas (login, recuperación, 404…) ---- */
body.site-footer-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}
/* El primer bloque queda centrado en el espacio libre y el footer pegado abajo */
body.site-footer-page > :first-child { margin-top: auto; margin-bottom: 1.5rem; }
body.site-footer-page > .site-footer-global { margin-top: auto; }

.site-footer-global--dark,
.site-footer-global--light {
    justify-content: center;
    text-align: center;
    padding: 1.25rem 1rem .25rem;
    background: transparent;
}

/* Sobre el degradado azul/oscuro del login */
.site-footer-global--dark {
    color: rgba(255,255,255,.6);
    border-top-color: rgba(255,255,255,.15);
}
.site-footer-global--dark a { color: #9CC3F0; }

/* Sobre fondo gris claro (el layout antiguo del error 500 no usa .site-footer-page) */
.site-footer-global--light { margin-top: 1.5rem; }
body.site-footer-page > .site-footer-global--light { margin-top: auto; }

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .site-footer-global {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: .85rem 1rem;
    }
}

/* ---- Impresión ---- */
@media print {
    .site-footer-global {
        display: flex !important;
        color: #555 !important;
        background: transparent !important;
        border-top: 1px solid #CCC !important;
        padding: .5rem 0 !important;
        break-inside: avoid;
    }
    .site-footer-global a {
        color: inherit !important;
        text-decoration: none !important;
        font-weight: 400;
    }
}
