/* =================================================== */
/* ============ ANIMACIONES GLOBALES PB&RM =========== */
/* =================================================== */

/* Animación de entrada para el contenido principal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-entrance {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Estado activo para los botones de la sidebar */
.nav-btn.active {
    background-color: #5a5a5a !important;
    /* Un gris más oscuro para resaltar */
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #f8c471;
    /* Un borde sutil para que destaque */
}

/* Mejora del hover general en la sidebar */
.nav-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-btn:hover {
    background-color: #4a4a4a !important;
    transform: translateX(8px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: -4px 0 0 #f8c471;
    /* Un acento de color al hacer hover */
}

/* Transición suave para el menú móvil */
.menu-mobile {
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
}


/* =================================================== */
/* ============ BUSCADOR INTELIGENTE ================ */
/* =================================================== */

.search-container {
    position: relative;
    width: 80%;
    margin: 15px 0;
    z-index: 1100;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    padding-left: 35px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
    transition: box-shadow 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237e7e7e' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.search-input:focus {
    box-shadow: 0 0 8px rgba(248, 196, 113, 0.5);
    border-color: #f8c471;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    border: 1px solid #eee;
}

.search-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #f8f9fa;
}

.search-item .item-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.search-item .item-category {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.search-no-results {
    padding: 10px 15px;
    color: #888;
    font-size: 13px;
    text-align: center;
}

/* Ajustes para la sidebar */
.sidebar .search-container {
    margin: 5px 0 20px 0;
}

/* Ajustes para el menú móvil */
.menu-mobile .search-container {
    width: 90%;
    margin-bottom: 15px;
}