/**
 * Portal público — sitio institucional con ritmo y micro-interacciones.
 */

:root {
    --portal-navy: #156892;
    --portal-navy-dark: #0e5678;
    --portal-teal: #2a94b8;
    --portal-accent: #3cb8db;
    --portal-page-bg: #f7fafc;
    --portal-surface: #ffffff;
    --portal-text: #2a3d48;
    --portal-muted: #6a7f8c;
    --portal-border: #e2ebf0;
    --portal-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --portal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.portal-page,
body.portal-page.portal-site {
    font-family: var(--font-body) !important;
    font-size: 16px;
    line-height: 1.5;
    background:
        radial-gradient(1100px 520px at -5% -10%, rgba(60, 184, 219, 0.18), transparent 60%),
        radial-gradient(900px 460px at 105% 5%, rgba(21, 104, 146, 0.07), transparent 55%),
        radial-gradient(600px 300px at 50% 100%, rgba(255, 255, 255, 0.7), transparent 60%),
        var(--portal-page-bg) !important;
    color: var(--portal-text) !important;
}

body.portal-page .sipos-portal h1:not(.portal-site-banner-title),
body.portal-page .sipos-portal h2,
body.portal-page .sipos-portal h3 {
    font-family: var(--portal-serif);
    font-weight: 700;
    color: var(--portal-navy);
}

.portal-site-banner .portal-site-banner-title,
.portal-site-banner .portal-site-banner-sub,
.portal-site-banner .portal-site-banner-kicker {
    color: #fff;
}

body.portal-page .portal-brand-title,
body.portal-page .portal-section-label h2,
body.portal-page .featured-header,
body.portal-page .news-title,
body.portal-page .inst-block-title {
    font-family: var(--font-display) !important;
}

.sipos-portal {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* —— Animaciones —— */
@keyframes portal-banner-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes portal-glow-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
    50% { transform: translate(-12px, 8px) scale(1.08); opacity: 0.75; }
}

@keyframes portal-rise-in {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes portal-soft-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes portal-fade-slide {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes portal-kicker-in {
    from { opacity: 0; letter-spacing: 0.22em; }
    to { opacity: 0.95; letter-spacing: 0.12em; }
}

.portal-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s var(--portal-ease), transform 0.75s var(--portal-ease);
}

.portal-reveal.is-visible {
    opacity: 1;
    transform: none;
}

.portal-site-banner-inner {
    animation: portal-rise-in 0.95s var(--portal-ease) both;
}

.portal-site-banner-kicker {
    animation: portal-kicker-in 1s var(--portal-ease) 0.1s both;
}

.portal-site-banner-visual {
    animation: portal-soft-float 7s ease-in-out infinite;
}

.portal-reveal-stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--portal-ease), transform 0.6s var(--portal-ease);
}

.portal-reveal-stagger > *.is-visible {
    opacity: 1;
    transform: none;
}

.portal-reveal-stagger > *:nth-child(1) { transition-delay: 0.04s; }
.portal-reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.portal-reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.portal-reveal-stagger > *:nth-child(4) { transition-delay: 0.22s; }
.portal-reveal-stagger > *:nth-child(5) { transition-delay: 0.28s; }
.portal-reveal-stagger > *:nth-child(6) { transition-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
    .portal-reveal,
    .portal-reveal-stagger > *,
    .portal-site-banner-bg,
    .portal-site-banner-glow,
    .portal-site-banner-slide,
    .portal-site-banner-visual,
    .portal-site-banner-kicker,
    .portal-site-banner-inner {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .portal-site-banner-slide:not(.is-active) {
        display: none !important;
    }
}

/* Anclas (#quienes-somos, etc.): dejar aire bajo el header sticky */
html:has(body.portal-page) {
    scroll-padding-top: 130px;
}

body.portal-page #quienes-somos,
body.portal-page #que-hacemos,
body.portal-page #mision-valores,
body.portal-page #portal-contacto,
body.portal-page #portal-sede {
    scroll-margin-top: 130px;
}

@media (max-width: 900px) {
    /* En móvil el menú se pliega: solo queda la franja del logo */
    html:has(body.portal-page) {
        scroll-padding-top: 108px;
    }

    body.portal-page #quienes-somos,
    body.portal-page #que-hacemos,
    body.portal-page #mision-valores,
    body.portal-page #portal-contacto,
    body.portal-page #portal-sede {
        scroll-margin-top: 108px;
    }
}

/* —— Encabezado —— */
.portal-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 -16px;
    transition: box-shadow 0.25s ease;
}

@media (min-width: 1132px) {
    .portal-site-header {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
    }
}

.portal-site-header.is-scrolled {
    box-shadow: 0 6px 24px rgba(6, 52, 84, 0.18);
}

.portal-site-header-compose {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.portal-topbar-tier--brand {
    background: linear-gradient(110deg, #1678a4 0%, #1f8fbc 100%);
}

.portal-site-header .portal-topbar-main {
    position: relative;
    padding: 16px var(--portal-header-pad-x, 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 132px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.portal-site-header .portal-brand {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    flex: 0 0 auto;
    z-index: 2;
}

.portal-header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: min(58vw, 580px);
    padding: 0 12px;
    z-index: 1;
    pointer-events: none;
}

.portal-site-header .portal-brand,
.portal-site-header .portal-brand:hover,
.portal-site-header .portal-brand:focus,
.portal-site-header .portal-brand:focus-visible {
    text-decoration: none !important;
}

.portal-site-header .portal-brand .portal-brand-title,
.portal-site-header .portal-brand .portal-brand-sub,
.portal-site-header .portal-brand:hover .portal-brand-title,
.portal-site-header .portal-brand:hover .portal-brand-sub {
    text-decoration: none !important;
}

.portal-site-header .portal-brand img {
    flex-shrink: 0;
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.28),
        0 1px 4px rgba(0, 0, 0, 0.18);
    transition:
        transform 0.35s var(--portal-ease),
        box-shadow 0.35s ease;
    will-change: transform;
}

.portal-site-header .portal-brand:hover img {
    transform: scale(1.1) translateY(-3px);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.34),
        0 4px 10px rgba(0, 0, 0, 0.2);
}

.portal-site-header .portal-brand:active img {
    transform: scale(1.04) translateY(-1px);
}

.portal-site-header .portal-brand-title,
.portal-header-center .portal-brand-title {
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 1.45rem;
    line-height: 1.15;
    color: #fff;
}

.portal-site-header .portal-brand-sub,
.portal-header-center .portal-brand-sub {
    margin-top: 5px;
    font-size: 0.78rem;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

/* Nivel 1: solo ingresar / salir */
.portal-topbar-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    z-index: 2;
    flex-shrink: 0;
}

.portal-auth-btn,
.portal-topbar-auth .portal-auth-btn--logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background 0.2s, transform 0.15s;
}

.portal-auth-btn--login {
    background: #fff;
    color: var(--portal-navy);
    border-color: #fff;
}

.portal-auth-btn--login:hover {
    background: #e8f0f4;
    color: var(--portal-navy-dark);
    text-decoration: none;
}

.portal-auth-btn--logout:hover,
.portal-auth-btn:hover:not(.portal-auth-btn--login) {
    background: rgba(255, 255, 255, 0.18);
}

.portal-topbar-auth .portal-install-btn--compact {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.portal-site-header .portal-menu-toggle {
    display: none;
    flex-shrink: 0;
}

/* Segundo nivel: franja blanca */
.portal-topbar-tier--nav {
    background: #fff;
    border-top: 3px solid var(--portal-teal);
    box-shadow: 0 1px 0 var(--portal-border);
}

.portal-topbar-tier--nav .portal-nav {
    padding: 0 var(--portal-header-pad-x, 20px);
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.portal-topbar-tier--nav .portal-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--portal-navy);
    font-family: var(--font-body) !important;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 14px;
    min-height: auto;
    position: relative;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}


.portal-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-body);
    background: var(--portal-teal);
    color: #fff;
    line-height: 1;
}

.portal-topbar-tier--nav .portal-nav a::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    background: var(--portal-accent);
    transform: scaleX(0);
    transition: transform 0.25s var(--portal-ease);
}

.portal-topbar-tier--nav .portal-nav a:hover {
    background: #f0f5f8;
    color: var(--portal-teal);
}

.portal-topbar-tier--nav .portal-nav a.is-active::after,
.portal-topbar-tier--nav .portal-nav a:hover::after {
    transform: scaleX(1);
}

.portal-topbar-tier--nav .portal-nav a.portal-nav--beneficios {
    background: transparent;
    color: var(--portal-navy);
}

.portal-topbar-tier--nav .portal-nav a.portal-nav--beneficios.is-active {
    color: var(--portal-teal);
    font-weight: 700;
}

.portal-site-header .portal-pwa-status {
    display: none !important;
}

.portal-site-header .portal-logout-form {
    margin: 0;
}

/* Volver arriba */
.portal-back-top {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    background: var(--portal-navy);
    box-shadow: 0 6px 20px rgba(6, 52, 84, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity 0.25s var(--portal-ease),
        transform 0.25s var(--portal-ease),
        visibility 0.25s,
        background 0.2s;
}

.portal-back-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.portal-back-top:hover {
    background: var(--portal-teal);
}

.portal-back-top:focus-visible {
    outline: 2px solid var(--portal-accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .portal-back-top {
        transition: opacity 0.15s, visibility 0.15s;
        transform: none;
    }

    .portal-back-top.is-visible {
        transform: none;
    }
}

/* Mi panel (desplegable) */
.portal-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.portal-nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font: inherit;
    background: transparent;
    color: var(--portal-navy);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 14px;
    position: relative;
    font-family: var(--font-body);
}

.portal-nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    background: var(--portal-accent);
    transform: scaleX(0);
    transition: transform 0.25s var(--portal-ease);
}

.portal-nav-dropdown-toggle:hover,
.portal-nav-dropdown.is-open .portal-nav-dropdown-toggle {
    background: #f0f5f8;
    color: var(--portal-teal);
}

.portal-nav-dropdown-toggle.is-active::after,
.portal-nav-dropdown-toggle:hover::after,
.portal-nav-dropdown.is-open .portal-nav-dropdown-toggle::after {
    transform: scaleX(1);
}

.portal-nav-dropdown-caret {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.portal-nav-dropdown.is-open .portal-nav-dropdown-caret {
    transform: rotate(180deg);
}

.portal-nav-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--portal-border);
    box-shadow: 0 8px 24px rgba(6, 52, 84, 0.12);
    z-index: 60;
    padding: 6px 0;
}

.portal-nav-dropdown.is-open .portal-nav-dropdown-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.portal-topbar-tier--nav .portal-nav .portal-nav-dropdown-panel .portal-nav-dropdown-item {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px !important;
    color: var(--portal-navy) !important;
    font-size: 0.84rem !important;
    font-weight: 600;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-decoration: none;
    position: static;
}

.portal-topbar-tier--nav .portal-nav .portal-nav-dropdown-panel .portal-nav-dropdown-item::after {
    display: none !important;
}

.portal-topbar-tier--nav .portal-nav .portal-nav-dropdown-panel .portal-nav-dropdown-item:hover {
    background: #f0f5f8 !important;
    color: var(--portal-teal) !important;
}

.portal-topbar-tier--nav .portal-nav .portal-nav-dropdown-panel .portal-nav-dropdown-item.is-active {
    font-weight: 700;
    color: var(--portal-teal) !important;
    background: #f0f5f8 !important;
}

.portal-nav-dropdown-panel .portal-nav-badge {
    margin-left: auto;
}

/* Salir en nav: solo móvil (en desktop queda en el header) */
.portal-nav-auth-form.portal-nav--auth-mobile {
    display: none;
}

/* Menú móvil: nivel 2 desplegable sobre navy */
@media (max-width: 900px) {
    .portal-site-header .portal-topbar-main {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
        min-height: 96px;
    }

    /* Salir del header en móvil → va al menú */
    .portal-topbar-auth {
        display: none !important;
    }

    /* Título: deja de estar absolute para no pelear con logo/menú */
    .portal-header-center {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        padding: 0 4px;
        text-align: left;
        pointer-events: none;
    }

    .portal-header-center .portal-brand-title {
        font-size: 1.2rem;
        letter-spacing: 0.08em;
    }

    .portal-header-center .portal-brand-sub {
        margin-top: 3px;
        font-size: 0.58rem;
        line-height: 1.3;
        letter-spacing: 0.02em;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .portal-site-header .portal-brand img {
        width: 80px;
        height: 80px;
    }

    .portal-site-header .portal-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: 0;
        padding: 0;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        cursor: pointer;
    }

    .portal-nav-auth-form.portal-nav--auth-mobile {
        display: block;
        width: 100%;
        margin: 0;
    }

    .portal-topbar-tier--nav .portal-nav a.portal-nav--login {
        background: #fff !important;
        color: var(--portal-navy) !important;
        border-color: #fff !important;
        font-weight: 700;
        margin-top: 4px;
    }

    .portal-nav-auth-submit {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.07);
        color: #e8f4fa;
        font-family: var(--font-body);
        font-size: 0.86rem;
        font-weight: 600;
        cursor: pointer;
        text-align: left;
    }

    .portal-nav-auth-submit:hover {
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
    }

    .portal-topbar-tier--nav {
        display: none;
        padding: 12px 14px 16px;
        background: var(--portal-navy);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .portal-topbar-tier--nav.is-open {
        display: block !important;
    }

    .portal-topbar-tier--nav .portal-nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 0;
        max-width: none;
    }

    .portal-topbar-tier--nav .portal-nav a {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        border-radius: 6px !important;
        color: #e8f4fa !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        font-size: 0.86rem;
    }

    .portal-topbar-tier--nav .portal-nav a::after {
        display: none;
    }

    .portal-topbar-tier--nav .portal-nav a.is-active {
        background: rgba(255, 255, 255, 0.14) !important;
        color: #fff !important;
    }

    .portal-nav-dropdown {
        display: grid;
        width: 100%;
    }

    .portal-nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 6px;
        color: #e8f4fa !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    .portal-nav-dropdown-toggle::after {
        display: none;
    }

    .portal-nav-dropdown-panel {
        position: static;
        min-width: 0;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 8px;
        gap: 6px;
    }

    .portal-nav-dropdown.is-open .portal-nav-dropdown-panel {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .portal-topbar-tier--nav .portal-nav .portal-nav-dropdown-panel .portal-nav-dropdown-item {
        width: 100%;
        border-radius: 6px !important;
        color: #e8f4fa !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    .portal-topbar-tier--nav .portal-nav .portal-nav-dropdown-panel .portal-nav-dropdown-item.is-active {
        background: rgba(255, 255, 255, 0.14) !important;
        color: #fff !important;
    }

    .portal-nav-dropdown-panel .portal-nav-badge {
        background: #fff;
        color: var(--portal-navy);
    }

    .portal-nav-badge {
        margin-left: auto;
        background: #fff;
        color: var(--portal-navy);
    }
}

@media (min-width: 901px) {
    .portal-topbar-tier--nav {
        display: block;
    }

    .portal-auth-label {
        display: inline;
    }
}

/* —— Banner —— */
.portal-site-banner {
    position: relative;
    margin: 0 -16px 32px;
    overflow: hidden;
    color: #fff;
    min-height: 260px;
    display: flex;
    align-items: center;
}

@media (min-width: 1132px) {
    .portal-site-banner {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
    }
}

.portal-site-banner--compact {
    min-height: 170px;
}

.portal-site-banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(118deg, #1478a6 0%, #2a9ec4 48%, #5bc4e0 100%);
    background-size: 140% 140%;
    animation: portal-banner-shift 14s ease-in-out infinite alternate;
}

.portal-site-banner-glow {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.portal-site-banner-glow--1 {
    width: 280px;
    height: 280px;
    top: -60px;
    right: 15%;
    background: rgba(26, 143, 184, 0.45);
    animation: portal-glow-drift 9s ease-in-out infinite;
}

.portal-site-banner-glow--2 {
    width: 200px;
    height: 200px;
    bottom: -40px;
    left: 8%;
    background: rgba(255, 255, 255, 0.12);
    animation: portal-glow-drift 11s ease-in-out infinite reverse;
}

.portal-site-banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            90deg,
            rgba(8, 64, 98, 0.38) 0%,
            rgba(18, 104, 145, 0.22) 50%,
            rgba(42, 168, 207, 0.1) 100%
        ),
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 48px,
            rgba(255, 255, 255, 0.04) 48px,
            rgba(255, 255, 255, 0.04) 49px
        );
    pointer-events: none;
}

.portal-site-banner-dots {
    display: none !important;
}

.portal-site-banner-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}

.portal-site-banner-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.portal-site-banner-dot.is-active {
    background: #fff;
    transform: scale(1.15);
}

.portal-site-banner-inner {
    position: relative;
    z-index: 3;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 48px;
    pointer-events: none;
    display: grid;
    gap: 24px;
    align-items: center;
}

.portal-site-banner--has-visual .portal-site-banner-inner {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .portal-site-banner--has-visual .portal-site-banner-inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(200px, 340px);
        gap: 28px 36px;
    }
}

.portal-site-banner-copy {
    min-width: 0;
    pointer-events: none;
}

.portal-site-banner-copy a,
.portal-site-banner-copy button {
    pointer-events: auto;
}

.portal-site-banner-visual {
    width: 100%;
    max-width: 340px;
    justify-self: center;
    pointer-events: none;
}

@media (min-width: 768px) {
    .portal-site-banner-visual {
        justify-self: end;
    }
}

.portal-site-banner-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.portal-site-banner-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 1.1s var(--portal-ease);
    pointer-events: none;
}

.portal-site-banner-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.portal-site-banner-slide-img {
    display: block;
    width: 100%;
    height: 100%;
}

.portal-site-banner-slide-img--cover {
    object-fit: cover;
    object-position: center;
}

.portal-site-banner-slide-img--contain {
    object-fit: contain;
    object-position: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.portal-site-banner--compact .portal-site-banner-inner {
    padding: 30px 24px 44px;
}

.portal-site-banner--compact .portal-site-banner-carousel {
    aspect-ratio: 16 / 10;
    max-height: 160px;
}

@media (max-width: 767px) {
    .portal-site-banner--compact .portal-site-banner-visual {
        display: none;
    }
}

.portal-site-banner-kicker {
    margin: 0 0 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.92;
    font-family: var(--font-body);
}

.portal-site-banner-title {
    margin: 0 0 12px;
    font-family: var(--portal-serif);
    font-size: clamp(1.85rem, 4.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.12;
    max-width: 20ch;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.portal-site-banner--compact .portal-site-banner-title {
    font-size: clamp(1.5rem, 3.2vw, 1.95rem);
    max-width: none;
}

.portal-site-banner-sub {
    margin: 0;
    max-width: 40rem;
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.96;
    font-family: var(--portal-serif);
}

.portal-site-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.portal-site-banner-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 36px;
    z-index: 4;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath fill='%23e4eaee' d='M0,24 C360,48 720,0 1080,24 C1260,36 1380,32 1440,28 L1440,48 L0,48 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

.portal-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s, transform 0.2s var(--portal-ease), box-shadow 0.2s;
}

.portal-site-btn--primary {
    background: #fff;
    color: var(--portal-navy);
    border-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.portal-site-btn--primary:hover {
    background: #f0f6fa;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    color: var(--portal-navy-dark);
}

.portal-site-btn--outline {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
}

.portal-site-btn--outline:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.portal-hero {
    display: none !important;
}

/* —— Contenido —— */
.sipos-portal .portal-section,
.sipos-portal .featured,
.sipos-portal .news-section,
.sipos-portal .inst-main {
    margin-bottom: 24px;
}

.portal-section {
    background: var(--portal-surface) !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(6, 52, 84, 0.06) !important;
    padding: 24px 20px 20px !important;
    transition: box-shadow 0.25s ease, transform 0.25s var(--portal-ease);
}

.featured,
.news-section {
    border: 1px solid var(--portal-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(6, 52, 84, 0.06) !important;
    overflow: hidden;
}

.featured-header {
    background: linear-gradient(90deg, var(--portal-navy), var(--portal-teal)) !important;
    border-radius: 0 !important;
}

.home-summary-grid {
    gap: 14px !important;
}

.home-summary-card {
    border-radius: 14px !important;
    border: 1px solid transparent !important;
    box-shadow: 0 4px 18px rgba(21, 104, 146, 0.07) !important;
    transition: transform 0.3s var(--portal-ease), box-shadow 0.3s ease, border-color 0.2s !important;
}

.home-summary-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 32px rgba(21, 104, 146, 0.14) !important;
    border-color: rgba(60, 184, 219, 0.45) !important;
}

.cat-card,
.beneficio-card,
.ben-card,
.feat-item--link,
.news-item--link {
    transition: transform 0.3s var(--portal-ease), box-shadow 0.3s ease, border-color 0.2s !important;
}

.cat-card:hover,
.beneficio-card:hover,
.ben-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(21, 104, 146, 0.12) !important;
}

.feat-item--link:hover,
.news-item--link:hover {
    transform: translateX(4px);
}

.portal-cta {
    border-radius: 6px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    background: var(--portal-navy) !important;
    transition: transform 0.2s !important;
}

.portal-cta:hover {
    transform: translateY(-2px) !important;
}

.portal-cta--ghost {
    background: transparent !important;
    border: 2px solid var(--portal-navy) !important;
    color: var(--portal-navy) !important;
}

.portal-login-section {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.portal-login-card {
    border-radius: 8px !important;
    border: 1px solid var(--portal-border) !important;
    box-shadow: 0 8px 28px rgba(6, 52, 84, 0.1) !important;
}

.portal-login-form-title {
    margin: 12px 0 0;
    font-family: var(--portal-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--portal-navy);
}

/* —— Pie —— */
.portal-site-footer {
    margin: 48px -16px 0;
    background: linear-gradient(165deg, #1a84b0 0%, #14729a 55%, #116588 100%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.88rem;
    line-height: 1.55;
}

.portal-footer-slogan {
    margin: 10px 0 0;
    font-family: var(--portal-serif);
    font-size: 0.92rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.35;
    color: #fff;
}

.portal-sede-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.portal-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.portal-social-link:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff !important;
    text-decoration: none;
}

@media (min-width: 1132px) {
    .portal-site-footer {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
    }
}

.portal-site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 24px 22px;
}

.portal-site-footer-grid {
    display: grid;
    gap: 28px 32px;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 640px) {
    .portal-site-footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.portal-site-footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.portal-site-footer-col > h2 {
    margin: 0 0 12px;
}

.portal-site-footer-col > p {
    margin: 0 0 8px;
}

.portal-footer-social {
    margin: 0;
    padding: 0;
    gap: 8px;
}

.portal-footer-social .portal-social-link {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.portal-footer-divider {
    width: 100%;
    margin: 14px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.portal-site-footer-col--aside .portal-footer-federacion {
    width: 100%;
}

.portal-site-footer-col--aside .portal-footer-federacion .portal-sede-list {
    gap: 0;
}

.portal-site-footer-col--aside .portal-footer-federacion .portal-sede-row {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.portal-site-footer-col--aside .portal-footer-federacion .portal-sede-row:hover {
    background: transparent;
    transform: none;
}

.portal-site-footer-sede .portal-sede-list {
    gap: 12px;
}

.portal-site-footer-sede .portal-sede-row {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.portal-site-footer-sede .portal-sede-row:hover {
    background: transparent;
    transform: none;
}

.portal-sede--compact .portal-sede-title {
    margin: 0 0 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    font-family: var(--font-body);
}

.portal-sede-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-sede-row {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.25s, transform 0.25s var(--portal-ease);
}

.portal-sede-row:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(3px);
}

.portal-sede-row dt {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.78;
    font-family: var(--font-body);
}

.portal-sede-row dd {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    font-family: var(--font-body);
}

.portal-sede-map {
    margin: 12px 0 0;
    font-size: 0.85rem;
}

.sipos-portal--inst .portal-sede-title {
    display: none;
}

.sipos-portal--inst .portal-sede-list {
    max-width: 32rem;
    margin: 0 auto;
}

.sipos-portal--inst .inst-main .portal-sede-row dt {
    font-family: var(--font-body);
    color: var(--portal-muted);
    opacity: 1;
}

.sipos-portal--inst .inst-main .portal-sede-row dd {
    font-family: var(--portal-serif);
    color: var(--portal-text);
}

body.portal-page .portal-site-footer h2,
body.portal-page .portal-site-footer .portal-site-contact-title {
    margin: 0 0 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    font-family: var(--font-body);
}

.portal-site-footer p,
.portal-site-footer li {
    color: rgba(255, 255, 255, 0.88);
}

.portal-site-footer a,
.portal-site-footer .portal-footer-link {
    color: #c5e8f7;
    text-decoration: none;
    transition: color 0.15s;
}

.portal-site-footer a:hover,
.portal-site-footer .portal-footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.portal-site-footer .portal-sede-row dt {
    color: rgba(255, 255, 255, 0.65);
    opacity: 1;
}

.portal-site-footer .portal-sede-row dd {
    color: rgba(255, 255, 255, 0.94);
}

.portal-site-footer .portal-sede-map {
    color: rgba(255, 255, 255, 0.88);
}

.portal-site-contact {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    scroll-margin-top: 130px;
}

.portal-site-contact--page {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    scroll-margin-top: 130px;
}

@media (max-width: 900px) {
    .portal-site-contact,
    .portal-site-contact--page {
        scroll-margin-top: 108px;
    }
}

.portal-site-contact--page .portal-site-contact-title {
    margin: 0 0 14px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--portal-navy);
}

.portal-contact-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0 0 18px;
}

.portal-contact-channel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--portal-navy);
    text-decoration: none;
}

.portal-contact-channel i {
    color: var(--portal-teal);
    width: 1em;
    text-align: center;
}

.portal-contact-channel:hover {
    color: var(--portal-teal);
    text-decoration: underline;
}

.portal-site-contact--page .portal-site-contact-lead {
    color: var(--portal-muted);
}

.portal-site-contact--page .portal-site-contact-lead a,
.portal-site-contact--page .portal-footer-link {
    color: var(--portal-teal);
}

.portal-site-contact--page .portal-sede-row {
    background: #f3f8fb;
    border: 1px solid var(--portal-border);
}

.portal-site-contact--page .portal-sede-row:hover {
    background: #eaf4f9;
}

.portal-site-contact--page .portal-sede-row dt {
    color: var(--portal-muted);
    opacity: 1;
}

.portal-site-contact--page .portal-sede-row dd {
    color: var(--portal-text);
}

.portal-site-contact--page .portal-social-link {
    background: #eaf4f9;
    border-color: var(--portal-border);
    color: var(--portal-navy) !important;
}

.portal-site-contact--page .portal-social-link:hover {
    background: #dceef6;
    color: var(--portal-navy) !important;
}

.portal-site-contact--page .portal-contact-label,
.portal-site-contact--page .portal-contact-form label {
    color: var(--portal-navy);
}

.portal-site-contact--page .portal-contact-form input.form-control,
.portal-site-contact--page .portal-contact-form textarea.form-control {
    border: 1px solid var(--portal-border);
    background: #fff;
}

.portal-site-contact--page .portal-contact-submit {
    background: var(--portal-navy) !important;
    color: #fff !important;
    align-self: flex-end;
    margin-left: auto;
}

.portal-site-contact--page .portal-contact-form {
    align-items: stretch;
}

.portal-site-contact--page .portal-contact-recaptcha-hint {
    color: var(--portal-muted);
}

.sipos-portal--inst .inst-main .portal-sede-list {
    max-width: none;
    margin: 0;
}

.portal-site-contact-split {
    display: grid;
    gap: 28px 36px;
    grid-template-columns: 1fr;
    margin-top: 8px;
}

@media (min-width: 768px) {
    .portal-site-contact-split {
        grid-template-columns: 1fr 1.15fr;
        align-items: start;
    }
}

.portal-site-contact-sede {
    scroll-margin-top: 130px;
}

@media (max-width: 900px) {
    .portal-site-contact-sede {
        scroll-margin-top: 108px;
    }
}

.portal-site-contact-form-col {
    min-width: 0;
}

.portal-site-contact-lead {
    margin: 0 0 18px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
}

.portal-site-contact-lead a {
    font-weight: 600;
}

.portal-contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.portal-contact-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.portal-contact-form .form-group,
.portal-contact-form .portal-contact-field {
    margin-bottom: 0;
}

.portal-contact-label,
.portal-contact-form label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.portal-contact-form input.form-control,
.portal-contact-form textarea.form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.96);
    color: var(--portal-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 10px 12px;
    min-height: 42px;
}

.portal-contact-form textarea.form-control {
    min-height: 112px;
    resize: vertical;
}

.portal-site-footer .portal-contact-form input.form-control::placeholder,
.portal-site-footer .portal-contact-form textarea.form-control::placeholder {
    color: var(--portal-muted);
    opacity: 1;
}

.portal-site-footer .portal-contact-form .invalid-feedback {
    color: #ffc8c4;
    font-size: 0.8rem;
}

.portal-site-footer .portal-contact-form .form-control.is-invalid {
    border-color: #f0a8a3;
    background: #fff;
}

.portal-contact-form-grid {
    display: grid;
    gap: 14px 16px;
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}

@media (min-width: 560px) {
    .portal-contact-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.portal-contact-field--full {
    margin-bottom: 14px;
}

.portal-contact-recaptcha {
    margin: 8px 0 14px;
}

.portal-contact-recaptcha-hint {
    margin: 0 0 14px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
}

.portal-contact-submit {
    margin-top: 2px;
    padding: 11px 22px;
    border: none;
    cursor: pointer;
    background: #fff !important;
    color: var(--portal-navy) !important;
    font-weight: 600;
    border-radius: 6px;
    align-self: flex-start;
}

.portal-contact-flash {
    max-width: 1100px;
    margin: 0 auto 12px;
    padding: 10px 16px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.88rem;
}

.portal-contact-flash--success {
    background: #e8f5e9;
    color: #1b5e20;
}

.portal-contact-flash--danger {
    background: #fdecea;
    color: #b42318;
}

.portal-site-footer-copy {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    opacity: 0.78;
}

/* Institucional */
.sipos-portal--inst {
    max-width: 920px;
}

.sipos-portal--inst .inst-prose,
.sipos-portal--inst .inst-prose p {
    font-family: var(--portal-serif);
}

.sipos-portal--inst .inst-main {
    margin: 0;
}

.sipos-portal--inst .inst-block {
    scroll-margin-top: 130px;
    transition: box-shadow 0.3s ease, transform 0.3s var(--portal-ease);
}

@media (max-width: 900px) {
    .sipos-portal--inst .inst-block {
        scroll-margin-top: 108px;
    }
}

.sipos-portal--inst .inst-block:hover {
    box-shadow: 0 8px 28px rgba(6, 52, 84, 0.1);
}

.sipos-portal--inst .inst-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: transform 0.2s var(--portal-ease), background 0.2s;
}

.sipos-portal--inst .inst-btn:hover {
    transform: translateY(-2px);
}

.sipos-portal--inst .inst-btn--primary {
    background: var(--portal-navy);
    color: #fff;
    border-color: var(--portal-navy);
}

.sipos-portal--inst .inst-btn--outline {
    border-color: var(--portal-teal);
    color: var(--portal-navy);
    background: #fff;
}

.sipos-portal--inst .portal-site-banner-title,
.sipos-portal--inst .portal-site-banner-sub {
    max-width: none;
}

.sipos-portal--inst .portal-site-banner-sub {
    font-weight: 600;
    font-style: italic;
    line-height: 1.4;
}

.sipos-portal--inst .inst-benefit-list a {
    transition: color 0.15s, padding-left 0.2s var(--portal-ease);
}

.sipos-portal--inst .inst-benefit-list a:hover {
    padding-left: 6px;
}

/* —— Beneficios y panel afiliado: mismo lenguaje institucional —— */
.sipos-portal--site {
    max-width: 1100px;
}

.sipos-portal--site:not(.sipos-portal--inst) .portal-section-label {
    text-align: center;
    margin: 0 0 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--portal-border);
}

.sipos-portal--site .portal-section-label .eyebrow {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--portal-muted);
    font-weight: 600;
}

.sipos-portal--site .portal-section-label h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--portal-navy);
    margin: 8px 0 6px;
}

.sipos-portal--site .portal-section-label p {
    font-family: var(--portal-serif);
    font-size: 0.95rem;
    color: var(--portal-muted);
    font-weight: 400;
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.55;
}

.sipos-portal--site .featured,
.sipos-portal--site .news-section {
    margin: 0 0 24px !important;
    border-radius: 8px !important;
    background: var(--portal-surface) !important;
}

.sipos-portal--site .featured-header {
    background: linear-gradient(90deg, var(--portal-navy), var(--portal-teal)) !important;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    font-size: 0.88rem;
    text-transform: uppercase;
}

.sipos-portal--site .featured-header i {
    color: rgba(255, 255, 255, 0.9) !important;
}

.sipos-portal--site .news-title {
    font-family: var(--font-display);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--portal-navy);
    padding: 14px 18px;
    background: #f4f7f9;
    border-bottom: 1px solid var(--portal-border);
}

.sipos-portal--site .news-dot {
    background: var(--portal-teal) !important;
}

.sipos-portal--site .ben-card,
.sipos-portal--site .cat-card,
.sipos-portal--site .beneficio-card {
    border-radius: 6px !important;
    border: 1px solid var(--portal-border) !important;
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(6, 52, 84, 0.05) !important;
    animation: none !important;
}

.sipos-portal--site .ben-icon,
.sipos-portal--site .cat-icon {
    border-radius: 6px !important;
    background: #f0f5f8 !important;
    color: var(--portal-navy) !important;
}

.sipos-portal--site .ben-tag {
    border-radius: 4px !important;
    background: #eef3f6 !important;
    color: var(--portal-teal) !important;
}

.sipos-portal--site .ben-card h3,
.sipos-portal--site .cat-card h3,
.sipos-portal--site .feat-name {
    font-family: var(--font-display);
    color: var(--portal-navy);
}

.sipos-portal--site .feat-item,
.sipos-portal--site .news-item {
    border-radius: 6px !important;
    border-color: var(--portal-border) !important;
}

.sipos-portal--site .featured-link,
.sipos-portal--site .cat-more,
.sipos-portal--site .beneficio-back {
    color: var(--portal-teal) !important;
    font-weight: 600;
}

.sipos-portal--site .home-summary-card {
    border-radius: 14px !important;
    border: 1px solid transparent !important;
    background: linear-gradient(165deg, #ffffff 0%, #f6fafc 100%) !important;
}

.sipos-portal--site .home-summary-card--cupo {
    border-top: 3px solid var(--portal-accent) !important;
}

.sipos-portal--site .home-summary-value {
    font-family: var(--portal-serif);
    color: var(--portal-navy);
}

.sipos-portal--site .home-summary-label {
    color: var(--portal-muted);
    font-family: var(--font-body);
}

.sipos-portal--site .portal-search-field input,
.sipos-portal--site .portal-search select {
    border-radius: 4px !important;
    border: 1px solid var(--portal-border) !important;
    font-family: var(--font-body);
}

.sipos-portal--site .portal-search button,
.sipos-portal--site .portal-search .portal-search-submit {
    border-radius: 4px !important;
    background: var(--portal-navy) !important;
    font-weight: 600;
}

.sipos-portal--site .cupo-card,
.sipos-portal--site .credencial-card,
.sipos-portal--site .beneficio-detail-card {
    border-radius: 14px !important;
    border: 1px solid transparent !important;
    box-shadow: 0 6px 22px rgba(21, 104, 146, 0.08) !important;
}

.sipos-portal--site .cupo-card--main {
    background: linear-gradient(145deg, #fff, #f4f7f9) !important;
}

.sipos-portal--site .beneficio-detail-icon {
    border-radius: 6px !important;
    background: #f0f5f8 !important;
    color: var(--portal-navy) !important;
}

.sipos-portal--site,
.sipos-portal--site .ben-card p,
.sipos-portal--site .cat-count,
.sipos-portal--site .portal-empty,
.sipos-portal--site .feat-desc {
    font-family: var(--font-body);
    color: var(--portal-text);
}

.sipos-portal--site .ben-card h3,
.sipos-portal--site .beneficio-detail-card h1 {
    font-family: var(--font-display);
    color: var(--portal-navy);
}

/* Anular estilo “pill” del CSS legacy en todo el header del sitio */
.portal-site-header .portal-nav a {
    box-shadow: none;
}

.portal-site-header .portal-nav--public a {
    text-transform: none;
}

/* —— Panel afiliado: cupo, credencial, notificaciones, familia, login —— */
.sipos-portal--site .cupo-card {
    background: #fff !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(6, 52, 84, 0.05) !important;
}

.sipos-portal--site .cupo-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--portal-muted);
}

.sipos-portal--site .cupo-value,
.sipos-portal--site .cupo-mini-grid strong {
    font-family: var(--portal-serif) !important;
    color: var(--portal-navy) !important;
}

.sipos-portal--site .cupo-card--main.is-ok .cupo-value {
    color: var(--portal-teal) !important;
}

.sipos-portal--site .cupo-card--main.is-warn .cupo-value {
    color: #b86b00 !important;
}

.sipos-portal--site .cupo-card--main.is-danger .cupo-value {
    color: #b42318 !important;
}

.sipos-portal--site .cupo-bar {
    background: #e2e8ec !important;
    border-radius: 4px !important;
}

.sipos-portal--site .cupo-bar-fill {
    background: linear-gradient(90deg, var(--portal-navy), var(--portal-accent)) !important;
    border-radius: 4px !important;
}

.sipos-portal--site .cupo-hint {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .cupo-order-amount {
    font-family: var(--font-display);
    color: var(--portal-navy);
}

.sipos-portal--site .cupo-orders .news-item {
    background: #fff !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 6px !important;
    transform: none !important;
}

.sipos-portal--site .cupo-orders .news-item:hover {
    border-color: var(--portal-accent) !important;
}

.sipos-portal--site .credencial-card {
    border-radius: 8px !important;
    overflow: hidden;
}

.sipos-portal--site .credencial-card-top {
    background: var(--portal-navy) !important;
}

.sipos-portal--site .credencial-org {
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

.sipos-portal--site .credencial-org-sub {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.78);
}

.sipos-portal--site .credencial-badge {
    border-radius: 4px !important;
    font-family: var(--font-body);
}

.sipos-portal--site .credencial-name {
    font-family: var(--portal-serif);
    font-size: 1.2rem;
    color: var(--portal-navy);
}

.sipos-portal--site .credencial-meta dt {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .credencial-meta dd {
    font-family: var(--font-body);
    color: var(--portal-navy);
}

.sipos-portal--site .credencial-qr-wrap span,
.sipos-portal--site .credencial-hint {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .notif-list,
.sipos-portal--site .familia-list {
    gap: 12px;
}

.sipos-portal--site .notif-item,
.sipos-portal--site .familia-item {
    padding: 18px 20px;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    background: linear-gradient(165deg, #ffffff 0%, #f6fafc 100%) !important;
    box-shadow: 0 4px 16px rgba(21, 104, 146, 0.07);
    transition: transform 0.28s var(--portal-ease), box-shadow 0.28s ease;
}

.sipos-portal--site .notif-item:hover,
.sipos-portal--site .familia-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(21, 104, 146, 0.12);
}

.sipos-portal--site .notif-item-title,
.sipos-portal--site .familia-item-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--portal-navy);
}

.sipos-portal--site .notif-item-date,
.sipos-portal--site .familia-item-meta {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .notif-item-body {
    font-family: var(--portal-serif);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--portal-text);
}

.sipos-portal--site .beneficio-detail {
    padding-top: 0;
}

.sipos-portal--site .beneficio-detail-date {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .beneficio-detail-body {
    font-family: var(--portal-serif);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--portal-text);
}

.sipos-portal--site .ben-tag--soft {
    background: #eef3f6 !important;
    color: var(--portal-navy) !important;
}

.sipos-portal--site .feat-item {
    background: #fff !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 6px !important;
}

.sipos-portal--site .feat-item > i {
    color: var(--portal-teal) !important;
}

.sipos-portal--site .feat-item:hover {
    border-color: var(--portal-accent) !important;
}

.sipos-portal--site .news-item,
.sipos-portal--site .news-item--link {
    background: #fff !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 6px !important;
}

.sipos-portal--site .news-item-title {
    font-family: var(--font-display);
    color: var(--portal-navy);
}

.sipos-portal--site .news-item-date {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .portal-login-section {
    padding-bottom: 32px;
}

.sipos-portal--site .portal-login-card {
    border-radius: 8px !important;
    border: 1px solid var(--portal-border) !important;
    padding: 28px 24px;
}

.sipos-portal--site .portal-login-card label {
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    color: var(--portal-navy) !important;
    font-size: 0.82rem;
}

.sipos-portal--site .portal-login-card .form-control {
    border-radius: 4px !important;
    border-color: var(--portal-border) !important;
    font-family: var(--font-body);
    min-height: 44px;
}

.sipos-portal--site .portal-cta.portal-cta--block {
    width: 100%;
    justify-content: center;
    border-radius: 6px !important;
    background: var(--portal-navy) !important;
    color: #fff !important;
    font-family: var(--font-body);
    font-weight: 600;
    box-shadow: none !important;
}

.sipos-portal--site .portal-cta.portal-cta--block:hover {
    color: #fff !important;
    background: var(--portal-navy-dark) !important;
}

.sipos-portal--site .portal-login-links {
    font-family: var(--font-body);
    color: var(--portal-muted);
}

.sipos-portal--site .portal-login-links a {
    color: var(--portal-teal) !important;
}

.sipos-portal--site .portal-login-form-title {
    font-family: var(--font-display) !important;
}

.sipos-portal--site .portal-empty {
    font-family: var(--font-body);
    color: var(--portal-muted);
    padding: 32px 16px;
}

.sipos-portal--site .beneficio-card,
.sipos-portal--site .ben-card-link {
    font-family: var(--font-body);
}

.sipos-portal--site .portal-cta--sm {
    border-radius: 4px !important;
    background: var(--portal-navy) !important;
    color: #fff !important;
    font-family: var(--font-body);
    font-weight: 600;
    box-shadow: none !important;
}

.sipos-portal--site .portal-search-clear {
    font-family: var(--font-body);
    color: var(--portal-teal) !important;
    font-weight: 600;
}

.sipos-portal--site .ben-more {
    font-family: var(--font-body);
    color: var(--portal-teal);
    font-weight: 600;
}

/* —— Franja de novedades (continuación del banner) —— */
.portal-news-strip {
    position: relative;
    z-index: 2;
    display: block;
    margin: -18px -16px 28px;
    background: linear-gradient(90deg, rgba(18, 104, 145, 0.1) 0%, rgba(42, 168, 207, 0.08) 50%, rgba(18, 104, 145, 0.06) 100%);
    border-bottom: 1px solid rgba(21, 104, 146, 0.12);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.portal-news-strip:hover .portal-news-strip-title,
.portal-news-strip:focus-visible .portal-news-strip-title {
    color: var(--portal-teal);
}

.portal-news-strip:focus-visible {
    outline: 2px solid rgba(42, 168, 207, 0.55);
    outline-offset: -2px;
}

@media (min-width: 1132px) {
    .portal-news-strip {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
    }
}

.portal-news-strip-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-news-strip-label,
.portal-news-strip-title,
.portal-news-strip-date {
    font-family: var(--font-body);
    line-height: 1;
    display: block;
}

.portal-news-strip-label {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--portal-navy);
    opacity: 0.42;
    padding-right: 14px;
    border-right: 1px solid rgba(21, 104, 146, 0.18);
}

.portal-news-strip-track {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 1em;
}

.portal-news-strip-slide {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--portal-ease);
}

.portal-news-strip-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.portal-news-strip-title {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--portal-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-news-strip-date {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--portal-muted);
    opacity: 0.85;
}

.portal-news-strip-controls {
    display: none;
}

.sipos-portal--inst .portal-news-strip {
    margin-top: -18px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .portal-news-strip-inner {
        padding: 0 14px;
        gap: 10px;
        height: 48px;
    }

    .portal-news-strip-date {
        display: none;
    }

    .portal-news-strip-track {
        height: auto;
        min-height: 1.1em;
    }

    .portal-news-strip-title {
        font-size: 0.84rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.25;
    }
}
