/* ============================================================================
   🌟 MI LIBRO FAVORITO — CSS PREMIUM
   Mezcla: Editorial + Revista + Minimalista para Ads
   Optimizado para rendimiento y estética moderna
============================================================================ */

/* -----------------------------------------------------
   🎨 VARIABLES GLOBALES
----------------------------------------------------- */
:root {
    --mlf-primary: #7C3AED;
    /* Morado editorial */
    --mlf-primary-dark: #5B21B6;
    --mlf-accent: #3f37c9;
    /* Azul revista */
    --mlf-text: #222;
    /* Más moderno y claro */
    --mlf-text-light: #555;
    --mlf-bg-light: #F8F6FF;
    /* Fondo suave */
    --mlf-radius: 14px;
    --mlf-shadow: 0 8px 22px rgba(124, 58, 237, 0.08);
    --mlf-shadow-hover: 0 12px 30px rgba(124, 58, 237, 0.15);
}

/* -----------------------------------------------------
   🧍 BODY
----------------------------------------------------- */
body {
    background-color: #ffffff;
    color: var(--mlf-text);
    font-family: "Inter", sans-serif;
    line-height: 1.65;
}

/* ============================================================
   🌟 NAVBAR PREMIUM — Mi Libro Favorito
   Moderno, elegante, animado y optimizado
   Funcionará sin depender de navbar-light (Bootstrap)
============================================================ */

/* CONTENEDOR NAVBAR */
.mlf-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;

    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* LOGO / BRAND */
.mlf-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--mlf-primary) !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mlf-navbar .navbar-brand i {
    color: var(--mlf-primary) !important;
}

/* ITEMS DEL NAV (CLASES NAV-LINK) */
.mlf-navbar .nav-link {
    position: relative;
    font-weight: 500;
    padding: 10px 12px !important;
    color: var(--mlf-text-light) !important;
    transition: color .25s ease;
    white-space: nowrap;
}

/* Línea animada profesional */
.mlf-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: var(--mlf-primary);
    border-radius: 3px;
    transition: width .25s ease;
}

.mlf-navbar .nav-link:hover {
    color: var(--mlf-primary) !important;
}

.mlf-navbar .nav-link:hover::after {
    width: 100%;
}

/* Íconos dentro del menú */
.mlf-navbar .nav-link i {
    color: inherit !important;
    transition: color .25s ease;
}

/* ESTADO ACTIVO */
.mlf-navbar .nav-link.active,
.mlf-navbar .nav-link:focus {
    color: var(--mlf-primary) !important;
}

.mlf-navbar .nav-link.active::after {
    width: 100%;
}

/* DROPDOWN */
.mlf-navbar .dropdown-menu {
    border-radius: var(--mlf-radius);
    border: none;
    padding: 8px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.mlf-navbar .dropdown-item {
    padding: 10px 18px;
    font-weight: 500;
    color: var(--mlf-text) !important;
    transition: .2s ease;
}

.mlf-navbar .dropdown-item:hover {
    background: var(--mlf-bg-light);
    color: var(--mlf-primary) !important;
}

/* BOTONES LOGIN / REGISTER */
.mlf-navbar .btn-primary,
.mlf-navbar .btn-outline-primary {
    border-radius: var(--mlf-radius);
    font-weight: 600;
    padding: 6px 14px;
    font-size: 0.9rem;
}

/* BOTÓN MÓVIL (ICONO) */
.mlf-navbar .navbar-toggler {
    border: none;
}

.mlf-navbar .navbar-toggler-icon {
    filter: brightness(0.4);
}

/* EFECTO 1: Color + Glow Suave en Hover */
.mlf-navbar .nav-link:hover {
    color: var(--mlf-primary) !important;
    text-shadow: 0 0 6px rgba(124, 58, 237, 0.18);
}

/* EFECTO 2: Iconos con micro-movimiento elegante */
.mlf-navbar .nav-link i {
    transition: transform .25s ease, opacity .25s ease;
}

.mlf-navbar .nav-link:hover i {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* EFECTO 3: Subrayado animado más fino y profesional */
.mlf-navbar .nav-link::after {
    height: 2px;
    background: linear-gradient(90deg, var(--mlf-primary), var(--mlf-primary-dark));
    transition: width .22s ease;
}

/* EFECTO 4: Fondo suave en hover (muy ligero, tipo portal editorial) */
.mlf-navbar .nav-item:hover .nav-link {
    background: rgba(124, 58, 237, 0.04);
    border-radius: 8px;
}

/* EFECTO 5: Navbar con sombra suave al hacer scroll */
.mlf-navbar {
    transition: box-shadow .25s ease;
}

.mlf-navbar.navbar-scrolled {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* EFECTO 6: Dropdown más elegante */
.mlf-navbar .dropdown-menu {
    animation: dropdownFade .18s ease forwards;
    transform-origin: top;
    opacity: 0;
}

@keyframes dropdownFade {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quitar cualquier línea de enlace que aparezca por defecto */
.mlf-navbar .nav-link,
.mlf-navbar .nav-link:hover,
.mlf-navbar .nav-link:focus,
.mlf-navbar .nav-link:active {
    text-decoration: none !important;
    box-shadow: none !important;
    border: none !important;
}

.mlf-navbar .navbar-brand,
.mlf-navbar .navbar-brand:hover,
.mlf-navbar .navbar-brand:focus,
.mlf-navbar .navbar-brand:active {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* EFECTO 7: Animación de foco en el link activo */
.mlf-navbar .nav-link.active {
    text-shadow: 0 0 6px rgba(124, 58, 237, 0.18);
    background: rgba(124, 58, 237, 0.05);
    border-radius: 8px;
}
/* -----------------------------------------------------
   🔘 BOTONES
----------------------------------------------------- */
.btn-primary {
    background-color: var(--mlf-primary);
    border-color: var(--mlf-primary);
    border-radius: var(--mlf-radius);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--mlf-primary-dark);
    border-color: var(--mlf-primary-dark);
}

.btn-outline-primary {
    color: var(--mlf-primary);
    border-color: var(--mlf-primary);
    border-radius: var(--mlf-radius);
}

.btn-outline-primary:hover {
    background-color: var(--mlf-primary);
    color: #fff;
}

/* -----------------------------------------------------
   🖼️ IMÁGENES — EFECTO PRO ZOOM + FADE + LIFT
----------------------------------------------------- */

/* Contenedor de la imagen */
.mlf-img {
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    display: block;
}

/* Imagen base */
.mlf-img img {
    width: 100%;
    height: auto;
    transition: transform .45s ease, opacity .35s ease;
    display: block;
}

/* Efecto: zoom suave + ligera elevación */
.mlf-img:hover img {
    transform: scale(1.07);
    opacity: 0.92;
}

/* Sombra suave en el contenedor al hacer hover */
.mlf-img:hover {
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.18);
    transition: box-shadow .35s ease;
}

/* ===========================
   🖼️ Contenedor unificado Home (con efecto MLF)
   =========================== */
.mlf-img-container {
    width: 160px;
    /* Ajusta según tu diseño */
    height: 95px;
    /* Mantén relación 16:9 */
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

/* Imagen interna con tu efecto original */
.mlf-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 🔥 Evita espacio blanco */
    display: block;
    transition: transform .35s ease, filter .35s ease;
}

/* 🔍 Mantiene el efecto MLF zoom */
.mlf-img-container:hover img {
    transform: scale(1.06);
    filter: brightness(1.02);
}
/* -----------------------------------------------------
   📄 TITULOS
----------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    color: var(--mlf-text);
}

h1 {
    font-size: 2rem;
    border-left: 4px solid var(--mlf-primary);
    padding-left: 12px;
    margin-bottom: 1rem;
}

/* -----------------------------------------------------
   📦 CARDS EDITORIALES
----------------------------------------------------- */
.card {
    border: none;
    border-radius: var(--mlf-radius);
    box-shadow: var(--mlf-shadow);
    transition: all .25s ease;
    background-color: #fff;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mlf-shadow-hover);
}

/* -----------------------------------------------------
   📌 ENLACES
----------------------------------------------------- */
a {
    text-decoration: none;
    color: var(--mlf-primary);
    transition: .2s ease;
}

a:hover {
    text-decoration: underline;
}

/* -----------------------------------------------------
   📚 WIDGETS Y SIDEBAR REVISTA
----------------------------------------------------- */
.mlf-feature-card {
    background: #fff;
    padding: 25px;
    border-radius: var(--mlf-radius);
    box-shadow: var(--mlf-shadow);
    transition: all .25s ease;
}

.mlf-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mlf-shadow-hover);
}

.mlf-category-list a {
    display: block;
    padding: 10px 15px;
    border-radius: var(--mlf-radius);
    transition: .2s ease;
    font-weight: 500;
    color: var(--mlf-text);
}

.mlf-category-list a:hover {
    background: var(--mlf-bg-light);
    color: var(--mlf-primary);
    transform: translateX(4px);
}

.mlf-category-list .active-cat a {
    background: var(--mlf-primary);
    color: #fff !important;
}

/* -----------------------------------------------------
   ⭐ BOOK CARDS (Moderno y Premium)
----------------------------------------------------- */
.mlf-book-card {
    border-radius: var(--mlf-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--mlf-shadow);
    transition: all .3s ease;
}

.mlf-book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--mlf-shadow-hover);
}

.mlf-img-wrapper {
    height: 280px;
    overflow: hidden;
}

.mlf-book-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .35s ease;
}

.mlf-book-card:hover .mlf-book-img {
    transform: scale(1.07);
}

/* -----------------------------------------------------
   ⭐ RATING MEJORADO (simple, limpio)
----------------------------------------------------- */
.mlf-stars i {
    color: #ccc;
    font-size: 1rem;
}

.mlf-stars i.active {
    color: #FFD700;
}

/* -----------------------------------------------------
   🔝 TOPBAR
----------------------------------------------------- */
.topbar {
    background-color: #F6F3FF;
    font-size: 0.95rem;
}

/* -----------------------------------------------------
   🦶 FOOTER (más elegante)
----------------------------------------------------- */
.footer-purple {
    background-color: var(--mlf-primary-dark);
    color: #fff;
}

.footer-purple p {
    max-width: 700px;
    margin: 0 auto;
}

.social-footer-icons a {
    color: #fff;
    transition: .2s ease;
}

.social-footer-icons a:hover {
    opacity: .8;
    transform: scale(1.1);
}

/* -----------------------------------------------------
   ✨ ANIMACIONES GLOBALES
----------------------------------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp .55s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* -----------------------------------------------------
   📱 RESPONSIVE
----------------------------------------------------- */
@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}

/* =====================================================================
   📝 ESTILOS PARA EL CONTENIDO DE NOTICIAS
   (TinyMCE frontend rendering — versión PRO)
   Editorial / Responsive / AdSense Safe
===================================================================== */

/* CONTENEDOR PRINCIPAL */
.mlf-article-content {
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #2a2a2a;
    max-width: 880px;
    margin: 25px auto;
    padding: 0 10px;
}

/* PÁRRAFOS */
.mlf-article-content p {
    margin-bottom: 1.4rem;
}

/* TÍTULOS */
.mlf-article-content h1,
.mlf-article-content h2,
.mlf-article-content h3,
.mlf-article-content h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    color: #111;
}

.mlf-article-content h1 {
    font-size: 2.1rem;
}

.mlf-article-content h2 {
    font-size: 1.8rem;
}

.mlf-article-content h3 {
    font-size: 1.5rem;
}

/* LISTAS */
.mlf-article-content ul,
.mlf-article-content ol {
    margin: 1.4rem 0;
    padding-left: 35px;
}

/* LINKS */
.mlf-article-content a {
    color: #7C3AED;
    text-decoration: underline;
}

/* BLOCKQUOTE */
.mlf-article-content blockquote {
    border-left: 4px solid #7C3AED;
    padding: 12px 18px;
    margin: 1.8rem 0;
    background: #faf5ff;
    border-radius: 8px;
    color: #444;
    font-style: italic;
}

/* ALERT BOX */
.mlf-article-content .alert-box {
    padding: 15px;
    background: #ffeeba;
    border-left: 5px solid #f0ad4e;
    margin: 20px 0;
    border-radius: 6px;
}

/* NOTE BOX */
.mlf-article-content .note-box {
    padding: 15px;
    background: #e7f3ff;
    border-left: 5px solid #1e90ff;
    margin: 20px 0;
    border-radius: 6px;
}

/* ======================================================
   🖼️ IMÁGENES INSERTADAS DESDE TINYMCE (PRO)
====================================================== */

.mlf-article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 12px;
}

/* Imágenes alineadas (TinyMCE) */
.mlf-article-content img.alignleft {
    float: left;
    margin: 10px 20px 20px 0;
    max-width: 50%;
}

.mlf-article-content img.alignright {
    float: right;
    margin: 10px 0 20px 20px;
    max-width: 50%;
}

.mlf-article-content img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Portada destacada */
.mlf-article-content .highlight-cover {
    border: 3px solid #7C3AED;
    padding: 5px;
    display: block;
    margin: 30px auto;
    max-width: 100%;
    border-radius: 12px;
}

/* Limpieza de floats */
.mlf-article-content::after {
    content: "";
    display: block;
    clear: both;
}

/* ======================================================
   🎥 VIDEOS EMBEBIDOS (YouTube / Vimeo / iframe)
====================================================== */

.mlf-article-content iframe,
.mlf-article-content embed,
.mlf-article-content video {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 35px auto;
    border-radius: 12px;
}

/* Mantener proporción 16:9 (solución moderna) */
.mlf-article-content iframe[src*="youtube"],
.mlf-article-content iframe[src*="youtu.be"],
.mlf-article-content iframe[src*="vimeo"] {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* ======================================================
   📊 TABLAS
====================================================== */

.mlf-article-content table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
}

.mlf-article-content table td,
.mlf-article-content table th {
    border: 1px solid #ddd;
    padding: 10px;
}

/* HR */
.mlf-article-content hr {
    margin: 2rem 0;
    border-top: 1px solid #ccc;
}

/* ======================================================
   📱 MOBILE
====================================================== */

@media (max-width: 768px) {

    .mlf-article-content {
        font-size: 1rem;
        line-height: 1.7;
        padding: 0 5px;
    }

    .mlf-article-content h1 {
        font-size: 1.6rem;
    }

    .mlf-article-content h2 {
        font-size: 1.4rem;
    }

    .mlf-article-content h3 {
        font-size: 1.25rem;
    }

    /* Imágenes alineadas vuelven a ancho completo */
    .mlf-article-content img.alignleft,
    .mlf-article-content img.alignright {
        float: none;
        max-width: 100%;
        margin: 25px auto;
    }
}

/* 🔥 Asegurar que el menú del usuario esté siempre encima */
.user-dropdown,
.navbar .dropdown-menu {
    position: relative;
    z-index: 9999 !important;
}

.top-thumb {
    width: 90px;
    height: 65px;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
}

.top-thumb .thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   ACCESOS ANDERCODE — navbar público
   Acentos violeta, contraste y estados accesibles
============================================================ */
.mlf-navbar .mlf-auth-item {
    display: flex;
    align-items: center;
}

.mlf-navbar .mlf-auth-btn {
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease,
                box-shadow .2s ease, transform .2s ease;
}

.mlf-navbar .mlf-auth-login {
    color: var(--mlf-primary);
    background: rgba(124, 58, 237, .065);
    border: 1px solid rgba(124, 58, 237, .20);
}

.mlf-navbar .mlf-auth-login:hover {
    color: var(--mlf-primary-dark);
    background: rgba(124, 58, 237, .12);
    border-color: rgba(124, 58, 237, .38);
    transform: translateY(-1px);
}

.mlf-navbar .mlf-auth-register {
    color: #fff;
    background: linear-gradient(120deg, var(--mlf-primary), var(--mlf-primary-dark));
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(124, 58, 237, .24);
}

.mlf-navbar .mlf-auth-register:hover {
    color: #fff;
    box-shadow: 0 7px 18px rgba(124, 58, 237, .32);
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.mlf-navbar .mlf-auth-arrow {
    font-size: .72rem;
    transition: transform .2s ease;
}

.mlf-navbar .mlf-auth-register:hover .mlf-auth-arrow {
    transform: translateX(3px);
}

.mlf-navbar .mlf-auth-btn:focus-visible {
    outline: 3px solid rgba(124, 58, 237, .45);
    outline-offset: 3px;
}

@media (max-width: 991.98px) {
    .mlf-navbar .mlf-auth-item {
        margin: 8px 0 0 !important;
        width: 100%;
    }

    .mlf-navbar .mlf-auth-btn {
        width: 100%;
        padding: 12px 16px;
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mlf-navbar .mlf-auth-btn,
    .mlf-navbar .mlf-auth-arrow {
        transition: none;
    }
    .mlf-navbar .mlf-auth-btn:hover {
        transform: none;
    }
}


/* ==========================================================
   ANDERCODE NAV · Rediseño editorial, desktop y responsive
   No altera componentes Bootstrap ajenos al encabezado.
========================================================== */
.andercode-nav {
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #eee7f8;
    box-shadow: 0 8px 25px rgba(49,25,97,.07);
    padding-block: .75rem !important;
}
.andercode-nav > .container { gap: 1.25rem; }
.andercode-nav .navbar-brand {
    flex-shrink: 0;
    gap: .55rem;
    font-size: 1.3rem;
    letter-spacing: -.045em;
    background: linear-gradient(100deg, #5b21b6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.andercode-nav .navbar-brand i {
    -webkit-text-fill-color: #7c3aed;
    font-size: 1.3rem;
}
.andercode-nav .andercode-nav-links { align-items: center; gap: .12rem; }
.andercode-nav .andercode-nav-links > .nav-item > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .43rem;
    padding: .62rem .7rem !important;
    border-radius: 12px;
    color: #514a5b !important;
    font-size: .88rem;
    font-weight: 650;
    line-height: 1.35;
    text-shadow: none !important;
}
.andercode-nav .andercode-nav-links > .nav-item > .nav-link::after {
    content: none;
}
.andercode-nav .andercode-nav-links > .nav-item > .dropdown-toggle::after {
    content: "";
    display: inline-block;
    position: static;
    width: 0;
    height: 0;
    margin-left: .12rem;
    border-top: .27em solid currentColor;
    border-right: .27em solid transparent;
    border-left: .27em solid transparent;
    border-bottom: 0;
    border-radius: 0;
    background: none;
    opacity: .65;
    transform: none;
}
.andercode-nav .andercode-nav-links > .nav-item > .nav-link:hover,
.andercode-nav .andercode-nav-links > .nav-item > .nav-link.active,
.andercode-nav .andercode-nav-links > .nav-item > .nav-link[aria-expanded="true"] {
    color: #6d28d9 !important;
    background: #f4efff;
}
.andercode-nav .andercode-nav-links > .nav-item > .nav-link i {
    font-size: .94rem;
    color: #7c3aed !important;
}
.andercode-nav .dropdown-menu {
    min-width: 235px;
    padding: .55rem;
    margin-top: .5rem;
    border: 1px solid #eee7f7;
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(42,22,75,.14);
}
.andercode-nav .dropdown-menu .dropdown-header {
    color: #7c3aed;
    font-weight: 800;
    letter-spacing: .06em;
    font-size: .7rem;
    text-transform: uppercase;
}
.andercode-nav .dropdown-menu .dropdown-item {
    min-height: 39px;
    padding: .58rem .7rem;
    border-radius: 9px;
    font-size: .86rem;
    line-height: 1.35;
}
.andercode-nav .dropdown-menu .dropdown-item:hover,
.andercode-nav .dropdown-menu .dropdown-item:focus {
    background: #f4efff;
    color: #5b21b6 !important;
}
/* Keep the current dropdown page in AnderCode's palette, not Bootstrap blue. */
.andercode-nav .dropdown-menu .dropdown-item.active,
.andercode-nav .dropdown-menu .dropdown-item[aria-current="page"],
.andercode-nav .dropdown-menu .dropdown-item:active {
    background: #ede5ff;
    color: #5b21b6 !important;
    font-weight: 650;
}
.andercode-nav .dropdown-menu .dropdown-item.active:hover,
.andercode-nav .dropdown-menu .dropdown-item.active:focus,
.andercode-nav .dropdown-menu .dropdown-item[aria-current="page"]:hover,
.andercode-nav .dropdown-menu .dropdown-item[aria-current="page"]:focus {
    background: #e5d9ff;
    color: #5b21b6 !important;
}
.andercode-nav .dropdown-menu .dropdown-item.active > i:first-child,
.andercode-nav .dropdown-menu .dropdown-item[aria-current="page"] > i:first-child,
.andercode-nav .dropdown-menu .dropdown-item:active > i:first-child {
    color: #5b21b6 !important;
}
.andercode-nav .dropdown-menu .dropdown-item > i:first-child {
    width: 18px;
    color: #7c3aed;
    text-align: center;
}
.andercode-nav .dropdown-divider { border-color: #eee7f7; }
.andercode-nav .andercode-user-menu > .nav-link {
    border: 1px solid #e5d8fa !important;
    background: #faf7ff;
    color: #5b21b6 !important;
    padding-inline: .9rem !important;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.andercode-nav .navbar-toggler {
    padding: .45rem .65rem;
    border: 1px solid #e8ddfa;
    border-radius: 11px;
    background: #f8f5ff;
}
.andercode-nav .navbar-toggler:focus-visible,
.andercode-nav .nav-link:focus-visible,
.andercode-nav .dropdown-item:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .andercode-nav > .container { gap: .5rem; }
    .andercode-nav .andercode-nav-links > .nav-item > .nav-link { padding-inline: .48rem !important; font-size: .8rem; }
    .andercode-nav .navbar-brand { font-size: 1.14rem; }
}
@media (max-width: 991.98px) {
    .andercode-nav .navbar-collapse { padding-top: 1rem; }
    .andercode-nav .andercode-nav-links { align-items: stretch; gap: .25rem; }
    .andercode-nav .andercode-nav-links > .nav-item > .nav-link {
        display: flex;
        width: 100%;
        padding: .85rem 1rem !important;
        justify-content: flex-start;
    }
    .andercode-nav .andercode-user-menu > .nav-link { max-width: none; }
    .andercode-nav .dropdown-menu {
        margin: .25rem 0 .6rem;
        box-shadow: none;
        border: 1px solid #eee7f7;
    }
}
@media (prefers-reduced-motion: reduce) {
    .andercode-nav *,
    .andercode-nav *::before,
    .andercode-nav *::after { animation: none !important; transition: none !important; }
}

/* ANDERCODE · Barra de redes sociales */
.topbar.andercode-socialbar {
    background: linear-gradient(90deg, #faf8ff 0%, #fff 52%, #f8f4ff 100%) !important;
    border-bottom: 1px solid #eee8f7 !important;
    padding: .3rem 0 !important;
}
.andercode-socialbar .social-top-icons {
    gap: .4rem !important;
    flex-wrap: wrap;
}
.andercode-socialbar .social-top-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(124, 58, 237, .055);
    color: #7738e7;
    text-decoration: none;
    transition: transform .2s ease, color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.andercode-socialbar .social-top-icons a:hover {
    transform: translateY(-2px);
    color: #fff;
    background: #7c3aed;
    border-color: #7c3aed;
    box-shadow: 0 5px 13px rgba(124,58,237,.2);
}
.andercode-socialbar .social-top-icons a:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}
.andercode-socialbar .social-top-icons a i {font-size: .83rem;}
@media (max-width: 575.98px) {
    .andercode-socialbar .social-top-icons {gap: .25rem !important;}
    .andercode-socialbar .social-top-icons a {width: 29px;height: 29px;}
}
@media (prefers-reduced-motion: reduce) {
    .andercode-socialbar .social-top-icons a {transition: none;}
    .andercode-socialbar .social-top-icons a:hover {transform: none;}
}

/* ==========================================================
   ANDERCODE FOOTER · Identidad visual y estructura editorial
========================================================== */
.andercode-footer {
    position: relative;
    overflow: hidden;
    padding: 4.25rem 0 0;
    color: #f9f7ff;
    background:
        radial-gradient(ellipse at 8% 8%, rgba(168,85,247,.25), transparent 38%),
        radial-gradient(ellipse at 94% 85%, rgba(100,51,211,.2), transparent 38%),
        #251441;
}
.andercode-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .16;
    pointer-events: none;
}
.andercode-footer > .container { position: relative; z-index: 1; }
.andercode-footer-main { padding-bottom: 3.25rem; }
.andercode-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1.15rem;
    color: #fff;
    font-size: 1.65rem;
    font-weight: 850;
    letter-spacing: -.04em;
    text-decoration: none;
}
.andercode-footer-brand:hover { color: #fff; }
.andercode-footer-brand-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: linear-gradient(135deg, #8b5cf6, #6026c1);
    box-shadow: 0 8px 25px rgba(124,58,237,.3);
    font-size: 1.15rem;
}
.andercode-footer .andercode-footer-description {
    max-width: 445px;
    margin: 0 0 1.55rem;
    color: #cfc4e2;
    font-size: .91rem;
    line-height: 1.85;
}
.andercode-footer .andercode-footer-heading,
.andercode-footer .andercode-footer-social-title {
    margin: 0 0 1.2rem;
    color: #fff;
    font-size: .96rem;
    font-weight: 800;
}
.andercode-footer .andercode-footer-social-title {
    margin-bottom: .8rem;
    font-size: .83rem;
    color: #e4d8f8;
}
.andercode-footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.andercode-footer .andercode-footer-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 37px;
    height: 37px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px;
    background: rgba(255,255,255,.07);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.andercode-footer .andercode-footer-socials a:hover {
    transform: translateY(-3px);
    background: #7c3aed;
    border-color: #a78bfa;
    box-shadow: 0 9px 20px rgba(0,0,0,.18);
    opacity: 1;
}
.andercode-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.andercode-footer-links li + li { margin-top: .8rem; }
.andercode-footer-links a {
    color: #cfc4e2;
    text-decoration: none;
    font-size: .88rem;
    line-height: 1.55;
}
.andercode-footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.andercode-footer-partners { display: grid; gap: .7rem; }
.andercode-footer-partners a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem .75rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: .85rem;
    font-weight: 650;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}
.andercode-footer-partners a:hover {
    color: #fff;
    background: rgba(124,58,237,.3);
    border-color: rgba(196,181,253,.45);
}
.andercode-footer-partners .andercode-footer-external {
    margin-left: auto;
    font-size: .65rem;
    color: #c4b5fd;
}
.andercode-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    padding: 1.3rem 0;
    border-top: 1px solid rgba(255,255,255,.15);
    color: #c8bfda;
    font-size: .79rem;
}
.andercode-footer-signature {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #ded0fc;
}
.andercode-footer a:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 3px; }
@media (max-width: 767.98px) {
    .andercode-footer { padding-top: 3rem; }
    .andercode-footer-main { padding-bottom: 2rem; }
    .andercode-footer-bottom { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .andercode-footer .andercode-footer-socials a,
    .andercode-footer-partners a { transition: none; }
    .andercode-footer .andercode-footer-socials a:hover { transform: none; }
}

/* Identidad del logotipo textual AnderCode: misma marca, más presencia. */
.andercode-nav .andercode-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem .15rem;
    white-space: nowrap;
    text-decoration: none;
    -webkit-text-fill-color: initial;
}
.andercode-nav .andercode-brand > .fa-code {
    color: #7c3aed !important;
    -webkit-text-fill-color: #7c3aed;
    font-size: 1.5rem;
    transition: transform .25s ease;
}
.andercode-nav .andercode-brand-name {
    display: inline-flex;
    font-size: clamp(1.3rem, 1.5vw, 1.55rem);
    font-weight: 900;
    letter-spacing: -.055em;
    line-height: 1;
}
.andercode-nav .andercode-brand-name span:first-child {
    color: #241535;
}
.andercode-nav .andercode-brand-name span:last-child {
    color: #7c3aed;
}
.andercode-nav .andercode-brand-spark {
    align-self: flex-start;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167,139,250,.13);
}
.andercode-nav .andercode-brand:hover > .fa-code {transform: rotate(-8deg);}
.andercode-nav .andercode-brand:hover .andercode-brand-name span:last-child {color: #5b21b6;}
@media (max-width: 575.98px) {
    .andercode-nav .andercode-brand-name {font-size: 1.3rem;}
    .andercode-nav .andercode-brand > .fa-code {font-size: 1.3rem;}
}
@media (prefers-reduced-motion: reduce) {
    .andercode-nav .andercode-brand > .fa-code {transition: none;}
    .andercode-nav .andercode-brand:hover > .fa-code {transform: none;}
}
