
/* ==========================================
   NEXORA - IDENTIDAD VISUAL GENERAL
========================================== */

:root {
    --azul: #c52e15;
    --oscuro: #202020;
    --texto: #626262;
    --fondo: #f7f5f2;

    --nx-acento: #e84625;
    --nx-acento-oscuro: #c52e15;
    --nx-carbon: #202020;
    --nx-blanco: #ffffff;
    --nx-marfil: #f7f5f2;
}

body {
    color: var(--nx-carbon);
}

/* NAVEGACION */

.navbar {
    background: #ffffff;
    box-shadow: 0 3px 20px #00000008;
}

.logo,
.nexora-interior .logo {
    color: #202020;
    letter-spacing: 4px;
    font-weight: 800;
}

.menu a {
    color: #404040;
}

.menu a:hover,
.menu a.activo,
.btn-ingresar {
    color: var(--nx-acento-oscuro);
}

/* BOTONES */

.btn-registro,
.btn-principal,
.nx-boton,
.nx-enviar,
.nc-prestamo {
    background: var(--nx-acento-oscuro);
    color: white;
    border-color: var(--nx-acento-oscuro);
}

.btn-registro:hover,
.btn-principal:hover,
.nx-boton:hover,
.nx-enviar:hover,
.nc-prestamo:hover:not(:disabled) {
    background: #a9230e;
    color: white;
}

.nx-boton-blanco {
    background: #ffffff;
    color: #202020;
    border-color: #ffffff;
}

.nx-boton-blanco:hover {
    background: #f7f5f2;
    color: #c52e15;
}

.nc-prestamo:disabled {
    background: #e7e5e4;
    color: #777;
}

/* TITULOS Y ENLACES */

.subtitulo,
.nx-subtitulo,
.nx-home-enlace,
.nx-home-categoria,
.nx-home-cine span,
.nx-numero {
    color: var(--nx-acento-oscuro);
}

.nexora-interior,
.nx-inicio {
    color: #202020;
    background: white;
}

.nx-suave,
.nx-home-suave,
.seccion-suave,
.contacto {
    background: #f7f5f2;
}

/* SECCIONES OSCURAS */

.nx-filosofia {
    background: #252525;
    color: white;
}

.nx-filosofia p {
    color: #d4d4d4;
}

.nx-etiqueta,
.nx-home-banner-texto > span,
.nx-mundo-texto span {
    color: #ffb49f;
}

/* FOOTER GENERAL */

footer,
.nx-footer,
.nx-home-footer,
.nc-footer {
    background: #202020;
    color: white;
}

.nx-footer p,
.nx-footer small,
.nx-footer-marca p,
.nx-footer-grid a,
.nx-footer-inferior,
.nc-footer p,
.nc-footer small {
    color: #bdbdbd;
}

.nx-footer-grid a:hover {
    color: #ffb49f;
}

/* TARJETAS Y GENEROS */

.nx-home-generos a {
    color: #202020;
    border-color: #e7e2dd;
}

.nx-home-generos a:hover {
    background: #c52e15;
    color: white;
}

.nx-home-libro-info a {
    color: #c52e15;
}

.nx-home-sin-portada {
    background: #303030;
}

.nx-proposito {
    border-color: #e7e2dd;
}

/* FORMULARIOS */

.nx-campo input:focus,
.nx-campo select:focus,
.nx-campo textarea:focus {
    outline: 2px solid #e84625;
    outline-offset: 2px;
}

input[type="checkbox"] {
    accent-color: #c52e15;
}

/* CARRUSEL PRINCIPAL */

.nexora-portada .navbar {
    background: transparent;
    box-shadow: none;
}

.nexora-portada .logo,
.nexora-portada .menu a,
.nexora-portada .btn-ingresar {
    color: white;
}

.nexora-portada .menu a:hover {
    color: #ffb49f;
}

.nexora-indicador.activo {
    background: #e84625;
}

/* ACCESIBILIDAD */

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #e84625;
    outline-offset: 4px;
}

img {
    max-width: 100%;
}

/* TABLETS */

@media (max-width: 1024px) {

    .navbar {
        flex-wrap: wrap;
        gap: 16px;
        padding: 18px 5%;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
    }

    .acciones {
        gap: 12px;
    }

}

/* CELULARES */

@media (max-width: 600px) {

    .navbar {
        justify-content: space-between;
        padding: 15px 4%;
        gap: 14px;
    }

    .navbar .logo {
        font-size: 21px;
    }

    .navbar .menu {
        order: 3;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 18px;
    }

    .navbar .menu a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 13px;
    }

    .navbar .acciones {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .btn-registro,
    .btn-principal {
        padding: 12px 15px;
        font-size: 12px;
    }

    .nc-corazon {
        width: 44px;
        height: 44px;
    }

    .nc-genero,
    .nc-prestamo,
    .nc-buscador button {
        min-height: 44px;
    }

    .nc-buscador input {
        font-size: 16px;
    }

    .nc-buscador {
        padding: 8px 12px;
        gap: 10px;
    }

    .nc-resultados-titulo {
        flex-wrap: wrap;
    }

    .nc-libro-info {
        overflow-wrap: anywhere;
    }

    .nc-portada-texto h3 {
        font-size: 14px;
    }

    .nx-home-seccion,
    .nx-seccion {
        padding: 55px 5%;
    }

    .nx-home-footer {
        padding: 45px 5% 25px;
    }

    .nx-footer-inferior {
        flex-direction: column;
        gap: 12px;
    }

}

@media (max-width: 340px) {

    .nc-grid {
        grid-template-columns: 1fr;
    }

}

/* REDUCIR ANIMACIONES */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }

}

/* ==========================================
   NEXORA - MENU DE USUARIO PROFESIONAL
========================================== */

.nx-navbar .logo {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 5px;
}

.nx-navbar .usuario-portal {
    position: relative;
    max-width: 100%;
}

.nx-cuenta {
    position: relative;
}

/* BOTON DEL PERFIL */

.nx-cuenta .cuenta-boton {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 40px;
    background: transparent;
    color: #202020;
    cursor: pointer;
    list-style: none;
}

.nx-cuenta .cuenta-boton::-webkit-details-marker {
    display: none;
}

.nx-cuenta .cuenta-boton::marker {
    content: "";
}

.nx-cuenta .cuenta-boton::after {
    content: none;
}

.nx-cuenta .cuenta-boton:hover {
    background: #00000006;
}

.nx-cuenta .cuenta-boton:focus:not(:focus-visible) {
    outline: none;
}

.nx-cuenta .cuenta-boton:focus-visible {
    outline: 2px solid #e84625;
    outline-offset: 3px;
}

/* FOTO DE PERFIL */

.nx-avatar {
    position: relative;
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: #eee8e3;
    color: #80351f;
}

.nx-avatar-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 17px;
    font-weight: 600;
}

.nx-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nx-avatar img[hidden] {
    display: none !important;
}

.nx-avatar-grande {
    width: 47px;
    height: 47px;
}

.nx-cuenta .nombre-usuario {
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

/* MENU DESPLEGABLE */

.nx-cuenta .nx-cuenta-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 285px;
    max-width: calc(100vw - 30px);
    padding: 12px;
    border: 1px solid #e9e5e1;
    border-radius: 16px;
    background: #ffffff;
    color: #202020;
    box-shadow: 0 15px 45px #00000018;
    z-index: 1000;
}

.nx-cuenta-cabecera {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px 15px;
}

.nx-cuenta-cabecera > div:last-child {
    min-width: 0;
}

.nx-cuenta-cabecera strong {
    display: block;
    color: #202020;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.nx-cuenta-cabecera small {
    display: block;
    color: #777;
    margin-top: 5px;
    font-size: 12px;
}

.nx-cuenta .nx-cuenta-panel a,
.nx-cuenta .cuenta-salir {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 45px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #404040;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease;
}

.nx-cuenta .nx-cuenta-panel svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nx-cuenta .nx-cuenta-panel a:hover {
    background: #f7f5f2;
    color: #c52e15;
}

.nx-cuenta .cuenta-separador {
    height: 1px;
    margin: 8px 0;
    background: #ebe8e5;
}

.nx-cuenta .cuenta-salir {
    color: #c52e15;
    font-weight: 600;
}

.nx-cuenta .cuenta-salir:hover {
    background: #fff0eb;
}

/* PERFIL SOBRE EL CARRUSEL DE INICIO */

.nexora-portada .nx-cuenta .cuenta-boton,
.nexora-portada .nx-cuenta .nombre-usuario {
    color: white;
}

.nexora-portada .nx-cuenta .cuenta-boton:hover {
    background: #ffffff15;
}

/* TABLETS Y CELULARES */

@media (max-width: 768px) {

    .nx-navbar .logo {
        font-size: 22px;
        letter-spacing: 3px;
    }

    .nx-cuenta .nombre-usuario {
        max-width: 110px;
        font-size: 12px;
    }

    .nx-cuenta .cuenta-boton {
        padding: 6px;
        min-height: 44px;
        gap: 8px;
    }

    .nx-avatar {
        width: 36px;
        height: 36px;
    }

    .nx-cuenta .nx-cuenta-panel {
        width: 275px;
    }

}

@media (max-width: 380px) {

    .nx-cuenta .cuenta-boton .nombre-usuario {
        display: none;
    }

}
