@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";

/* =========================================
   VARIABLES Y UTILIDADES
   ========================================= */
.text-scalabl, .color-scalabl { color: #5b455b !important; }
.text-blanco { color: #fff !important; }
.text-negro { color: #000 !important; }
.text-gray { color: gray !important; }
.text-lightgrey { background-color: lightgrey !important; }
.bg-scalabl { background-color: #5b455b !important; }
.bg-grisclaro { background-color: #f7f7f7 !important; }
.bg-lightgrey { background-color: lightgrey !important; }
.bg-scalabl-new { background-color: #5b455b; }
.turquesa-grow { color: #5CE1E6; }
.no-cursor { cursor: default !important; }

body { font-family: 'Poppins', sans-serif; }
h4, span, p { color: #000; }
a span { color: #563454; }

.pagina-libro-card-descripcion .card-body span,
.pagina-libro-card-descripcion .card-body p {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* =========================================
   BOTONES DE INTERFAZ GENERAL
   ========================================= */

.btn-scalabl {
    color: #fff !important;
    border-color: #5b455b;
    background-color: #5b455b;
}
.btn-scalabl:hover {
    opacity: 0.8;
    background-color: #5b455b;
    border-color: #5b455b;
    color: #fff;
}

.btn-outline-scalabl {
    color: #5b455b;
    border-color: #5b455b;
    background-color: #fff;
}
.btn-outline-scalabl:hover {
    background-color: #5b455b; 
    border-color: #5b455b;
    color: #fff;               
}

/* Botones de Categorías (Temas) */
.btn_tema {
    background-color: #5b455b !important;
    color: #ffffff !important;
    border: 1px solid #5b455b !important;
    font-weight: normal !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
    outline: none !important;
}
.btn_tema:hover, 
.btn_tema.active {
    background-color: #ffffff !important;
    color: #5b455b !important;
    border-color: #5b455b !important;
    cursor: pointer;
}
.btn_tema span {
    font-size: 10px;
    font-weight: normal !important;
    color: inherit;
}

/* Botón Ver Más */
.btn-ver-mas { color: darkblue; text-decoration: underline; }
.btn-ver-mas:hover { cursor: pointer; opacity: 0.8; text-decoration: underline; }

/* WhatsApp Flotante */
.floating {
    position: fixed;
    bottom: 50px;
    right: 50px;
    background-color: #198754;
    width: 65px;
    height: 65px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
}
.float-button {
    margin-top: 16px;
    color: #fff !important;
}
.float-button:hover, .floating:hover {
    color: #FFF;
    transform: scale(1.05);
}

/* =========================================
   BOTONES ESPECIALES (HUB METODOLÓGICO)
   ========================================= */

/* 1. Botones de Libros Relacionados */
.btn-integracion {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    width: 100% !important;
    height: 75px !important;          /* AUMENTADO: Permite 3 líneas */
    
    padding: 0 8px !important;
    background-color: #ffffff !important;
    border: 1px solid #5b455b !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

/* Texto interno del botón de libro */
.btn-integracion span {
    color: #5b455b !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    
    /* Corte de texto a 3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover Desktop */
@media (min-width: 992px) {
    .btn-integracion:hover {
        background-color: #5b455b !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(91, 69, 91, 0.15);
    }
    .btn-integracion:hover span {
        color: #ffffff !important;
    }
}

/* 2. Botón VIP de Acción ("Emprende con...") */
.btn-vip-action {
    background-color: #4a3b4a !important; /* Violeta Oscuro */
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    border-radius: 30px !important;
    padding: 12px 24px !important;
    border: none !important;
    
    /* SIN UPPERCASE (Minúsculas naturales) */
    
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-decoration: none !important;
    white-space: normal;
}

.btn-vip-action:hover {
    background-color: #2c232c !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

/* =========================================
   BUSCADOR Y PAGINACIÓN
   ========================================= */

#tb_buscar {
    border: 0;
    border-top: 2px solid lightgrey;
    border-bottom: 2px solid lightgrey;
    padding: 15px 15px;
    letter-spacing: 1px;
}
#tb_buscar:focus {
    -webkit-box-shadow: none;
    box-shadow: none;
}
.form-control-buscar { 
    border-right: none; 
    font-size: 1rem !important;
    height: auto !important; 
    padding: 0.5rem 1rem !important;
}
.input-group-text { 
    background-color: white; 
    border-left: none; 
}
.btn_lupa {
    cursor: pointer;
    color: lightgrey;
}

.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
}
.pagination li { margin: 0 0.25rem; }
.page-link { 
    color: #563454; 
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}
.page-item.active .page-link { 
    z-index: 3;
    color: #fff;
    background-color: #563454; 
    border-color: #563454; 
}
.page-item.disabled .page-link { 
    color: #ccc; 
    pointer-events: none;
}

.loading-notas { display: none !important; visibility: hidden !important; }

/* =========================================
   CARDS Y LISTADOS (INDEX)
   ========================================= */

.bg-libro { background-color: #fff; }
.bg-libro:hover { box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.36); }
.link-libro { color: #000; text-decoration: none; }
.pagina-libro-card-libro, .pagina-libro-card-descripcion { border: 0; }
.pagina-libro-img-libro { width: 80%; object-fit: contain; }

.card-libro { height: 100%; display: flex; flex-direction: column; }
.card-libro .card-header { background-color: #fff; border-bottom: 0; padding: 0.75rem; }
.card-libro .card-body { display: flex; flex-direction: column; flex-grow: 1; }
.img-libro-portada { max-width: 100%; height: auto; max-height: 260px; object-fit: contain; display: block; margin: 0 auto; }

/* Título H1 en Página de Libro (Grande) */
.titulo-bibliografia {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #000;
    font-size: 1.8rem !important; 
    line-height: 1.2;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    word-wrap: break-word;
}
@media (max-width: 576px) {
    .titulo-bibliografia { 
        font-size: 1.4rem !important; 
        line-height: 1.2;
    }
    
    /* Ajuste Botones Temas en Mobile */
    .btn_tema {
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Ajuste Botón VIP en Mobile */
    .btn-vip-action {
        width: 100%;
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }
}

/* TÍTULO H5 en Cards (Index) */
.titulo-libro-biblio {
    all: unset;
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.25rem 0;
    color: #000;
}
.titulo-limitado {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.6em; 
    margin-bottom: 0.5rem !important;
}
.descripcion-limitada {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 8.5em;         
    max-height: 8.5em;
}
.autor-bibliografia {
    font-size: 1.2rem;
    font-weight: 500;
    color: #555;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   PORTADA Y MENÚ
   ========================================= */
.portada__texto--literatura {
    font-family: 'Poppins', sans-serif;
    text-align: center; color: #ffffff; position: absolute;
    top: 18rem; transform: translateX(400px); max-width: 600px;
}
@media(max-width: 1440px) { .portada__texto--literatura { top: 14rem; transform: translateX(300px); } }
@media(max-width: 1200px) { .portada__texto--literatura { top: 12rem; transform: translateX(150px); } }
@media(max-width: 992px) { .portada__texto--literatura { top: 12rem; transform: translateX(130px); max-width: 350px; } }
@media(max-width: 600px) { .portada__texto--literatura { top: 9.5rem; transform: translateX(50px); max-width: 200px; } }

.portada-pepe { width: 100% !important; max-width: 100% !important; margin: 0 0 48px 0 !important; padding: 0 !important; }
.portada-pepe .banner-link .banner-img { display: block !important; width: 100% !important; height: auto !important; object-fit: contain !important; }

.menu-close-button {
    position: absolute !important; top: 15px; right: 20px; z-index: 100001 !important;
    font-size: 1rem !important; padding: 10px !important; background-color: white !important; border-radius: 5px;
}
@media (max-width: 991.98px) {
    .nuevo-header-nav-container .collapse, .nuevo-header-nav .collapse {
        position: fixed !important; top: 60px !important; width: auto !important; left: 10px !important; right: 10px !important;
        background-color: white !important; border-radius: 12px !important; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
        z-index: 99999; padding: 0 !important;
    }
    .navbar-collapse .navbar-nav { padding: 20px 20px 20px 50px !important; }
    .navbar-collapse .navbar-nav li { border-bottom: 1px solid #f2f2f2; }
}