/* Nota de Transparencia: Código generado/refactorizado con asistencia de IA Generativa (Claude Code) bajo la Política ODTI012 del CCS. Requiere supervisión y validación humana permanente. */
/* Novedades del inicio: botón flotante (abajo a la izquierda) y modal con pasos */

.nov_boton {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: #00338d;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.nov_boton:hover,
.nov_boton:focus-visible {
    background: #0058d8;
    transform: translateY(-2px);
}

.nov_boton:focus-visible {
    outline: 3px solid #ffb703;
    outline-offset: 2px;
}

.nov_boton ion-icon {
    font-size: 1.3rem;
}

.nov_contador {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e63946;
    color: #fff;
    font-size: 0.78rem;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* Todas vistas: muestra el total en blanco */
.nov_contador.nov_contador_vistas {
    background: #fff;
    color: #00338d;
    box-shadow: 0 0 0 2px #00338d;
}

.nov_contador.d-none {
    display: none !important;
}

/* Modal */
html.nov_abierto {
    overflow: hidden;
}

.nov_fondo {
    position: fixed;
    inset: 0;
    z-index: 2147483640;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 20, 40, 0.6);
}

.nov_fondo[hidden] {
    display: none;
}

.nov_modal {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px 24px 22px;
    border-radius: 16px;
    background: #fff;
    color: #1b2430;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    outline: none;
}

.nov_cerrar {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5a6472;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.nov_cerrar:hover {
    background: #eef1f5;
}

.nov_titulo {
    margin: 0 0 10px;
    color: #00338d;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.25;
}

.nov_novedad {
    margin: 0 0 14px;
    color: #5a6472;
    font-size: 0.92rem;
}

.nov_novedad {
    margin: 0 36px 2px 0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.nov_progreso {
    margin: 0 0 12px;
    color: #0058d8;
    font-size: 0.85rem;
    font-weight: 600;
}

.nov_imagen {
    margin: 0 0 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f4f8;
    border: 1px solid #e1e6ee;
}

.nov_imagen img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.nov_texto {
    margin: 0 0 16px;
    font-size: 1.05rem;
    line-height: 1.55;
    white-space: pre-line;
}

.nov_puntos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 16px;
}

.nov_puntos button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c3c9d4;
    cursor: pointer;
}

.nov_puntos button.activo {
    width: 26px;
    border-radius: 999px;
    background: #00338d;
}

.nov_acciones {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nov_btn {
    padding: 10px 20px;
    border: 0;
    border-radius: 8px;
    background: #00338d;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.nov_btn:hover {
    background: #0058d8;
}

.nov_btn_sec {
    border: 1px solid #c3c9d4;
    background: #fff;
    color: #1b2430;
}

.nov_btn_sec:hover {
    background: #f1f4f8;
}

.nov_btn:disabled {
    opacity: 0.45;
    cursor: default;
}

/* Dos columnas: títulos a la izquierda, novedad con pasos a la derecha */
.nov_modal {
    display: flex;
    max-width: 1140px;
    height: min(720px, calc(100vh - 32px));
    padding: 0;
    overflow: hidden;
}

.nov_lateral {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    padding: 24px 12px 16px;
    background: #f1f4f8;
    border-right: 1px solid #e1e6ee;
    overflow-y: auto;
}

.nov_lateral_titulo {
    margin: 0 8px 12px;
    color: #00338d;
    font-size: 1.2rem;
    font-weight: 700;
}

.nov_menu {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nov_menu li + li {
    margin-top: 4px;
}

.nov_menu_item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #1b2430;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.3;
    cursor: pointer;
}

.nov_menu_item:hover {
    background: #e3e9f3;
}

.nov_menu_item.activo {
    background: #fff;
    color: #00338d;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 51, 141, 0.12);
}

/* Punto: rojo = sin ver; verde con chulo = vista */
.nov_punto {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    margin-top: 3px;
    border-radius: 50%;
    background: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

.nov_punto.visto {
    position: relative;
    background: #2a9d5c;
    box-shadow: none;
}

.nov_punto.visto::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 2px;
    width: 3px;
    height: 6px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nov_leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 14px 8px 0;
    color: #5a6472;
    font-size: 0.78rem;
}

.nov_leyenda span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nov_leyenda .nov_punto {
    margin-top: 0;
    width: 10px;
    height: 10px;
}

.nov_detalle {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 32px 36px 26px;
    overflow-y: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .nov_modal {
        flex-direction: column;
        height: calc(100vh - 32px);
    }

    /* En celular los títulos pasan arriba como pestañas que se deslizan */
    .nov_lateral {
        flex: 0 0 auto;
        padding: 16px 12px 10px;
        border-right: 0;
        border-bottom: 1px solid #e1e6ee;
    }

    .nov_lateral_titulo {
        margin-right: 40px;
    }

    .nov_menu {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .nov_menu li + li {
        margin-top: 0;
    }

    .nov_menu_item {
        width: max-content;
        max-width: 220px;
        white-space: nowrap;
        overflow: hidden;
    }

    .nov_menu_texto {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nov_leyenda {
        display: none;
    }

    .nov_detalle {
        min-height: 0;
        padding: 18px 16px 16px;
    }
}

@media (max-width: 576px) {
    .nov_boton {
        padding: 12px;
    }

    .nov_boton_texto {
        display: none;
    }

    .nov_modal {
        padding: 24px 16px 16px;
    }

    .nov_titulo {
        font-size: 1.15rem;
    }


    .nov_acciones .nov_btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nov_boton {
        transition: none;
    }
}

/* Portada: presentación grande a la derecha y miniatura en la lista de la izquierda */
.nov_imagen.nov_portada img {
    max-height: 460px;
    object-fit: contain;
}

.nov_menu_item {
    align-items: center;
}

.nov_menu_item .nov_punto {
    margin-top: 0;
}

.nov_menu_portada {
    flex-shrink: 0;
    width: 56px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #e1e6ee;
}

@media (max-width: 768px) {
    .nov_menu_portada {
        width: 40px;
        height: 28px;
    }
}
