/* ==========================================================================
   SISADES - Mejoras UX/UI del portal público
   Se carga desde los layouts pagina_principal y pagina_principal_modulo,
   por lo que aplica a todas las páginas públicas: barra institucional,
   cabecera, footer compacto, botón/panel de ayuda flotante y "volver arriba".
   Los estilos de secciones concretas (hero, accesos rápidos, MyLOFT) solo
   tienen efecto en las vistas que usan dichas clases.
   Paleta institucional: azul #003866, celeste #78b8e5, blanco, grises claros.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scroll suave (para enlaces ancla internos, p. ej. "Explorar servicios")
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   1) Barra institucional superior (celeste)
   -------------------------------------------------------------------------- */
.top-header-area {
    padding-top: 7px;
    padding-bottom: 7px;
}

.top-header-area .container-fluid {
    max-width: 1320px;
}

.header-left-content p {
    margin-bottom: 0;
    line-height: 1.5;
}

.header-right-content .list ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 2px 0;
    margin-bottom: 0;
    padding-left: 0;
}

.header-right-content .list ul li {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
}

.header-right-content .list ul li:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 14px;
    background: rgba(255, 255, 255, 0.45);
}

.header-right-content .list ul li a {
    display: inline-block;
    padding: 4px 0;
    line-height: 1.4;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.header-right-content .list ul li a:hover,
.header-right-content .list ul li a:focus {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.header-right-content .list ul li a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2) Cabecera blanca: estado activo, foco y botón de inicio de sesión
   -------------------------------------------------------------------------- */
.navbar-area .container-fluid {
    max-width: 1320px;
}

.navbar-area.nav-bg-2 .desktop-nav .navbar-nav .nav-item a.nav-link.active {
    color: #003866;
    padding-bottom: 5px;
    border-bottom: 3px solid #003866;
}

.navbar-area.nav-bg-2 .desktop-nav .navbar-nav .nav-item a.nav-link:focus-visible {
    outline: 2px solid #003866;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Botón "Inicio de sesión": azul institucional, redondeado */
.navbar-area .others-options .default-btn {
    background-color: #003866;
    border: 1px solid #003866;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 15px;
}

.navbar-area .others-options .default-btn::before {
    background-color: #78b8e5;
    border-radius: 8px;
}

.navbar-area .others-options .default-btn:hover,
.navbar-area .others-options .default-btn:focus {
    color: #ffffff;
}

.navbar-area .others-options .default-btn:focus-visible {
    outline: 3px solid #78b8e5;
    outline-offset: 2px;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   3) Hero: fotografía del campus con overlay azul marino (izq. oscuro)
   -------------------------------------------------------------------------- */
.sisades-hero {
    display: flex;
    align-items: center;
    min-height: 420px;
    padding-top: 60px;
    padding-bottom: 60px;
    background-position: center center;
}

.sisades-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg,
            rgba(2, 22, 48, 0.92) 0%,
            rgba(2, 30, 62, 0.80) 32%,
            rgba(3, 42, 80, 0.55) 58%,
            rgba(4, 56, 102, 0.20) 100%);
}

.sisades-hero .container {
    position: relative;
    z-index: 1;
}

.sisades-hero-content {
    max-width: 560px;
}

.sisades-hero-kicker {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 400;
    line-height: 1.2;
}

.sisades-hero-name {
    display: block;
    color: #ffffff;
    font-size: clamp(44px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.5px;
}

.sisades-hero-accent {
    display: block;
    width: 64px;
    height: 4px;
    margin: 18px 0;
    border-radius: 2px;
    background-color: #78b8e5;
}

.sisades-hero-text {
    max-width: 540px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(15px, 1.4vw, 16.5px);
    line-height: 1.65;
}

.sisades-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   Sistema de botones (dos niveles, coherente en toda la home)
   -------------------------------------------------------------------------- */
.sisades-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 26px;
    border-radius: 8px;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease;
}

.sisades-btn i {
    font-size: 18px;
    line-height: 1;
}

.sisades-btn:focus-visible {
    outline: 3px solid #78b8e5;
    outline-offset: 2px;
}

.sisades-btn-primary {
    background-color: #003866;
    border: 1px solid #003866;
    color: #ffffff;
}

.sisades-btn-primary:hover,
.sisades-btn-primary:focus {
    background-color: #78b8e5;
    border-color: #78b8e5;
    color: #003866;
}

.sisades-btn-outline-light {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.sisades-btn-outline-light:hover,
.sisades-btn-outline-light:focus {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #003866;
}

.sisades-btn-outline-blue {
    background-color: #ffffff;
    border: 1px solid #003866;
    color: #003866;
}

.sisades-btn-outline-blue:hover,
.sisades-btn-outline-blue:focus {
    background-color: #003866;
    border-color: #003866;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   4) Sección "¿Qué necesitas hacer hoy?" - accesos rápidos
   -------------------------------------------------------------------------- */
#servicios-principales {
    scroll-margin-top: 96px;
}

.sisades-servicios {
    padding: 56px 0 64px;
    background-color: #ffffff;
}

.sisades-section-head {
    max-width: 640px;
    margin-bottom: 30px;
}

.sisades-section-title {
    margin: 0 0 8px;
    color: #1b2336;
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.2;
}

.sisades-section-sub {
    margin: 0;
    color: #5b6572;
    font-size: 16px;
    line-height: 1.5;
}

/* Cuadrícula: 1 col móvil -> 2 -> 3 (9 servicios en 3 filas equilibradas) */
.sisades-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* --------------------------------------------------------------------------
   5) Tarjetas de acceso rápido
   -------------------------------------------------------------------------- */
.sisades-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e7ecf2;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.sisades-card:hover {
    transform: translateY(-2px);
    border-color: #c9d8ea;
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.08);
}

.sisades-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 42, 67, 0.07);
}

.sisades-card:focus-visible {
    outline: 3px solid #78b8e5;
    outline-offset: 2px;
}

.sisades-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 10px;
    background-color: #003866;
    color: #ffffff;
    font-size: 22px;
}

.sisades-card-icon--acento {
    background-color: #4a90c9;
}

.sisades-card-title {
    margin: 0 0 8px;
    color: #1b2336;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
}

.sisades-card-desc {
    flex-grow: 1;
    margin: 0;
    color: #5b6572;
    font-size: 14px;
    line-height: 1.55;
}

.sisades-card-arrow {
    align-self: flex-end;
    margin-top: 12px;
    color: #78b8e5;
    font-size: 18px;
    transition: transform 0.18s ease, color 0.18s ease;
}

.sisades-card:hover .sisades-card-arrow {
    color: #003866;
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   6) MyLOFT destacado (40% texto / 60% recurso visual)
   -------------------------------------------------------------------------- */
.sisades-myloft-area {
    padding: 56px 0 72px;
    background-color: #f4f6f9;
}

.sisades-myloft {
    background-color: #ffffff;
    border: 1px solid #e7ecf2;
    border-radius: 12px;
    padding: 36px;
}

.sisades-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: #003866;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sisades-myloft-title {
    margin: 0 0 14px;
    color: #1b2336;
    font-size: clamp(24px, 2.6vw, 30px);
    font-weight: 700;
    line-height: 1.2;
}

.sisades-myloft-text {
    margin-bottom: 18px;
    color: #5b6572;
    font-size: 15px;
    line-height: 1.7;
}

.sisades-check-list {
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.sisades-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.sisades-check-list li:last-child {
    margin-bottom: 0;
}

.sisades-check-list li i {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background-color: #78b8e5;
    color: #003866;
    font-size: 15px;
}

.sisades-check-list li p {
    margin: 0;
    color: #1b2336;
    font-size: 14.5px;
    line-height: 1.55;
}

.sisades-myloft-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.sisades-myloft-figure {
    margin: 0;
    text-align: center;
}

.sisades-myloft-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e7ecf2;
    border-radius: 10px;
}

/* --------------------------------------------------------------------------
   7) Botón flotante de ayuda + panel
   -------------------------------------------------------------------------- */
.sisades-help-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background-color: #003866;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 25, 55, 0.25);
    transition: background-color 0.18s ease, color 0.18s ease,
        box-shadow 0.18s ease;
}

.sisades-help-btn i {
    font-size: 21px;
    line-height: 1;
}

.sisades-help-btn span {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.sisades-help-btn:hover,
.sisades-help-btn[aria-expanded="true"] {
    background-color: #78b8e5;
    color: #003866;
}

.sisades-help-btn:focus-visible {
    outline: 3px solid #78b8e5;
    outline-offset: 2px;
}

.sisades-help-panel {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 1000;
    width: min(320px, calc(100vw - 48px));
    padding: 18px 18px 20px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(9, 30, 58, 0.16);
}

.sisades-help-panel[hidden] {
    display: none;
}

.sisades-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sisades-help-title {
    margin: 0;
    color: #1b2336;
    font-size: 16.5px;
    font-weight: 700;
}

.sisades-help-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #5b6572;
    font-size: 21px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sisades-help-close:hover {
    background-color: #f0f4f9;
    color: #1b2336;
}

.sisades-help-close:focus-visible {
    outline: 2px solid #003866;
    outline-offset: 2px;
}

.sisades-help-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #edf1f6;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sisades-help-item:last-child {
    margin-bottom: 0;
}

.sisades-help-item:hover {
    border-color: #78b8e5;
    background-color: #f6faff;
}

.sisades-help-item:focus-visible {
    outline: 3px solid #78b8e5;
    outline-offset: 2px;
}

.sisades-help-item-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: #003866;
    color: #ffffff;
    font-size: 19px;
}

.sisades-help-item-body strong {
    display: block;
    color: #1b2336;
    font-size: 14.5px;
    line-height: 1.3;
}

.sisades-help-item-body span {
    display: block;
    margin-top: 2px;
    color: #5b6572;
    font-size: 12.5px;
    line-height: 1.4;
}

.sisades-help-item-arrow {
    margin-left: auto;
    color: #78b8e5;
    font-size: 20px;
}

/* --------------------------------------------------------------------------
   8) "Volver arriba": se reposiciona para no chocar con el botón de ayuda
   (solo ajustes visuales; la lógica del tema no se modifica)
   -------------------------------------------------------------------------- */
.go-top,
.go-top.active {
    top: auto;
    right: 27px;
    bottom: 94px;
    transform: none;
}

body.sisades-help-open .go-top.active {
    opacity: 0;
    visibility: hidden;
}

/* --------------------------------------------------------------------------
   9) Footer: más compacto en la home (contenido real sin cambios)
   -------------------------------------------------------------------------- */
.footer-area {
    padding-top: 64px;
    padding-bottom: 44px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 576px) {
    .sisades-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 992px) {
    .sisades-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .sisades-servicios {
        padding: 44px 0 48px;
    }

    .sisades-myloft-area {
        padding: 40px 0 56px;
    }

    .sisades-myloft {
        padding: 28px;
    }
}

@media (max-width: 767px) {
    /* Barra superior: contenido centrado y legible */
    .header-left-content p {
        text-align: center;
    }

    .header-right-content {
        text-align: center;
    }

    .header-right-content .list ul {
        justify-content: center;
    }

    .header-right-content .list ul li:not(:last-child)::after {
        margin: 0 9px;
    }

    /* Hero más bajo, texto a ancho completo */
    .sisades-hero {
        min-height: 0;
        padding: 48px 0;
        background-position: 60% center;
    }

    .sisades-hero-content {
        max-width: 100%;
    }

    .sisades-hero-text {
        max-width: 100%;
    }

    .sisades-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sisades-hero-actions .sisades-btn {
        width: 100%;
    }

    /* Ayuda flotante y panel en móvil */
    .sisades-help-btn {
        right: 16px;
        bottom: 16px;
    }

    .sisades-help-panel {
        right: 16px;
        bottom: 84px;
        width: min(320px, calc(100vw - 32px));
    }

    .go-top,
    .go-top.active {
        right: 24px;
        bottom: 86px;
    }
}

@media (max-width: 575px) {
    .sisades-servicios {
        padding: 40px 0 44px;
    }

    .sisades-myloft-area {
        padding: 36px 0 48px;
    }

    .sisades-myloft {
        padding: 22px;
    }
}

/* --------------------------------------------------------------------------
   Accesibilidad: respetar la preferencia de movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .sisades-card,
    .sisades-card-arrow,
    .sisades-btn,
    .sisades-help-btn,
    .sisades-help-item,
    .sisades-help-close,
    .go-top {
        transition: none;
    }
}
